/* ============================================================
   AANDAVAR TILES — GLOBAL DESIGN SYSTEM v4.0
   Sticky header · Floating dial · Back-to-top · Full responsive
   ============================================================ */

/* ---- TOKENS ---- */
:root {
    --green:        #07da63;
    --green-dark:   #05b451;
    --green-deep:   #052e16;
    --green-pale:   #ecfdf5;
    --green-mid:    #bbf7d0;
    --ink:          #0f172a;
    --body:         #334155;
    --muted:        #64748b;
    --line:         #e2e8f0;
    --soft:         #f8fafc;
    --white:        #ffffff;
    --radius-sm:    6px;
    --radius-md:    10px;
    --radius-lg:    14px;
    --radius-xl:    20px;
    --shadow-sm:    0 2px 8px rgba(15,23,42,0.06);
    --shadow-md:    0 8px 24px rgba(15,23,42,0.09);
    --shadow-lg:    0 20px 48px rgba(15,23,42,0.12);
    --shadow-xl:    0 32px 72px rgba(15,23,42,0.16);
    --wrap:         min(1180px, calc(100% - 32px));
    --t:            0.22s ease;
    --header-h:     72px;
}

/* ---- RESET ---- */
*,*::before,*::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
    /* offset anchors so sticky header doesn't cover them */
    scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
    margin: 0;
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--body);
    background: #f8fafc;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    letter-spacing: 0;
}

main,section,article,aside,header,footer,nav,form,div { min-width: 0; }
main { width: 100%; max-width: 100vw; overflow-x: hidden; }

a { color: inherit; text-decoration: none; }
img,video,canvas,iframe,table { max-width: 100%; height: auto; display: block; }

h1,h2,h3,h4,h5,h6 {
    font-family: "Poppins", system-ui, sans-serif;
    color: var(--ink);
    letter-spacing: 0;
    line-height: 1.15;
    margin: 0;
}

p { margin: 0; }
button,input,select,textarea { font-family: inherit; font-size: inherit; }

::-webkit-scrollbar { width: 6px; height: 5px; }
::-webkit-scrollbar-track { background: var(--soft); }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 999px; }
::selection { background: var(--green); color: var(--green-deep); }

/* ============================================================
   TRANSITIONS (global)
   ============================================================ */
a,button,.at-card,.at-btn,.nav-menu a,.nav-cta,.site-brand {
    transition: transform var(--t), background var(--t), color var(--t),
                box-shadow var(--t), border-color var(--t), opacity var(--t);
}

/* ============================================================
   PRELOADER
   ============================================================ */
body.at-loading { overflow: hidden; }

.site-preloader {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: grid;
    place-items: center;
    background: var(--white);
    transition: opacity 0.38s ease, visibility 0.38s ease;
}

.site-preloader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-mark {
    display: grid;
    gap: 14px;
    place-items: center;
    color: var(--green-dark);
    font-weight: 800;
    font-size: 0.96rem;
    animation: fadeUp 0.4s ease both;
}

.preloader-ring {
    width: 52px;
    height: 52px;
    border: 4px solid #dcfce7;
    border-top-color: var(--green);
    border-radius: 50%;
    animation: atSpin 0.8s linear infinite;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes atSpin   { to { transform: rotate(360deg); } }
@keyframes fadeUp   { from { opacity:0;transform:translateY(20px); } to { opacity:1;transform:translateY(0); } }
@keyframes dialPing { 0%,100% { box-shadow:0 0 0 0 rgba(7,218,99,0.55); } 60% { box-shadow:0 0 0 14px rgba(7,218,99,0); } }
@keyframes waPulse  { 0%,100% { box-shadow:0 0 0 0 rgba(37,211,102,0.55); } 60% { box-shadow:0 0 0 14px rgba(37,211,102,0); } }
@keyframes bounceSm { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-4px); } }

.at-reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}
.at-reveal.visible { opacity:1; transform:translateY(0); }

/* ============================================================
   ★ STICKY HEADER (perfect implementation)
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 900;
    width: 100%;
    height: var(--header-h);
    background: rgba(255,255,255,0.97);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 2px 16px rgba(15,23,42,0.06);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: box-shadow var(--t), background var(--t), border-color var(--t);
}

/* Scroll-down: elevated header */
.site-header.scrolled {
    box-shadow: 0 6px 28px rgba(15,23,42,0.14);
    background: rgba(255,255,255,0.99);
}

.site-nav {
    width: var(--wrap);
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

/* Brand */
.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    min-width: 0;
    text-decoration: none;
}

.site-brand img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex: 0 0 48px;
    border-radius: 8px;
}

.brand-copy { min-width: 0; line-height: 1.18; }

.brand-name {
    display: block;
    color: var(--green-dark);
    font-size: 1.22rem;
    font-weight: 900;
    white-space: nowrap;
    letter-spacing: 0;
}

.brand-sub {
    display: block;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Mobile toggle */
.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--ink);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex: 0 0 44px;
    transition: background var(--t), border-color var(--t);
}

.menu-toggle:hover { background: var(--soft); border-color: var(--green); color: var(--green-dark); }

/* Nav wrap */
.nav-menu-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    justify-content: flex-end;
    min-width: 0;
}

.nav-menu {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 2px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-menu a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 40px;
    padding: 6px 9px;
    border-radius: var(--radius-sm);
    color: var(--body);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
}

.nav-menu a i { width: 14px; text-align: center; flex: 0 0 14px; font-size: 0.78em; }

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--green-pale);
    color: var(--green-dark);
}

.nav-menu a.active { font-weight: 800; }

/* CTA button in nav */
.nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 42px;
    padding: 0 18px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--green);
    color: var(--green-deep);
    font-size: 0.86rem;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
    flex: 0 0 auto;
    text-decoration: none;
}

.nav-cta:hover {
    background: var(--green-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(7,218,99,0.32);
    color: var(--white);
}

/* ============================================================
   MOBILE NAV
   ============================================================ */
@media (max-width: 980px) {
    :root { --header-h: 64px; }

    .menu-toggle { display: inline-flex; }

    .nav-menu-wrap {
        display: none;
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 8px 28px rgba(15,23,42,0.12);
        padding: 14px var(--wrap);
        padding-left: max(14px, calc((100% - 1180px) / 2 + 16px));
        padding-right: max(14px, calc((100% - 1180px) / 2 + 16px));
        flex-direction: column;
        gap: 10px;
        z-index: 800;
        align-items: stretch;
    }

    .site-header.menu-open .nav-menu-wrap { display: flex; }

    .nav-menu {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        width: 100%;
    }

    .nav-menu li { width: 100%; }

    .nav-menu a {
        width: 100%;
        height: 46px;
        justify-content: flex-start;
        background: var(--soft);
        border-radius: var(--radius-sm);
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .nav-cta { width: 100%; height: 46px; font-size: 0.9rem; }
}

@media (max-width: 540px) {
    .nav-menu { grid-template-columns: 1fr; }
    .brand-name { font-size: 1.06rem; }
    .brand-sub  { display: none; }
    .site-brand img { width: 40px; height: 40px; flex: 0 0 40px; }
}

/* ============================================================
   ★ FLOATING DIAL BUTTON (+91 8903949000)
   ============================================================ */
.dial-fab {
    position: fixed;
    left: 20px;
    bottom: 92px;         /* above WhatsApp FAB */
    z-index: 5100;
    display: flex;
    align-items: center;
    gap: 0;
    border-radius: 999px;
    background: var(--green);
    color: var(--green-deep);
    text-decoration: none;
    box-shadow: 0 8px 28px rgba(7,218,99,0.45);
    animation: dialPing 2.2s ease infinite;
    overflow: hidden;
    transition: box-shadow var(--t), transform var(--t);
    max-width: 52px;      /* collapsed by default */
}

.dial-fab:hover {
    max-width: 260px;
    box-shadow: 0 12px 36px rgba(7,218,99,0.55);
    transform: translateY(-2px);
}

.dial-fab-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex: 0 0 52px;
    animation: bounceSm 1.8s ease infinite;
}

.dial-fab-label {
    font-size: 0.84rem;
    font-weight: 900;
    white-space: nowrap;
    padding: 0 16px 0 4px;
    opacity: 0;
    max-width: 0;
    transition: opacity 0.25s ease, max-width 0.35s ease, padding 0.35s ease;
    overflow: hidden;
}

.dial-fab:hover .dial-fab-label {
    opacity: 1;
    max-width: 200px;
    padding: 0 16px 0 4px;
}

/* ============================================================
   ★ WHATSAPP FLOATING BUTTON
   ============================================================ */
.wa-fab {
    position: fixed;
    left: 20px;
    bottom: 28px;
    z-index: 5000;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #25d366;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 8px 26px rgba(37,211,102,0.45);
    text-decoration: none;
    animation: waPulse 2.4s ease infinite;
    transition: transform 0.2s, background 0.2s;
}

.wa-fab:hover {
    transform: scale(1.12);
    background: #1ebe5a;
    color: var(--white);
}

/* ============================================================
   ★ BACK-TO-TOP BUTTON
   ============================================================ */
.back-top {
    position: fixed;
    right: 20px;
    bottom: 28px;
    z-index: 5000;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 6px 20px rgba(15,23,42,0.28);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity var(--t), visibility var(--t), transform var(--t), background var(--t);
}

.back-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-top:hover {
    background: var(--green);
    color: var(--green-deep);
    box-shadow: 0 10px 28px rgba(7,218,99,0.35);
    transform: translateY(-3px);
}

/* ============================================================
   BUTTONS — GLOBAL
   ============================================================ */
.at-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 11px 22px;
    border-radius: var(--radius-md);
    font-weight: 800;
    font-size: 0.94rem;
    cursor: pointer;
    border: 2px solid transparent;
    white-space: nowrap;
    text-decoration: none;
    line-height: 1;
}

.at-btn:hover { transform: translateY(-2px); }

.at-btn-green  { background:var(--green);   color:var(--green-deep); border-color:var(--green); }
.at-btn-green:hover  { background:var(--green-dark); border-color:var(--green-dark); box-shadow:0 10px 28px rgba(7,218,99,0.32); color:var(--white); }

.at-btn-dark   { background:var(--ink);    color:var(--white);      border-color:var(--ink); }
.at-btn-dark:hover   { background:#1e293b; box-shadow:0 10px 28px rgba(15,23,42,0.28); color:var(--white); }

.at-btn-outline { background:transparent; color:var(--white); border-color:rgba(255,255,255,0.5); }
.at-btn-outline:hover { background:rgba(255,255,255,0.12); border-color:var(--white); color:var(--white); }

.at-btn-ghost  { background:var(--green-pale); color:var(--green-dark); border-color:var(--green-mid); }
.at-btn-ghost:hover  { background:var(--green-mid); }

.at-btn i { font-size: 0.9em; }

/* ============================================================
   SHARED LAYOUT UTILITIES
   ============================================================ */
.at-wrap { width: var(--wrap); margin: 0 auto; }

.at-section    { padding: clamp(48px,7vw,80px) 0; }
.at-section-sm { padding: clamp(32px,5vw,56px) 0; }

.at-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--green-dark);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.at-section-head { display: grid; gap: 12px; margin-bottom: 36px; }
.at-section-head h2 { font-size: clamp(1.7rem,3.5vw,2.7rem); font-weight:800; line-height:1.12; }
.at-section-head p  { color:var(--body); line-height:1.8; font-size:1.02rem; max-width:680px; }

/* ============================================================
   CARDS
   ============================================================ */
.at-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--t), box-shadow var(--t);
}
.at-card:hover { transform:translateY(-4px); box-shadow:var(--shadow-lg); }

/* ============================================================
   STAT COUNTER (animated counter used on all stat sections)
   ============================================================ */
.stat-number { display:inline-block; }

/* ============================================================
   PAGE HERO BANNER (reusable)
   ============================================================ */
.at-page-hero {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(28px,5vw,56px);
    margin-bottom: 40px;
    color: var(--white);
    box-shadow: var(--shadow-xl);
}

.at-page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(125deg, rgba(5,46,22,0.92) 0%, rgba(15,23,42,0.72) 100%);
    z-index: 1;
}

.at-page-hero > * { position: relative; z-index: 2; }
.at-page-hero .at-eyebrow { color: #86efac; }
.at-page-hero h1 { color:var(--white); font-size:clamp(1.9rem,4.5vw,3.4rem); font-weight:800; margin:12px 0 10px; line-height:1.08; }
.at-page-hero p  { color:#d1fae5; line-height:1.78; font-size:1rem; max-width:680px; }

/* ============================================================
   FORMS
   ============================================================ */
.at-input {
    width: 100%;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-family: inherit;
    font-size: 0.96rem;
    color: var(--ink);
    background: var(--white);
    transition: border-color var(--t), box-shadow var(--t);
    min-width: 0;
}

.at-input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(7,218,99,0.16);
}

.at-input::placeholder { color: var(--muted); }

/* ============================================================
   FORM ALERT TOAST
   ============================================================ */
.site-form-alert {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    z-index: 10000;
    width: min(560px, calc(100vw - 28px));
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 20px 48px rgba(15,23,42,0.22);
    animation: fadeUp 0.35s ease both;
}

.site-form-alert.success { background:#dcfce7; color:#14532d; border:1px solid #86efac; }
.site-form-alert.error   { background:#fee2e2; color:#7f1d1d; border:1px solid #fca5a5; }

/* ============================================================
   COOKIE CONSENT
   ============================================================ */
.cookie-consent {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 18px;
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: min(760px, calc(100vw - 36px));
    padding: 16px 20px;
    background: var(--ink);
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 56px rgba(15,23,42,0.32);
    animation: fadeUp 0.38s ease both;
}

.cookie-consent p { margin:0; font-size:0.88rem; line-height:1.6; }
.cookie-consent a { color:#bbf7d0; font-weight:700; }

.cookie-consent button {
    flex: 0 0 auto;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    background: var(--green);
    color: var(--green-deep);
    font-weight: 900;
    font-size: 0.88rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--t);
}

.cookie-consent button:hover { background: var(--green-dark); }

@media (max-width: 560px) {
    .cookie-consent { flex-direction:column; align-items:stretch; }
}

/* ============================================================
   FOOTER GLOBAL UTILITIES (used by footer.php inline styles too)
   ============================================================ */
.footer-contact-list,
.footer-social-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact-list li {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    margin-bottom: 0.7rem;
    line-height: 1.55;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.88);
}

.footer-contact-list a  { color: rgba(255,255,255,0.88); }
.footer-contact-list a:hover { color: var(--green); }
.footer-contact-list i  { color: var(--green); margin-top: 0.2rem; flex: 0 0 16px; }

.footer-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
}

.footer-social-links a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.18);
    color: var(--white);
    font-size: 0.95rem;
    transition: background var(--t), color var(--t), border-color var(--t);
}

.footer-social-links a:hover {
    background: var(--green);
    color: var(--green-deep);
    border-color: var(--green);
}

/* ============================================================
   ADMIN PANEL
   ============================================================ */
.admin-shell { min-height: 100vh; background: #f8fafc; }
.admin-sidebar { background: #0f172a; color: var(--white); }
.btn-at { background:var(--green)!important; border-color:var(--green)!important; color:var(--green-deep)!important; font-weight:800; }
.btn-at:hover { background:var(--green-dark)!important; border-color:var(--green-dark)!important; }
.admin-media-thumb { width:88px; height:66px; object-fit:cover; border-radius:var(--radius-sm); border:1px solid var(--line); }

/* ============================================================
   RESPONSIVE UTILITIES
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,*::before,*::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 480px) {
    .at-wrap { width: min(100% - 22px, 1180px); }
    :root { --wrap: min(100% - 22px, 1180px); }
}
