/* ==========================================================================
   Responsive Design - Mobile First Approach
   ========================================================================== */

/* Large Desktop */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 5rem;
    }
    
    .hero-subtitle {
        font-size: 1.8rem;
    }
    
    .hero-kpis {
        gap: 3rem;
    }
    
    .kpi-item {
        min-width: 150px;
        padding: 1.5rem;
    }
}

/* Desktop */
@media (max-width: 1199px) {
    .hero-title {
        font-size: 4rem;
    }
    
    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet */
@media (max-width: 991px) {
    /* Navigation */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--midnight-blue);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 2rem 0;
        gap: 0;
    }

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

    .nav-item {
        margin: 1rem 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* Hero */
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-title-compact {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .hero-subtitle-compact {
        font-size: 1.1rem;
    }
    
    .hero-kpis {
        gap: 1.5rem;
    }
    
    .kpi-item {
        min-width: 100px;
        padding: 1rem;
    }
    
    .kpi-number,
    .kpi-symbol {
        font-size: 1.5rem;
    }
    
    .kpi-label {
        font-size: 0.8rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    /* Typography */
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2.2rem; }
    h3 { font-size: 1.6rem; }
    
    /* Grid adjustments */
    .value-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .methodology-process {
        flex-direction: column;
        gap: 2rem;
    }
    
    .methodology-arrow {
        transform: rotate(90deg);
        font-size: 1.5rem;
        margin: 0.5rem 0;
    }
    
    .cases-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .proof-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    /* Timeline adjustments */
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        flex-direction: row !important;
        padding-left: 60px;
    }
    
    .timeline-item .timeline-content {
        text-align: left !important;
        margin: 0 0 0 1rem;
    }
    
    .timeline-year {
        position: absolute;
        left: 0;
        min-width: 70px;
    }
    
    /* Connect page */
    .connect-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Logo carousel */
    .logo-carousel {
        gap: 1.5rem;
    }
    
    .media-logos {
        gap: 1rem;
    }
}

/* Tablet and Mobile Devices - Normal Mobile Breakpoint */
@media (max-width: 768px) {
    /* Hero Video Responsive Switching */
    .hero-video-desktop {
        display: none !important;
    }
    
    .hero-video-mobile {
        display: block !important;
    }
    
    /* Mobile video optimization - no fallback images, videos play on all devices */
    .hero-video-mobile {
        z-index: 3;
        opacity: 1;
        display: block !important;
    }
    
    /* Mobile Video Start Button Responsive Adjustments */
    .mobile-video-start-overlay {
        background: rgba(11, 28, 63, 0.85);
    }
    
    .mobile-video-start-container {
        padding: 1.5rem;
        max-width: 280px;
    }
    
    .mobile-video-start-button {
        padding: 16px 28px;
        font-size: 15px;
        min-height: 56px;
    }
    

}

/* Mobile Large */
@media (max-width: 767px) {
    /* Container */
    .container {
        padding: 0 15px;
    }
    
    /* Navigation */
    .nav-container {
        padding: 0 15px;
        height: 60px;
    }
    
    .nav-logo-img {
        width: 35px;
        height: 35px;
    }
    
    .nav-brand-text {
        font-size: 1rem;
        margin-left: 10px;
    }
    
    .page {
        padding-top: 60px;
    }
    
    /* Hero - Ensure mobile video is visible */
    .hero-video-desktop {
        display: none !important;
    }
    
    .hero-video-mobile {
        display: block !important;
        opacity: 1 !important;
    }
    
    .hero-title {
        font-size: 2.2rem;
        line-height: 1.1;
    }
    
    .hero-title-compact {
        font-size: 1.9rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-subtitle-compact {
        font-size: 1rem;
    }
    
    .hero-kpis {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .kpi-item {
        width: 200px;
        padding: 1rem;
    }
    
    /* Typography */
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.4rem; }
    p { font-size: 1rem; }
    
    /* Sections */
    :root {
        --section-padding: 60px 0;
    }
    
    .manifesto-text p {
        font-size: 1.2rem;
    }
    
    /* Grids */
    .value-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .methodology-process {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .methodology-arrow {
        transform: rotate(90deg);
        font-size: 1.2rem;
        margin: 0.5rem 0;
    }
    
    .methodology-item {
        padding: 1.5rem;
        max-width: 100%;
    }
    
    .value-item {
        padding: 1.5rem;
    }
    
    .value-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .proof-grid {
        grid-template-columns: 1fr;
    }
    
    .archive-grid {
        grid-template-columns: 1fr;
    }
    
    /* Expertise tags */
    .expertise-grid {
        gap: 0.8rem;
        justify-content: flex-start;
        align-items: flex-start;
    }
    
    .expertise-tag {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        flex-shrink: 0;
        white-space: nowrap;
        max-width: none;
        background: #FFFFFF !important;
        color: #0B1C3F !important;
        border: 2px solid #1ED5C3 !important;
        font-weight: 600 !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* Articles */
    .articles-filters {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Forms */
    .form-group input,
    .form-group textarea {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
    
    .btn-large {
        padding: 14px 30px;
        font-size: 1.1rem;
    }
    
    /* Page headers */
    .page-header {
        padding: 3rem 0 1.5rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
}

/* Mobile Small */
@media (max-width: 575px) {
    /* Container */
    .container {
        padding: 0 10px;
    }
    
    /* Navigation */
    .nav-container {
        padding: 0 10px;
    }
    
    .nav-brand-text {
        font-size: 0.9rem;
        margin-left: 8px;
    }
    
    /* Hero */
    .hero-title {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-title-compact {
        font-size: 1.6rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-subtitle-compact {
        font-size: 0.9rem;
        margin-bottom: 1.8rem;
    }
    
    .kpi-item {
        width: 180px;
        padding: 0.8rem;
    }
    
    .kpi-number,
    .kpi-symbol {
        font-size: 1.3rem;
    }
    
    .kpi-label {
        font-size: 0.7rem;
    }
    
    /* Typography */
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }
    
    /* Mobile Video Start Button - Small Screens */
    .mobile-video-start-container {
        padding: 1.2rem;
        max-width: 260px;
    }
    
    .mobile-video-start-button {
        padding: 14px 24px;
        font-size: 14px;
        min-height: 52px;
        gap: 10px;
    }
    
    .mobile-video-start-button i {
        font-size: 18px;
    }
    
    .mobile-video-start-text {
        font-size: 13px;
        margin-top: 14px;
    }
    
    /* Sections */
    :root {
        --section-padding: 40px 0;
        --container-padding: 0 10px;
    }
    
    .section-title {
        margin-bottom: 2rem;
    }
    
    .manifesto-text p {
        font-size: 1.1rem;
    }
    
    /* Cards and items */
    .value-item,
    .case-card,
    .article-card,
    .proof-item {
        padding: 1.2rem;
    }
    
    /* Logo carousel */
    .logo-carousel {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .logo-item {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .media-logos {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .media-logo {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    /* Timeline mobile optimization */
    .timeline-item {
        padding-left: 40px;
    }
    
    .timeline-year {
        min-width: 50px;
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .timeline-content {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .timeline-content .timeline-icon {
        margin-bottom: 0.5rem;
    }
    
    /* Contact links */
    .contact-links {
        gap: 0.8rem;
    }
    
    .contact-link {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    /* Filters */
    .articles-filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding: 0.5rem 0;
    }
    
    .filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    /* Buttons in mobile */
    .hero-cta .btn,
    .proof-cta .btn,
    .articles-cta .btn,
    .cta-buttons .btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    /* Proof Page Responsive */
    .proof-hero-title {
        font-size: 2rem;
    }
    
    .proof-hero-subtitle {
        font-size: 1.1rem;
    }
    
    .case-tile {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .case-grid {
        gap: 2rem;
    }
    
    .company-logos {
        gap: 0.8rem;
    }
    
    .company-pill {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .proof-cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1.2rem;
    }
    
    .category-copy {
        max-width: 95%;
    }
    
    .case-block li {
        padding-left: 1.5rem;
        font-size: 0.95rem;
    }
    
    .case-block li::before {
        width: 6px;
        height: 6px;
        top: 0.6rem;
    }
}

/* Extra Small Mobile */
@media (max-width: 375px) {
    .hero-title {
        font-size: 1.6rem;
    }
    
    .hero-title-compact {
        font-size: 1.4rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    /* Extra Small Proof Page */
    .proof-hero-title {
        font-size: 2rem;
        line-height: 1.1;
    }
    
    .proof-hero-subtitle {
        font-size: 1rem;
    }
    
    .category-header h2 {
        font-size: 1.7rem;
    }
    
    .case-block {
        padding: 1.5rem;
    }
    
    .case-block h4 {
        font-size: 1.2rem;
    }
    
    .external-video-link {
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .proof-final-cta h2 {
        font-size: 1.8rem;
    }
    
    .hero-subtitle-compact {
        font-size: 0.8rem;
    }
    
    .kpi-item {
        width: 160px;
        padding: 0.6rem;
    }
    
    .kpi-number,
    .kpi-symbol {
        font-size: 1.1rem;
    }
    
    .value-item,
    .case-card,
    .article-card {
        padding: 1rem;
    }
    
    .value-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    h2 { font-size: 1.3rem; }
    h3 { font-size: 1.1rem; }
    
    /* Expertise tags - Extra small mobile */
    .expertise-tag {
        padding: 0.5rem 1rem !important;
        font-size: 0.8rem !important;
        background: #FFFFFF !important;
        color: #0B1C3F !important;
        border: 2px solid #1ED5C3 !important;
        font-weight: 700 !important;
        box-shadow: 0 3px 6px rgba(0,0,0,0.15) !important;
        min-height: 32px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .btn {
        padding: 8px 20px;
        font-size: 0.8rem;
    }
    
    /* Mobile Video Start Button - Extra Small Screens */
    .mobile-video-start-container {
        padding: 1rem;
        max-width: 240px;
    }
    
    .mobile-video-start-button {
        padding: 12px 20px;
        font-size: 13px;
        min-height: 48px;
        gap: 8px;
    }
    
    .mobile-video-start-button i {
        font-size: 16px;
    }
    
    .mobile-video-start-text {
        font-size: 12px;
        margin-top: 12px;
    }
}

/* Mobile Video Button - Avoid Browser UI Overlays */
@media (max-height: 700px) {
    .mobile-video-start-overlay {
        /* Adjust for phones with bottom navigation bars */
        padding-bottom: 20px;
    }
    
    .mobile-video-start-container {
        /* Move button higher to avoid gesture areas and browser UI */
        transform: translateY(-10px);
    }
}

@media (max-height: 600px) {
    .mobile-video-start-container {
        /* Further adjustment for shorter screens */
        transform: translateY(-20px);
        padding: 1rem;
    }
    
    .mobile-video-start-button {
        min-height: 44px;
        padding: 10px 18px;
    }
    
    .mobile-video-start-text {
        font-size: 12px;
        margin-top: 10px;
    }
}

/* Landscape mobile optimization */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        margin-bottom: 1.5rem;
    }
    
    .hero-kpis {
        margin-bottom: 1.5rem;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .kpi-item {
        width: auto;
        min-width: 100px;
        padding: 0.5rem 1rem;
    }
    
    .hero-cta {
        flex-direction: row;
        gap: 1rem;
    }
}

/* Print styles */
@media print {
    .nav,
    .hero-video,
    .btn,
    .nav-toggle {
        display: none !important;
    }
    
    .page {
        display: block !important;
        padding-top: 0;
    }
    
    .hero {
        height: auto;
        background: var(--midnight-blue);
        color: var(--white);
        padding: 2rem 0;
    }
    
    * {
        box-shadow: none !important;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-video-desktop,
    .hero-video-mobile {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .hero-title,
    .hero-subtitle,
    .hero-kpis,
    .hero-cta {
        animation: none;
    }
}

/* Dark mode support - Replaced with improved implementation in dark-mode-fix.css */