/* ============================================
   MAJESTIC HEALTH - Responsive Styles
   Mobile-First Breakpoints
   ============================================ */

/* ===== LARGE DESKTOP (1280px+) ===== */
@media (min-width: 1280px) {
    .container {
        padding-left: var(--space-8);
        padding-right: var(--space-8);
    }
}

/* ===== DESKTOP (1024px - 1279px) ===== */
@media (max-width: 1279px) {
    .hero__inner {
        gap: var(--space-10);
    }
    
    .journey__timeline {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-10);
    }
    
    .journey__timeline::before {
        display: none;
    }
    
    .why-us__grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .team__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== TABLET LANDSCAPE (1024px) ===== */
@media (max-width: 1024px) {
    /* Header */
    .nav {
        display: none;
    }

    .header__actions {
        display: none;
    }

    .header__menu-toggle {
        display: flex;
    }

    /* Hero */
    .hero__inner {
        grid-template-columns: 1fr;
        gap: var(--space-10);
    }

    .hero__content {
        text-align: center;
        max-width: 600px;
        margin: 0 auto;
    }

    .hero__text {
        max-width: none;
    }

    .hero__cta {
        justify-content: center;
    }

    .hero__stats {
        justify-content: center;
    }

    .hero__form-wrapper {
        max-width: 500px;
        margin: 0 auto;
    }

    .hero__floating {
        display: none;
    }

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

    .results__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-card.featured {
        transform: none;
    }

    .video-testimonials__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Team */
    .team__featured {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .team__featured-image {
        max-width: 400px;
        margin: 0 auto;
    }

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

    .team__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* FAQ */
    .faq__grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .faq__content {
        text-align: center;
    }

    /* Consultation */
    .consultation__grid {
        grid-template-columns: 1fr;
        gap: var(--space-10);
    }

    .consultation__content {
        text-align: center;
    }

    .consultation__features {
        max-width: 400px;
        margin: 0 auto;
    }

    .consultation__form {
        max-width: 600px;
        margin: 0 auto;
    }

    /* Footer */
    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-10);
    }

    .footer__brand {
        grid-column: span 2;
        max-width: none;
        text-align: center;
    }

    .footer__social {
        justify-content: center;
    }
}

/* ===== SITE FOOTER - RESPONSIVE (769px - 1024px): 4 columns ===== */
@media (max-width: 1024px) and (min-width: 769px) {
    .site-footer__grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 24px !important;
    }
    .site-footer__grid > *:nth-child(1) {
        grid-column: 1 / 5 !important;
        grid-row: 1 !important;
        max-width: 100% !important;
        text-align: center !important;
    }
    .site-footer__grid > *:nth-child(2) {
        grid-column: 1 !important;
        grid-row: 2 !important;
    }
    .site-footer__grid > *:nth-child(3) {
        grid-column: 2 !important;
        grid-row: 2 !important;
    }
    .site-footer__grid > *:nth-child(4) {
        grid-column: 3 !important;
        grid-row: 2 !important;
    }
    .site-footer__grid > *:nth-child(5) {
        grid-column: 4 !important;
        grid-row: 2 !important;
    }
}

/* ===== TABLET PORTRAIT (768px) ===== */
@media (max-width: 768px) {
    /* Typography */
    .section-title {
        font-size: var(--text-3xl);
    }

    .hero__title {
        font-size: var(--text-4xl);
    }

    /* Hero */
    .hero {
        padding-top: 100px;
        min-height: auto;
    }

    .hero__stats {
        flex-direction: column;
        gap: var(--space-4);
    }

    .hero__stat {
        display: flex;
        align-items: center;
        gap: var(--space-3);
        text-align: left;
    }

    .hero__stat-number {
        font-size: var(--text-2xl);
        margin-bottom: 0;
    }

    /* Grids */
    .services__grid,
    .results__grid,
    .pricing__grid,
    .video-testimonials__grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }

    .why-us__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .journey__timeline {
        grid-template-columns: repeat(2, 1fr);
    }

    .team__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-6);
    }

    /* Social Proof */
    .social-proof__inner {
        flex-direction: column;
        gap: var(--space-6);
    }

    /* Testimonials */
    .testimonials__header {
        flex-direction: column;
        align-items: center;
        gap: var(--space-6);
    }

    .testimonials__card {
        width: 320px;
    }

    /* Filters */
    .results__filters {
        flex-wrap: wrap;
    }

    /* Footer - old classes */
    .footer__grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer__brand {
        grid-column: auto;
    }

    .footer__column h4 {
        margin-top: var(--space-4);
    }

    .footer__links {
        align-items: center;
    }

    .footer__contact-item {
        justify-content: center;
    }

    .footer__bottom {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }

    .footer__legal {
        justify-content: center;
    }

    /* SITE FOOTER - MOBILE: 2x2 grid */
    .site-footer__grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 24px 16px !important;
    }
    .site-footer__grid > *:nth-child(1) {
        grid-column: 1 / 3 !important;
        grid-row: 1 !important;
        text-align: center !important;
        max-width: 100% !important;
    }
    .site-footer__grid > *:nth-child(2) {
        grid-column: 1 !important;
        grid-row: 2 !important;
        text-align: left !important;
    }
    .site-footer__grid > *:nth-child(3) {
        grid-column: 2 !important;
        grid-row: 2 !important;
        text-align: left !important;
    }
    .site-footer__grid > *:nth-child(4) {
        grid-column: 1 !important;
        grid-row: 3 !important;
        text-align: left !important;
    }
    .site-footer__grid > *:nth-child(5) {
        grid-column: 2 !important;
        grid-row: 3 !important;
        text-align: left !important;
    }

    /* Trust Bar */
    .trust-bar__inner {
        flex-direction: column;
        gap: var(--space-6);
    }

    /* Press Logos */
    .press-logos {
        gap: var(--space-6);
    }

    .press-logos img {
        height: 20px;
    }
}

/* ===== MOBILE LARGE (600px) ===== */
@media (max-width: 600px) {
    /* Section Padding */
    .section {
        padding-top: var(--space-14);
        padding-bottom: var(--space-14);
    }
    
    .section-header {
        margin-bottom: var(--space-8);
    }
    
    /* Form */
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Cards */
    .service-card,
    .pricing-card,
    .result-card {
        padding: var(--space-6);
    }
    
    .consultation__form {
        padding: var(--space-6);
    }
    
    /* Journey */
    .journey__timeline {
        grid-template-columns: 1fr;
    }
    
    .journey__number {
        width: 64px;
        height: 64px;
        font-size: var(--text-xl);
    }
    
    /* Team */
    .team__credentials {
        grid-template-columns: 1fr;
    }
    
    /* CTA */
    .cta__buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta__buttons .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* ===== MOBILE (480px) ===== */
@media (max-width: 480px) {
    /* Container */
    :root {
        --container-px: var(--space-4);
    }
    
    /* Typography */
    .hero__title {
        font-size: var(--text-3xl);
    }
    
    .section-title {
        font-size: var(--text-2xl);
    }
    
    /* Hero */
    .hero__cta {
        flex-direction: column;
    }
    
    .hero__cta .btn {
        width: 100%;
    }
    
    .hero__form-wrapper {
        padding: var(--space-5);
    }
    
    .hero__form-badge {
        font-size: var(--text-xs);
        padding: var(--space-1) var(--space-3);
    }
    
    /* Grids */
    .why-us__grid {
        grid-template-columns: 1fr;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .team__grid {
        grid-template-columns: 1fr;
        max-width: 300px;
        margin: 0 auto;
    }
    
    /* Buttons */
    .btn {
        padding: 12px 24px;
    }
    
    .btn-lg {
        padding: 14px 28px;
    }
    
    /* Testimonials */
    .testimonials__card {
        width: 280px;
    }
    
    .review-card {
        padding: var(--space-5);
    }
    
    .review-card__avatar {
        width: 48px;
        height: 48px;
    }
    
    /* WhatsApp */
    .whatsapp-float {
        width: 52px;
        height: 52px;
        bottom: var(--space-4);
        right: var(--space-4);
    }
    
    .whatsapp-float svg {
        width: 24px;
        height: 24px;
    }
    
    .scroll-top {
        right: calc(var(--space-4) + 62px);
        width: 40px;
        height: 40px;
    }
    
    /* Mobile Nav */
    .mobile-nav {
        max-width: 100%;
    }
    
    /* Modal */
    .modal__container {
        border-radius: var(--radius-xl);
    }
    
    .modal__header,
    .modal__body,
    .modal__footer {
        padding: var(--space-5);
    }
}

/* ===== MOBILE SMALL (360px) ===== */
@media (max-width: 360px) {
    /* Even smaller adjustments */
    .hero__title {
        font-size: clamp(1.75rem, 8vw, 2.25rem);
    }
    
    .section-title {
        font-size: clamp(1.5rem, 7vw, 2rem);
    }
    
    .pricing-card__amount {
        font-size: var(--text-4xl);
    }
    
    .stat__number {
        font-size: var(--text-3xl);
    }
}

/* ===== HEIGHT ADJUSTMENTS ===== */
@media (max-height: 700px) and (min-width: 1024px) {
    .hero {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: var(--space-12);
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .header,
    .footer,
    .whatsapp-float,
    .scroll-top,
    .mobile-nav,
    .modal {
        display: none !important;
    }
    
    .section {
        padding: var(--space-8) 0;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    a {
        text-decoration: underline;
    }
    
    .btn {
        border: 1px solid currentColor;
        background: none !important;
        color: inherit !important;
    }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    :root {
        --color-border: rgba(0, 0, 0, 0.3);
        --color-text-secondary: var(--color-text-primary);
        --color-text-muted: var(--color-text-secondary);
    }
    
    .btn-outline {
        border-width: 3px;
    }
    
    a:focus-visible {
        outline-width: 3px;
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    .hero__floating {
        animation: none;
    }
    
    .whatsapp-float {
        animation: none;
    }
    
    .testimonials__track {
        animation: none;
    }
    
    .comparison {
        cursor: default;
    }
}

/* ===== LANDSCAPE PHONES ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding-top: 80px;
        padding-bottom: var(--space-8);
    }
    
    .hero__inner {
        grid-template-columns: 1fr 1fr;
    }
    
    .hero__content {
        text-align: left;
    }
    
    .hero__cta {
        justify-content: flex-start;
    }
    
    .hero__stats {
        justify-content: flex-start;
    }
}

/* ===== TOUCH DEVICES ===== */
@media (hover: none) {
    .nav__link::after {
        display: none;
    }
    
    .nav__dropdown-menu {
        display: none;
    }
    
    .card:hover,
    .service-card:hover,
    .pricing-card:hover,
    .result-card:hover {
        transform: none;
    }
}

/* ===== SAFE AREA INSETS (iOS) ===== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .footer {
        padding-bottom: calc(var(--space-8) + env(safe-area-inset-bottom));
    }
    
    .whatsapp-float {
        bottom: calc(var(--space-6) + env(safe-area-inset-bottom));
    }
    
    .scroll-top {
        bottom: calc(var(--space-6) + env(safe-area-inset-bottom));
    }
    
    .mobile-nav {
        padding-bottom: calc(var(--space-6) + env(safe-area-inset-bottom));
    }
}
