/**
 * Career Care India - Responsive Breakpoints & Adaptive Layouts
 * Flawless fluid rendering across Large Screens, Laptops, Tablets, iPhones, and Android devices.
 */

/* ====================================================================
   1. Laptop & Medium Screens (max-width: 1199px)
   ==================================================================== */
@media screen and (max-width: 1199px) {
    :root {
        --container-padding: 1.25rem;
    }

    .hero-grid {
        grid-template-columns: 1.05fr 0.95fr;
        gap: 2.5rem;
    }

    .footer-top-grid {
        grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
        gap: 2.25rem;
    }

    .nav-menu {
        gap: 0.35rem;
    }

    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.885rem;
    }

    .nav-cta .btn {
        padding: 0.55rem 1rem;
        font-size: 0.885rem;
    }
}

/* ====================================================================
   2. Tablet Landscape & Small Laptops (max-width: 991px)
   ==================================================================== */
@media screen and (max-width: 991px) {
    /* Prevent ambient blur circles from stretching mobile viewport */
    .ambient-glow-wrapper {
        display: none !important;
    }

    /* Hide desktop navigation menu & show hamburger */
    .nav-menu, .nav-cta {
        display: none !important;
    }

    .mobile-nav-toggle {
        display: block !important;
        margin-left: auto;
        flex-shrink: 0;
    }

    /* Hero Section */
    .hero-section {
        padding: 4rem 0 4.5rem 0;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3.5rem;
    }

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

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

    .hero-trust-bar {
        margin: 0 auto;
    }

    .hero-visual {
        max-width: 580px;
        margin: 0 auto;
        width: 100%;
    }

    /* Learning Tracks */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .dual-pillar-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .values-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .learner-profiles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    /* Learning Journey */
    .journey-timeline {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    /* Course Hero & Details */
    .course-hero-grid {
        grid-template-columns: 1fr;
        gap: 2.75rem;
    }

    .course-sidebar-card {
        position: static;
        margin-top: 2rem;
    }

    /* Footer */
    .footer-top-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }

    /* Comparison Table Horizontal Scroll Wrapper */
    .comparison-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .comparison-table {
        min-width: 600px;
    }
}

/* ====================================================================
   3. Mobile Devices & Small Tablets (max-width: 767px)
   ==================================================================== */
@media screen and (max-width: 767px) {
    :root {
        --container-padding: 1.15rem;
    }

    .section {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    .section-header {
        margin-bottom: 2.75rem;
    }

    /* Top bar adjustments */
    .top-bar-tagline {
        display: none;
    }

    .top-bar .container {
        justify-content: center;
    }

    .top-bar-info {
        gap: 1rem;
        font-size: 0.775rem;
    }

    /* Navbar */
    .navbar {
        height: 68px;
        width: 100%;
        max-width: 100%;
        gap: 1rem;
    }

    .brand-logo-img {
        height: 42px;
        max-width: 175px;
    }

    /* Hero Typography & CTA */
    .hero-badge-pill {
        font-size: 0.775rem;
        padding: 0.35rem 0.75rem;
        max-width: 100%;
        white-space: normal;
        display: inline-flex;
    }

    .hero-title {
        font-size: 1.85rem;
        line-height: 1.22;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .hero-subtext {
        font-size: 1.025rem;
    }

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

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

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

    .hero-floating-pill {
        position: static;
        margin-top: 1.25rem;
        justify-content: center;
    }

    .hero-trust-bar {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Courses Filter Bar */
    .courses-filter-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 1.15rem;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }

    .search-input-group {
        width: 100%;
        flex: 1 1 100%;
        box-sizing: border-box;
    }

    .search-input {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .category-tabs {
        overflow-x: auto;
        padding-bottom: 0.5rem;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        max-width: 100%;
        display: flex;
        gap: 0.5rem;
        box-sizing: border-box;
    }

    .tab-btn {
        flex-shrink: 0;
    }

    /* Single column grids */
    .categories-grid {
        grid-template-columns: 1fr;
    }

    .dual-pillar-grid {
        grid-template-columns: 1fr;
    }

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

    .learner-profiles-grid {
        grid-template-columns: 1fr;
    }

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

    .journey-timeline {
        grid-template-columns: 1fr;
    }

    /* Enquiry Form */
    .enquiry-form-card {
        padding: 1.75rem 1.25rem;
    }

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

    .form-group.full-width {
        grid-column: span 1;
    }

    /* Footer */
    .footer {
        padding-top: 3.75rem;
    }

    .footer-top-grid {
        grid-template-columns: 1fr;
        gap: 2.25rem;
    }

    .footer-bottom .container {
        flex-direction: column;
        text-align: center;
        gap: 0.85rem;
    }

    .footer-bottom-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    /* Modal */
    .modal-backdrop {
        padding: 0.75rem;
    }

    .modal-container {
        padding: 1.5rem 1.15rem;
        margin: 0;
        width: 100%;
        max-width: 100%;
        max-height: 92vh;
        border-radius: var(--radius-md);
    }

    .modal-close-btn {
        top: 0.85rem;
        right: 0.85rem;
        background: #f1f5f9;
        border-radius: 50%;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
        color: var(--color-navy);
    }

    .modal-filter-tabs {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        width: 100% !important;
        gap: 0.45rem !important;
        padding-bottom: 0.45rem !important;
    }

    .modal-filter-tabs .tab-btn {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        font-size: 0.8rem !important;
        padding: 0.35rem 0.75rem !important;
    }

    .modal-search-box-wrap {
        width: 100% !important;
        margin-top: 0.5rem !important;
    }

    .modal-search-input {
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .modal-courses-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* WhatsApp Floating Widget on Mobile */
    .wa-widget-wrapper {
        bottom: 16px;
        right: 16px;
    }

    .wa-main-floating-btn {
        width: 52px;
        height: 52px;
    }

    .wa-btn-icon-wa {
        width: 28px;
        height: 28px;
    }

    .wa-chat-modal {
        position: fixed !important;
        bottom: 78px !important;
        right: 12px !important;
        left: 12px !important;
        width: auto !important;
        max-width: calc(100vw - 24px) !important;
        max-height: calc(100vh - 100px) !important;
        border-radius: 18px !important;
        margin: 0 !important;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28) !important;
    }

    .wa-modal-header {
        padding: 0.85rem 1rem !important;
    }

    .wa-header-avatar-circle {
        width: 36px !important;
        height: 36px !important;
    }

    .wa-brand-title-row h4 {
        font-size: 0.95rem !important;
    }

    .wa-modal-chat-body {
        max-height: 200px !important;
        padding: 0.85rem !important;
    }

    /* WhatsApp Floating Widget on Mobile - Clean circular button without intrusive nudge card */
    .wa-nudge-card {
        display: none !important;
    }

    /* Hide floating WhatsApp button when any modal or drawer is active */
    body.modal-open .wa-widget-wrapper,
    body.drawer-open .wa-widget-wrapper {
        display: none !important;
    }

    body.drawer-open {
        overflow: hidden !important;
    }

    body.drawer-open::after {
        content: '';
        position: fixed;
        top: 68px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(15, 23, 42, 0.45);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        z-index: 998;
        pointer-events: auto;
    }

    /* Mobile drawer overlay refinement */
    .mobile-nav-drawer {
        position: fixed;
        top: 68px;
        left: 0;
        width: 100%;
        max-height: calc(100vh - 68px);
        overflow-y: auto;
        background-color: #ffffff;
        border-bottom: 2px solid var(--color-primary-light);
        box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
        z-index: 999;
    }
}

/* ====================================================================
   4. Extra Small Screens (max-width: 480px)
   ==================================================================== */
@media screen and (max-width: 480px) {
    .brand-logo-img {
        height: 38px;
        max-width: 155px;
    }

    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.925rem;
    }

    .code-mockup-wrapper {
        font-size: 0.75rem;
        padding: 0.85rem;
    }

    .top-bar-info {
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }

    .top-bar-item {
        font-size: 0.725rem;
    }

    .hero-tab-btn {
        font-size: 0.725rem;
        padding: 0.45rem 0.5rem;
    }
}
