/**
 * Sabrina M. Cunha Theme - Responsive Styles
 *
 * @package Sabrina_Cunha_Theme
 */

/* ============================================
   EXTRA LARGE SCREENS (1400px and up)
============================================ */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }

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

/* ============================================
   LARGE SCREENS (1200px and down)
============================================ */
@media (max-width: 1199.98px) {
    :root {
        --header-height: 70px;
    }

    .container {
        max-width: 960px;
    }

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

    .hero-container {
        gap: var(--spacing-2xl);
    }

    .about-grid,
    .contact-grid {
        gap: var(--spacing-2xl);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: var(--spacing-xl);
    }

    .footer-brand {
        grid-column: span 3;
    }
}

/* ============================================
   MEDIUM SCREENS (992px and down)
============================================ */
@media (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }

    /* Header */
    .header-cta {
        display: none;
    }

    .main-navigation {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background-color: var(--primary, #1a365d) !important;
        box-shadow: var(--shadow-lg);
        padding: var(--spacing-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
    }

    .main-navigation.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .main-navigation a {
        color: rgba(255,255,255,0.85) !important;
        display: block;
        padding: var(--spacing-sm) 0;
    }

    .menu-toggle {
        display: flex;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

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

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    body.menu-open {
        overflow: hidden;
    }

    body.menu-open::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 9998;
    }

    .main-navigation {
        z-index: 10001 !important;
    }

    .menu-toggle {
        z-index: 10001 !important;
    }

    /* Hero */
    .hero-section {
        min-height: auto;
        padding: calc(var(--header-height) + var(--spacing-4xl)) 0 var(--spacing-4xl);
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        order: 1;
    }

    .hero-image {
        order: 2;
        margin-top: var(--spacing-2xl);
    }

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

    .hero-description {
        margin: 0 auto var(--spacing-xl);
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        position: relative;
        bottom: auto;
        left: auto;
        justify-content: center;
        margin-top: var(--spacing-xl);
    }

    /* About */
    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-image {
        order: 2;
        margin-top: var(--spacing-xl);
    }

    .about-content {
        order: 1;
    }

    .experience-badge {
        right: 20px;
        bottom: 20px;
    }

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

    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-form-wrapper {
        margin-top: var(--spacing-xl);
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: span 2;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   SMALL SCREENS (768px and down)
============================================ */
@media (max-width: 767.98px) {
    :root {
        --font-5xl: 2.5rem;
        --font-4xl: 2rem;
        --font-3xl: 1.5rem;
        --font-2xl: 1.25rem;
        --spacing-4xl: 4rem;
        --spacing-3xl: 3rem;
    }

    .container {
        max-width: 540px;
        padding: 0 var(--spacing-md);
    }

    .section {
        padding: var(--spacing-3xl) 0;
    }

    /* Hero */
    .hero-title {
        font-size: 2rem;
    }

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

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }

    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .stat-card {
        min-width: 200px;
    }

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

    .service-card {
        padding: var(--spacing-xl);
    }

    /* Testimonials */
    .testimonial-card {
        padding: var(--spacing-xl);
    }

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

    /* About Features */
    .about-features {
        grid-template-columns: 1fr;
    }

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

    .footer-brand {
        grid-column: span 1;
    }

    .footer-brand p {
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .footer-links ul {
        align-items: center;
    }

    .footer-contact .contact-item {
        justify-content: center;
        flex-direction: column;
        text-align: center;
    }

    /* WhatsApp Float */
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-float a {
        width: 50px;
        height: 50px;
    }

    .whatsapp-float::before {
        display: none;
    }

    /* Scroll Top */
    .scroll-top {
        bottom: 80px;
        right: 20px;
    }

    .scroll-top a {
        width: 40px;
        height: 40px;
    }
}

/* ============================================
   EXTRA SMALL SCREENS (576px and down)
============================================ */
@media (max-width: 575.98px) {
    :root {
        --font-5xl: 2rem;
        --font-4xl: 1.75rem;
        --font-3xl: 1.35rem;
    }

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

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

    .hero-title {
        font-size: 1.75rem;
        line-height: 1.2;
    }

    .hero-badge {
        font-size: 0.65rem;
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    /* Buttons */
    .btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: var(--font-sm);
    }

    .btn-lg {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: var(--font-base);
    }

    /* Section Title */
    .section-title h2 {
        font-size: var(--font-2xl);
    }

    /* Service Cards */
    .service-icon {
        width: 60px;
        height: 60px;
    }

    .service-icon i {
        font-size: var(--font-2xl);
    }

    /* Contact */
    .contact-form-wrapper {
        padding: var(--spacing-lg);
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
    }

    .contact-item-icon {
        width: 45px;
        height: 45px;
    }

    /* Testimonials Slider Navigation */
    .testimonials-section {
        padding: var(--spacing-2xl) 0;
    }

    .testimonial-author {
        flex-direction: column;
        text-align: center;
    }

    .testimonial-author img {
        width: 50px;
        height: 50px;
    }

    /* About Image */
    .about-image::before {
        top: -10px;
        left: -10px;
    }

    .experience-badge {
        padding: var(--spacing-md);
    }

    .experience-badge .number {
        font-size: var(--font-2xl);
    }

    .experience-badge .text {
        font-size: var(--font-xs);
    }
}

/* ============================================
   ANIMATIONS & TRANSITIONS
============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   PRINT STYLES
============================================ */
@media print {
    .site-header,
    .whatsapp-float,
    .scroll-top,
    .hero-buttons,
    .contact-form-wrapper,
    .social-links {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    .section {
        padding: 20pt 0;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .hero-section {
        background: none !important;
        color: #000;
    }

    .hero-title {
        color: #000;
    }
}

/* ============================================
   LANDSCAPE ORIENTATION FIXES
============================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: calc(var(--header-height) + var(--spacing-xl)) 0 var(--spacing-xl);
    }

    .hero-stats {
        flex-direction: row;
    }
}

/* ============================================
   HIGH CONTRAST MODE
============================================ */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000080;
        --secondary-color: #997700;
        --text-primary: #000000;
        --text-secondary: #333333;
    }

    .btn-primary {
        border: 2px solid #000;
    }

    .service-card,
    .testimonial-card,
    .contact-form-wrapper {
        border: 2px solid #333;
    }
}

/* ============================================
   DARK MODE SUPPORT (optional)
============================================ */
@media (prefers-color-scheme: dark) {
    /* Uncomment below to enable dark mode */
    /*
    :root {
        --white: #1a1a2e;
        --off-white: #16213e;
        --light-gray: #0f3460;
        --text-primary: #f5f5f5;
        --text-secondary: #e0e0e0;
    }

    .site-header.scrolled {
        background-color: #1a1a2e;
    }

    .service-card,
    .contact-form-wrapper {
        background-color: #16213e;
    }
    */
}

/* ============================================
   UTILITIES - VISIBILITY
============================================ */
.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

.d-flex {
    display: flex !important;
}

@media (min-width: 576px) {
    .d-sm-none { display: none !important; }
    .d-sm-block { display: block !important; }
    .d-sm-flex { display: flex !important; }
}

@media (min-width: 768px) {
    .d-md-none { display: none !important; }
    .d-md-block { display: block !important; }
    .d-md-flex { display: flex !important; }
}

@media (min-width: 992px) {
    .d-lg-none { display: none !important; }
    .d-lg-block { display: block !important; }
    .d-lg-flex { display: flex !important; }
}

@media (min-width: 1200px) {
    .d-xl-none { display: none !important; }
    .d-xl-block { display: block !important; }
    .d-xl-flex { display: flex !important; }
}
