/* Responsive CSS for Arfexa Technologies */

/* Extra Small Devices (< 576px) */
@media (max-width: 575.98px) {
    body {
        font-size: 0.95rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    section {
        padding: 2rem 0;
    }
    
    .hero-section {
        min-height: 300px;
        padding-top: 2rem;
    }
    
    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.95rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .navbar-nav {
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0 !important;
    }
    
    .display-4 {
        font-size: 1.75rem !important;
    }
    
    .display-5 {
        font-size: 1.5rem !important;
    }
    
    .display-6 {
        font-size: 1.25rem !important;
    }

    .hero-section, .hero-slider, .hero-slide { min-height: 590px; }
    .hero-slide-shade { background: linear-gradient(90deg, rgba(7,16,31,.96), rgba(7,16,31,.72)); }
    .hero-inner { padding-top: 4rem; padding-bottom: 3rem; }
    .hero-section h1 { font-size: clamp(2.6rem, 12vw, 3.25rem); margin-bottom: 1.35rem; }
    .hero-copy { font-size: 1rem; line-height: 1.5; }
    .hero-actions { align-items: flex-start; flex-direction: column; gap: 1.25rem; }
    .hero-note { border-left: 0; border-top: 1px solid #4b555e; padding: 1rem 0 0; }
    .hero-note p { margin-bottom: 0; }
    section { padding: 4.5rem 0; }
    .about-hero { padding: 5rem 0 4rem; }
    .about-hero h1 { font-size: 3.2rem; }
    .about-aside { border-left: 0; padding-left: 0; }
    .capability-grid { grid-template-columns: 1fr; }
    .values-grid { grid-template-columns: 1fr 1fr; }
    .services-hero { padding: 5rem 0 4rem; }
    .services-hero h1 { font-size: 3.2rem; }
    .catalog-grid, .approach-grid { grid-template-columns: 1fr; }
    .service-feature { min-height: 0; padding: 2.25rem 1.25rem 2.5rem; }
    .service-number { margin-bottom: 2.5rem; }
    .approach-grid > div { min-height: 170px; }
    .tech-list > div { grid-template-columns: 1fr; gap: .35rem; }
    .services-cta .text-link { display: inline-block; margin: 1.5rem 0 0 !important; }
    .contact-widgets { right: 1rem; bottom: 1rem; gap: .65rem; }
    .whatsapp-fab, .chatbot-toggle { width: 3.1rem; height: 3.1rem; }
    .chatbot-panel { bottom: 3.85rem; }
    .hero-controls { right: 1rem; bottom: 1.5rem; }
    .hero-control { width: 2.2rem; height: 2.2rem; font-size: .75rem; }
    .home-intro, .why-section, .approach-section, .technology-section, .industries-section, .home-cta, .final-cta { padding: 4.5rem 0; }
    .home-service { min-height: 230px; }
    .why-grid, .industry-list { grid-template-columns: 1fr; }
    .why-grid > div { min-height: 0; }
    .home-cta .text-link, .final-cta .text-link { display: inline-block; margin: 1.5rem 0 0 !important; }
    .site-nav .navbar-brand { font-size: .92rem; gap: .5rem; }
    .site-nav .brand-mark { width: 1.9rem; height: 1.9rem; }
    .navbar-toggler { padding: .35rem .5rem; }
    .contact-widgets { bottom: .75rem; }
    main > .container.py-5, main > article.container.py-5 { padding-top: 4.5rem !important; padding-bottom: 4.5rem !important; }
    main > .container.py-5 > h1, main > article.container.py-5 h1 { font-size: 2.8rem; }
    main > .container.py-5 > .d-flex { display: block !important; }
    main > .container.py-5 > .d-flex form { margin-top: 1.5rem; width: 100%; }
    main > .container.py-5 > .d-flex form .form-control { min-width: 0; }
    main > .container.py-5 .card-body, main > article.container.py-5 .border { padding: 1.25rem; }
    main form .btn { width: 100%; }
    .site-nav .navbar-collapse { padding: .75rem 0 0; }
    .site-nav .nav-link { margin-left: 0; padding: .65rem 0 !important; }
    .site-nav .nav-cta { display: inline-block; margin-top: .35rem; }
    .table { font-size: .85rem; }
}

/* Small Devices (576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    section {
        padding: 3rem 0;
    }
    
    section h2 {
        font-size: 2rem;
    }
    
    .btn-group.gap-2 {
        gap: 0.5rem !important;
    }
}

/* Medium Devices (768px and up) */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
    
    section {
        padding: 4rem 0;
    }
}

/* Large Devices (992px and up) */
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

/* Extra Large Devices (1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Extra Extra Large Devices (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Touch Devices */
@media (hover: none) and (pointer: coarse) {
    .btn {
        padding: 0.6rem 1.2rem;
    }
    
    .card:active {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
        transform: translateY(-5px);
    }
}

/* Print Styles */
@media print {
    .navbar, footer, .btn-group, .cta-section {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    a {
        text-decoration: underline;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: more) {
    :root {
        --primary-color: #0047ab;
        --secondary-color: #000000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mobile usability refinements */
@media (max-width: 767.98px) {
    body {
        overflow-x: hidden;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .site-nav .container {
        padding-top: .4rem;
        padding-bottom: .4rem;
    }

    .site-nav .navbar-brand {
        min-width: 0;
        max-width: calc(100% - 4rem);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .site-nav .brand-name {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .site-nav .navbar-collapse {
        max-height: calc(100vh - 5rem);
        overflow-y: auto;
    }

    .site-nav .ms-3 {
        display: flex;
        flex-wrap: wrap;
        gap: .5rem;
        margin: .75rem 0 0 !important;
    }

    .site-nav .ms-3 .btn {
        flex: 1 1 auto;
    }

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

    .hero-actions,
    .btn-group,
    main > .container.py-5 > .d-flex,
    main > article.container.py-5 > .d-flex {
        flex-wrap: wrap;
    }

    .hero-actions .btn,
    main form .btn,
    .btn-group .btn {
        min-height: 2.75rem;
    }

    .hero-actions .text-link,
    .home-cta .text-link,
    .final-cta .text-link,
    .services-cta .text-link {
        margin-left: 0 !important;
    }

    .img-fluid,
    .card-img-top {
        max-width: 100%;
        height: auto;
    }

    .table-responsive {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    main form .form-control,
    main form select,
    main form textarea,
    main form input[type='file'] {
        width: 100%;
        max-width: 100%;
        font-size: 16px;
    }

    main form textarea {
        min-height: 8rem;
    }

    .chatbot-panel {
        right: -.35rem;
        max-width: calc(100vw - 2rem);
    }

    .contact-widgets {
        right: .75rem;
        bottom: .75rem;
    }
}

/* Consistent hero slider layout */
.hero-section,
.hero-slider,
.hero-slide {
    height: 650px;
    min-height: 0;
}

.hero-slider {
    position: relative;
}

.hero-slide {
    display: flex;
    align-items: stretch;
}

.hero-inner {
    width: 100%;
    min-height: 100%;
    align-items: center;
    padding-top: 5rem;
    padding-bottom: 7.5rem;
}

.hero-inner > .row {
    width: 100%;
    align-items: center !important;
}

.hero-section h1 {
    text-wrap: balance;
}

.hero-slide-image {
    object-position: center center;
}

.hero-controls {
    right: max(1rem, calc((100% - 1140px) / 2));
    bottom: 2rem;
}

@media (max-width: 767.98px) {
    .hero-section,
    .hero-slider,
    .hero-slide {
        height: 590px;
    }

    .hero-inner {
        padding-top: 3rem;
        padding-bottom: 7rem;
    }

    .hero-inner > .row {
        align-items: flex-start !important;
    }

    .hero-section h1 {
        max-width: 11ch;
    }

    .hero-note {
        margin-top: 1.25rem;
    }

    .hero-controls {
        right: 1rem;
        bottom: 1.5rem;
    }
}
