/* =====================================================
   AMMABETA TECHNOLOGIES - Responsive Styles
   Breakpoints:
   - Mobile: < 576px
   - Tablet: 576px - 767px
   - Tablet Landscape: 768px - 1023px
   - Desktop: 1024px+
   - Large Desktop: 1200px+
   ===================================================== */

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
    .container {
        padding: 0 var(--spacing-lg);
    }
}

/* Desktop (1024px - 1199px) */
@media (max-width: 1199px) {
    .hero-content {
        gap: var(--spacing-2xl);
    }
    
    .solutions-grid {
        gap: var(--spacing-md);
    }
    
    .solution-card {
        padding: var(--spacing-lg);
    }
    
    .why-us-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .partners-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .footer-main {
        grid-template-columns: 1.5fr repeat(3, 1fr);
        gap: var(--spacing-lg);
    }
}

/* Tablet Landscape (768px - 1023px) */
@media (max-width: 1023px) {
    :root {
        --spacing-3xl: 4rem;
    }
    
    .nav-main {
        display: none;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    /* Mobile Navigation */
    .nav-main.active {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--color-navy);
        padding: var(--spacing-lg);
        overflow-y: auto;
        z-index: 999;
    }
    
    .nav-main.active .nav-list {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }
    
    .nav-main.active .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-main.active .nav-link {
        padding: var(--spacing-md);
        font-size: 1rem;
        justify-content: space-between;
    }
    
    .nav-main.active .dropdown {
        position: static;
        transform: none;
        background: rgba(0, 0, 0, 0.2);
        box-shadow: none;
        border-radius: 0;
        padding: 0 var(--spacing-md);
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition-base);
    }
    
    .nav-main.active .nav-item.dropdown-active .dropdown {
        max-height: 500px;
        opacity: 1;
        visibility: visible;
    }
    
    .nav-main.active .dropdown-link {
        color: rgba(255, 255, 255, 0.75);
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .nav-main.active .dropdown-link:hover {
        background: rgba(255, 255, 255, 0.1);
        color: var(--color-white);
    }
    
    .nav-main.active .header-cta {
        margin-top: var(--spacing-lg);
        flex-direction: column;
        width: 100%;
    }
    
    .nav-main.active .header-cta .btn {
        width: 100%;
    }
    
    /* Hero */
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        padding: var(--spacing-2xl) 0;
    }
    
    .hero-text {
        max-width: 100%;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-visual {
        display: none;
    }
    
    /* Solutions */
    .solutions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Industries */
    .industries-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Case Studies */
    .case-studies-slider {
        grid-template-columns: 1fr;
    }
    
    .case-study-card {
        grid-template-columns: 1fr;
    }
    
    .case-study-image {
        min-height: 200px;
    }
    
    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Partners */
    .partners-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Footer */
    .footer-main {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-brand {
        grid-column: span 2;
    }
    
    /* Service Page */
    .service-overview {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    /* About */
    .about-intro {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .about-image {
        order: -1;
    }
    
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Case Studies Page */
    .case-studies-grid {
        grid-template-columns: 1fr;
    }
    
    .case-study-full {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }
}

/* Tablet Portrait (576px - 767px) */
@media (max-width: 767px) {
    :root {
        --spacing-2xl: 3rem;
        --spacing-3xl: 3rem;
    }
    
    h1 { font-size: clamp(1.75rem, 5vw, 2.5rem); }
    h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
    
    .section {
        padding: var(--spacing-2xl) 0;
    }
    
    /* Hero */
    .hero {
        min-height: auto;
        padding-top: 72px;
    }
    
    .hero-badge {
        font-size: 0.75rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: var(--spacing-lg);
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    /* Solutions */
    .solutions-grid {
        grid-template-columns: 1fr;
    }
    
    .solution-card {
        padding: var(--spacing-lg);
    }
    
    /* Industries */
    .industries-grid {
        grid-template-columns: 1fr;
    }
    
    /* Why Us */
    .why-us-grid {
        grid-template-columns: 1fr;
    }
    
    .why-us-card {
        padding: var(--spacing-lg);
    }
    
    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    /* Partners */
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Trust Bar */
    .trust-bar-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .trust-logos {
        justify-content: center;
    }
    
    /* Footer */
    .footer-main {
        grid-template-columns: 1fr;
        text-align: left;
    }
    
    .footer-brand {
        grid-column: span 1;
    }
    
    .footer-brand p {
        max-width: 100%;
    }
    
    .footer-social {
        justify-content: left;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }
    
    .footer-legal {
        justify-content: center;
    }
    
    /* Features Grid */
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    /* Values Grid */
    .values-grid {
        grid-template-columns: 1fr;
    }
    
    /* Team Grid */
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    /* Process Timeline */
    .process-item {
        grid-template-columns: 60px 1fr;
        gap: var(--spacing-md);
    }
    
    .process-number {
        width: 60px;
        height: 60px;
        font-size: 1.25rem;
    }
    
    .process-item:not(:last-child)::before {
        left: 30px;
        top: 60px;
    }
    
    /* Form Row */
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Contact Info */
    .contact-info {
        text-align: center;
    }
    
    .contact-detail {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    /* Case Study Meta */
    .case-study-meta {
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }
    
    /* CTA Section */
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
}

/* Mobile (< 576px) */
@media (max-width: 575px) {
    :root {
        --container-padding: 1rem;
        --spacing-xl: 2rem;
        --spacing-2xl: 2.5rem;
    }
    
    .header-inner {
        min-height: 64px;
    }
    
    .logo-text {
        font-size: 1.125rem;
    }
    
    .logo-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
    
    /* Buttons */
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
    }
    
    /* Hero */
    .hero-cta {
        flex-direction: column;
    }
    
    .hero-cta .btn {
        width: 100%;
    }
    
    .hero-stats {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-md);
        display: none;
    }
    
    .stat-item {
        text-align: center;
    }
    
    /* Section Header */
    .section-header {
        margin-bottom: var(--spacing-xl);
    }
    
    .section-description {
        font-size: 1rem;
    }
    
    /* Cards */
    .solution-card,
    .feature-card,
    .testimonial-card,
    .value-card {
        padding: var(--spacing-md);
    }
    
    .solution-icon,
    .feature-icon {
        width: 48px;
        height: 48px;
    }
    
    .solution-icon svg,
    .feature-icon svg {
        width: 24px;
        height: 24px;
    }
    
    /* Partners */
    .partner-card {
        padding: var(--spacing-md);
        min-height: 80px;
    }
    
    .partner-card img {
        max-height: 30px;
    }
    
    /* Case Study Metrics */
    .case-study-metrics {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .metric-value {
        font-size: 1.25rem;
    }
    
    /* Team Grid */
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .team-avatar {
        width: 100px;
        height: 100px;
    }
    
    /* Process */
    .process-item {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .process-number {
        margin: 0 auto var(--spacing-md);
    }
    
    .process-item:not(:last-child)::before {
        display: none;
    }
    
    /* FAQ */
    .faq-question {
        padding: var(--spacing-md);
        font-size: 0.9375rem;
    }
    
    .faq-answer-inner {
        padding: 0 var(--spacing-md) var(--spacing-md);
    }
    
    /* Contact Form */
    .contact-form-wrapper {
        padding: var(--spacing-md);
    }
    
    .contact-info {
        padding: var(--spacing-md);
    }
    
    /* Page Header */
    .page-header {
        padding: calc(64px + var(--spacing-2xl)) 0 var(--spacing-2xl);
    }
    
    .breadcrumb {
        font-size: 0.8125rem;
        flex-wrap: wrap;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .hero-grid {
        animation: none;
    }
    
    .floating-card {
        animation: none;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .cta-section,
    .mobile-toggle,
    .btn,
    .hero-visual {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    .hero {
        min-height: auto;
        padding: 20pt 0;
        background: none;
    }
    
    .hero h1 {
        color: #000;
    }
    
    .section {
        padding: 20pt 0;
        page-break-inside: avoid;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 10pt;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --color-border: #000;
        --shadow-sm: none;
        --shadow-md: none;
        --shadow-lg: none;
    }
    
    .btn {
        border-width: 3px;
    }
    
    .solution-card,
    .feature-card,
    .testimonial-card,
    .faq-item {
        border-width: 2px;
        border-color: var(--color-navy);
    }
}

/* Dark Mode Support (Future Enhancement) */
@media (prefers-color-scheme: dark) {
    /* 
    Uncomment and customize when implementing dark mode:
    
    :root {
        --color-white: #0A1F44;
        --color-light-bg: #0F2D5E;
        --color-text-dark: #FFFFFF;
        --color-text-light: #94A3B8;
        --color-border: #1E3A5F;
    }
    */
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
    }
    
    .solution-card:hover,
    .feature-card:hover,
    .industry-card:hover,
    .case-study-single:hover {
        transform: none;
    }
    
    .nav-link:hover svg {
        transform: none;
    }
    
    .dropdown {
        display: none;
    }
}

/* Landscape Phone */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: var(--spacing-xl) 0;
    }
    
    .hero-content {
        padding: var(--spacing-lg) 0;
    }
}
@media (max-width: 1023px) {
    
    /* Mobile Navigation */
    .nav-main {
        display: none;
    }
    
    .mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .nav-main.active {
        display: flex !important;
        flex-direction: column;
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--color-navy);
        padding: var(--spacing-lg);
        overflow-y: auto;
        z-index: 1000;
    }
    
    .nav-main.active .nav-list {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }
    
    .nav-main.active .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-main.active .nav-link {
        padding: var(--spacing-md);
        font-size: 1rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    /* Arrow rotation when dropdown is active */
    .nav-main.active .nav-item.dropdown-active .nav-link svg {
        transform: rotate(180deg);
    }
    
    /* CRITICAL: Dropdown on mobile */
    .nav-main.active .dropdown {
        position: static;
        transform: none;
        background: rgba(0, 0, 0, 0.2);
        box-shadow: none;
        border-radius: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        visibility: visible;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }
    
    /* Show dropdown when parent has dropdown-active class */
    .nav-main.active .nav-item.dropdown-active .dropdown {
        max-height: 500px;
        padding: var(--spacing-sm) 0;
    }
    
    /* Dropdown links */
    .nav-main.active .dropdown-link {
        color: rgba(255, 255, 255, 0.8);
        padding: var(--spacing-sm) var(--spacing-xl);
        display: block;
        border-left: 3px solid transparent;
        transition: all 0.2s ease;
    }
    
    .nav-main.active .dropdown-link:hover {
        background: rgba(255, 255, 255, 0.1);
        color: var(--color-white);
        border-left-color: var(--color-primary);
    }
    
    .nav-main.active .header-cta {
        margin-top: var(--spacing-lg);
        width: 100%;
    }
    
    .nav-main.active .header-cta .btn {
        width: 100%;
    }
    
    body.nav-open {
        overflow: hidden;
    }
    
    /* Hide desktop dropdown on mobile */
    .nav-item .dropdown {
        display: none;
    }
    
    .nav-main.active .nav-item .dropdown {
        display: block;
    }
}
