/* ================================================================
   CHAT HERITAGE - MEDIA QUERIES OTTIMIZZATE
   ================================================================ */

/* ================================================================
   1. MOBILE EXTRA SMALL (320px - 374px)
   ================================================================ */

@media screen and (max-width: 374px) {
    .container {
        padding: 0 0.75rem;
    }

    .social-icons {
        gap: 1rem;
    }

    .social-icons a {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .footer-social h3 {
        font-size: 1.2rem;
    }

    .hero {
        padding: 100px 0.75rem 50px;
    }

    .hero-video {
        min-height: 100vh;
        object-position: center center;
    }

    .hero-overlay {
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.25) 50%, rgba(0, 0, 0, 0.25) 100%);
    }

    .hero-title {
        font-size: clamp(1.8rem, 8vw, 2.2rem);
        line-height: 1.1;
        white-space: normal;
    }

    .hero-subtitle {
        font-size: clamp(1rem, 5vw, 1.2rem);
    }

    .hero-cta {
        font-size: 0.85rem;
        padding: 0.8rem 1.5rem;
        min-width: 180px;
    }

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

    .dropdown button {
        min-width: 100px;
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }

    .content-title,
    .section-title,
    .about-text h3,
    .gallery-info h3 {
        font-family: 'Nunito', sans-serif;
        font-size: 1.8rem;
        font-weight: 800;
        color: var(--text-primary);
        line-height: 1.2;
    }

    .hero-title {
        font-family: 'Nunito', sans-serif;
        font-size: 1.8rem;
        font-weight: 800;
        color: white;
        line-height: 1.2;
    }

    .gallery-info h3 {
        color: white;
    }

    .content-description,
    .section-subtitle,
    .about-text p,
    .leo-description,
    .leo-feature-item p,
    .gallery-info p,
    .stat-label,
    .feature-list li,
    .gallery-tab {
        font-family: 'Nunito', sans-serif;
        font-size: 1rem;
        font-weight: 600;
        color: var(--text-primary);
        line-height: 1.7;
    }

    .hero-subtitle {
        font-family: 'Nunito', sans-serif;
        font-size: 1rem;
        font-weight: 600;
        color: white;
        line-height: 1.7;
    }

    .gallery-info p {
        color: white;
    }

    .content-section {
        margin-bottom: 50px;
    }

    .image-container {
        max-width: 100%;
        margin-bottom: 2rem;
    }

    .placeholder-image {
        width: 100%;
        height: auto;
    }

    .placeholder-image img {
        width: 100%;
        height: auto;
        display: block;
    }
}

/* ================================================================
   2. MOBILE SMALL (375px - 479px)
   ================================================================ */

@media screen and (min-width: 375px) and (max-width: 479px) {
    .hero-video {
        object-position: center center;
    }

    .hero-title {
        font-size: clamp(2rem, 7vw, 2.4rem);
    }

    .hero-subtitle {
        font-size: clamp(1.1rem, 4vw, 1.3rem);
    }

    .content-title,
    .section-title,
    .about-text h3 {
        font-family: 'Nunito', sans-serif;
        font-size: clamp(1.9rem, 6vw, 2.1rem);
        font-weight: 800;
        color: var(--text-primary);
        line-height: 1.2;
    }

    .hero-title {
        font-family: 'Nunito', sans-serif;
        color: white;
    }

    .gallery-info h3 {
        font-family: 'Nunito', sans-serif;
        font-size: clamp(1.9rem, 6vw, 2.1rem);
        font-weight: 800;
        color: white;
        line-height: 1.2;
    }

    .step-badge {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .content-description,
    .section-subtitle,
    .about-text p,
    .leo-description,
    .leo-feature-item p,
    .gallery-info p,
    .stat-label,
    .feature-list li,
    .gallery-tab {
        font-family: 'Nunito', sans-serif;
        font-size: 1.05rem;
        font-weight: 600;
        color: var(--text-primary);
        line-height: 1.7;
    }

    .hero-subtitle {
        font-family: 'Nunito', sans-serif;
        color: white;
    }

    .gallery-info p {
        color: white;
    }

    .content-block {
        padding: 0 0.5rem;
    }

    .image-container {
        max-width: 100%;
        margin-bottom: 2.5rem;
    }

    .placeholder-image {
        width: 100%;
        height: auto;
    }

    .placeholder-image img {
        width: 100%;
        height: auto;
        display: block;
    }
}

/* ================================================================
   3. MOBILE STANDARD (480px)
   ================================================================ */

@media screen and (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .nav-menu li {
        margin-right: 1.5rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .social-icons {
        gap: 1.2rem;
    }

    .social-icons a {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
        min-height: 48px;
        min-width: 48px;
    }

    .hero {
        min-height: 100vh;
    }

    .hero-video-container {
        width: 100%;
        height: 100%;
    }

    .hero-video {
        min-width: 100%;
        min-height: 100vh;
        object-fit: cover;
        object-position: center center;
    }

    .hero-overlay {
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.25) 50%, rgba(0, 0, 0, 0.25) 100%);
    }

    .hero-content {
        margin-bottom: clamp(-60vh, -35vh, -25vh);
    }

    .hero-title {
        font-size: clamp(2.2rem, 6vh, 7rem);
        max-width: 100%;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
    }

    .hero-cta {
        font-size: 0.95rem;
        padding: 0.9rem 2rem;
        width: fit-content;
        min-width: 200px;
        min-height: 44px;
        touch-action: manipulation;
    }

    .content-block {
        padding: 0;
    }

    .image-container {
        max-width: 100%;
        margin-bottom: 2rem;
    }

    .placeholder-image {
        width: 100%;
        height: auto;
    }

    .placeholder-image img {
        width: 100%;
        height: auto;
        display: block;
    }
}

/* ================================================================
   4. MOBILE LARGE (481px - 599px)
   ================================================================ */

@media screen and (min-width: 481px) and (max-width: 599px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero {
        padding: 120px 1.5rem 60px;
    }

    .hero-video {
        object-position: center center;
    }

    .hero-title {
        font-size: clamp(2.4rem, 5vw, 2.8rem);
    }

    .hero-subtitle {
        font-size: clamp(1.3rem, 3.5vw, 1.5rem);
    }

    .hero-cta {
        font-size: 1rem;
        padding: 1rem 2.2rem;
    }

    .main-content {
        padding: 85px 0 65px;
    }

    .content-section {
        margin-bottom: 65px;
    }

    .content-title,
    .section-title,
    .about-text h3 {
        font-family: 'Nunito', sans-serif;
        font-size: clamp(2.1rem, 4vw, 2.4rem);
        font-weight: 800;
        color: var(--text-primary);
        line-height: 1.2;
    }

    .gallery-info h3 {
        font-family: 'Nunito', sans-serif;
        font-size: clamp(2.1rem, 4vw, 2.4rem);
        font-weight: 800;
        color: white;
        line-height: 1.2;
    }

    .content-description,
    .section-subtitle,
    .about-text p,
    .leo-description,
    .leo-feature-item p,
    .gallery-info p,
    .stat-label,
    .feature-list li,
    .gallery-tab {
        font-family: 'Nunito', sans-serif;
        font-size: 1.15rem;
        font-weight: 600;
        color: var(--text-primary);
        line-height: 1.7;
    }

    .gallery-info p {
        color: white;
    }

    .image-container {
        margin-bottom: 2.5rem;
    }

    .placeholder-image {
        width: 100%;
        height: auto;
    }

    .placeholder-image img {
        width: 100%;
        height: auto;
        display: block;
    }
}

/* ================================================================
   5. TABLET PORTRAIT (600px - 767px)
   ================================================================ */

@media screen and (min-width: 600px) and (max-width: 767px) {
    .container {
        padding: 0 2rem;
    }

    .hero {
        padding: 130px 2rem 70px;
    }

    .hero-video {
        object-position: center 40%;
    }

    .hero-overlay {
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.25) 50%, rgba(0, 0, 0, 0.25) 100%);
    }

    .hero-title {
        font-size: clamp(2.8rem, 4vw, 3.2rem);
    }

    .hero-subtitle {
        font-size: clamp(1.4rem, 2.5vw, 1.6rem);
    }

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

    .main-content {
        padding: 90px 0 70px;
    }

    .content-section {
        margin-bottom: 75px;
    }

    .content-title,
    .section-title,
    .about-text h3 {
        font-family: 'Nunito', sans-serif;
        font-size: clamp(2.3rem, 3.5vw, 2.6rem);
        font-weight: 800;
        color: var(--text-primary);
        line-height: 1.2;
    }

    .gallery-info h3 {
        font-family: 'Nunito', sans-serif;
        font-size: clamp(2.3rem, 3.5vw, 2.6rem);
        font-weight: 800;
        color: white;
        line-height: 1.2;
    }

    .content-description,
    .section-subtitle,
    .about-text p,
    .leo-description,
    .leo-feature-item p,
    .gallery-info p,
    .stat-label,
    .feature-list li,
    .gallery-tab {
        font-family: 'Nunito', sans-serif;
        font-size: 1.2rem;
        font-weight: 600;
        color: var(--text-primary);
        line-height: 1.7;
    }

    .gallery-info p {
        color: white;
    }

    .image-container {
        max-width: 80%;
        margin: 0 auto 3rem auto;
    }

    .placeholder-image {
        width: 100%;
        height: auto;
    }

    .placeholder-image img {
        width: 100%;
        height: auto;
        display: block;
    }
}

/* ================================================================
   6. TABLET LANDSCAPE (768px)
   ================================================================ */

@media screen and (max-width: 768px) {
    .hero {
        padding: 120px 1rem 60px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .content-title,
    .section-title,
    .about-text h3 {
        font-family: 'Nunito', sans-serif;
        font-size: 2rem;
        font-weight: 800;
        color: var(--text-primary);
        line-height: 1.2;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .gallery-info h3 {
        font-family: 'Nunito', sans-serif;
        font-size: 2rem;
        font-weight: 800;
        color: white;
        line-height: 1.2;
    }

    .content-description,
    .section-subtitle,
    .about-text p,
    .leo-description,
    .leo-feature-item p,
    .gallery-info p,
    .stat-label,
    .feature-list li,
    .gallery-tab {
        font-family: 'Nunito', sans-serif;
        font-size: 1.2rem;
        font-weight: 600;
        color: var(--text-primary);
        line-height: 1.7;
    }

    .gallery-info p {
        color: white;
    }

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

    .main-content {
        padding: 80px 0 60px;
    }

    .content-section {
        margin-bottom: 60px;
    }

    .image-container {
        margin-bottom: 2rem;
        max-width: 100%;
    }

    .placeholder-image {
        height: auto;
    }
}

@media screen and (min-width: 769px) and (max-width: 1023px) {
    .nav-container {
        padding: 0 2.5rem;
    }

    .hero {
        padding: 130px 2.5rem 80px;
    }

    .hero-video {
        object-position: center 35%;
    }

    .hero-overlay {
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.25) 50%, rgba(0, 0, 0, 0.25) 100%);
    }

    .hero-title {
        font-size: clamp(3.2rem, 3.5vw, 3.8rem);
    }

    .hero-subtitle {
        font-size: clamp(1.5rem, 2vw, 1.7rem);
    }

    .main-content {
        padding: 100px 0 80px;
    }

    .content-section {
        margin-bottom: 85px;
    }

    .content-title,
    .about-text h3 {
        font-family: 'Nunito', sans-serif;
        font-size: clamp(2.4rem, 3vw, 2.8rem);
        font-weight: 800;
        color: var(--text-primary);
        line-height: 1.2;
    }

    .section-title {
        font-family: 'Nunito', sans-serif;
        font-size: clamp(2.6rem, 2.8vw, 3rem);
        font-weight: 800;
        color: var(--text-primary);
        line-height: 1.2;
    }

    .gallery-info h3 {
        font-family: 'Nunito', sans-serif;
        font-size: clamp(2.4rem, 3vw, 2.8rem);
        font-weight: 800;
        color: white;
        line-height: 1.2;
    }

    .content-description,
    .section-subtitle,
    .about-text p,
    .leo-description,
    .leo-feature-item p,
    .gallery-info p,
    .stat-label,
    .feature-list li,
    .gallery-tab {
        font-family: 'Nunito', sans-serif;
        font-size: 1.2rem;
        font-weight: 600;
        color: var(--text-primary);
        line-height: 1.7;
    }

    .gallery-info p {
        color: white;
    }
}

/* ================================================================
   7. DESKTOP SMALL (1024px+)
   ================================================================ */

@media screen and (min-width: 1024px) and (max-width: 1199px) {
    .container {
        max-width: 1200px;
        padding: 0 2.5rem;
    }

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

    .social-icons a {
        width: 55px;
        height: 55px;
        font-size: 1.6rem;
    }

    .social-icons {
        gap: 2rem;
    }

    .hero {
        padding: 140px 2.5rem 90px;
    }

    .hero-video {
        object-position: center 32%;
    }

    .hero-overlay {
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.25) 50%, rgba(0, 0, 0, 0.25) 100%);
    }

    .hero-title {
        font-size: clamp(3.8rem, 3vw, 4.2rem);
    }

    .hero-subtitle {
        font-size: clamp(1.6rem, 1.5vw, 1.8rem);
    }

    .main-content {
        padding: 110px 0 90px;
    }

    .content-section {
        margin-bottom: 100px;
        display: flex;
        flex-direction: row;
        text-align: left;
        align-items: center;
        gap: 4rem;
    }

    .content-section.slide-in-right {
        flex-direction: row-reverse;
    }

    .image-container {
        flex: 0 0 45%;
        margin-bottom: 0;
        max-width: none;
    }

    .content-block {
        flex: 1;
        max-width: none;
        padding: 0;
    }

    .content-title,
    .section-title,
    .about-text h3 {
        font-family: 'Nunito', sans-serif;
        font-size: clamp(2.6rem, 2.2vw, 3rem);
        font-weight: 800;
        color: var(--text-primary);
        line-height: 1.2;
    }

    .gallery-info h3 {
        font-family: 'Nunito', sans-serif;
        font-size: clamp(2.6rem, 2.2vw, 3rem);
        font-weight: 800;
        color: white;
        line-height: 1.2;
    }

    .content-description,
    .section-subtitle,
    .about-text p,
    .leo-description,
    .leo-feature-item p,
    .gallery-info p,
    .stat-label,
    .feature-list li,
    .gallery-tab {
        font-family: 'Nunito', sans-serif;
        font-size: 1.2rem;
        font-weight: 600;
        color: var(--text-primary);
        line-height: 1.7;
    }

    .gallery-info p {
        color: white;
    }
}

/* ================================================================
   8. DESKTOP LARGE (1200px+)
   ================================================================ */

@media screen and (min-width: 1200px) {
    .container {
        max-width: 1400px;
        padding: 0 3rem;
    }

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

    .social-icons a {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }

    .social-icons {
        gap: 2.5rem;
    }

    .hero {
        padding: 150px 3rem 100px;
    }

    .hero-video {
        object-position: center 28%;
    }

    .hero-overlay {
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.25) 50%, rgba(0, 0, 0, 0.25) 100%);
    }

    .hero-title {
        font-size: clamp(4.2rem, 2.5vw, 4.8rem);
    }

    .hero-subtitle {
        font-size: clamp(1.7rem, 1.2vw, 1.9rem);
    }

    .main-content {
        padding: 120px 0 100px;
    }

    .content-section {
        margin-bottom: 120px;
        gap: 5rem;
    }

    .image-container {
        flex: 0 0 50%;
    }

    .content-title,
    .section-title,
    .about-text h3 {
        font-family: 'Nunito', sans-serif;
        font-size: clamp(2.8rem, 2vw, 3.2rem);
        font-weight: 800;
        color: var(--text-primary);
        line-height: 1.2;
    }

    .gallery-info h3 {
        font-family: 'Nunito', sans-serif;
        font-size: clamp(2.8rem, 2vw, 3.2rem);
        font-weight: 800;
        color: white;
        line-height: 1.2;
    }

    .content-description,
    .section-subtitle,
    .about-text p,
    .leo-description,
    .leo-feature-item p,
    .gallery-info p,
    .stat-label,
    .feature-list li,
    .gallery-tab {
        font-family: 'Nunito', sans-serif;
        font-size: 1.2rem;
        font-weight: 600;
        color: var(--text-primary);
        line-height: 1.7;
    }

    .gallery-info p {
        color: white;
    }
}

/* ================================================================
   9. DESKTOP ULTRA WIDE (1600px+)
   ================================================================ */

@media screen and (min-width: 1600px) {
    .hero-video {
        object-position: center 25%;
    }

    .container {
        max-width: 1600px;
        padding: 0 4rem;
    }

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

    .content-section {
        gap: 6rem;
    }
}

/* ================================================================
   10. PERFORMANCE E ACCESSIBILITÀ
   ================================================================ */

/* High DPI displays */
@media screen and (min-resolution: 192dpi),
       screen and (min-resolution: 2dppx) {
    .hero-video,
    .logo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Landscape orientation mobile */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: 80px 1rem 40px;
    }

    .hero-video {
        min-height: 100vh;
        object-fit: cover;
        object-position: center center;
    }

    .hero-overlay {
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.25) 50%, rgba(0, 0, 0, 0.25) 100%);
    }

    .hero-content {
        text-align: left;
        max-width: 50%;
    }

    .hero-title {
        font-size: clamp(2rem, 5vw, 2.8rem);
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: clamp(1rem, 3vw, 1.3rem);
        margin-bottom: 1.5rem;
    }

    .main-content {
        padding: 60px 0 40px;
    }

    .content-section {
        margin-bottom: 50px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .hero-content {
        animation: none;
    }

    .content-section {
        transform: none !important;
        opacity: 1 !important;
    }

    .hero-cta:hover {
        transform: none !important;
    }
}

/* Print styles */
@media print {
    .header,
    .dropdown,
    .footer-social {
        display: none !important;
    }

    .hero {
        background: #000 !important;
        padding: 2rem !important;
        page-break-after: always;
    }

    .hero-video-container,
    .hero-video,
    .hero-overlay {
        display: none !important;
    }

    .hero-content {
        position: relative !important;
        z-index: 10 !important;
    }
}
