/* ============================================================
   GAUDEV MOBILE IMPROVEMENTS
   Mobile-first fixes, animations, FAQ accordion, UX polish.
   NO color or brand identity changes.
   ============================================================ */

/* -------------------------------------------------------
   1. GLOBAL MOBILE BASE FIXES
   ------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Ensure all sections don't overflow horizontally */
section,
.container,
.row,
[class*="col-"] {
    max-width: 100%;
}

/* Minimum readable font size - only for content areas, NOT nav */
body,
p,
.text-body {
    font-size: max(16px, 1rem);
    line-height: 1.65;
}

/* -------------------------------------------------------
   2. TOUCH TARGET SIZES (min 48px for all tappables)
   ------------------------------------------------------- */
@media (max-width: 768px) {

    /* Touch targets - ONLY on mobile */
    button,
    .vs-btn,
    [role="button"],
    input[type="submit"],
    input[type="button"] {
        min-height: 48px;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    /* Navigation links */
    .vs-mobile-menu li a {
        min-height: 48px;
        display: flex;
        align-items: center;
        padding: 10px 20px;
        font-size: 16px;
    }

    .main-menu li a {
        font-size: 15px;
    }

    /* CTA Buttons prominence */
    .vs-btn {
        font-size: 16px;
        padding: 14px 24px;
        border-radius: 6px;
        width: auto;
        min-width: 160px;
        text-align: center;
    }
}

/* -------------------------------------------------------
   DESKTOP NAV SINGLE-ROW FIX
   Reduces spacing so all 7 nav links fit on one horizontal line.
   Colors, fonts, and brand identity are not changed.
   ------------------------------------------------------- */

/* Force the top-level nav list to stay on one line */
.main-menu>ul {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    white-space: nowrap;
}

/* Reduce per-item margin (was 15px each side → now 8px) */
.main-menu>ul>li {
    margin: 0 8px !important;
}

.main-menu>ul>li:first-child {
    margin-left: 0 !important;
}

.main-menu>ul>li:last-child {
    margin-right: 0 !important;
}

/* On mid-size desktop (1025–1280px) compress a little more */
@media (min-width: 992px) and (max-width: 1280px) {
    .main-menu a {
        font-size: 13.5px;
    }

    .main-menu>ul>li {
        margin: 0 5px !important;
    }
}

/* Prevent the header main row itself from wrapping */
.header-main .row {
    flex-wrap: nowrap !important;
}

/* --------------------------------------- */
/* 3. NAVIGATION / HAMBURGER MENU
   ------------------------------------------------------- */
.vs-menu-wrapper {
    z-index: 100000;
}

.vs-menu-toggle {
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
}

.vs-menu-toggle:hover,
.vs-menu-toggle:focus {
    background: rgba(0, 0, 0, 0.05);
    outline: 2px solid transparent;
}

@media (max-width: 991px) {
    .sticky-active.active {
        width: 100%;
    }

    .header-main .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Ensure header notice is hidden on mobile; it's dense */
    .header-notice {
        display: none !important;
    }

    /* Mobile menu full overlay */
    .vs-menu-area {
        padding: 20px 0;
    }

    .vs-mobile-menu ul {
        padding: 0 20px;
    }

    .vs-mobile-menu li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    /* Opening animation on the mobile nav */
    .vs-body-visible .vs-menu-wrapper {
        animation: slideInLeft 0.25s ease forwards;
    }

    @keyframes slideInLeft {
        from {
            transform: translateX(-100%);
            opacity: 0;
        }

        to {
            transform: translateX(0);
            opacity: 1;
        }
    }
}

/* -------------------------------------------------------
   4. HERO SLIDER / CAROUSEL - TOUCH SUPPORT
   ------------------------------------------------------- */
@media (max-width: 768px) {

    /* Disable heavy parallax on mobile */
    .parallax {
        background-attachment: scroll !important;
        transform: none !important;
    }

    /* Slider text readable on mobile */
    .vs-hero-carousel .ls-layer h1,
    .vs-hero-carousel .ls-layer h2 {
        font-size: clamp(22px, 5vw, 36px) !important;
        line-height: 1.3;
    }

    .vs-hero-carousel .ls-layer p {
        font-size: 14px !important;
    }

    /* Breadcumb hero title */
    .breadcumb-title {
        font-size: clamp(24px, 6vw, 40px);
    }
}

/* -------------------------------------------------------
   5. LAYOUT & SECTION STACKING ON MOBILE
   ------------------------------------------------------- */
@media (max-width: 767px) {

    /* Basic spacing */
    .space,
    .space-top {
        padding-top: 50px;
    }

    .space,
    .space-md-bottom,
    .space-bottom {
        padding-bottom: 50px;
    }

    /* Fix row from causing overflow */
    .row {
        margin-left: 0;
        margin-right: 0;
    }

    [class*="col-"] {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* About section image fix */
    .vs-surface,
    .about-img3 {
        width: 100%;
        max-width: 100%;
    }

    .vs-surface img,
    .about-img3 img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    /* About section text */
    .about-content {
        padding: 20px 0 0;
    }

    /* Exp box positioning */
    .exp-box-bottom {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 12px;
        display: inline-flex;
        align-items: center;
        padding: 10px 20px;
    }

    /* Product table - scrollable on mobile */
    .med-list {
        width: 100%;
        overflow-x: auto;
        display: block;
    }

    /* Isotope filter items – single column on smallest screens */
    .filter-item {
        width: 100% !important;
    }

    /* Footer: stack gracefully */
    .footer-top .row {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
    }

    .footer-social {
        justify-content: center;
        display: flex;
        gap: 12px;
    }

    .widget-area .row {
        gap: 28px;
    }

    /* Contact form full width */
    .form-wrap3 {
        padding: 20px 15px;
    }

    /* Map iframe */
    .contact-map {
        height: 260px !important;
        margin-top: 30px !important;
    }

    .contact-map iframe {
        width: 100% !important;
        height: 260px !important;
    }

    /* Company-list logo grid */
    .med-list td {
        padding: 8px;
    }

    .med-list td img {
        max-width: 120px;
        height: auto;
    }

    /* Mission/Vision layout */
    .flex-row-reverse {
        flex-direction: column !important;
    }

    /* Input fields - full width and large */
    .form-control,
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea {
        font-size: 16px;
        /* Prevents iOS zoom */
        padding: 12px 14px;
        width: 100%;
        min-height: 48px;
    }

    textarea.form-control {
        min-height: 100px;
    }

    /* Section title */
    .section-title h2,
    .section-title .h1 {
        font-size: clamp(24px, 6vw, 36px);
        line-height: 1.3;
    }

    /* Trust badges / feature boxes */
    .vs-icon-box {
        padding: 20px 15px;
    }

    /* Brand logos carousel */
    .brand img {
        max-width: 100px;
        height: auto;
    }
}

/* -------------------------------------------------------
   6. IMAGE LAZY LOADING FADE-IN
   ------------------------------------------------------- */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.35s ease;
}

img[loading="lazy"].loaded,
img[loading="lazy"][src] {
    opacity: 1;
}

/* -------------------------------------------------------
   7. WOW.JS ANIMATION FIXES ON MOBILE
   ------------------------------------------------------- */
@media (max-width: 767px) {

    /* Override WOW animations to be simpler on mobile */
    .wow {
        animation-duration: 0.4s !important;
        animation-delay: 0s !important;
        visibility: visible !important;
    }

    /* Remove heavier animated effects - just fade */
    .wow.fadeInLeft,
    .wow.fadeInRight,
    .wow.slideInLeft,
    .wow.slideInRight,
    .wow.bounceIn {
        animation-name: fadeIn !important;
    }

    /* Disable parallax animations entirely on mobile */
    [data-parallax-image] {
        background-attachment: scroll !important;
    }
}

/* Globally, prefer user motion preferences */
@media (prefers-reduced-motion: reduce) {

    .wow,
    .animated {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* -------------------------------------------------------
   8. SCROLL-TO-TOP BUTTON
   ------------------------------------------------------- */
.scrollToTop {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

@media (max-width: 767px) {
    .scrollToTop {
        bottom: 100px;
        /* above chatbot bubble */
        right: 16px;
    }
}

/* -------------------------------------------------------
   9. CHATBOT FIXES & MOBILE VISIBILITY
   ------------------------------------------------------- */

/* Ensure chatbot is above everything */
#gaudev-ai-chat {
    position: fixed !important;
    inset: auto 20px 20px auto !important;
    z-index: 999999 !important;
}

/* Chat bubble always visible */
#ga-bubble {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    display: grid !important;
    place-items: center !important;
    position: relative !important;
    z-index: 999999 !important;
    cursor: pointer !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35) !important;
}

/* Pulse animation on the bubble to draw attention */
#ga-bubble::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--brand, #25eb2f);
    opacity: 0;
    animation: ga-pulse 2.5s ease-in-out infinite;
}

@keyframes ga-pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    70% {
        transform: scale(1.18);
        opacity: 0;
    }

    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

/* Chat panel mobile: full screen sheet */
@media (max-width: 640px) {
    #gaudev-ai-chat {
        inset: auto 12px 12px auto !important;
    }

    #ga-bubble {
        width: 56px !important;
        height: 56px !important;
    }

    #ga-overlay {
        padding: 0 !important;
        place-items: stretch !important;
        inset: 0 !important;
        position: fixed !important;
    }

    #ga-panel {
        width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }

    #ga-input {
        font-size: 16px !important;
        /* prevent iOS zoom */
    }
}

/* -------------------------------------------------------
   10. FAQ ACCORDION STYLES
   ------------------------------------------------------- */
.vs-faq-wrapper {
    padding: 60px 0;
}

.vs-faq-wrapper .section-title {
    margin-bottom: 40px;
}

/* Accordion container */
.faq-accordion {
    max-width: 900px;
    margin: 0 auto;
}

/* Single FAQ item */
.faq-item {
    border: 1px solid #e8eef5;
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: box-shadow 0.25s ease;
    background: #fff;
}

.faq-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.faq-item.faq-open {
    box-shadow: 0 6px 24px rgba(3, 71, 108, 0.12);
    border-color: #03476c;
}

/* FAQ question button */
.faq-question {
    width: 100%;
    background: transparent;
    border: none;
    text-align: left;
    padding: 18px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #1a2e44;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 60px;
    line-height: 1.4;
    transition: background 0.2s;
}

.faq-question:hover {
    background: #f7f9fb;
}

.faq-item.faq-open .faq-question {
    color: #03476c;
    background: #f0f6fb;
}

/* Icon indicator */
.faq-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e8f0f7;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.25s;
}

.faq-icon svg {
    width: 14px;
    height: 14px;
    stroke: #03476c;
    stroke-width: 2.5;
    fill: none;
    transition: stroke 0.2s;
}

.faq-item.faq-open .faq-icon {
    transform: rotate(45deg);
    background: #03476c;
}

.faq-item.faq-open .faq-icon svg {
    stroke: #fff;
}

/* FAQ answer panel */
.faq-answer {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer-inner {
    padding: 0 20px 18px 20px;
    font-size: 15px;
    line-height: 1.75;
    color: #4a5e72;
    border-top: 1px solid #e8eef5;
    padding-top: 14px;
}

/* Mobile FAQ fixes */
@media (max-width: 767px) {
    .faq-question {
        font-size: 15px;
        padding: 16px 16px;
        min-height: 56px;
    }

    .faq-answer-inner {
        font-size: 14px;
        padding: 12px 16px 16px;
    }

    .vs-faq-wrapper {
        padding: 40px 0;
    }
}

/* -------------------------------------------------------
   11. OVERALL UX POLISH
   ------------------------------------------------------- */

/* Focus indicators for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #03476c;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Smooth page reveal - no FOUC */
body {
    animation: bodyFadeIn 0.3s ease forwards;
}

@keyframes bodyFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Fix sticky header covering anchors */
html {
    scroll-padding-top: 100px;
}

/* Page load - preloader fix */
.preloader {
    z-index: 999998;
}

/* Social links on contact page - fix alignment */
.social-links ul {
    display: flex;
    gap: 12px;
    list-style: none;
    padding: 0;
    flex-wrap: wrap;
}

.social-links a {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Footer widget links touchable - ONLY in footer, not main nav */
.footer-wrapper .menu li a,
.widget-area .menu li a {
    min-height: 40px;
    display: flex;
    align-items: center;
    padding: 4px 0;
}

@media (max-width: 767px) {

    /* Scrollable product table */
    .ttm-tabs .content-tab {
        overflow-x: auto;
    }

    /* Ensure form submit button is prominent on mobile */
    .vs-btn.style2 {
        width: 100%;
        justify-content: center;
        font-size: 16px;
    }

    /* Logo sizing */
    .header2-logo img {
        max-height: 55px;
        width: auto;
    }

    /* Phone numbers in header, easy to tap */
    .header-top-info a[href^="tel"] {
        font-size: 14px;
        min-height: 36px;
        display: flex;
        align-items: center;
    }

    /* Stat counters */
    .counter {
        font-size: clamp(28px, 8vw, 48px);
    }

    /* Breadcrumb */
    .breadcumb-wrapper {
        padding: 50px 0 40px;
    }

    /* Section GEO tag */
    p.fs-18 {
        font-size: 15px !important;
    }
}