/* ==========================================================================
   MEDILEGAL Consulting — Responsive Styles
   Breakpoints:
     1200px — Large desktop
     1024px — Laptop / small desktop
      768px — Tablet / iPad
      640px — Large phone
      480px — Small phone
   ========================================================================== */

/* ---------- LAPTOP (≤ 1200px) ---------- */
@media (max-width: 1200px) {
    :root {
        --text-5xl: 3rem;
        --text-4xl: 2.5rem;
    }

    .sectors-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}


/* ---------- TABLET (≤ 1024px) ---------- */
@media (max-width: 1024px) {
    :root {
        --space-4xl: 6rem;
        --space-3xl: 4rem;
    }

    /* Header — show mobile menu */
    .menu-toggle {
        display: flex;
    }

    .site-nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: var(--white);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        transition: opacity var(--duration-base) ease,
                    visibility var(--duration-base) ease;
        z-index: 999;
    }

    .site-nav.open {
        opacity: 1;
        visibility: visible;
    }

    .nav-list {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .nav-link {
        font-size: var(--text-xl);
        padding: 0.75rem 1.5rem;
    }

    .header-cta {
        display: none;
    }

    /* About */
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    /* Services */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Sectors */
    .sectors-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-xl);
    }
}


/* ---------- TABLET PORTRAIT / iPAD (≤ 768px) ---------- */
@media (max-width: 768px) {
    :root {
        --text-5xl: 2.5rem;
        --text-4xl: 2rem;
        --text-3xl: 1.75rem;
        --space-4xl: 5rem;
        --space-3xl: 3.5rem;
    }

    .container {
        padding: 0 var(--space-md);
    }

    /* Hero */
    .hero-title {
        font-size: var(--text-4xl);
    }

    .hero-title br {
        display: none;
    }

    .hero-arc {
        width: 400px;
        height: 400px;
        right: -25%;
    }

    /* Services */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }

    /* Sectors */
    .sectors-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* YouTube */
    .youtube-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .footer-brand {
        margin-bottom: var(--space-md);
    }
}


/* ---------- LARGE PHONE (≤ 640px) ---------- */
@media (max-width: 640px) {
    :root {
        --text-5xl: 2.25rem;
        --text-4xl: 1.75rem;
        --text-3xl: 1.5rem;
        --text-2xl: 1.25rem;
        --space-4xl: 4rem;
        --space-3xl: 3rem;
    }

    /* Hero */
    .hero {
        padding-top: calc(var(--header-height) + var(--space-xl));
        padding-bottom: var(--space-xl);
    }

    .hero-subtitle {
        font-size: var(--text-base);
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-scroll-indicator {
        display: none;
    }

    /* Section titles */
    .section-title {
        font-size: var(--text-3xl);
    }

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
    }

    /* Sectors */
    .sectors-grid {
        grid-template-columns: 1fr 1fr;
    }

    .sector-card {
        padding: var(--space-md);
    }

    /* YouTube */
    .youtube-grid {
        grid-template-columns: 1fr;
    }

    /* Form */
    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-form-wrap {
        padding: var(--space-lg);
    }

    /* Conferences */
    .conferences-topics {
        gap: 0.375rem;
    }

    .topic-tag {
        font-size: 0.6875rem;
        padding: 0.25rem 0.75rem;
    }

    /* Footer CTA */
    .footer-cta-title {
        font-size: var(--text-2xl);
    }
}


/* ---------- SMALL PHONE (≤ 480px) ---------- */
@media (max-width: 480px) {
    :root {
        --text-5xl: 2rem;
        --text-4xl: 1.625rem;
        --text-3xl: 1.375rem;
        --space-4xl: 3.5rem;
        --space-3xl: 2.5rem;
    }

    .container {
        padding: 0 var(--space-sm);
    }

    .header-inner {
        padding: 0 var(--space-sm);
    }

    .logo-text {
        display: none;
    }

    .hero-eyebrow {
        font-size: 0.6875rem;
    }

    .about-lead {
        font-size: var(--text-base);
    }

    .conferences-text {
        font-size: var(--text-base);
    }

    .pillar {
        padding: var(--space-sm) var(--space-md);
    }

    .service-card {
        padding: var(--space-lg) var(--space-md);
    }

    .sectors-grid {
        grid-template-columns: 1fr;
    }

    .footer-cta {
        padding: var(--space-3xl) 0;
    }
}


/* ---------- HOVER MEDIA QUERY (touch vs pointer) ---------- */
@media (hover: none) {
    .service-card:hover,
    .sector-card:hover,
    .youtube-card:hover,
    .pillar:hover,
    .contact-channel:hover {
        transform: none;
        box-shadow: none;
    }

    .btn:hover {
        transform: none;
        box-shadow: none;
    }
}


/* ---------- HIGH DPI SCREENS ---------- */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-icon {
        image-rendering: -webkit-optimize-contrast;
    }
}
