/* ==========================================================================
   Responsive Styles - All Media Queries
   ========================================================================== */

/* ---------- Large Tablets / Small Desktops (max-width: 1200px) ---------- */
@media (max-width: 1200px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero__container {
        gap: var(--space-2xl);
    }

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

    /* Steps handled in home.css responsive */

    .site-footer__grid {
        grid-template-columns: 1.2fr 1fr 1fr 1fr;
        gap: var(--space-2xl);
    }

    .product-row {
        gap: var(--space-2xl);
    }
}

/* ---------- Tablets (max-width: 992px) ---------- */
@media (max-width: 992px) {
    /* Header - show hamburger */
    .site-nav {
        display: none;
    }

    .site-header__cta {
        display: none;
    }

    .site-header__toggle {
        display: flex;
    }

    .mobile-menu {
        display: block;
    }

    /* Grids */
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-6 {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Split layout */
    .split {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .split--reverse {
        direction: ltr;
    }

    /* Hero products handled in home.css responsive */

    .hero__stats {
        gap: var(--space-lg);
        padding: var(--space-md) var(--space-lg);
    }

    .hero__stat-num {
        font-size: 1.2rem;
    }

    /* Page Hero */
    .page-hero {
        padding: 8rem 0 4rem;
    }

    .product-hero .split {
        grid-template-columns: 1fr;
    }

    .product-hero__visual {
        display: none;
    }

    /* Product Row */
    .product-row {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .product-row--reverse {
        direction: ltr;
    }

    .product-row__visual {
        order: -1;
    }

    /* Industries Strip */
    .industries-strip {
        gap: var(--space-lg);
    }

    /* About Stats Grid */
    .about-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Footer */
    .site-footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-2xl);
    }

    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

}

/* ---------- Large Phones (max-width: 768px) ---------- */
@media (max-width: 768px) {
    :root {
        --container-px: 1.25rem;
    }

    /* Grids */
    .grid-2 {
        grid-template-columns: 1fr;
    }

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

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

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

    /* Hero */
    .hero {
        min-height: auto;
        padding: 7rem 0 5rem;
    }

    .hero__title {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }

    .hero__badge {
        font-size: var(--fs-xs);
    }

    /* Decorative shapes - hide on mobile */
    .hero__shapes,
    .hero__bg,
    .cta-section__shapes,
    .deco-dot-grid {
        display: none;
    }

    [data-theme="dark"] .hero {
        background: linear-gradient(135deg, #0a0f1e 0%, var(--color-navy) 50%, var(--color-primary-dark) 100%);
    }

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

    /* Steps handled in home.css responsive */

    /* Hero products handled in home.css responsive */

    .hero__stats {
        flex-wrap: wrap;
        gap: var(--space-md);
        justify-content: center;
    }

    .hero__stat-sep { display: none; }

    .industries-strip { gap: var(--space-sm); }

    .ind-chip {
        padding: 8px 14px;
        font-size: var(--fs-xs);
    }

    /* Stats */
    .stats {
        gap: var(--space-xl);
    }

    .stat__number {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    /* About Stats Grid */
    .about-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Product Hero */
    .product-hero {
        padding: 7rem 0 3rem;
    }

    .product-hero .split {
        grid-template-columns: 1fr;
    }

    .product-hero__visual {
        display: none;
    }

    .product-hero__logo {
        height: 40px;
    }

    /* Product Row lists */
    .product-row__lists {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .site-footer__grid {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .site-footer__bottom-inner {
        flex-direction: column;
        text-align: center;
    }

    /* Position card */
    .position-card {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }

    /* Section header */
    .section-header {
        margin-bottom: var(--space-2xl);
    }

    /* Services section - add proper gap when split stacks */
    #services .split {
        gap: var(--space-2xl);
    }

    #services h2 {
        max-width: 100% !important;
    }

    #services .svc-card {
        padding: var(--space-xl);
    }

    /* CTA Section - add side margins on mobile */
    .cta-section {
        margin-left: var(--space-lg);
        margin-right: var(--space-lg);
        margin-top: var(--space-2xl);
        margin-bottom: var(--space-2xl);
    }

    /* Contact form grid */
    .contact-form-wrap .grid-2 {
        grid-template-columns: 1fr;
    }

    /* Buttons */
    .hero__actions {
        flex-direction: column;
        align-items: center;
    }

    .hero__actions .btn {
        width: 100%;
        max-width: 300px;
    }

    /* Page hero */
    .page-hero {
        padding: 7rem 0 3rem;
    }

    .page-hero__title {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    /* Mega menu hide on mobile (handled by mobile menu) */
    .mega-menu {
        display: none !important;
    }
}

/* ---------- Small Phones (max-width: 480px) ---------- */
@media (max-width: 480px) {
    :root {
        --container-px: 1rem;
        --section-py: clamp(3rem, 6vw, 4rem);
    }

    /* Further reduce sizes */
    .hero {
        padding: 6rem 0 4rem;
    }

    .hero__title {
        font-size: 1.5rem;
    }

    .hero__subtitle {
        font-size: var(--fs-body);
    }

    .card {
        padding: var(--space-xl);
    }

    .section-header__title {
        font-size: clamp(1.25rem, 5vw, 1.5rem);
    }

    /* Stats in 2 columns */
    .stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--space-lg);
    }

    /* About Stats Grid */
    .about-stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .office-gallery-row {
        grid-template-columns: 1fr;
    }

    .career-form-wrap {
        padding: var(--space-lg);
    }

    .map-card__embed {
        height: 180px;
    }

    /* Badges wrap */
    .flex-center.flex-wrap {
        justify-content: center;
    }

    /* Button full width */
    .btn--lg {
        padding: 0.875rem 1.5rem;
        font-size: var(--fs-body);
    }
}

/* ---------- Touch Device Optimizations ---------- */
@media (hover: none) {
    /* Disable hover transforms */
    .card:hover {
        transform: none;
    }

    .tilt-card:hover {
        transform: none !important;
    }

    .ind-chip:hover {
        transform: none;
    }

    .why-card:hover {
        transform: none;
    }

    .position-card:hover {
        transform: none;
    }

    /* Ensure tap targets are 44px minimum */
    .btn--sm {
        min-height: 44px;
        min-width: 44px;
    }

    .site-footer__social-link {
        width: 44px;
        height: 44px;
    }

    .mobile-menu__expand {
        min-width: 44px;
        min-height: 44px;
    }
}

/* ---------- Print Styles ---------- */
@media print {
    .site-header,
    .site-footer,
    .mobile-menu,
    .hero__particles,
    .hero__shapes,
    .cta-section__shapes,
    .wave-divider,
    .deco-shape {
        display: none !important;
    }

    .hero {
        min-height: auto;
        padding: 2rem 0;
        background: none !important;
        color: #000;
    }

    .hero__title,
    .page-hero__title {
        color: #000;
    }

    .section--gradient,
    .section--navy {
        background: none !important;
        color: #000;
    }

    body {
        padding-top: 0 !important;
    }
}
