/* =====================================================================
   DERMAL — Brand palette override  (project colours)
   Ivory #FAF6F0 · Gold #C29B38 · Espresso #261C18 · Charcoal #2B2625
   Sage #829281 · White #FFFFFF · Beige #EADFD5
   ===================================================================== */
:root{
    --primary-color:#261C18;
    --secondary-color:#FFFFFF;
    --text-color:#2B2625;
    --accent-color:#261C18;
    --accent-secondary-color:#FAF6F0;
    --white-color:#FFFFFF;
    --divider-color:#EADFD5;
    --dark-divider-color:rgba(255,255,255,.14);
    --error-color:#E65757;
    --gold:#C29B38;
    --sage:#829281;
}

/* eyebrow accent dot -> gold */
.section-title h3::before{ background:var(--gold); }
.bg-section.dark-section .section-title h3::before{ background:var(--gold); }

/* primary buttons -> gold, hover -> espresso wash */
.btn-default{ background:var(--gold); color:var(--primary-color); }
.btn-default::after{ background:var(--primary-color); }
.btn-default:hover{ color:var(--white-color); }

/* white button (on dark sections) -> gold on hover */
.btn-default.btn-highlighted{ background:var(--white-color); color:var(--primary-color); }
.btn-default.btn-highlighted::after{ background:var(--gold); }
.btn-default.btn-highlighted:hover{ color:var(--primary-color); }

/* selection */
::selection{ color:var(--primary-color); background-color:var(--gold); filter:none; }

/* ---------- Footer copyright — compact ---------- */
@media (min-width:768px){
    .footer-copyright{ margin-top:38px; padding:20px 0; }
}
.footer-copyright-text p{ font-size:14px; }
.footer-social-links span{ font-size:15px; }
.footer-social-links ul li a{ width:36px; height:36px; }
.footer-social-links ul li a i{ font-size:16px; }

/* ---------- Logos link home ---------- */
.footer-logo a{ display:inline-block; }
.footer-logo a img{ display:block; }
a.navbar-brand, .footer-logo a{ cursor:pointer; }

/* ---------- Testimonials page pagination (6 per page) ---------- */
.testimonial-pagination{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 50px;
}
.testimonial-pagination a{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--divider-color);
    border-radius: 12px;
    background: var(--white-color);
    color: var(--primary-color);
    font-size: 17px;
    font-weight: 600;
    line-height: 1;
    transition: all .3s ease-in-out;
}
.testimonial-pagination a:hover,
.testimonial-pagination a.active{
    background: var(--gold);
    border-color: var(--gold);
    color: var(--primary-color);
}
.testimonial-pagination a.active{ cursor: default; }
.testimonial-pagination a.page-arrow{ font-size: 20px; }

@media (max-width: 767px){
    .testimonial-pagination{ margin-top: 34px; gap: 8px; }
    .testimonial-pagination a{ min-width: 40px; height: 40px; padding: 0 11px; font-size: 15px; border-radius: 10px; }
}

/* =====================================================================
   MOBILE BOTTOM BAR + APPOINTMENT POPUP
   Bar: सिर्फ़ mobile (≤991px), scroll करने पर नीचे से आती है।
   Popup: desktop पर centered dialog, mobile पर bottom-sheet.
   ===================================================================== */
.mobile-bottom-bar{
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99;
    display: none;                                   /* desktop: hidden */
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, .97);
    border-top: 1px solid var(--divider-color);
    box-shadow: 0 -6px 24px rgba(38, 28, 24, .10);
    transform: translateY(120%);
    transition: transform .35s cubic-bezier(.4, 0, .2, 1);
}
.mobile-bottom-bar.show{ transform: translateY(0); }
.mobile-bottom-bar-inner{ display: flex; align-items: center; gap: 10px; }

.mbb-item{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 50px;
    border: 1px solid var(--divider-color);
    border-radius: 14px;
    background: var(--accent-secondary-color);
    color: var(--primary-color);
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: all .3s ease-in-out;
}
.mbb-item i{ font-size: 17px; }
.mbb-call{ flex: 0 0 auto; padding: 0 16px; }
.mbb-call:hover{ background: var(--primary-color); border-color: var(--primary-color); color: var(--white-color); }
.mbb-book{
    flex: 1 1 auto;
    background: var(--gold);
    border-color: var(--gold);
}
.mbb-book:hover{ background: var(--primary-color); border-color: var(--primary-color); color: var(--white-color); }

@media (max-width: 991px){
    .mobile-bottom-bar{ display: block; }
}

/* ---------- Appointment popup ---------- */
.appt-modal{
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
}
.appt-modal.open{ opacity: 1; visibility: visible; }
.appt-modal-overlay{ position: absolute; inset: 0; background: rgba(38, 28, 24, .62); }
.appt-modal-box{
    position: relative;
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--white-color);
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(38, 28, 24, .35);
    transform: translateY(18px) scale(.98);
    transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}
.appt-modal.open .appt-modal-box{ transform: translateY(0) scale(1); }

.appt-modal-head{
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 22px 24px 14px;
    border-bottom: 1px solid var(--divider-color);
}
.appt-modal-head h3{ font-size: 24px; margin: 0 0 4px; color: var(--primary-color); }
.appt-modal-head p{ font-size: 14px; margin: 0; }
.appt-modal-close{
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border: 1px solid var(--divider-color);
    border-radius: 12px;
    background: var(--accent-secondary-color);
    color: var(--primary-color);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all .3s ease-in-out;
}
.appt-modal-close:hover{ background: var(--gold); border-color: var(--gold); }
.appt-modal-body{ padding: 20px 24px 24px; }

/* popup के form fields थोड़ा अलग (ivory) रखें ताकि दिखें */
.appt-modal-form .form-control{ background: var(--accent-secondary-color); }

body.appt-modal-open{ overflow: hidden; }

/* =====================================================================
   FOOTER — mobile layout सुधार
   पहले: quick links एक लंबी single column में, और copyright का text
   left-aligned जबकि social icons centered — इसलिए बेमेल लगता था।
   ===================================================================== */
@media (max-width: 767px){

    .footer-main{ padding: 34px 0 8px; }
    .about-footer{ margin: 0 0 26px 0; }
    .footer-links{ margin-bottom: 26px; }

    /* section headings छोटे + uppercase = साफ़ separation */
    .footer-links h3{
        font-size: 16px;
        letter-spacing: .6px;
        text-transform: uppercase;
        margin-bottom: 14px;
    }
    .footer-links p{ font-size: 15px; line-height: 1.65; }

    /* quick links -> 2 columns (compact, आँख को आसान) */
    .footer-quick-links ul{
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px 18px;
    }
    .footer-quick-links ul li{ margin-bottom: 0; }
    .footer-quick-links ul li a{ font-size: 15px; }

    /* emergency toll-free — mobile पर नहीं */
    .footer-emergency{ display: none; }

    /* phone number — बड़ा + phone icon के ठीक सामने, बीच में */
    .footer-contact-item .footer-contact-content p{
        line-height: 1.2;
        margin: 0;
    }
    .footer-contact-item .footer-contact-content p a{
        font-size: 20px;
        font-weight: 600;
        letter-spacing: .3px;
        color: var(--gold);
    }
    .footer-contact-item .icon-box{ flex: 0 0 50px; }

    /* copyright: सब कुछ center (पहले text left + icons center था) */
    .footer-copyright{
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 18px;
        margin-top: 0;
        padding: 22px 0 18px;
    }
    .footer-copyright-text,
    .footer-copyright-text p{ text-align: center; }
    .footer-copyright-text p{ font-size: 13px; line-height: 1.7; }
    .footer-social-links{ justify-content: center; gap: 14px; }
    .footer-social-links span{ font-size: 15px; }
    .footer-social-links ul li a{ width: 38px; height: 38px; }
    .footer-social-links ul li a i{ font-size: 15px; }
}

@media (max-width: 767px){
    .appt-modal{ padding: 0; align-items: flex-end; }
    .appt-modal-box{
        max-width: 100%;
        max-height: 92vh;
        border-radius: 22px 22px 0 0;
        transform: translateY(100%);
    }
    .appt-modal.open .appt-modal-box{ transform: translateY(0); }
    .appt-modal-head{ padding: 18px 18px 12px; }
    .appt-modal-head h3{ font-size: 20px; }
    .appt-modal-body{ padding: 16px 18px 22px; }
}

/* ---------- Sticky header: bar is ALWAYS fixed, only transform animates ----------
   Switching position (relative -> fixed) collapses the wrapper and makes the
   page jump, and the theme only declares a transition on .hide (so showing
   again snaps). Keeping the bar fixed and animating translateY removes both. */
header.main-header{
    --hdr-top: 0px;                 /* gap above the bar  */
    --hdr-bottom: 0px;              /* gap below the bar  */
    height: calc(var(--hdr-h, 0px) + var(--hdr-top) + var(--hdr-bottom));
}
header.main-header .header-sticky{
    position: fixed;
    top: var(--hdr-top);
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--secondary-color);
    border-bottom: 1px solid var(--divider-color);
    transform: translateY(0);
    transition: transform .38s cubic-bezier(.4, 0, .2, 1);
    will-change: transform;
}
header.main-header .header-sticky.hide{
    transform: translateY(calc(-100% - var(--hdr-top) - 24px));
    transition: transform .38s cubic-bezier(.4, 0, .2, 1);
}
header.main-header .header-sticky.active{
    background: var(--secondary-color);
    border-bottom: 1px solid var(--divider-color);
}

/* ---------- Mobile header: floating rounded bar ---------- */
@media (max-width: 991px){
    /* dark espresso behind the floating header so the gaps around the
       rounded bar match the dark hero instead of the ivory page bg */
    header.main-header{
        --hdr-top: 8px;
        --hdr-bottom: 12px;
        background: #261C18;
    }
    header.main-header .header-sticky{
        top: var(--hdr-top);
        margin: 0 12px;
        border-radius: 22px;
        background: #FFFFFF;
        border-bottom: none;
        box-shadow: 0 6px 22px rgba(38,28,24,.08);
    }
    header.main-header .header-sticky.hide,
    header.main-header .header-sticky.active{
        border-radius: 22px;
        background: #FFFFFF;
        border-bottom: none;
        box-shadow: 0 8px 26px rgba(38,28,24,.12);
    }
    header.main-header .navbar{ padding: 10px 0; }
}

/* ---------- Preloader: guaranteed hide (even if JS/network is slow) ---------- */
@keyframes brandHidePreloader{
    0%{ opacity:1; visibility:visible; }
    99%{ opacity:0; visibility:visible; }
    100%{ opacity:0; visibility:hidden; }
}
.preloader{
    animation: brandHidePreloader .6s ease 2.5s forwards;
}


/* ---------- Image overlays: green gradient -> espresso ---------- */
.service-image figure::before,
.process-video-image figure::before{ background: linear-gradient(180deg, rgba(38,28,24,0) 52.13%, rgba(38,28,24,.9) 81.58%) !important; }
.how-we-work-img figure::before{ background: linear-gradient(180deg, rgba(38,28,24,0) 49.89%, rgba(38,28,24,.9) 78.07%) !important; }
.team-image figure:before{ background: linear-gradient(180deg, rgba(38,28,24,0) 43.17%, rgba(38,28,24,1) 100%) !important; }
.our-dermatology-img figure:before{ background: linear-gradient(180deg, rgba(38,28,24,0) 61.99%, rgba(38,28,24,.8) 100%) !important; }
.contact-us-img figure:before{ background: linear-gradient(180deg, rgba(38,28,24,0) 63.4%, rgba(38,28,24,.8) 93.4%) !important; }

/* =====================================================================
   Mobile: hero CTA strip + about counters
   On phones these stacked as bare paragraphs (heading 18px ≈ body 16px,
   18px icons, no separation) so the section read like pasted plain text.
   Here they become proper cards with a clear hierarchy.
   ===================================================================== */
@media (max-width: 767px){

    /* 1. Hero CTA box -> stacked cards */
    .hero-cta-box{ padding: 30px 0; }
    .hero-cta-info{ display: block; }
    .hero-cta-item{
        width: 100%;
        background: var(--accent-secondary-color);      /* ivory */
        border: 1px solid var(--divider-color);
        border-radius: 18px;
        padding: 18px 20px;
        margin-bottom: 14px;
    }
    .hero-cta-item:last-child{ margin-bottom: 0; }
    .hero-cta-item::before{ display: none; }
    .hero-cta-item-header{ margin-bottom: 12px; }
    .hero-cta-item-header .icon-box{
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        background: var(--white-color);
        border: 1px solid var(--divider-color);
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 12px;
    }
    .hero-cta-item-header .icon-box img{ max-width: 20px; }
    .hero-cta-item-title h3{
        font-size: 19px;
        line-height: 1.25;
        margin: 0;
        color: var(--primary-color);
    }
    .hero-cta-item-content p{
        font-size: 15px;
        line-height: 1.6;
        margin-bottom: 4px;
    }
    .hero-cta-item-content p:last-child{ margin-bottom: 0; }
    .hero-cta-item-content a span{ color: var(--gold); }

    /* 2. About counters -> 2 x 2 stat cards */
    .about-counter-list{
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        margin-top: 26px;
        padding-top: 26px;
    }
    .about-counter-item{
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        background: var(--white-color);
        border: 1px solid var(--divider-color);
        border-radius: 16px;
        padding: 16px 14px;
    }
    .about-counter-item .icon-box{ margin: 0 0 10px; }
    .about-counter-item .icon-box img{ max-width: 32px; }
    .about-counter-item .about-counter-content{ width: 100%; }
    .about-counter-item .about-counter-content h2{
        font-size: 26px;
        line-height: 1.1;
        margin-bottom: 2px;
        color: var(--gold);
    }
    .about-counter-item .about-counter-content p{
        font-size: 13px;
        line-height: 1.45;
    }
}
