/**
 * GIWOST Responsive Styles
 * Mobile-first responsive design
 */

/* Prevent horizontal scroll globally */
html {
    overflow-x: hidden;
    max-width: 100%;
}

/* ===========================
   TOPBAR RESPONSIVE
   =========================== */
@media screen and (max-width: 900px) {
    .header-topbar .container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    .topbar-left {
        justify-content: center;
        gap: 12px;
    }
}

@media screen and (max-width: 480px) {
    /* Hide email on very small screens — phone numbers + socials are enough */
    .topbar-left a[href^="mailto"] {
        display: none;
    }
    .topbar-left {
        gap: 10px;
    }
    .header-topbar {
        font-size: 12px;
    }
}

/* ===========================
   TABLET - 1024px and below
   =========================== */
@media screen and (max-width: 1024px) {
    :root {
        --spacing-3xl: 64px;
        --spacing-2xl: 48px;
    }

    .hero-title {
        font-size: 38px;
    }

    .section-title {
        font-size: 36px;
    }

    .cta-title {
        font-size: 36px;
    }

    .courses-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .hero-content {
        grid-template-columns: 1fr;
    }

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

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

    .about-image {
        height: 280px;
        order: -1;
    }

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

    .stats-bar .stat-card {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.12);
    }
}

/* ===========================
   MOBILE - 768px and below
   =========================== */
@media screen and (max-width: 768px) {
    :root {
        --spacing-3xl: 48px;
        --spacing-2xl: 32px;
        --spacing-xl: 32px;
    }

    /* Navigation Mobile */
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg-white);
        flex-direction: column;
        justify-content: center;
        padding: var(--spacing-xl);
        transition: left 0.3s ease;
        box-shadow: var(--shadow-xl);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-md);
        margin-bottom: var(--spacing-xl);
    }

    .nav-link {
        font-size: 18px;
    }

    .nav-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }

    .nav-buttons .btn {
        width: 100%;
    }

    .hamburger {
        display: flex;
    }

    /* Hero Mobile */
    .hero {
        min-height: auto;
        padding: 72px 20px 56px;
        background-position: center top;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .hero-content {
        display: block;
        text-align: center;
        width: 100%;
    }

    .hero-text {
        text-align: center;
        width: 100%;
    }

    .hero-title {
        font-size: 28px;
        line-height: 1.25;
        letter-spacing: -0.2px;
        font-weight: 700;
        margin-bottom: 14px;
    }

    .hero-subtitle {
        font-size: 15px;
        line-height: 1.65;
        opacity: 0.9;
        margin-bottom: 24px;
    }

    .hero-actions {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        width: 100%;
        position: relative;
        z-index: 5;
    }

    .hero-actions .btn {
        display: block;
        width: 220px;
        max-width: 100%;
        padding: 13px 24px;
        font-size: 15px;
        text-align: center;
        box-sizing: border-box;
    }

    .hero-image {
        display: none;
    }

    .hero-scroll {
        display: none;
    }

    /* Sections Mobile */
    section {
        padding: var(--spacing-2xl) 0;
    }

    .section-title {
        font-size: 28px;
    }

    .section-subtitle {
        font-size: 16px;
    }

    /* Features Mobile */
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    /* Stats Mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }

    .stat-number {
        font-size: 42px;
    }

    .stat-label {
        font-size: 14px;
    }

    /* Courses Mobile */
    .courses-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    /* Testimonials Mobile */
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    /* CTA Mobile */
    .cta-title {
        font-size: 28px;
    }

    .cta-subtitle {
        font-size: 16px;
    }

    .cta-actions {
        flex-direction: column;
        align-items: center;
    }

    .cta-actions .btn {
        width: 100%;
        max-width: 300px;
    }

    .cta-trust {
        gap: 20px;
        flex-direction: column;
        align-items: center;
    }

    /* Services grid — 1 col on mobile */
    .services-grid {
        grid-template-columns: 1fr;
    }

    /* Blog grid */
    .blog-grid {
        grid-template-columns: 1fr;
    }

    /* Hero carousel controls — move up so they don't get cut off */
    .hero-carousel-controls {
        bottom: 24px;
    }

    /* About page stats row */
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

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

    .footer-bottom-links {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
}

/* ===========================
   SMALL MOBILE - 480px and below
   =========================== */
@media screen and (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }

    .hero-title {
        font-size: 24px;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    .hero-actions .btn {
        width: 200px;
        padding: 12px 20px;
        font-size: 13px;
    }

    .section-title {
        font-size: 24px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    .btn-lg {
        padding: 14px 32px;
        font-size: 14px;
    }

    .stat-number {
        font-size: 36px;
    }

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

    /* Footer 1 column on very small screens */
    .footer-content {
        grid-template-columns: 1fr;
    }

    /* Footer bottom links — stack vertically */
    .footer-bottom-links {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    /* Nav brand text — slightly smaller */
    .logo-text {
        font-size: 20px;
    }

    /* Hero carousel dots/controls */
    .hero-carousel-controls {
        bottom: 16px;
        gap: 10px;
    }

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

/* ===========================
   LANDSCAPE ORIENTATION
   =========================== */
@media screen and (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: var(--spacing-lg) 0;
    }

    .hero-scroll {
        display: none;
    }
}

/* ===========================
   MODAL RESPONSIVE
   =========================== */
@media screen and (max-width: 768px) {
    .modal-overlay {
        padding: 0;
        align-items: flex-start;
    }

    .modal-container {
        max-height: 100vh;
        border-radius: 0;
        min-height: 100vh;
    }

    .modal-title {
        font-size: 22px;
    }

    .modal-header {
        padding: var(--spacing-md);
    }

    .modal-body {
        padding: var(--spacing-md);
    }

    .modal-footer {
        padding: var(--spacing-md);
        flex-direction: column;
    }

    .modal-whatsapp {
        max-width: 100%;
        width: 100%;
    }

    .modal-close-btn {
        width: 100%;
    }

    .modal-content h3 {
        font-size: 18px;
    }
}

@media screen and (max-width: 480px) {
    .modal-title {
        font-size: 20px;
    }

    .modal-content h3 {
        font-size: 16px;
    }

    .modal-content p {
        font-size: 15px;
    }
}

/* ===========================
   PRINT STYLES
   =========================== */
@media print {
    .header,
    .hamburger,
    .hero-scroll,
    .cta-section,
    .footer {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .course-card,
    .testimonial-card,
    .feature-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* ===========================
   ACCESSIBILITY
   =========================== */
@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;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-blue: #0d1570;
        --text-gray: #495057;
    }

    .btn {
        border-width: 3px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed in the future */
}
