/* 
  AMW Resources FZC - Responsive Styles
  All Media Queries and Mobile Overrides
*/

/* ================================
   LARGE SCREENS (≤1200px)
================================ */
@media (max-width: 1200px) {
    .h1 {
        font-size: 120px;
    }

    .resources-text {
        font-size: 48px;
    }

    .h2 {
        font-size: 56px;
    }

    .about-grid,
    .contact-section {
        flex-direction: column;
        gap: 40px;
    }

    .about-image {
        order: -1;
        height: 400px;
    }

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

/* ================================
   TABLETS (≤1024px)
================================ */
@media (max-width: 1024px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .testimonial-card {
        min-height: auto;
    }

    .testimonials-section h2 {
        font-size: 60px;
    }

    .global-ops-title {
        font-size: 48px;
    }

    .info-panel {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        width: 100%;
        margin-top: 20px;
        opacity: 0;
        max-height: 0;
        overflow: hidden;
        padding: 0;
    }

    .info-panel.visible {
        opacity: 1;
        max-height: 400px;
        padding: 28px;
        transform: none;
    }

    .map-wrapper {
        padding: 20px;
    }
}

/* ================================
   SMALL TABLETS (≤900px)
================================ */
@media (max-width: 900px) {
    .main-header {
        padding: 0 40px;
    }

    .hero {
        padding: 120px 40px 60px;
    }

    .section {
        padding: 80px 40px;
    }

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

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

    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
}

/* ================================
   MOBILE (≤768px)
================================ */
@media (max-width: 768px) {

    /* Root Overrides */
    :root {
        --section-padding: 24px 16px;
        --header-height: 60px;
    }

    body {
        font-size: 16px;
        overflow-x: hidden;
    }

    html,
    body {
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Typography - Mobile Safe */
    .h1 {
        font-size: 48px;
        line-height: 1;
    }

    .h2 {
        font-size: 32px;
        line-height: 1.2;
    }

    .h3 {
        font-size: 24px;
        margin-bottom: 16px;
    }

    .h4 {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .text-body {
        font-size: 16px;
        line-height: 1.5;
    }

    /* Header / Navbar - Hamburger */
    .main-header {
        padding: 0 16px;
        top: 12px;
        z-index: 1000;
    }

    .header-pill {
        display: flex !important;
        padding: 8px 16px;
        gap: 12px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
    }

    .logo {
        height: 40px;
    }

    /* Hide desktop nav links, show hamburger */
    .main-nav {
        display: none !important;
    }

    .header-icons {
        display: flex !important;
        position: relative;
        /* Reset desktop absolute */
        right: auto;
        border-left: none;
        padding-left: 0;
        margin-left: auto;
        gap: 12px;
    }

    .search-trigger {
        display: none;
    }

    .menu-trigger {
        display: flex !important;
        width: 32px;
        height: 32px;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

    /* Mobile nav overlay */
    .mobile-nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        z-index: 9999;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 24px;
    }

    .mobile-nav-overlay.active {
        display: flex;
    }

    .mobile-nav-close {
        position: absolute;
        top: 24px;
        right: 24px;
        width: 40px;
        height: 40px;
        background: transparent;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10000;
    }

    .mobile-nav-overlay .nav-links {
        display: flex;
        flex-direction: column;
        gap: 24px;
        text-align: center;
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .mobile-nav-overlay .nav-links li {
        list-style: none;
    }

    .mobile-nav-overlay .nav-links a {
        font-size: 24px;
        font-weight: 600;
        color: var(--text-dark);
        text-decoration: none;
    }

    .mobile-nav-overlay .nav-links a:hover {
        color: var(--primary-green);
    }

    /* Hero Section - Mobile */
    .hero {
        min-height: 100vh;
        height: auto;
        padding: 0;
    }

    .hero-content-layer {
        padding: 80px 16px 40px;
        align-items: center;
        text-align: center;
    }

    .hero-ui-container {
        flex-direction: column;
        gap: 24px;
    }

    .hero-grid-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .hero-col-left,
    .hero-col-right {
        align-items: center;
        text-align: center;
    }

    .hero-brand-box {
        margin-top: 10vh;
        align-items: center;
    }

    .amw-large {
        font-size: 64px;
        margin-left: 0;
        display: none;
        /* Hide legacy if present */
    }

    /* Mobile AMW Title Override */
    .hero-title-amw {
        width: 100%;
        height: auto;
        font-size: 100px;
        /* Scale down from 200px */
        line-height: 1.1;
        text-align: center;
        margin: 0 auto;
        display: block;
    }

    .resources-subtitle {
        font-size: 24px;
        margin-top: -4px;
    }

    .hero-headline {
        font-size: clamp(24px, 10vw, 40px);
        line-height: 1.1;
        max-width: 100%;
        text-align: center;
        white-space: nowrap;
        display: block;
    }

    .hero-right {
        align-items: center;
        text-align: center;
        width: 100%;
    }

    .hero-headline-box {
        text-align: center;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        transform: none;
    }

    .vertical-indicator {
        display: none;
    }

    .slide-dots {
        left: 50%;
        transform: translateX(-50%);
        bottom: 24px;
    }

    /* Sections - Single Column */
    .section {
        padding: var(--section-padding);
    }

    .section-header {
        text-align: center;
        margin-bottom: 24px;
    }

    .about-content {
        flex-direction: column;
        gap: 24px;
    }

    .about-image {
        width: 100%;
        max-width: 100%;
    }

    .about-text {
        width: 100%;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .service-card {
        padding: 20px;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .product-card {
        min-height: auto;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .testimonial-card {
        padding: 20px;
    }

    .clientele-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .clientele-box {
        grid-template-columns: repeat(2, 1fr);
        padding: 24px;
    }

    /* Clientele Section - Mobile */
    .clientele-section {
        padding: 50px 0;
    }

    .clientele-section-title {
        font-size: 40px;
        padding: 0 24px;
    }

    .clientele-section-subtitle {
        font-size: 15px;
        padding: 0 24px;
    }

    /* Marquee adjustments for mobile */
    .clientele-marquee::before,
    .clientele-marquee::after {
        width: 40px;
    }

    .clientele-marquee-track {
        gap: 24px;
        animation-duration: 25s;
    }

    .clientele-item {
        font-size: 16px;
        padding: 16px 28px;
    }

    .map-container {
        height: 300px;
    }

    /* Text Safety */
    .hero-headline-box,
    .about-text,
    .service-content,
    .testimonial-text {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    /* Interactions - Disable Hover */
    .service-card:hover,
    .testimonial-card:hover,
    .product-card:hover {
        transform: none;
        box-shadow: var(--card-shadow);
    }

    /* Disable 3D tilt on touch devices */
    .tilt-element {
        transform: none !important;
        transition: none !important;
    }

    /* Services Title */
    .services-title {
        font-size: 40px;
    }

    /* Global Ops Title */
    .global-ops-title {
        font-size: 36px;
    }

    .map-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    /* Footer - Mobile */
    .footer-content {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 16px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-columns {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Footer Accordion Behavior on Mobile */
    .footer-col-accordion {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .footer-col-accordion:last-child {
        border-bottom: none;
    }

    .footer-col-title {
        cursor: pointer;
        padding: 16px 0;
        margin-bottom: 0;
        border-bottom: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Plus/Minus Accordion Icon */
    .footer-col-title::after {
        content: '+';
        display: block;
        font-size: 20px;
        font-weight: 400;
        color: rgba(255, 255, 255, 0.6);
        transition: transform 0.3s ease;
    }

    .footer-col-accordion.is-open .footer-col-title::after {
        content: '−';
    }

    /* Side-by-Side Footer Responsive */
    .footer-split-layout {
        grid-template-columns: 1fr;
        gap: 60px;
        padding-bottom: 60px;
    }

    .footer-info-section {
        gap: 40px;
    }

    .footer-brand-desc {
        max-width: 100%;
    }

    .footer-links-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .footer-contact-section {
        padding: 20px;
    }

    .footer-contact {
        text-align: center;
    }

    .contact-title {
        font-size: 36px;
        margin-bottom: 20px;
    }

    .contact-form-footer .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .footer-bottom {
        padding: 20px 0;
    }

    .footer-bottom {
        padding: 30px 0;
    }

}

/* ================================
   EXTRA SMALL DEVICES (≤375px)
================================ */
@media (max-width: 375px) {
    .amw-large {
        font-size: 48px;
    }

    .hero-title-amw {
        font-size: 80px;
        /* Smaller for very small screens */
    }

    .resources-subtitle {
        font-size: 18px;
    }

    .hero-headline {
        font-size: 16px;
    }

    .h2 {
        font-size: 28px;
    }

    .h3 {
        font-size: 20px;
    }
}

/* ================================
   TOUCH DEVICES
================================ */
@media (hover: none) and (pointer: coarse) {

    .service-card:hover,
    .testimonial-card:hover,
    .product-card:hover {
        transform: none;
        box-shadow: var(--card-shadow);
        border-color: transparent;
    }

    .tilt-element {
        transform: none !important;
    }
}