/* ==========================================================================
   V1RCM - Responsive Breakpoints & Mobile Optimization
   ========================================================================== */

@media (max-width: 1200px) {
    .navbar {
        padding: 0 1rem;
    }
    
    .nav-menu {
        gap: 0.85rem;
    }
    
    .nav-link {
        font-size: 0.875rem;
    }

    .pipeline-flow {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem 1.25rem;
    }
    
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .calculator-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .performance-metrics-strip,
    .startup-metrics-strip {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .mobile-toggle {
        display: flex !important;
    }
    
    /* Mobile Backdrop Overlay */
    .mobile-menu-backdrop {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(4, 7, 14, 0.75);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        z-index: 1400;
        opacity: 0;
        visibility: hidden;
        transition: opacity var(--transition-normal), visibility var(--transition-normal);
        pointer-events: none;
    }
    
    .mobile-menu-backdrop.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    
    /* Mobile Drawer Menu */
    .mobile-menu-drawer {
        display: none !important;
        position: fixed;
        top: 0;
        right: 0;
        width: 320px;
        max-width: 85vw;
        height: 100vh;
        background: var(--bg-surface);
        border-left: 1px solid var(--border-glow);
        padding: 2.5rem 1.75rem;
        z-index: 1500;
        flex-direction: column;
        overflow-y: auto;
        box-shadow: -15px 0 40px rgba(0, 0, 0, 0.9);
    }
    
    .mobile-menu-drawer.active {
        display: flex !important;
        animation: drawerSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    @keyframes drawerSlideIn {
        from { transform: translateX(100%); }
        to { transform: translateX(0); }
    }
    
    .mobile-menu-close {
        align-self: flex-end;
        background: none;
        border: none;
        color: var(--text-primary);
        font-size: 1.5rem;
        margin-bottom: 2rem;
        cursor: pointer;
    }
    
    .mobile-links {
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
        margin-bottom: 2.5rem;
    }
    
    .mobile-links a {
        color: var(--text-primary);
        font-size: 1.1rem;
        font-weight: 600;
    }
    
    .mobile-submenu {
        list-style: none;
        padding-left: 1rem;
        display: flex;
        flex-direction: column;
        gap: 0.65rem;
        margin-top: 0.5rem;
    }
    
    .mobile-submenu a {
        color: var(--text-secondary);
        font-size: 0.95rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 1rem;
    }

    .section {
        padding: 4.5rem 0;
    }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .pipeline-flow {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .performance-metrics-strip,
    .startup-metrics-strip {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }
    
    .calculator-panel {
        padding: 2rem 1.5rem;
    }
    
    .calc-stat-number {
        font-size: 2.5rem;
    }
    
    .calc-substats {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1.25rem;
        text-align: center;
    }
    
    .compliance-badge-row {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-section {
        padding-top: 110px;
        text-align: center;
    }

    .hero-title {
        font-size: clamp(1.85rem, 7vw, 2.5rem) !important;
        word-break: break-word;
    }

    .hero-live-badge {
        font-size: 0.78rem !important;
        padding: 0.35rem 0.85rem !important;
        max-width: 100%;
        text-align: center;
    }
    
    .hero-subtitle {
        margin: 0 auto 2rem auto;
        font-size: 1rem !important;
    }
    
    .hero-cta-group {
        justify-content: center;
    }
    
    .modal-dialog {
        padding: 2rem 1.25rem;
    }

    .brand-badge {
        display: none !important;
    }

    .brand-text {
        font-size: 1.35rem !important;
    }

    .brand-logo-img {
        height: 38px !important;
        max-height: 38px !important;
    }

    .nav-actions {
        gap: 0.5rem !important;
    }

    .nav-actions .btn {
        display: none !important;
    }

    .nav-social-group {
        gap: 0.35rem;
    }

    .nav-social-link {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    .nav-social-link i {
        font-size: 0.8rem;
    }
}

/* Certifications Responsive Optimization */
@media (max-width: 992px) {
    .cert-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    .cert-logos-row-primary {
        gap: 2rem 1.5rem;
    }
    .cert-showcase-plate {
        padding: 2.25rem 1.75rem;
    }
    .cert-logo-item img {
        height: 92px;
        max-height: 92px;
        max-width: 190px;
    }
    .cert-logo-item.hitrust-item img {
        height: 62px;
        max-height: 62px;
        max-width: 220px;
    }
}

@media (max-width: 640px) {
    .cert-cards-grid {
        grid-template-columns: 1fr;
    }
    .cert-showcase-plate {
        padding: 2rem 1.25rem;
        gap: 1.75rem;
    }
    .cert-logos-row-primary {
        gap: 1.75rem 1.25rem;
    }
    .cert-logo-item {
        padding: 0.5rem 0.75rem;
    }
    .cert-logo-item img {
        height: 78px;
        max-height: 78px;
        max-width: 160px;
    }
    .cert-logo-item.hitrust-item img {
        height: 52px;
        max-height: 52px;
        max-width: 190px;
    }
    .cert-intro-text {
        font-size: 1rem;
        text-align: left;
    }
    .cert-cta-buttons {
        flex-direction: column;
        width: 100%;
    }
    .cert-cta-buttons .btn {
        width: 100%;
    }
}

/* Gallery & Clinical Showcases Responsive Optimization */
@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1.25rem !important;
    }

    .specialty-tab-showcase {
        height: 300px;
        margin-top: 1.75rem;
    }

    .lightbox-close {
        top: 10px !important;
        right: 10px !important;
    }

    .lightbox-prev {
        left: 10px !important;
    }

    .lightbox-next {
        right: 10px !important;
    }
}

@media (max-width: 640px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    .gallery-filter-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.85rem;
    }

    .lightbox-close {
        top: 8px !important;
        right: 8px !important;
        width: 38px !important;
        height: 38px !important;
    }

    .lightbox-nav-btn {
        width: 38px !important;
        height: 38px !important;
        font-size: 1rem !important;
    }

    .lightbox-prev {
        left: 8px !important;
    }

    .lightbox-next {
        right: 8px !important;
    }

    .specialty-tab-showcase {
        height: 230px;
        margin-top: 1.5rem;
    }

    .specialty-stat-floating {
        padding: 0.75rem 1rem;
        left: 14px;
        right: 14px;
        bottom: 14px;
    }

    .specialty-stat-floating .stat-num {
        font-size: 1.5rem;
    }

    .specialty-stat-floating .stat-lbl {
        font-size: 0.8rem;
    }
}

