/* Responsive Web Design CSS - Mobile-first responsive styles */

/* Extra small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Navigation */
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .navbar-toggler {
        padding: 0.25rem 0.5rem;
        font-size: 1rem;
    }
    
    /* Hero sections */
    .hero-title {
        font-size: 1.75rem !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
    }
    
    /* Sections */
    .home-seamless-section,
    .content-section {
        padding: 2rem 0 !important;
    }
    
    .section-title {
        font-size: 1.5rem !important;
    }
    
    .section-subtitle {
        font-size: 1rem !important;
    }
    
    /* Cards */
    .project-card,
    .value-card,
    .team-card {
        margin-bottom: 1.5rem;
    }
    
    /* Grid adjustments */
    .row {
        margin: 0 -0.5rem;
    }
    
    .col, .col-md-4, .col-md-6, .col-lg-6 {
        padding: 0 0.5rem;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer .col-md-4 {
        margin-bottom: 1.5rem;
    }
    
    /* Side menu */
    .side-menu {
        width: 85%;
    }
    
    /* Video container */
    .video-container {
        height: 300px !important;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Navigation */
    .navbar-brand {
        font-size: 1.35rem;
    }
    
    /* Hero sections */
    .hero-title {
        font-size: 2rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.1rem !important;
    }
    
    /* Sections */
    .home-seamless-section,
    .content-section {
        padding: 2.5rem 0 !important;
    }
    
    .section-title {
        font-size: 1.75rem !important;
    }
    
    /* Grid adjustments */
    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    /* Video container */
    .video-container {
        height: 350px !important;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Navigation */
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    /* Hero sections */
    .hero-title {
        font-size: 2.25rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.2rem !important;
    }
    
    /* Sections */
    .home-seamless-section,
    .content-section {
        padding: 3rem 0 !important;
    }
    
    .section-title {
        font-size: 2rem !important;
    }
    
    /* Grid adjustments */
    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    
    /* Video container */
    .video-container {
        height: 400px !important;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Container */
    .container {
        max-width: 960px;
    }
    
    /* Video container */
    .video-container {
        height: 450px !important;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    /* Container */
    .container {
        max-width: 1140px;
    }
    
    /* Video container */
    .video-container {
        height: 500px !important;
    }
}

/* Mobile-specific styles */
@media (max-width: 767.98px) {
    /* Hide desktop elements on mobile */
    .desktop-only {
        display: none !important;
    }
    
    /* Show mobile elements */
    .mobile-only {
        display: block !important;
    }
    
    /* Mobile navigation */
    .navbar-collapse {
        background-color: rgba(44, 62, 80, 0.98);
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
    }
    
    /* Mobile menu button */
    .navbar-toggler {
        border: none;
        background: transparent;
    }
    
    .navbar-toggler:focus {
        outline: none;
        box-shadow: none;
    }
    
    /* Mobile side menu */
    .side-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100%;
        background: white;
        z-index: var(--z-modal);
        transition: right 0.3s ease;
        box-shadow: var(--shadow-lg);
        overflow-y: auto;
    }
    
    .side-menu.active {
        right: 0;
    }
    
    .side-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: var(--z-modal-backdrop);
        display: none;
    }
    
    .side-menu-overlay.active {
        display: block;
    }
    
    /* Mobile timeline */
    .home-timeline-mobile {
        display: block;
    }
    
    .home-timeline-desktop {
        display: none;
    }
    
    /* Mobile image optimization */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Mobile button sizing */
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Mobile form optimization */
    .form-control {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
    
    /* Mobile touch targets */
    .nav-link,
    .btn,
    .dropdown-item {
        min-height: 44px;
        padding: 12px 16px;
    }
    
    /* Mobile scroll prevention */
    body.no-scroll {
        overflow: hidden;
    }
}

/* Desktop-specific styles */
@media (min-width: 768px) {
    /* Hide mobile elements on desktop */
    .mobile-only {
        display: none !important;
    }
    
    /* Show desktop elements */
    .desktop-only {
        display: block !important;
    }
    
    /* Desktop navigation */
    .navbar-nav {
        flex-direction: row;
    }
    
    .nav-item {
        margin-left: 1rem;
    }
    
    /* Desktop timeline */
    .home-timeline-desktop {
        display: block;
    }
    
    .home-timeline-mobile {
        display: none;
    }
    
    /* Desktop side menu */
    .side-menu {
        display: none;
    }
    
    .side-menu-overlay {
        display: none;
    }
}

/* Print styles */
@media print {
    /* Hide non-essential elements */
    .navbar,
    .footer,
    .btn,
    .video-container,
    .social-links,
    .side-menu {
        display: none !important;
    }
    
    /* Adjust layout for print */
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    /* Page breaks */
    .page-break {
        page-break-before: always;
    }
    
    /* Links */
    a {
        color: #000;
        text-decoration: underline;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
    
    /* Images */
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
    
    /* Prevent page breaks inside important elements */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    p, blockquote {
        orphans: 3;
        widows: 3;
    }
}

/* High DPI/Retina displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Use higher resolution images */
    .logo {
        background-image: url('../images/logo@2x.png');
        background-size: contain;
    }
    
    /* Sharper borders */
    .btn,
    .form-control,
    .card {
        border-width: 0.5px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #f0f0f0;
        --bg-light: #2a2a2a;
        --border-color: #444;
    }
    
    body {
        background-color: #1a1a1a;
        color: var(--text-color);
    }
    
    .card {
        background-color: #2a2a2a;
        border-color: #444;
    }
    
    .form-control {
        background-color: #2a2a2a;
        border-color: #444;
        color: var(--text-color);
    }
}

/* Reduced motion preference */
@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;
    }
}

/* Orientation-specific styles */
@media (orientation: portrait) {
    .video-container {
        height: 60vh !important;
    }
}

@media (orientation: landscape) and (max-width: 767.98px) {
    .video-container {
        height: 80vh !important;
    }
    
    .navbar {
        padding: 0.25rem 0;
    }
}

/* Very small screens (watch size) */
@media (max-width: 320px) {
    html {
        font-size: 12px;
    }
    
    .container {
        padding: 0 0.25rem;
    }
    
    .hero-title {
        font-size: 1.5rem !important;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* Large screens (4K and above) */
@media (min-width: 2560px) {
    .container {
        max-width: 2000px;
    }
    
    html {
        font-size: 18px;
    }
    
    .video-container {
        height: 600px !important;
    }
}