/* ==========================================
   RESPONSIVE STYLES
   ========================================== */

/* ==========================================
   LARGE DESKTOP - 1400px and above
   ========================================== */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
}

/* ==========================================
   DESKTOP - 1024px to 1399px
   ========================================== */
@media (max-width: 1399px) {
    :root {
        --container-max: 1200px;
    }

    .hero-title {
        font-size: clamp(2.5rem, 7vw, 5rem);
    }

    .section-heading {
        font-size: clamp(2rem, 5vw, 4rem);
    }
}

/* ==========================================
   TABLET - 768px to 1023px
   ========================================== */
@media (max-width: 1023px) {
    :root {
        --section-padding: 80px 0;
    }

    /* Navigation */
    .nav-menu {
        display: none;
    }

    .navbar .btn-primary {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .logo-image {
        height: 40px;
        max-width: 200px;
    }

    /* Hero Section */
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-image {
        order: -1;
    }

    .device-mockup {
        height: 400px;
    }

    .hero-robot-container {
        height: 400px;
    }

    .hero-robot {
        width: 280px;
        height: 280px;
    }

    /* About Section */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Features Grid */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Services Grid */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Articles Grid */
    .articles-grid {
        grid-template-columns: 1fr;
    }

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

    /* Vertical Menu Text */
    .vertical-menu-text {
        display: none;
    }
}

/* ==========================================
   MOBILE - 480px to 767px
   ========================================== */
@media (max-width: 767px) {
    :root {
        --section-padding: 60px 0;
    }

    .container {
        padding: 0 1.5rem;
    }

    /* Typography */
    .section-heading {
        font-size: clamp(1.75rem, 8vw, 3rem);
        margin-bottom: 1.5rem;
    }

    .section-subheading {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    /* Navigation */
    .logo-image {
        height: 35px;
        max-width: 180px;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .logo-main {
        font-size: 1rem;
    }

    .logo-sub {
        font-size: 0.5rem;
    }

    .footer-logo {
        height: 50px;
        max-width: 250px;
    }

    /* Hero Section */
    .hero {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: 60px;
    }

    .hero-title {
        font-size: clamp(2rem, 10vw, 3.5rem);
    }

    .hero-subtitle {
        font-size: 0.875rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-cta .btn-primary,
    .hero-cta .btn-secondary {
        width: 100%;
        text-align: center;
    }

    .device-mockup {
        height: 300px;
    }

    .hero-robot-container {
        height: 300px;
    }

    .hero-robot {
        width: 220px;
        height: 220px;
    }

    .robot-glow {
        width: 400px;
        height: 400px;
    }

    .scroll-indicator {
        display: none;
    }

    /* Stats Grid */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 3rem;
    }

    .stat-suffix {
        font-size: 2rem;
    }

    /* Feature Cards */
    .feature-image {
        height: 200px;
    }

    .feature-content {
        padding: 1.5rem;
    }

    .feature-content h3 {
        font-size: 1.25rem;
    }

    /* Services Grid */
    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        height: 300px;
    }

    .service-card h3 {
        font-size: 1.25rem;
        padding: 1.5rem;
    }

    /* Partners */
    .partners-carousel {
        gap: 2rem;
    }

    .partner-logo {
        width: 120px;
        height: 60px;
    }

    /* Articles */
    .article-card {
        padding: 1.5rem;
    }

    .article-card h3 {
        font-size: 1.125rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* CTA Section */
    .cta-section {
        padding: 60px 0;
    }

    .btn-primary.large {
        padding: 1.25rem 2.5rem;
        font-size: 0.875rem;
    }

    /* Footer */
    .footer-links {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer {
        padding: 40px 0 20px;
    }

    /* Buttons */
    .cta-row {
        flex-direction: column;
        width: 100%;
    }

    .cta-row .btn-primary {
        width: 100%;
    }

    /* Back to Top */
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 1.5rem;
        right: 1.5rem;
    }

    /* Mobile Menu */
    .mobile-menu {
        padding: 3rem 1.5rem;
    }

    .mobile-menu-items a {
        font-size: 1.5rem;
    }
}

/* ==========================================
   SMALL MOBILE - 320px to 479px
   ========================================== */
@media (max-width: 479px) {
    :root {
        --section-padding: 40px 0;
    }

    .container {
        padding: 0 1rem;
    }

    /* Typography */
    .section-heading {
        font-size: clamp(1.5rem, 9vw, 2.5rem);
        letter-spacing: 1px;
    }

    .large-text {
        font-size: 1.125rem;
    }

    /* Buttons */
    .btn-primary,
    .btn-secondary {
        padding: 0.875rem 2rem;
        font-size: 0.75rem;
    }

    /* Hero */
    .hero-title {
        font-size: clamp(1.75rem, 11vw, 3rem);
    }

    .hero-subtitle {
        font-size: 0.75rem;
        letter-spacing: 1px;
    }

    .device-mockup {
        height: 250px;
    }

    /* Stats */
    .stat-item {
        padding: 1.5rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .stat-suffix {
        font-size: 1.75rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    /* Video Wrapper */
    .video-wrapper {
        margin-bottom: 1rem;
    }

    /* Service Cards */
    .service-card {
        height: 250px;
    }

    /* Hero Robot */
    .hero-robot-container {
        height: 250px;
    }

    .hero-robot {
        width: 180px;
        height: 180px;
    }

    /* Article Cards */
    .article-card h3 {
        font-size: 1rem;
    }

    .article-meta {
        font-size: 0.625rem;
    }

    /* Footer */
    .footer-logo-section h3 {
        font-size: 1.25rem;
    }

    .link-column h4 {
        font-size: 0.875rem;
    }

    .social-icons a {
        width: 35px;
        height: 35px;
    }

    /* Mobile Menu */
    .mobile-menu-items a {
        font-size: 1.25rem;
    }
}

/* ==========================================
   LANDSCAPE MOBILE
   ========================================== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 80px 0 40px;
    }

    .hero-content {
        gap: 2rem;
    }

    .device-mockup {
        height: 200px;
    }

    section {
        padding: 40px 0;
    }

    .scroll-indicator {
        display: none;
    }
}

/* ==========================================
   PRINT STYLES
   ========================================== */
@media print {
    .navbar,
    .mobile-menu,
    .vertical-menu-text,
    .back-to-top,
    .scroll-indicator,
    .hero-cta,
    .cta-row,
    .btn-primary,
    .btn-secondary,
    .social-icons {
        display: none !important;
    }

    body {
        background-color: white;
        color: black;
    }

    .section-background {
        display: none;
    }

    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
}

/* ==========================================
   ACCESSIBILITY - REDUCED MOTION
   ========================================== */
@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;
    }
}

/* ==========================================
   HIGH CONTRAST MODE
   ========================================== */
@media (prefers-contrast: high) {
    :root {
        --cyber-cyan: #00ffdd;
        --cyber-gray: #999999;
    }

    .btn-primary {
        border: 2px solid var(--cyber-darker);
    }

    .btn-secondary {
        border-width: 3px;
    }

    a {
        text-decoration: underline;
    }
}

/* ==========================================
   DARK MODE OVERRIDE (if needed)
   ========================================== */
@media (prefers-color-scheme: light) {
    /* Site is designed for dark mode by default */
    /* Add light mode overrides here if needed */
}

/* ==========================================
   SPECIFIC BREAKPOINT FIXES
   ========================================== */

/* Fix for iPad Pro Portrait */
@media (min-width: 768px) and (max-width: 834px) and (orientation: portrait) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

/* Fix for iPad Pro Landscape */
@media (min-width: 1024px) and (max-width: 1194px) and (orientation: landscape) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Fix for very wide screens */
@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }

    .section-heading {
        font-size: clamp(3rem, 6vw, 6rem);
    }
}

/* ==========================================
   UTILITY CLASSES FOR RESPONSIVE
   ========================================== */

/* Hide on Mobile */
@media (max-width: 767px) {
    .hide-mobile {
        display: none !important;
    }
}

/* Hide on Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
    .hide-tablet {
        display: none !important;
    }
}

/* Hide on Desktop */
@media (min-width: 1024px) {
    .hide-desktop {
        display: none !important;
    }
}

/* Show only on Mobile */
@media (min-width: 768px) {
    .show-mobile-only {
        display: none !important;
    }
}

/* Show only on Tablet */
.show-tablet-only {
    display: none !important;
}

@media (min-width: 768px) and (max-width: 1023px) {
    .show-tablet-only {
        display: block !important;
    }
}

/* Show only on Desktop */
.show-desktop-only {
    display: none !important;
}

@media (min-width: 1024px) {
    .show-desktop-only {
        display: block !important;
    }
}
