/* 
   Care Givers - Responsive Styling
   Tailored Responsive Design & Mobile-First Adaptation
*/

/* --- Tablet Breakpoint (Under 1024px) --- */
@media screen and (max-width: 1023px) {
    .container {
        padding: 0 2rem;
    }
    
    .section {
        padding: 6rem 0;
    }
    
    /* Header Adapts */
    .header-container {
        padding: 0 2rem;
    }
    
    .nav-menu {
        display: none; /* Hidden on mobile/tablet, using mobile drawer */
    }
    
    .header-actions .btn {
        display: none; /* Hide primary CTA on smaller devices in header */
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    /* Hero Section Adapts */
    .hero-section {
        min-height: auto;
        padding-top: calc(var(--header-height) + 4rem);
        padding-bottom: 6rem;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
        text-align: center;
    }
    
    .hero-content {
        align-items: center;
    }
    
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-ctas {
        justify-content: center;
        width: 100%;
    }
    
    .hero-facts-strip {
        justify-content: center;
        width: 100%;
    }
    
    .hero-visual-wrapper {
        height: 460px;
    }
    
    /* Grids Adapt */
    .solutions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-preview-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
    
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .category-grid {
        gap: 1.5rem;
    }
    
    .category-grid .col-4,
    .category-grid .col-8,
    .category-grid .col-6 {
        grid-column: span 6;
    }
    
    .workflow-panels {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .value-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .client-logo-wall {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
    
    /* Catalog Layout */
    .catalog-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .catalog-sidebar {
        position: relative;
        top: 0;
    }
    
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Details Page */
    .product-details-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .details-image-view {
        height: 380px;
    }
    
    /* Contact Page */
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
    
    .contact-cards-stack {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .contact-card-sidebar {
        flex: 1;
        min-width: 250px;
    }
}

/* --- Mobile Breakpoint (Under 768px) --- */
@media screen and (max-width: 767px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .header-container {
        padding: 0 1.5rem;
    }
    
    .section {
        padding: 5rem 0;
    }
    
    /* Heading Scaling */
    .hero-heading {
        font-size: 2.5rem !important; /* Cap mobile heading size around 40-42px */
    }
    
    .section-heading {
        font-size: 2rem;
        margin-bottom: 3rem;
    }
    
    /* Buttons expand full width */
    .hero-ctas {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .hero-ctas .btn {
        width: 100%;
    }
    
    .hero-facts-strip {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    /* Hero Right Visual on Mobile */
    .hero-visual-wrapper {
        height: 280px;
    }
    
    .float-label {
        font-size: 0.65rem;
        padding: 0.5rem 0.8rem;
    }
    
    .float-label-1 { top: 15%; left: 5%; }
    .float-label-2 { bottom: 30%; right: 5%; }
    .float-label-3 { bottom: 10%; left: 10%; }
    
    /* Header Action Buttons on Mobile Viewports */
    .header-actions {
        gap: 0.75rem;
    }
    
    .header-actions .phone-action {
        width: 38px;
        height: 38px;
        background-color: var(--soft-mint);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: var(--transition-smooth);
    }
    
    .header-actions .phone-action span {
        display: none; /* Hide long number text */
    }
    
    .header-actions .phone-icon-svg {
        margin: 0;
        width: 18px;
        height: 18px;
    }
    
    .mobile-toggle {
        display: flex !important;
        width: 38px;
        height: 38px;
        background-color: var(--soft-mint);
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        gap: 4px;
        flex-shrink: 0;
    }
    
    .mobile-toggle span {
        width: 18px;
        height: 2px;
    }
    
    .mobile-toggle-active span:nth-child(1) {
        transform: rotate(45deg) translate(4px, 4px);
    }
    
    .mobile-toggle-active span:nth-child(3) {
        transform: rotate(-45deg) translate(4px, -4px);
    }
    
    /* Grids collapse to single columns */
    .solutions-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .category-grid .col-4,
    .category-grid .col-8,
    .category-grid .col-6 {
        grid-column: span 12;
    }
    
    .category-panel {
        min-height: auto;
    }
    
    .apparel-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .apparel-img-showcase {
        gap: 1rem;
    }
    
    .apparel-img-card-large {
        height: 380px;
    }
    
    .apparel-img-card {
        height: 180px;
    }
    
    .value-grid {
        grid-template-columns: 1fr;
    }
    
    .client-logo-wall {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .cta-panel {
        padding: 4rem 1.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
    
    .cta-buttons .btn {
        width: 100%;
    }
    
    /* Footer Layout on Mobile */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .footer-column {
        gap: 1rem;
    }
    
    .footer-logo {
        height: 36px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    /* Ecosystem Node Diagram Mobile Adjustments */
    .ecosystem-container {
        min-height: 400px;
        padding: 2rem 1rem;
    }
    
    .ecosystem-center {
        width: 100px;
        height: 100px;
        font-size: 0.85rem;
    }
    
    .ecosystem-node {
        font-size: 0.7rem;
        padding: 0.4rem 0.8rem;
    }
    
    /* Compact coordinates to prevent text clipping */
    .node-1 { top: 8%; }
    .node-2 { top: 22%; right: 4%; }
    .node-3 { top: 58%; right: 2%; }
    .node-4 { bottom: 12%; right: 8%; }
    .node-5 { bottom: 8%; }
    .node-6 { bottom: 12%; left: 8%; }
    .node-7 { top: 58%; left: 2%; }
    .node-8 { top: 22%; left: 4%; }
    
    /* Catalog Sidebar & Filter scroll limits */
    .catalog-sidebar {
        width: 100%;
        min-width: 0;
    }
    
    .filter-list-scroll-wrapper {
        overflow-x: auto;
        padding-bottom: 1rem;
        margin: 0 -1.5rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        max-width: 100%;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-list {
        display: flex;
        flex-direction: row;
        gap: 0.75rem;
        width: max-content;
    }
    
    .filter-list li {
        flex-shrink: 0;
    }
    
    .filter-btn {
        padding: 0.6rem 1.25rem;
        font-size: 0.85rem;
        width: auto;
        white-space: nowrap;
    }
    
    .products-results {
        width: 100%;
        min-width: 0;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
        width: 100%;
        min-width: 0;
    }
    
    /* Details Tabs scrollable */
    .tabs-headers-scroll {
        overflow-x: auto;
        padding-bottom: 0.75rem;
        -webkit-overflow-scrolling: touch;
        margin: 0 -1.5rem 2rem -1.5rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .tabs-headers {
        width: max-content;
        gap: 2rem;
        margin-bottom: 0;
    }
    
    .tab-features-list {
        grid-template-columns: 1fr;
    }
    
    .specs-table td {
        padding: 1rem;
        font-size: 0.85rem;
    }
    
    .accessories-grid {
        grid-template-columns: 1fr;
    }
    
    /* Contact */
    .contact-cards-stack {
        flex-direction: column;
    }
    
    .enquiry-form-container {
        padding: 2.5rem 1.5rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .form-group-full {
        grid-column: span 1;
    }
    
    .conditional-section {
        grid-template-columns: 1fr;
        padding: 1.5rem;
        gap: 1.5rem;
    }
    
    /* Show Sticky Mobile Bar, add padding to body */
    body {
        padding-bottom: 60px; /* Offset for sticky bar */
    }
    
    .mobile-sticky-bar {
        display: grid;
    }
}

/* --- Mobile Navigation Drawer System --- */
.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    height: 100vh;
    background-color: var(--white);
    z-index: 10002;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.08);
    transition: var(--transition-smooth);
    padding: 6rem 2.5rem 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.mobile-nav-drawer-active {
    right: 0;
}

.mobile-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.mobile-nav-item {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
}

.mobile-nav-item-sub {
    font-size: 0.95rem;
    color: var(--text-secondary);
    padding-left: 1.5rem;
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    list-style: none;
}

.mobile-nav-item-sub a {
    font-weight: 500;
}

.mobile-drawer-bottom {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.mobile-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(7, 59, 53, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.mobile-overlay-active {
    opacity: 1;
    visibility: visible;
}
