/* ================================================
           THOPOS - STILI UNIFICATI TUTORIAL
        ================================================ */

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* ================================================
           HEADER E NAVIGAZIONE
        ================================================ */

.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(26, 51, 38, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
    border-bottom: 1px solid white;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    height: 40px;
    filter: drop-shadow(0 0 10px rgba(0, 255, 136, 0.3));
    transition: all 0.3s ease;
}

.logo:hover {
    filter: drop-shadow(0 0 15px rgba(0, 255, 136, 0.5));
    transform: scale(1.05);
}

.nav-container a {
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: #00ff88;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #00ff88, #00cc66);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* Menu Hamburger - Fix per mobile */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
    position: relative;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
    display: block;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
    background: white;
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
    background: white;
}

/* ================================================
           HERO SECTION GENERALE
        ================================================ */

.hero {
    min-height: 100vh;
    padding-top: 80px;
    padding-bottom: 2rem;
    background: linear-gradient(135deg, #1a3326 0%, #2d5942 50%, #0f4c2e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M0,0 L50,50 L100,0 Z" fill="none" stroke="%23ffffff10" stroke-width="0.5"/><path d="M0,50 L50,100 L100,50 Z" fill="none" stroke="%23ffffff10" stroke-width="0.5"/></svg>') repeat;
    opacity: 0.1;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

.hero-content {
    text-align: center;
    color: white;
    z-index: 2;
    max-width: 900px;
    padding: 0 2rem;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    margin-top: -2rem;
    background: linear-gradient(45deg, #00ff88, #ffffff, #00cc66);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 3s ease-in-out infinite alternate;
    font-weight: bold;
    font-style: italic;
}

@keyframes glow {
    from {
        filter: drop-shadow(0 0 20px rgba(0, 255, 136, 0.5));
    }
    to {
        filter: drop-shadow(0 0 30px rgba(0, 255, 136, 0.8));
    }
}

.hero p {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    font-style: italic;
    opacity: 0.8;
}

/* ================================================
           PAGE HEADER TUTORIAL
        ================================================ */

.page-header {
    background: linear-gradient(135deg, #1a3326 0%, #2d5942 50%, #0f4c2e 100%);
    padding: 8rem 0 4rem;
    margin-top: 80px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    border: none;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M0,0 L50,50 L100,0 Z" fill="none" stroke="%23ffffff10" stroke-width="0.5"/><path d="M0,50 L50,100 L100,50 Z" fill="none" stroke="%23ffffff10" stroke-width="0.5"/></svg>') repeat;
    opacity: 0.1;
}

.page-header h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #00ff88, #ffffff, #00cc66);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
    z-index: 2;
    position: relative;
}

/* Icona tutorial (berretto diploma) */
.tutorial-graduation-icon {
    font-size: 4rem;
    color: #00ff88;
    margin-bottom: 1.5rem;
    display: block;
    z-index: 2;
    position: relative;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* ================================================
           PULSANTI CTA
        ================================================ */

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.hero-btn,
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    background: linear-gradient(45deg, #00b366, #008a4d);
    color: white;
    min-width: 160px;
    border: none;
    cursor: pointer;
    text-align: center;
}

.hero-btn:hover,
.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 179, 102, 0.4);
    background: linear-gradient(45deg, #00cc73, #009955);
    color: white;
    text-decoration: none;
}

.cta-button:active {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 179, 102, 0.3);
}

/* Variante bianca */
.cta-button.white {
    background: linear-gradient(45deg, #ffffff, #f0f0f0);
    color: #2d5942;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.cta-button.white:hover {
    background: linear-gradient(45deg, #f8f8f8, #e8e8e8);
    color: #1a3326;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
}

/* ================================================
           LAYOUT GENERALE
        ================================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

.section-alt {
    background: #f8f9fa;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 3rem;
    color: #2d5942;
}

.text-center {
    text-align: center;
}

/* ================================================
           FEATURE SECTIONS
        ================================================ */

.feature-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 6rem;
}

.feature-section:nth-child(even) {
    direction: rtl;
}

.feature-section:nth-child(even) > * {
    direction: ltr;
}

.feature-content {
    padding: 2rem 0;
}

.feature-content h2 {
    font-size: 2.5rem;
    color: #2d5942;
    margin-bottom: 1.5rem;
}

.feature-content p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.feature-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, #00ff88, #00cc66);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.3);
    margin-right: 1rem;
    margin-bottom: 1rem;
}

.feature-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 255, 136, 0.5);
}

.feature-image,
.video-container {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #2d5942, #1a3326);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-container:hover,
.feature-image:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.video-thumbnail,
.feature-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(0, 255, 136, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    transition: all 0.3s ease;
}

.play-button:hover {
    background: rgba(0, 255, 136, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    color: #00ff88;
}

.feature-icon img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

/* ================================================
           SEZIONI TUTORIAL SPECIFICHE
        ================================================ */

.tutorial-category {
    margin-bottom: 3rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.category-header {
    background: linear-gradient(135deg, #2d5942, #1a3326);
    color: white;
    padding: 2rem;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.category-header:hover {
    background: linear-gradient(135deg, #1a3326, #0f2019);
}

.category-header h3 {
    margin: 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.category-icon {
    width: 40px;
    height: 40px;
    background: rgba(0, 255, 136, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.category-description {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0.5rem 0 0 0;
}

.expand-icon {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.category-header.active .expand-icon {
    transform: translateY(-50%) rotate(180deg);
}

.tutorial-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.tutorial-list.active {
    max-height: 5000px;
    transition: max-height 0.5s ease-in;
}

.tutorial-item {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

.tutorial-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

.tutorial-item:last-child {
    border-bottom: none;
}

.tutorial-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, #00ff88, #00cc66);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.tutorial-content {
    flex: 1;
}

.tutorial-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #2d5942;
    margin-bottom: 0.5rem;
}

.tutorial-description {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
}

.tutorial-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #888;
}

.tutorial-badge {
    background: rgba(0, 255, 136, 0.1);
    color: #00cc66;
    padding: 0.2rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.tutorial-thumbnail {
    cursor: pointer;
}

.youtube-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 1rem 0;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.youtube-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

.search-box {
    position: relative;
    max-width: 500px;
    margin: 0 auto 3rem;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem 1rem 3rem;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #00ff88;
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #00ff88;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: #666;
}

.youtube-channel-section {
    background: linear-gradient(135deg, #ff0000, #cc0000);
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin: 4rem 0;
    border-radius: 20px;
}

.youtube-channel-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.youtube-channel-button {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 2.5rem;
    background: white;
    color: #ff0000;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-top: 2rem;
}

.youtube-channel-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.youtube-icon {
    width: 200px;
    height: 113px;
    border-radius: 8px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.youtube-icon:hover {
    transform: scale(1.1);
}

/* ================================================
           YOUTUBE SECTION
        ================================================ */

.youtube-section {
    background: linear-gradient(135deg, #2d5942, #1a3326);
    color: white;
    text-align: center;
    padding: 6rem 0;
}

.youtube-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: #ff0000;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.3);
}

.youtube-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 0, 0, 0.5);
}

/* ================================================
           FOOTER
        ================================================ */

.footer {
    background: #1a3326;
    color: white;
    padding: 3rem 0 1rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0;
}

.social-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.social-links a:hover {
    color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
    transform: translateY(-2px);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #00ff88;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 0.8;
}

.copyright {
    font-size: 1.1rem;
    font-weight: bold;
    color: #00ff88;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 255, 136, 0.3);
}

/* ================================================
           ANIMAZIONI
        ================================================ */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ================================================
           MEDIA QUERIES - RESPONSIVE DESIGN
        ================================================ */

/* Tablet */
@media (max-width: 1024px) {
    .page-header {
        padding: 6rem 0 3rem;
    }

    .page-header h1 {
        font-size: 3rem;
    }

    .tutorial-graduation-icon {
        font-size: 3.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1.5rem;
    }
}

/* Mobile medio */
@media (max-width: 768px) {
    /* Menu Mobile */
    .nav-menu {
        position: fixed;
        top: 77px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 77px);
        background: rgba(26, 51, 38, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 2rem;
        padding-top: 3rem;
        transition: left 0.3s ease;
        z-index: 999;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        opacity: 0;
        transform: translateX(-50px);
        transition: all 0.3s ease;
    }

    .nav-menu.active li {
        opacity: 1;
        transform: translateX(0);
    }

    .nav-menu.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-menu.active li:nth-child(2) { transition-delay: 0.2s; }
    .nav-menu.active li:nth-child(3) { transition-delay: 0.3s; }
    .nav-menu.active li:nth-child(4) { transition-delay: 0.4s; }
    .nav-menu.active li:nth-child(5) { transition-delay: 0.5s; }
    .nav-menu.active li:nth-child(6) { transition-delay: 0.6s; }

    .nav-menu a {
        font-size: 1.4rem;
        padding: 1rem;
        color: white;
        width: 100%;
        text-align: center;
        display: block;
    }

    .hamburger {
        display: flex;
        z-index: 1001;
    }

    /* Fix per header mobile */
    .header {
        padding: 0.8rem 0;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .logo {
        height: 35px;
    }

    /* Hero generale responsive */
    .hero {
        padding-top: 90px;
        padding-bottom: 2rem;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .hero-content {
        padding: 0 1rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: calc(100vh - 140px);
    }

    .hero h1 {
        font-size: 2.2rem;
        margin-top: 0;
        line-height: 1.1;
        margin-bottom: 1rem;
    }

    .hero p {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    /* Page Header responsive */
    .page-header {
        padding: 5rem 0 3rem;
        margin-top: 77px;
    }

    .page-header h1 {
        font-size: 2.2rem;
        line-height: 1.1;
        margin-bottom: 1rem;
    }

    .tutorial-graduation-icon {
        font-size: 2.8rem;
        margin-bottom: 1rem;
    }

    /* Layout responsive */
    .container {
        padding: 0 1rem;
    }

    .section {
        padding: 4rem 0;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    /* Feature sections responsive */
    .feature-section {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 4rem;
    }

    .feature-section:nth-child(even) {
        direction: ltr;
    }

    .feature-content {
        padding: 1rem 0;
    }

    .feature-content h2 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

    .feature-content p {
        font-size: 1rem;
        line-height: 1.6;
    }

    .feature-image,
    .video-container {
        height: 250px;
    }

    /* Pulsanti responsive */
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        margin-top: 2rem;
    }

    .hero-btn,
    .cta-button {
        width: 100%;
        max-width: 250px;
        font-size: 0.95rem;
        padding: 0.8rem 1.5rem;
        min-width: auto;
        margin-bottom: 0.5rem;
    }

    .feature-button {
        display: block;
        width: 100%;
        max-width: 200px;
        text-align: center;
        margin: 0 auto 1rem;
    }

    /* Tutorial responsive */
    .tutorial-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.2rem 1.5rem;
    }

    .tutorial-icon {
        margin-bottom: 0.5rem;
    }

    .category-header {
        padding: 1.5rem;
    }

    .category-header h3 {
        font-size: 1.3rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .expand-icon {
        position: static;
        transform: none;
        margin-top: 0.5rem;
    }

    .category-header.active .expand-icon {
        transform: rotate(180deg);
    }

    /* Stats responsive */
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
        margin: 2rem 0;
    }

    .stat-card {
        padding: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    /* YouTube responsive */
    .youtube-channel-content {
        padding: 0 1rem;
    }

    .youtube-channel-button {
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    .youtube-icon {
        width: 150px;
        height: 85px;
    }

    /* Footer responsive */
    .social-links {
        gap: 1rem;
        margin: 1.5rem 0;
    }

    .social-links a {
        width: 35px;
        height: 35px;
    }

    .footer-links {
        gap: 1rem;
        flex-direction: column;
        margin-bottom: 1.5rem;
    }

    .copyright {
        font-size: 1rem;
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }
}

/* Mobile piccolo */
@media (max-width: 480px) {
    /* Header fix smartphone */
    .header {
        padding: 0.7rem 0;
        border-bottom: 1px solid white;
    }

    .nav-container {
        padding: 0 0.8rem;
    }

    .logo {
        height: 32px;
    }
    /* Hero generale smartphone */
    .hero {
        padding-top: 80px;
        padding-bottom: 1.5rem;
    }

    .hero h1 {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    /* Page Header smartphone */
    .page-header {
        padding: 4.5rem 0 2.5rem;
        margin-top: 60px;
        border-top: none;
        border: none;
    }

    .page-header h1 {
        font-size: 1.8rem;
        line-height: 1.1;
    }

    .tutorial-graduation-icon {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }

    /* Layout smartphone */
    .container {
        padding: 0 0.8rem;
    }

    .section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }

    .feature-content h2 {
        font-size: 1.6rem;
    }

    .feature-content p {
        font-size: 0.95rem;
    }

    .feature-image,
    .video-container {
        height: 200px;
        font-size: 1rem;
    }

    /* Pulsanti smartphone */
    .hero-btn,
    .cta-button {
        font-size: 0.9rem;
        padding: 0.7rem 1.2rem;
        max-width: 220px;
    }

    .feature-button {
        font-size: 0.9rem;
        padding: 0.8rem 1.5rem;
        max-width: 180px;
    }

    /* Tutorial smartphone */
    .tutorial-item {
        padding: 1rem 1rem;
    }

    .category-header {
        padding: 1.2rem;
    }

    .category-header h3 {
        font-size: 1.1rem;
    }

    .tutorial-title {
        font-size: 1rem;
    }

    .tutorial-description {
        font-size: 0.9rem;
    }

    .tutorial-meta {
        font-size: 0.8rem;
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .tutorial-badge {
        font-size: 0.75rem;
        padding: 0.15rem 0.6rem;
    }

    /* Stats smartphone */
    .stat-card {
        padding: 1rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .stat-label {
        font-size: 0.9rem;
    }

    /* Search box smartphone */
    .search-input {
        padding: 0.8rem 1.2rem 0.8rem 2.5rem;
        font-size: 0.95rem;
    }

    .search-icon {
        left: 0.8rem;
    }

    /* YouTube smartphone */
    .youtube-channel-section {
        padding: 3rem 0;
        margin: 3rem 0;
        border-radius: 15px;
    }

    .youtube-channel-button {
        padding: 0.9rem 1.8rem;
        font-size: 0.95rem;
        gap: 0.8rem;
    }

    .youtube-icon {
        width: 120px;
        height: 68px;
    }

    /* Footer smartphone */
    .social-links a {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .footer-links {
        font-size: 0.9rem;
    }

    .copyright {
        font-size: 0.9rem;
    }

    /* Menu hamburger smartphone */
    .hamburger {
        padding: 3px;
    }

    .hamburger span {
        width: 22px;
        height: 2.5px;
        margin: 2.5px 0;
    }

    .nav-menu a {
        font-size: 1.3rem;
        padding: 0.8rem;
    }
}

/* Mobile molto piccolo */
@media (max-width: 360px) {
    .page-header {
        padding: 4rem 0 2rem;
    }

    .page-header h1 {
        font-size: 1.6rem;
    }

    .tutorial-graduation-icon {
        font-size: 2rem;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .container {
        padding: 0 0.6rem;
    }

    .tutorial-item {
        padding: 0.8rem;
    }

    .category-header {
        padding: 1rem;
    }

    .stat-card {
        padding: 0.8rem;
    }

    .stat-number {
        font-size: 1.6rem;
    }

    .youtube-icon {
        width: 100px;
        height: 56px;
    }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding-top: 70px;
        padding-bottom: 1rem;
    }
    
    .hero-content {
        min-height: calc(100vh - 120px);
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 1.6rem;
        margin-bottom: 0.5rem;
    }

    .hero p {
        font-size: 0.9rem;
        margin-bottom: 0.8rem;
    }

    .hero-subtitle {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }

    .page-header {
        padding: 3rem 0 2rem;
    }

    .page-header h1 {
        font-size: 1.6rem;
        margin-bottom: 0.8rem;
    }

    .tutorial-graduation-icon {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }

    .hero-buttons {
        margin-top: 1rem;
        gap: 0.5rem;
    }

    .hero-btn,
    .cta-button {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .tutorial-item {
        padding: 1rem;
        flex-direction: row;
        text-align: left;
    }

    .category-header {
        padding: 1rem 1.5rem;
    }

    .category-header h3 {
        font-size: 1rem;
        flex-direction: row;
        gap: 1rem;
    }

    .expand-icon {
        position: absolute;
        right: 1.5rem;
        top: 50%;
        transform: translateY(-50%);
        margin-top: 0;
    }

    .category-header.active .expand-icon {
        transform: translateY(-50%) rotate(180deg);
    }
}

/* Correzione per Safari iOS */
@supports (-webkit-touch-callout: none) {
    .hero {
        min-height: calc(100vh + env(safe-area-inset-top));
        padding-top: calc(80px + env(safe-area-inset-top));
    }

    .page-header {
        padding-top: calc(8rem + env(safe-area-inset-top));
        margin-top: calc(80px + env(safe-area-inset-top));
    }
    
    @media (max-width: 768px) {
        .page-header {
            padding-top: calc(5rem + env(safe-area-inset-top));
            margin-top: calc(77px + env(safe-area-inset-top));
        }
    }
    
    @media (max-width: 480px) {
        .page-header {
            padding-top: calc(4.5rem + env(safe-area-inset-top));
        }
    }
}