
/*Large Desktop (1400px and above) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }

    .hero-title {
        font-size: 4.5rem;
    }

    .hero-logo img {
        width: 200px;
        height: 200px;
    }
}

/* Desktop (1200px - 1399px)*/
@media (max-width: 1399px) {
    .container {
        max-width: 1140px;
    }
}

/* Laptop (992px - 1199px)*/
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }

    .hero-title {
        font-size: var(--text-5xl);
    }

    .logo-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .logo-grid.sponsors {
        grid-template-columns: repeat(4, 1fr);
    }

    .footer-content {
        grid-template-columns: 1.2fr 1fr 1fr;
    }
}

/*Tablet (768px - 991px)*/
@media (max-width: 991px) {
    :root {
        --text-5xl: 2.5rem;
        --text-4xl: 2rem;
        --text-3xl: 1.75rem;
    }

    .container {
        max-width: 720px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: var(--bg-white);
        flex-direction: column;
        justify-content: center;
        padding: var(--space-8);
        transition: right var(--transition-base);
        box-shadow: var(--shadow-xl);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        color: var(--text-primary);
        font-size: var(--text-lg);
        padding: var(--space-4);
        width: 100%;
        text-align: center;
    }

    .nav-link:hover {
        background: rgba(0, 146, 70, 0.1);
        color: var(--color-primary);
    }

    .btn-nav {
        margin-left: 0;
        margin-top: var(--space-4);
    }

    /* Hero */
    .hero-logo img {
        width: 150px;
        height: 150px;
    }

    .hero-title {
        font-size: var(--text-4xl);
    }

    .hero-subtitle {
        font-size: var(--text-lg);
    }

    /* Storia */
    .storia-content {
        grid-template-columns: 1fr;
        gap: var(--space-10);
    }

    .storia-video {
        position: relative;
        top: 0;
        max-width: 500px;
        margin: 0 auto;
    }

    /* Spazio */
    .spazio-grid {
        grid-template-columns: 1fr;
        gap: var(--space-10);
    }

    .spazio-image {
        order: -1;
        max-width: 400px;
        margin: 0 auto;
    }

    .spazio-content {
        text-align: center;
    }

    .spazio-content .section-title {
        text-align: center;
    }

    .spazio-content .title-decoration {
        margin-left: auto;
        margin-right: auto;
    }

    /* Mission */
    .mission-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    /* Progetti Carousel */
    .project-card {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .project-image {
        aspect-ratio: 16/9;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
    }

    /* Eventi */
    .eventi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Collaborazioni */
    .logo-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .logo-grid.sponsors {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Iscrizione */
    .section-iscrizione::before {
        display: none;
    }

    .iscrizione-content {
        grid-template-columns: 1fr;
        gap: var(--space-10);
    }

    .iscrizione-text {
        text-align: center;
    }

    .iscrizione-text .section-title {
        text-align: center;
    }

    .iscrizione-text .title-decoration {
        margin-left: auto;
        margin-right: auto;
    }

    .iscrizione-cta {
        text-align: center;
        justify-content: center;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-8);
    }

    .footer-brand {
        grid-column: 1 / -1;
        text-align: center;
    }

    .footer-brand img {
        margin: 0 auto var(--space-4);
    }
}

/* Mobile Large (576px - 767px)*/
@media (max-width: 767px) {
    :root {
        --text-5xl: 2rem;
        --text-4xl: 1.75rem;
        --text-3xl: 1.5rem;
        --text-2xl: 1.25rem;
    }

    .container {
        max-width: 540px;
        padding: 0 var(--space-4);
    }

    .section {
        padding: var(--space-16) 0;
    }

    .section-header {
        margin-bottom: var(--space-10);
    }

    /* Hero */
    .hero-content {
        padding: var(--space-4);
    }

    .hero-logo img {
        width: 120px;
        height: 120px;
    }

    .hero-cta {
        flex-direction: column;
        gap: var(--space-3);
    }

    .hero-cta .btn {
        width: 100%;
        max-width: 280px;
    }

    /* Storia Quote */
    .storia-quote blockquote {
        font-size: var(--text-xl);
    }

    /* Eventi */
    .eventi-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    /* Collaborazioni */
    .logo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }

    .logo-grid.sponsors {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Contatti */
    .contatti-grid {
        flex-direction: column;
        align-items: center;
    }

    .social-card {
        width: 100%;
        max-width: 280px;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links,
    .footer-legal {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: var(--space-6);
    }

    /* Modal */
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .modal-body {
        padding: var(--space-6);
    }

    .modal-body h2 {
        font-size: var(--text-2xl);
    }
}

/*Mobile Small (below 576px)*/
@media (max-width: 575px) {
    :root {
        --text-5xl: 1.75rem;
        --text-4xl: 1.5rem;
        --text-3xl: 1.25rem;
        --text-2xl: 1.125rem;
        --text-xl: 1rem;
    }

    .container {
        padding: 0 var(--space-3);
    }

    /* Navigation */
    .nav-logo span {
        display: none;
    }

    .nav-logo img {
        width: 40px;
        height: 40px;
    }

    .nav-menu {
        width: 100%;
        max-width: none;
    }

    /* Hero */
    .hero-logo img {
        width: 100px;
        height: 100px;
    }

    .hero-tagline {
        font-size: var(--text-base);
    }

    /* Buttons */
    .btn {
        padding: var(--space-3) var(--space-6);
        font-size: var(--text-sm);
    }

    /* Cards */
    .mission-card {
        padding: var(--space-6);
    }

    .card-icon {
        width: 60px;
        height: 60px;
    }

    .card-icon svg {
        width: 30px;
        height: 30px;
    }

    /* Iscrizione */
    .step {
        flex-direction: column;
        text-align: center;
    }

    .iscrizione-card {
        padding: var(--space-6);
    }

    /* Carousel */
    .carousel-btn {
        display: none;
    }

    .carousel-container {
        padding: 0;
    }

    .carousel-slide {
        padding: 0;
    }

    .project-content {
        padding: var(--space-6);
    }

    /* Collaborazioni */
    .logo-grid {
        grid-template-columns: 1fr 1fr;
    }

    .logo-item {
        padding: var(--space-4);
        min-height: 80px;
    }

    /* Section spacing */
    .section {
        padding: var(--space-12) 0;
    }

    .section-header {
        margin-bottom: var(--space-8);
    }
}

/* Touch Device */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
    }

    .evento-card:hover {
        transform: none;
    }

    .evento-overlay {
        opacity: 1;
    }

    .mission-card:hover {
        transform: none;
    }

    .logo-item:hover {
        transform: none;
    }

    .social-card:hover {
        transform: none;
    }

    /* Increase touch targets */
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .btn {
        min-height: 44px;
    }

    .carousel-btn {
        min-width: 44px;
        min-height: 44px;
    }
}

/* High Resolution Displays*/
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-logo img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Print Styles*/
@media print {
    .navbar,
    .hero-scroll,
    .carousel-btn,
    .social-card,
    .footer {
        display: none !important;
    }

    .section {
        padding: 1rem 0;
        page-break-inside: avoid;
    }

    .hero {
        min-height: auto;
        padding: 2rem 0;
    }

    .hero-bg {
        background: none;
    }

    .hero-title,
    .hero-subtitle {
        color: #000 !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    .btn {
        border: 1px solid #000;
        background: none;
        color: #000;
    }
}

/*Landscape Mode on Mobile*/
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: var(--space-20) 0;
    }

    .hero-logo img {
        width: 80px;
        height: 80px;
    }

    .hero-scroll {
        display: none;
    }

    .nav-menu {
        padding-top: var(--space-16);
        justify-content: flex-start;
    }
}

/*Dark Mode Suppor*/
@media (prefers-color-scheme: dark) {
    :root {
        --bg-light: var(--color-gray-900);
        --bg-white: var(--color-gray-800);
        --text-primary: var(--color-gray-100);
        --text-secondary: var(--color-gray-300);
        --text-muted: var(--color-gray-500);
    }
}
