:root {
    --medex-navy: #211b57;
    --medex-navy-2: #30266f;
    --medex-orange: #ef4b23;
    --medex-teal: #12888f;
    --medex-ink: #14213d;
    --medex-muted: #65708a;
    --medex-line: #e7ebf3;
    --medex-soft: #f7f9fd;
    --medex-white: #ffffff;
    --medex-shadow: 0 18px 50px rgba(22, 31, 70, 0.12);
    --medex-radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.medex-page {
    color: var(--medex-ink);
    background: #fff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
img { max-width: 100%; }
main#main-content { min-height: 50vh; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
    outline: 3px solid rgba(239, 75, 35, .35);
    outline-offset: 3px;
}
.skip-link {
    position: fixed;
    left: 16px;
    top: -80px;
    z-index: 20000;
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--medex-navy);
    color: #fff;
    transition: top .2s ease;
}
.skip-link:focus { top: 12px; color: #fff; }
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Premium sticky header */
.medex-header {
    position: sticky;
    top: 0;
    z-index: 9998;
    width: 100%;
    background: rgba(255,255,255,.98);
    border-bottom: 1px solid rgba(33,27,87,.08);
    transition: box-shadow .25s ease, transform .25s ease;
}
.medex-header.is-scrolled {
    box-shadow: 0 12px 35px rgba(21, 26, 60, .13);
}
.medex-topbar {
    max-height: 58px;
    overflow: hidden;
    background: linear-gradient(90deg, #f6f8ff 0%, #fff 48%, #fff7f3 100%);
    border-bottom: 1px solid #eceff6;
    transition: max-height .25s ease, opacity .2s ease, border .2s ease;
}
.medex-header.is-scrolled .medex-topbar {
    max-height: 0;
    opacity: 0;
    border-color: transparent;
}
.medex-topbar-inner {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
}
.medex-contact-list { display: flex; align-items: center; gap: 24px; }
.medex-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--medex-navy);
    font-size: 14px;
    font-weight: 650;
    white-space: nowrap;
}
.medex-contact-link:hover { color: var(--medex-orange); }
.medex-contact-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--medex-navy);
    color: #fff;
    font-size: 13px;
    flex: 0 0 32px;
    box-shadow: 0 8px 18px rgba(33, 27, 87, .18);
}
.medex-contact-icon.phone-icon i { transform: scaleX(-1); }
.medex-top-appointment {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 18px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--medex-orange), #ff6a3b);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 10px 22px rgba(239,75,35,.22);
}
.medex-top-appointment:hover { color: #fff; transform: translateY(-1px); }
.medex-navbar-wrap { background: rgba(255,255,255,.98); }
.medex-navbar {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    transition: min-height .25s ease;
}
.medex-header.is-scrolled .medex-navbar { min-height: 70px; }
.medex-brand { flex: 0 0 auto; display: inline-flex; align-items: center; }
.medex-brand img {
    width: clamp(280px, 25vw, 390px);
    height: auto;
    max-height: 68px;
    object-fit: contain;
    transition: width .25s ease, max-height .25s ease;
}
.medex-header.is-scrolled .medex-brand img { width: clamp(245px, 22vw, 335px); max-height: 57px; }
.medex-desktop-nav { margin-left: auto; }
.medex-desktop-nav > ul {
    display: flex;
    align-items: center;
    gap: clamp(12px, 1.4vw, 27px);
    margin: 0;
    padding: 0;
    list-style: none;
}
.medex-desktop-nav li { position: relative; }
.medex-desktop-nav a,
.medex-desktop-nav .nav-dropdown-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 48px;
    padding: 0 1px;
    border: 0;
    background: transparent;
    color: #161925;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .01em;
    cursor: pointer;
    white-space: nowrap;
}
.medex-desktop-nav a::after,
.medex-desktop-nav .nav-dropdown-toggle::after {
    content: '';
    position: absolute;
    left: 50%;
    right: 50%;
    bottom: 3px;
    height: 2px;
    border-radius: 4px;
    background: var(--medex-orange);
    transition: left .2s ease, right .2s ease;
}
.medex-desktop-nav a:hover::after,
.medex-desktop-nav a.active::after,
.medex-desktop-nav .nav-dropdown-toggle:hover::after,
.medex-desktop-nav .nav-dropdown-toggle.active::after { left: 0; right: 0; }
.medex-desktop-nav a:hover,
.medex-desktop-nav a.active,
.medex-desktop-nav .nav-dropdown-toggle:hover,
.medex-desktop-nav .nav-dropdown-toggle.active { color: var(--medex-navy); }
.nav-dropdown {
    position: absolute;
    top: calc(100% + 9px);
    left: 50%;
    z-index: 60;
    min-width: 280px;
    margin: 0;
    padding: 10px;
    list-style: none;
    border: 1px solid #edf0f6;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 20px 55px rgba(26, 31, 65, .18);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 10px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.nav-dropdown-small { min-width: 170px; }
.has-dropdown:hover > .nav-dropdown,
.has-dropdown:focus-within > .nav-dropdown,
.has-dropdown.open > .nav-dropdown { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.nav-dropdown li a {
    display: flex;
    min-height: 42px;
    padding: 9px 12px;
    border-radius: 9px;
    font-weight: 600;
    color: #3a4052;
    white-space: normal;
}
.nav-dropdown li a::after { display: none; }
.nav-dropdown li a:hover { background: #f7f5ff; color: var(--medex-navy); }
.medex-mobile-actions { display: none; align-items: center; gap: 10px; }
.mobile-icon-button,
.medex-menu-toggle {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e8ebf3;
    background: #fff;
    color: var(--medex-navy);
    box-shadow: 0 8px 22px rgba(31, 35, 70, .08);
}
.mobile-icon-button i { transform: scaleX(-1); }
.medex-menu-toggle { flex-direction: column; gap: 4px; cursor: pointer; }
.medex-menu-toggle span { width: 19px; height: 2px; border-radius: 3px; background: var(--medex-navy); }
.medex-mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 10002;
    width: min(88vw, 390px);
    height: 100dvh;
    padding: 18px;
    background: #fff;
    box-shadow: -20px 0 70px rgba(18, 22, 55, .22);
    transform: translateX(105%);
    transition: transform .28s ease;
    overflow-y: auto;
}
.medex-mobile-menu.open { transform: translateX(0); }
.medex-mobile-menu-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 2px 18px; border-bottom: 1px solid var(--medex-line); }
.medex-mobile-menu-head strong { font-size: 21px; color: var(--medex-navy); }
.medex-mobile-menu-head button { width: 40px; height: 40px; border: 0; border-radius: 10px; background: #f3f4f9; color: var(--medex-navy); }
.medex-mobile-menu nav { display: grid; gap: 4px; padding-top: 14px; }
.medex-mobile-menu nav > a,
.medex-mobile-menu summary {
    display: flex;
    min-height: 48px;
    align-items: center;
    padding: 10px 13px;
    border-radius: 10px;
    color: #242a3a;
    font-weight: 700;
    cursor: pointer;
}
.medex-mobile-menu nav > a:hover,
.medex-mobile-menu summary:hover { background: #f7f7fc; color: var(--medex-navy); }
.medex-mobile-menu details a { display: block; margin-left: 14px; padding: 10px 14px; border-left: 2px solid #ebe7ff; color: #5b6274; font-size: 14px; }
.medex-mobile-menu .mobile-book-button { justify-content: center; margin-top: 12px; background: var(--medex-orange); color: #fff; }
.medex-menu-backdrop { position: fixed; inset: 0; z-index: 10001; background: rgba(12,15,36,.55); opacity: 0; visibility: hidden; transition: .25s ease; }
.medex-menu-backdrop.open { opacity: 1; visibility: visible; }

/* Hero and page section fixes */
.page-index .banner-section { margin-top: 0; }
.page-index .slides_ { min-height: clamp(430px, 49vw, 780px); background-size: cover; background-position: center; }
.page-index ._slide1 { background-image: url('../images/1.jpeg'); }
.page-index .scroll-btns { pointer-events: none; }
.breadcrumb { margin-bottom: 0 !important; }
.inner-pages { padding-top: 70px; padding-bottom: 80px; }

/* Global premium cards and reveal animation */
.medex-reveal { opacity: 0; transform: translateY(26px); transition: opacity .65s ease, transform .65s cubic-bezier(.2,.8,.2,1); }
.medex-reveal.is-visible { opacity: 1; transform: translateY(0); }
.medex-card-hover { transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
.medex-card-hover:hover { transform: translateY(-8px); box-shadow: var(--medex-shadow); }
.services_item .ser_blocks,
.why-item,
.content-box,
.testimonial-block,
.video-card,
.gallery-card,
.facility-card { will-change: transform; }

/* Stats */
.page-index .stat-wrap { transform: scale(.92); }
.page-index .white-card { box-shadow: 0 16px 45px rgba(22,27,66,.14); }
.page-index .white-card h2 { color: var(--medex-navy); }
.page-index .white-card p { color: var(--medex-muted); }

/* Continuous insurance ticker */
.insurance-marquee-section {
    position: relative;
    overflow: hidden;
    padding: 92px 0;
    background: linear-gradient(135deg, #1d174d 0%, #2e246c 62%, #1a6677 130%);
}
.insurance-marquee-section::before,
.insurance-marquee-section::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 3;
    pointer-events: none;
}
.insurance-marquee-section::before { left: 0; background: linear-gradient(90deg, #1d174d, transparent); }
.insurance-marquee-section::after { right: 0; background: linear-gradient(270deg, #262061, transparent); }
.insurance-heading { position: relative; z-index: 4; margin-bottom: 12px; color: #fff; text-align: center; font-weight: 750; }
.insurance-note { position: relative; z-index: 4; max-width: 760px; margin: 0 auto 34px; color: rgba(255,255,255,.76); text-align: center; font-size: 14px; }
.insurance-marquee { overflow: hidden; }
.insurance-track {
    display: flex;
    align-items: center;
    width: max-content;
    animation: insuranceScroll var(--ticker-duration, 42s) linear infinite;
}
.insurance-marquee:hover .insurance-track { animation-play-state: paused; }
.insurance-logo-card {
    width: 180px;
    height: 104px;
    margin-right: 22px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 16px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 16px 38px rgba(7,9,31,.2);
}
.insurance-logo-card img { max-width: 100%; max-height: 74px; object-fit: contain; }
@keyframes insuranceScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Forms */
.medex-form-card {
    padding: clamp(24px, 4vw, 42px);
    border: 1px solid var(--medex-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--medex-shadow);
}
.medex-form-card h2, .medex-form-card h3 { color: var(--medex-navy); }
.medex-field { margin-bottom: 18px; }
.medex-field label { display: block; margin-bottom: 7px; color: #353c50; font-weight: 700; font-size: 14px; }
.medex-field .form-control {
    min-height: 48px;
    border: 1px solid #dfe4ee;
    border-radius: 11px;
    padding: 10px 13px;
    color: #1f2638;
    background: #fff;
}
.medex-field textarea.form-control { min-height: 110px; resize: vertical; }
.medex-field .form-control:focus { border-color: var(--medex-navy-2); box-shadow: 0 0 0 4px rgba(48,38,111,.09); }
.medex-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--medex-muted); }
.medex-consent input { margin-top: 4px; }
.medex-primary-button {
    min-height: 48px;
    padding: 0 24px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--medex-orange), #ff6d3f);
    color: #fff;
    font-weight: 750;
    box-shadow: 0 12px 26px rgba(239,75,35,.2);
    cursor: pointer;
}
.medex-primary-button:hover { transform: translateY(-2px); }
.medex-alert { padding: 13px 16px; margin-bottom: 18px; border-radius: 10px; font-size: 14px; }
.medex-alert-success { background: #eaf9f1; color: #17653d; border: 1px solid #c6ecd8; }
.medex-alert-error { background: #fff0f0; color: #a02626; border: 1px solid #f2c7c7; }
.honeypot-field { position: absolute !important; left: -9999px !important; opacity: 0 !important; height: 1px !important; width: 1px !important; }

/* Facilities */
.facilities-intro { max-width: 850px; margin: 0 auto 38px; text-align: center; color: var(--medex-muted); line-height: 1.7; }
.facility-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.facility-card {
    overflow: hidden;
    border: 1px solid var(--medex-line);
    border-radius: var(--medex-radius);
    background: #fff;
    box-shadow: 0 11px 34px rgba(28,35,72,.09);
}
.facility-card-image { height: 285px; padding: 16px; display: flex; align-items: center; justify-content: center; background: linear-gradient(145deg, #fff, #f7f9fc); }
.facility-card-image img { width: 100%; height: 100%; object-fit: contain; border: 0 !important; outline: 0 !important; }
.facility-card-body { padding: 19px 20px 22px; border-top: 1px solid var(--medex-line); }
.facility-card-body h2 { margin: 0 0 8px; color: var(--medex-navy); font-size: 18px; line-height: 1.35; }
.facility-card-body p { margin: 0; color: var(--medex-muted); font-size: 14px; line-height: 1.6; }
/* Remove legacy red search overlay and coloured inner borders */
.page-facilities .gallery_block .box-content,
.page-facilities .gallery_block .icon,
.page-facilities .gallery_block .box::before,
.page-facilities .gallery_block .box::after { display: none !important; }
.page-facilities .gallery_block .box img { border: 0 !important; outline: 0 !important; }

/* Gallery and videos */
.gallery-premium-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 22px; }
.gallery-card { overflow: hidden; border-radius: 17px; background: #fff; border: 1px solid var(--medex-line); box-shadow: 0 10px 30px rgba(28,35,72,.08); }
.gallery-card a { display: block; }
.gallery-card img { width: 100%; height: 260px; object-fit: cover; transition: transform .45s ease; }
.gallery-card:hover img { transform: scale(1.045); }
.gallery-card-caption { padding: 14px 16px; color: var(--medex-navy); font-weight: 700; }
.video-premium-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
.video-card { border-radius: 17px; overflow: hidden; border: 1px solid var(--medex-line); background: #fff; box-shadow: 0 10px 30px rgba(28,35,72,.08); }
.video-card iframe { display: block; width: 100%; aspect-ratio: 16/9; border: 0; }
.video-card-body { padding: 16px 18px 19px; }
.video-card-body h2 { margin: 0; font-size: 18px; color: var(--medex-navy); }
.video-card-body p { margin: 8px 0 0; color: var(--medex-muted); font-size: 13px; }

/* Contact */
.contact-premium-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: stretch; }
.contact-map-card, .contact-info-card { border-radius: 20px; overflow: hidden; background: #fff; border: 1px solid var(--medex-line); box-shadow: var(--medex-shadow); }
.contact-map-card iframe { width: 100%; height: 100%; min-height: 520px; border: 0; }
.contact-info-card { padding: 32px; }
.contact-info-card h2 { color: var(--medex-navy); margin-bottom: 22px; }
.contact-info-row { display: flex; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--medex-line); }
.contact-info-row:last-of-type { border-bottom: 0; }
.contact-info-row .contact-info-icon { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: #f2efff; color: var(--medex-navy); }
.contact-info-row h3 { margin: 0 0 5px; font-size: 15px; color: var(--medex-navy); }
.contact-info-row p { margin: 0; color: var(--medex-muted); }
.contact-cta-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 24px; }
.contact-cta-row a { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; font-weight: 700; }
.contact-cta-primary { color: #fff; background: var(--medex-orange); }
.contact-cta-secondary { color: var(--medex-navy); background: #f2efff; }

/* Legal pages / doctor/service additions */
.medex-content-card { max-width: 960px; margin: 0 auto; padding: clamp(24px,4vw,46px); border: 1px solid var(--medex-line); border-radius: 20px; background: #fff; box-shadow: var(--medex-shadow); }
.medex-content-card h2, .medex-content-card h3 { color: var(--medex-navy); }
.medex-content-card p, .medex-content-card li { color: #4f586e; line-height: 1.75; }
.doctor-premium-card { display: grid; grid-template-columns: 330px 1fr; gap: 36px; align-items: center; padding: 30px; border: 1px solid var(--medex-line); border-radius: 22px; background: #fff; box-shadow: var(--medex-shadow); }
.doctor-premium-card img { width: 100%; max-height: 410px; object-fit: cover; border-radius: 17px; }
.doctor-premium-card h2 { color: var(--medex-navy); }
.doctor-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 15px 0; }
.doctor-tags span { padding: 7px 11px; border-radius: 999px; background: #f2efff; color: var(--medex-navy); font-size: 13px; font-weight: 700; }

/* Footer */
.medex-footer { padding: 74px 0 22px; background: linear-gradient(140deg, #17133d, #29205f 72%, #183e57); color: rgba(255,255,255,.78); }
.medex-footer-grid { display: grid; grid-template-columns: 1.3fr .8fr 1fr 1.25fr; gap: 42px; }
.medex-footer-logo { width: 300px; max-width: 100%; padding: 9px 12px; border-radius: 10px; background: #fff; }
.medex-footer p { line-height: 1.75; }
.medex-footer h3 { margin: 0 0 20px; color: #fff; font-size: 18px; }
.medex-footer ul { margin: 0; padding: 0; list-style: none; }
.medex-footer li { margin-bottom: 10px; }
.medex-footer a { color: rgba(255,255,255,.78); }
.medex-footer a:hover { color: #fff; }
.medex-socials { display: flex; gap: 9px; margin-top: 20px; }
.medex-socials a { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: rgba(255,255,255,.1); color: #fff; }
.footer-contact-list li { display: flex; gap: 11px; align-items: flex-start; }
.footer-contact-list i { margin-top: 5px; color: #ff8866; }
.medex-footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 46px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.14); }
.medex-footer-bottom p { margin: 0; font-size: 13px; }
.medex-footer-bottom nav { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; }

/* Quick buttons */
.medex-quick-actions { position: fixed; left: 14px; top: 52%; z-index: 9000; display: grid; gap: 8px; }
.medex-quick-actions a { width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 10px 24px rgba(20,25,60,.2); }
.quick-whatsapp { background: #0abb67; font-size: 22px; }
.quick-appointment { background: var(--medex-navy); }
.medex-scroll-top { position: fixed; right: 18px; bottom: 22px; z-index: 9000; width: 43px; height: 43px; border: 0; border-radius: 12px; background: var(--medex-orange); color: #fff; opacity: 0; visibility: hidden; transform: translateY(10px); transition: .2s ease; }
.medex-scroll-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.medex-mobile-cta { display: none; }

/* Legacy conflict neutralisation */
.header-top { position: static !important; box-shadow: none !important; }
.main-header, .sticky-header, .mobile-menu, .social-links-one, .int_infosidebar { /* legacy header is no longer rendered */ }

@media (max-width: 1199px) {
    .medex-topbar-inner { gap: 15px; }
    .medex-contact-list { gap: 14px; }
    .medex-desktop-nav > ul { gap: 12px; }
    .medex-desktop-nav a, .medex-desktop-nav .nav-dropdown-toggle { font-size: 13px; }
    .medex-brand img { width: 270px; }
}

@media (max-width: 991px) {
    .medex-topbar { display: none; }
    .medex-navbar { min-height: 72px; }
    .medex-header.is-scrolled .medex-navbar { min-height: 66px; }
    .medex-brand img, .medex-header.is-scrolled .medex-brand img { width: min(68vw, 315px); max-height: 55px; }
    .medex-desktop-nav { display: none; }
    .medex-mobile-actions { display: flex; }
    .facility-grid, .gallery-premium-grid, .video-premium-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .contact-premium-grid { grid-template-columns: 1fr; }
    .contact-map-card iframe { min-height: 390px; }
    .medex-footer-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .doctor-premium-card { grid-template-columns: 260px 1fr; }
}

@media (max-width: 767px) {
    body.medex-page { padding-bottom: 65px; }
    .medex-navbar { min-height: 66px; padding-left: 14px; padding-right: 14px; }
    .medex-brand img, .medex-header.is-scrolled .medex-brand img { width: min(62vw, 250px); max-height: 50px; }
    .mobile-icon-button, .medex-menu-toggle { width: 39px; height: 39px; border-radius: 10px; }
    .page-index .slides_ { min-height: 340px; background-position: 58% center; }
    .page-index .scroll-btns { display: none; }
    .inner-pages { padding-top: 42px; padding-bottom: 56px; }
    .insurance-marquee-section { padding: 65px 0; }
    .insurance-logo-card { width: 145px; height: 88px; margin-right: 14px; }
    .facility-grid, .gallery-premium-grid, .video-premium-grid { grid-template-columns: 1fr; gap: 16px; }
    .facility-card-image { height: 255px; }
    .gallery-card img { height: 240px; }
    .contact-info-card { padding: 24px; }
    .contact-cta-row { grid-template-columns: 1fr; }
    .medex-footer { padding-top: 56px; }
    .medex-footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .medex-footer-bottom { align-items: flex-start; flex-direction: column; }
    .doctor-premium-card { grid-template-columns: 1fr; padding: 22px; }
    .doctor-premium-card img { max-height: 380px; }
    .medex-quick-actions { display: none; }
    .medex-scroll-top { bottom: 78px; }
    .medex-mobile-cta {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9900;
        display: grid;
        grid-template-columns: .8fr 1.2fr;
        min-height: 62px;
        padding-bottom: env(safe-area-inset-bottom);
        background: #fff;
        box-shadow: 0 -12px 35px rgba(20,25,60,.15);
    }
    .medex-mobile-cta a { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--medex-navy); font-weight: 750; }
    .medex-mobile-cta a:last-child { background: var(--medex-orange); color: #fff; }
    .medex-field .form-control { font-size: 16px; }
}

@media (max-width: 420px) {
    .medex-brand img, .medex-header.is-scrolled .medex-brand img { width: min(58vw, 215px); }
    .medex-mobile-actions { gap: 7px; }
    .mobile-icon-button, .medex-menu-toggle { width: 37px; height: 37px; }
    .page-index .slides_ { min-height: 300px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .medex-reveal { opacity: 1; transform: none; }
}

.animations-off .medex-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }

.section-kicker { display:inline-block; margin-bottom:9px; color:var(--medex-orange); font-size:12px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
.appointment-gallery-card { overflow:hidden; border:1px solid var(--medex-line); border-radius:22px; background:#fff; box-shadow:var(--medex-shadow); }
.appointment-gallery-card > img { width:100%; max-height:360px; object-fit:cover; }
.appointment-gallery-copy { padding:28px; }
.appointment-gallery-copy h2, .appointment-intro h2 { color:var(--medex-navy); }
.appointment-gallery-copy ul { margin:18px 0 0; padding:0; list-style:none; display:grid; gap:9px; }
.appointment-gallery-copy li i { margin-right:8px; color:var(--medex-teal); }
.appointment-intro { padding:10px 24px 10px 0; }
.appointment-intro p { color:var(--medex-muted); line-height:1.7; }
.appointment-intro img { margin-top:18px; border-radius:18px !important; box-shadow:var(--medex-shadow); }
.scheme-icon { width:76px; height:76px; margin:0 auto 18px; border-radius:22px; display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg,var(--medex-navy),var(--medex-navy-2)); color:#fff; font-size:30px; box-shadow:0 15px 30px rgba(33,27,87,.2); }
@media(max-width:767px){.appointment-intro{padding-right:0}.appointment-gallery-copy{padding:22px}}

/* ===== Footer compact + contrast fix (2026-07-22) ===== */
.medex-footer {
    padding: 38px 0 14px !important;
    color: #e8e5f2 !important;
}

.medex-footer-grid {
    grid-template-columns: 1.2fr .78fr .92fr 1.18fr !important;
    gap: 30px !important;
    align-items: start !important;
}

.medex-footer-logo {
    width: 270px !important;
    padding: 7px 10px !important;
}

.medex-footer p,
.medex-footer .medex-footer-grid p,
.medex-footer .medex-footer-bottom p,
.medex-footer .medex-footer-bottom .copyright {
    color: #e8e5f2 !important;
}

.medex-footer-grid > div:first-child > p {
    max-width: 320px !important;
    margin: 10px 0 0 !important;
    font-size: 14px !important;
    line-height: 1.55 !important;
}

.medex-footer h3 {
    margin-bottom: 14px !important;
    font-size: 17px !important;
}

.medex-footer li {
    margin-bottom: 7px !important;
    line-height: 1.45 !important;
}

.medex-footer a,
.medex-footer li,
.medex-footer li span,
.medex-footer .footer-contact-list a,
.medex-footer .footer-contact-list span {
    color: #eeeaf8 !important;
}

.medex-socials {
    margin-top: 14px !important;
}

.medex-socials a {
    width: 34px !important;
    height: 34px !important;
    border-radius: 9px !important;
}

.medex-footer-bottom {
    margin-top: 24px !important;
    padding-top: 14px !important;
    min-height: 0 !important;
}

.medex-footer-bottom p,
.medex-footer-bottom nav,
.medex-footer-bottom nav a {
    font-size: 12px !important;
    color: #eeeaf8 !important;
}

.medex-footer-bottom nav {
    gap: 13px !important;
}

@media (max-width: 991px) {
    .medex-footer {
        padding: 34px 0 12px !important;
    }

    .medex-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 26px 32px !important;
    }
}

@media (max-width: 767px) {
    .medex-footer {
        padding: 30px 0 12px !important;
    }

    .medex-footer-grid {
        grid-template-columns: 1fr !important;
        gap: 22px !important;
    }

    .medex-footer-logo {
        width: 245px !important;
    }

    .medex-footer-bottom {
        margin-top: 20px !important;
        padding-top: 13px !important;
        gap: 10px !important;
    }

    .medex-footer-bottom nav {
        gap: 10px 14px !important;
    }
}
.floating-social {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 9990;
    display: flex;
    flex-direction: column;
}

.floating-social a {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: width 0.25s ease;
}

.floating-social a:hover {
    width: 50px;
}

.floating-social a:nth-child(1) {
    background: #4267b2;
}

.floating-social a:nth-child(2) {
    background: #e1306c;
}

.floating-social a:nth-child(3) {
    background: #1da1f2;
}

.floating-social a:nth-child(4) {
    background: #ff0000;
}

@media (max-width: 767px) {
    .floating-social a {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .floating-social a:hover {
        width: 36px;
    }
}.appointment-gallery-card {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    overflow: hidden;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 12px 35px rgba(31, 19, 72, 0.12);
}

.appointment-gallery-image {
    display: block;
    width: 100%;
    height: 360px;
    object-fit: cover;
}

.appointment-gallery-copy {
    padding: 28px;
}

.appointment-gallery-copy span {
    color: #f0522d;
    font-weight: 700;
}

.appointment-gallery-copy h2 {
    margin: 8px 0 12px;
    color: #281451;
}

.appointment-gallery-copy p {
    color: #52556a;
    line-height: 1.7;
}

.appointment-gallery-copy ul {
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.appointment-gallery-copy li {
    margin-bottom: 10px;
    color: #30334a;
}

.appointment-gallery-copy li i {
    margin-right: 8px;
    color: #f0522d;
}

@media (max-width: 767px) {
    .appointment-gallery-image {
        height: 240px;
    }

    .appointment-gallery-copy {
        padding: 22px;
    }
}