/* ==========================================================================
   MangoDent — "Enamel" public website
   Layered on top of the template's custom.css. Loaded last.

   The template is built on CSS variables, so the palette is retuned at the
   root and the futuristic layer (aurora, glass, the diagnostic ring motif)
   is added on top of the existing components.
   ========================================================================== */

:root {
    /* Template tokens, retuned to the MangoDent mark */
    --primary-color: #02181c;
    --secondary-color: #eaf6f4;
    --text-color: #4a6b6a;
    --accent-color: #0d9488;
    --white-color: #ffffff;
    --divider-color: rgba(94, 234, 212, 0.18);
    --dark-divider-color: rgba(13, 148, 136, 0.16);
    --error-color: #e11d48;
    --default-font: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;

    /* Enamel system */
    --md-enamel-300: #5eead4;
    --md-enamel-500: #14b8a6;
    --md-enamel-700: #0d9488;
    --md-enamel-900: #0f766e;
    --md-ink: #02181c;
    --md-glaze: #ccfbf1;

    --md-font-display: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
    --md-font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", monospace;

    --md-grad: linear-gradient(115deg, #14b8a6 0%, #0d9488 55%, #0f766e 100%);
    --md-grad-hover: linear-gradient(115deg, #2dd4bf 0%, #14b8a6 55%, #0d9488 100%);
    --md-edge: rgba(13, 148, 136, 0.18);
    --md-wash: rgba(13, 148, 136, 0.07);
    --md-ease: cubic-bezier(0.22, 1, 0.36, 1);

    --md-sheen: linear-gradient(
        90deg,
        transparent 10%,
        rgba(13, 148, 136, 0.3) 38%,
        rgba(94, 234, 212, 0.9) 50%,
        rgba(13, 148, 136, 0.3) 62%,
        transparent 90%
    );
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

body {
    font-family: var(--default-font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.hero-content h1,
.section-title h2 {
    font-family: var(--md-font-display);
    letter-spacing: -0.03em;
}

.section-title h2,
.hero-content h1 {
    font-weight: 600;
}

/* Section eyebrows become instrument labels with the diagnostic-ring bullet */
.section-title h3 {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--md-font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.22em;
    padding-left: 0;
    color: var(--md-enamel-700);
}

/* The template absolutely-positions this bullet at left:0 with a background
   image; ours joins the inline-flex row instead, so position must be reset. */
.section-title h3::before {
    content: "";
    position: static;
    transform: none;
    flex: none;
    width: 10px;
    height: 10px;
    background: none;
    filter: none;
    border-radius: 50%;
    border: 1px dashed var(--md-enamel-500);
    animation: md-spin 6s linear infinite;
}

/* The template draws its own bullet with a pseudo-element; ours replaces it. */
.section-title h3::after {
    display: none !important;
}

@keyframes md-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Accented words in headings keep the template's solid accent colour, which is
   now enamel teal. Gradient text is deliberately NOT used here: the headings run
   through GSAP SplitText, which re-wraps each character in its own element, so a
   background-clipped span would render its letters invisible. */

/* --------------------------------------------------------------------------
   Brand lockup
   -------------------------------------------------------------------------- */

.navbar-brand.md-site-brand,
.footer-logo .md-site-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
}

.md-site-brand__mark {
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 12px;
    filter: drop-shadow(0 4px 14px rgba(13, 148, 136, 0.35));
}

.md-site-brand__word {
    font-family: var(--md-font-display);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--md-ink);
    white-space: nowrap;
}

.md-site-brand__word em {
    font-style: normal;
    color: var(--md-enamel-700);
}

.footer-logo .md-site-brand__word {
    color: #ffffff;
}

.footer-logo .md-site-brand__word em {
    color: var(--md-enamel-300);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.main-header {
    background-color: rgba(234, 246, 244, 0.82);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
    border-bottom: 1px solid var(--md-edge);
}

.header-sticky.fixed-top .main-header,
.main-header.sticky {
    background-color: rgba(255, 255, 255, 0.86);
}

.navbar .navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.2s var(--md-ease);
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--md-enamel-700);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn-default {
    position: relative;
    background: var(--md-grad);
    border-radius: 99px;
    overflow: hidden;
    box-shadow: 0 12px 26px -14px rgba(13, 148, 136, 0.85);
    transition: box-shadow 0.25s var(--md-ease), transform 0.25s var(--md-ease);
}

/* Enamel sheen sweep */
.btn-default::before {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 45%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: skewX(-18deg);
    transition: left 0.7s var(--md-ease);
    pointer-events: none;
    z-index: 0;
}

.btn-default:hover {
    background: var(--md-grad-hover);
    transform: translateY(-2px);
    box-shadow: 0 18px 34px -16px rgba(13, 148, 136, 0.95);
}

.btn-default:hover::before {
    left: 130%;
}

.btn-default.btn-highlighted {
    background: transparent;
    color: var(--md-enamel-700);
    border: 1px solid var(--md-edge);
    box-shadow: none;
}

.btn-default.btn-highlighted:hover {
    background: var(--md-wash);
    color: var(--md-enamel-900);
}

/* --------------------------------------------------------------------------
   Hero — the futuristic layer
   -------------------------------------------------------------------------- */

.hero {
    position: relative;
    background-color: var(--secondary-color);
    background-image: none;
    overflow: hidden;
}

/* Drifting aurora tinted with the enamel gradient */
.hero::before {
    content: "";
    position: absolute;
    inset: -25%;
    background:
        radial-gradient(closest-side, rgba(94, 234, 212, 0.55), transparent 70%) 18% 22% / 55% 55% no-repeat,
        radial-gradient(closest-side, rgba(20, 184, 166, 0.35), transparent 70%) 82% 78% / 60% 60% no-repeat;
    filter: blur(34px);
    animation: md-drift 26s var(--md-ease) infinite alternate;
    pointer-events: none;
    z-index: 0;
}

/* Clinical grid, masked to fade at the edges */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(13, 148, 136, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(13, 148, 136, 0.07) 1px, transparent 1px);
    background-size: 68px 68px;
    mask-image: radial-gradient(85% 70% at 50% 40%, #000 15%, transparent 80%);
    -webkit-mask-image: radial-gradient(85% 70% at 50% 40%, #000 15%, transparent 80%);
    pointer-events: none;
    z-index: 0;
}

.hero .container,
.hero > * {
    position: relative;
    z-index: 1;
}

@keyframes md-drift {
    from {
        transform: translate3d(-3%, -2%, 0) scale(1);
    }
    to {
        transform: translate3d(4%, 3%, 0) scale(1.09);
    }
}

/* The diagnostic ring, orbiting behind the hero portrait */
.hero-image {
    position: relative;
}

.hero-image::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(560px, 90%);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px dashed rgba(13, 148, 136, 0.35);
    animation: md-spin 80s linear infinite;
    pointer-events: none;
    z-index: 0;
}

.hero-image::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(420px, 70%);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px dashed rgba(13, 148, 136, 0.22);
    animation: md-spin 55s linear infinite reverse;
    pointer-events: none;
    z-index: 0;
}

.hero-image > * {
    position: relative;
    z-index: 1;
}

/* --------------------------------------------------------------------------
   Page header
   -------------------------------------------------------------------------- */

.page-header {
    position: relative;
    background-color: var(--secondary-color);
    background-image: none;
    overflow: hidden;
}

.page-header::before {
    content: "";
    position: absolute;
    inset: -30%;
    background:
        radial-gradient(closest-side, rgba(94, 234, 212, 0.45), transparent 70%) 22% 30% / 50% 60% no-repeat,
        radial-gradient(closest-side, rgba(20, 184, 166, 0.28), transparent 70%) 80% 70% / 55% 60% no-repeat;
    filter: blur(32px);
    pointer-events: none;
}

.page-header::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(13, 148, 136, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(13, 148, 136, 0.07) 1px, transparent 1px);
    background-size: 68px 68px;
    mask-image: radial-gradient(80% 80% at 50% 50%, #000 10%, transparent 80%);
    -webkit-mask-image: radial-gradient(80% 80% at 50% 50%, #000 10%, transparent 80%);
    pointer-events: none;
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.page-header-box h1 {
    font-family: var(--md-font-display);
    letter-spacing: -0.035em;
}

/* --------------------------------------------------------------------------
   Cards — glass with an enamel edge
   -------------------------------------------------------------------------- */

.service-item,
.why-choose-item,
.counter-item,
.team-member-item,
.testimonial-box-item,
.blog-item,
.contact-us-item,
.dental-process-item {
    position: relative;
    background-color: rgba(255, 255, 255, 0.82);
    -webkit-backdrop-filter: blur(12px) saturate(130%);
    backdrop-filter: blur(12px) saturate(130%);
    border: 1px solid var(--md-edge);
    box-shadow: 0 16px 38px -26px rgba(2, 40, 44, 0.42);
    transition: transform 0.3s var(--md-ease), box-shadow 0.3s var(--md-ease),
        border-color 0.3s var(--md-ease);
}

/* Enamel sheen along the top edge — the mark's glaze highlight */
.service-item::after,
.why-choose-item::after,
.contact-us-item::after {
    content: "";
    position: absolute;
    inset: -1px -1px auto;
    height: 1px;
    background: var(--md-sheen);
    opacity: 0;
    transition: opacity 0.3s var(--md-ease);
    pointer-events: none;
    z-index: 2;
}

.service-item:hover,
.why-choose-item:hover,
.counter-item:hover,
.team-member-item:hover,
.contact-us-item:hover {
    transform: translateY(-4px);
    border-color: rgba(13, 148, 136, 0.42);
    box-shadow: 0 26px 50px -28px rgba(2, 40, 44, 0.5);
}

.service-item:hover::after,
.why-choose-item:hover::after,
.contact-us-item:hover::after {
    opacity: 1;
}

/* Service icons sit in an enamel well */
.icon-box img,
.service-item .icon-box img {
    filter: drop-shadow(0 4px 10px rgba(13, 148, 136, 0.3));
}

/* --------------------------------------------------------------------------
   Counters
   -------------------------------------------------------------------------- */

.counter-item h2,
.counter-item .counter {
    font-family: var(--md-font-display);
    background: linear-gradient(115deg, var(--md-enamel-500), var(--md-enamel-900));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.counter-title p,
.counter-item p {
    font-family: var(--md-font-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.form-control,
.form-select {
    border-radius: 12px;
    border: 1px solid var(--md-edge);
    color: var(--md-ink);
    transition: border-color 0.2s var(--md-ease), box-shadow 0.2s var(--md-ease);
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(13, 148, 136, 0.5);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
}

.form-control::placeholder {
    color: #8aa8a6;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.main-footer {
    position: relative;
    background-color: var(--primary-color);
    background-image: none;
    overflow: hidden;
}

.main-footer::before {
    content: "";
    position: absolute;
    inset: -40% -10% auto;
    height: 120%;
    background:
        radial-gradient(closest-side, rgba(20, 184, 166, 0.3), transparent 70%) 15% 20% / 55% 70% no-repeat,
        radial-gradient(closest-side, rgba(13, 148, 136, 0.22), transparent 70%) 85% 60% / 50% 70% no-repeat;
    filter: blur(40px);
    pointer-events: none;
}

.main-footer .container {
    position: relative;
    z-index: 1;
}

.main-footer .footer-links h3 {
    font-family: var(--md-font-mono);
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--md-enamel-300);
}

.main-footer .footer-links ul li a:hover {
    color: var(--md-enamel-300);
}

.footer-copyright {
    border-top: 1px solid var(--divider-color);
}

.footer-copyright-text a {
    color: var(--md-enamel-300);
}

/* --------------------------------------------------------------------------
   For dentists — the join page
   -------------------------------------------------------------------------- */

.md-join-intro {
    padding: 100px 0 40px;
}

.md-join-intro .section-title {
    margin-bottom: 50px;
}

.md-join-intro .section-title p {
    margin: 18px auto 0;
    max-width: 62ch;
}

/* Standalone card — deliberately NOT built on the template's .why-choose-item,
   which is display:flex and would lay the label, heading and copy out as
   side-by-side columns. */
.md-join-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: calc(100% - 30px);
    margin-bottom: 30px;
    padding: 28px 26px;
    border-radius: 22px;
    background-color: rgba(255, 255, 255, 0.86);
    -webkit-backdrop-filter: blur(12px) saturate(130%);
    backdrop-filter: blur(12px) saturate(130%);
    border: 1px solid var(--md-edge);
    box-shadow: 0 16px 38px -26px rgba(2, 40, 44, 0.42);
    transition: transform 0.3s var(--md-ease), box-shadow 0.3s var(--md-ease),
        border-color 0.3s var(--md-ease);
}

.md-join-card::after {
    content: "";
    position: absolute;
    inset: -1px -1px auto;
    height: 1px;
    border-radius: 22px 22px 0 0;
    background: var(--md-sheen);
    opacity: 0;
    transition: opacity 0.3s var(--md-ease);
    pointer-events: none;
}

.md-join-card:hover {
    transform: translateY(-4px);
    border-color: rgba(13, 148, 136, 0.42);
    box-shadow: 0 26px 50px -28px rgba(2, 40, 44, 0.5);
}

.md-join-card:hover::after {
    opacity: 1;
}

.md-join-card__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-family: var(--md-font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--md-enamel-700);
}

.md-join-card__label::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 1px dashed var(--md-enamel-500);
}

.md-join-card h3 {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 10px;
    color: var(--md-ink);
}

.md-join-card p {
    margin-bottom: 0;
    font-size: 15px;
}

/* --- The step sequence: numbered because joining genuinely is one --- */

.md-join-steps {
    position: relative;
    padding: 60px 0 90px;
}

.md-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: none;
}

.md-steps__item {
    position: relative;
    padding: 0 26px;
}

/* The connecting rail — a dashed line, echoing the diagnostic ring */
.md-steps__item::before {
    content: "";
    position: absolute;
    top: 21px;
    left: 0;
    right: 0;
    border-top: 1px dashed rgba(13, 148, 136, 0.35);
    z-index: 0;
}

.md-steps__item:first-child::before {
    left: 50%;
}

.md-steps__item:last-child::before {
    right: 50%;
}

.md-steps__num {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: 0 auto 20px;
    font-family: var(--md-font-mono);
    font-size: 13px;
    font-weight: 500;
    color: var(--white-color);
    background: var(--md-grad);
    border-radius: 50%;
    box-shadow: 0 0 0 6px var(--secondary-color), 0 10px 20px -10px rgba(13, 148, 136, 0.8);
}

.md-steps__item h4 {
    font-family: var(--md-font-display);
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
    color: var(--md-ink);
}

.md-steps__item p {
    text-align: center;
    font-size: 15px;
    margin-bottom: 0;
}

@media (max-width: 991px) {
    .md-steps {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 44px;
    }

    .md-steps__item:nth-child(odd)::before {
        left: 50%;
    }

    .md-steps__item:nth-child(even)::before {
        right: 50%;
    }
}

@media (max-width: 575px) {
    .md-steps {
        grid-template-columns: 1fr;
    }

    .md-steps__item::before {
        display: none;
    }
}

/* --- Application form --- */

.md-join-form-section {
    padding: 20px 0 110px;
}

.md-join-form {
    position: relative;
    padding: 46px 44px 40px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.86);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid var(--md-edge);
    box-shadow: 0 26px 60px -34px rgba(2, 40, 44, 0.5);
}

/* Enamel sheen along the top edge */
.md-join-form::before {
    content: "";
    position: absolute;
    inset: -1px -1px auto;
    height: 1px;
    border-radius: 26px 26px 0 0;
    background: var(--md-sheen);
    pointer-events: none;
}

.md-label {
    display: block;
    margin-bottom: 8px;
    font-family: var(--md-font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-color);
}

.md-label__opt {
    letter-spacing: 0.1em;
    color: #93b3b0;
    text-transform: none;
}

.md-join-form .form-control {
    padding: 13px 16px;
    background: #ffffff;
}

.md-join-form__fine {
    margin: 16px 0 0;
    font-size: 13px;
    color: #7fa19f;
}

/* --- Notices --- */

.md-notice {
    margin-bottom: 26px;
    padding: 15px 18px;
    border-radius: 14px;
    border: 1px solid;
    font-size: 15px;
    line-height: 1.55;
}

.md-notice ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

.md-notice--ok {
    color: var(--md-enamel-900);
    background: rgba(13, 148, 136, 0.09);
    border-color: rgba(13, 148, 136, 0.32);
}

.md-notice--bad {
    color: #be123c;
    background: rgba(225, 29, 72, 0.08);
    border-color: rgba(225, 29, 72, 0.3);
}

/* --------------------------------------------------------------------------
   Native cursor restoration & clean interactive states
   -------------------------------------------------------------------------- */

html, body {
    cursor: default !important;
}

a, button, [role="button"], input[type="submit"], select, .btn, .btn-default, .nav-link {
    cursor: pointer !important;
}

input[type="text"], input[type="email"], input[type="tel"], input[type="date"], textarea {
    cursor: text !important;
}

.cb-cursor, .cb-cursor-text {
    display: none !important;
    pointer-events: none !important;
}

/* --------------------------------------------------------------------------
   Header enhancements
   -------------------------------------------------------------------------- */

.md-header-status {
    padding: 6px 14px;
    background: rgba(20, 184, 166, 0.08);
    border: 1px solid rgba(20, 184, 166, 0.22);
    border-radius: 99px;
    font-family: var(--md-font-mono);
    font-size: 11px;
    font-weight: 500;
    color: var(--md-enamel-900);
    letter-spacing: 0.04em;
}

.md-status-dot {
    width: 7px;
    height: 7px;
    background-color: #10b981;
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: md-pulse 2.2s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes md-pulse {
    to {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
}

.md-nav-dentists {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.md-nav-badge {
    display: inline-block;
    padding: 2px 7px;
    margin-left: 6px;
    font-family: var(--md-font-mono);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--md-enamel-900);
    background: rgba(20, 184, 166, 0.14);
    border-radius: 6px;
    border: 1px solid rgba(20, 184, 166, 0.25);
    vertical-align: middle;
}

.md-btn-header {
    padding: 11px 22px;
    font-size: 13px;
    letter-spacing: 0.02em;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Hero modern telemetry & interactive layout
   -------------------------------------------------------------------------- */

.md-hero-section {
    position: relative;
    padding: 130px 0 90px;
    background-color: var(--secondary-color);
    overflow: hidden;
}

.md-telemetry-chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 18px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--md-edge);
    font-family: var(--md-font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--md-enamel-700);
    box-shadow: 0 8px 24px -12px rgba(2, 40, 44, 0.15);
    margin-bottom: 22px;
}

.md-hero-title {
    font-family: var(--md-font-display);
    font-size: clamp(34px, 4.2vw, 56px);
    line-height: 1.12;
    font-weight: 700;
    color: var(--md-ink);
    letter-spacing: -0.035em;
    margin-bottom: 20px;
}

.md-hero-title span {
    background: linear-gradient(120deg, var(--md-enamel-700), var(--md-enamel-500));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.md-hero-subtitle {
    font-size: 17px;
    line-height: 1.65;
    color: var(--text-color);
    max-width: 540px;
    margin-bottom: 30px;
}

.md-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 38px;
}

.md-hero-social-proof {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-top: 24px;
    border-top: 1px solid rgba(13, 148, 136, 0.12);
}

.md-avatar-stack {
    display: flex;
    align-items: center;
}

.md-avatar-stack img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    margin-left: -10px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.md-avatar-stack img:first-child {
    margin-left: 0;
}

.md-proof-rating {
    display: flex;
    flex-direction: column;
}

.md-proof-stars {
    color: #f59e0b;
    font-size: 13px;
    display: flex;
    gap: 2px;
}

.md-proof-text {
    font-size: 12px;
    color: var(--text-color);
    margin-top: 3px;
}

.md-proof-text strong {
    color: var(--md-ink);
}

/* Diagnostic hero card */
.md-diagnostic-card {
    position: relative;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.88);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid var(--md-edge);
    box-shadow: 0 28px 65px -25px rgba(2, 40, 44, 0.35);
    padding: 30px;
    overflow: hidden;
}

.md-diagnostic-card::before {
    content: "";
    position: absolute;
    inset: -1px -1px auto;
    height: 1px;
    border-radius: 26px 26px 0 0;
    background: var(--md-sheen);
    pointer-events: none;
}

.md-diag-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(13, 148, 136, 0.1);
}

.md-diag-badge {
    font-family: var(--md-font-mono);
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--md-enamel-700);
    display: flex;
    align-items: center;
    gap: 6px;
}

.md-diag-badge::before {
    content: "";
    width: 7px;
    height: 7px;
    background: #10b981;
    border-radius: 50%;
}

.md-diag-id {
    font-family: var(--md-font-mono);
    font-size: 11px;
    color: #8aa8a6;
}

.md-diag-preview-img {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 22px;
    background: #02181c;
}

.md-diag-preview-img img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    opacity: 0.92;
    transition: transform 0.5s var(--md-ease);
}

.md-diagnostic-card:hover .md-diag-preview-img img {
    transform: scale(1.04);
}

.md-diag-overlay-pill {
    position: absolute;
    bottom: 14px;
    left: 14px;
    padding: 6px 14px;
    border-radius: 99px;
    background: rgba(2, 24, 28, 0.75);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: #ffffff;
    font-family: var(--md-font-mono);
    font-size: 11px;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.md-diag-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.md-metric-box {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(234, 246, 244, 0.5);
    border: 1px solid rgba(13, 148, 136, 0.1);
    text-align: center;
}

.md-metric-val {
    font-family: var(--md-font-display);
    font-size: 19px;
    font-weight: 700;
    color: var(--md-ink);
    line-height: 1.1;
    margin-bottom: 2px;
}

.md-metric-label {
    font-family: var(--md-font-mono);
    font-size: 9px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #5c7e7c;
}

/* Floating interactive chip on hero */
.md-floating-chip {
    position: absolute;
    top: 25px;
    right: -15px;
    padding: 12px 18px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid var(--md-edge);
    box-shadow: 0 16px 36px -12px rgba(2, 40, 44, 0.22);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2;
    animation: md-float 6s ease-in-out infinite alternate;
}

@keyframes md-float {
    0% { transform: translateY(0); }
    100% { transform: translateY(-8px); }
}

.md-floating-chip__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--md-grad);
    color: #ffffff;
    display: grid;
    place-items: center;
    font-size: 14px;
    flex-shrink: 0;
}

.md-floating-chip__title {
    font-family: var(--md-font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--md-ink);
    margin-bottom: 2px;
}

.md-floating-chip__desc {
    font-family: var(--md-font-mono);
    font-size: 10px;
    color: var(--md-enamel-700);
}

/* --------------------------------------------------------------------------
   Quick Booking Launcher Bar
   -------------------------------------------------------------------------- */

.md-quick-booking-bar {
    position: relative;
    margin-top: -45px;
    z-index: 10;
}

.md-booking-bar-card {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--md-edge);
    border-radius: 22px;
    padding: 24px 30px;
    box-shadow: 0 24px 60px -28px rgba(2, 40, 44, 0.38);
}

.md-booking-field-label {
    display: block;
    font-family: var(--md-font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--md-enamel-700);
    margin-bottom: 6px;
}

.md-booking-field-label i {
    margin-right: 5px;
}

.md-booking-bar-card .form-control,
.md-booking-bar-card .form-select {
    border-radius: 12px;
    font-size: 14px;
    padding: 10px 14px;
    border: 1px solid rgba(13, 148, 136, 0.18);
    background-color: #f9fdfc;
    color: var(--md-ink);
    font-weight: 500;
}

.md-booking-bar-card .form-control:focus,
.md-booking-bar-card .form-select:focus {
    border-color: var(--md-enamel-500);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
    background-color: #ffffff;
}

.md-btn-book-submit {
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   The MangoDent Standard (Bento Grid)
   -------------------------------------------------------------------------- */

.md-bento-section {
    padding: 100px 0;
    position: relative;
    background: #ffffff;
}

.md-bento-card {
    position: relative;
    height: 100%;
    border-radius: 24px;
    background: #fbfdfc;
    border: 1px solid var(--md-edge);
    padding: 34px 30px;
    transition: transform 0.3s var(--md-ease), box-shadow 0.3s var(--md-ease), border-color 0.3s var(--md-ease);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.md-bento-card::before {
    content: "";
    position: absolute;
    inset: -1px -1px auto;
    height: 1px;
    border-radius: 24px 24px 0 0;
    background: var(--md-sheen);
    opacity: 0;
    transition: opacity 0.3s var(--md-ease);
}

.md-bento-card:hover {
    transform: translateY(-4px);
    border-color: rgba(13, 148, 136, 0.4);
    box-shadow: 0 22px 50px -26px rgba(2, 40, 44, 0.35);
}

.md-bento-card:hover::before {
    opacity: 1;
}

.md-bento-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(20, 184, 166, 0.12);
    color: var(--md-enamel-700);
    display: grid;
    place-items: center;
    font-size: 20px;
    margin-bottom: 20px;
}

.md-bento-tag {
    font-family: var(--md-font-mono);
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--md-enamel-700);
    margin-bottom: 8px;
    display: block;
}

.md-bento-title {
    font-family: var(--md-font-display);
    font-size: 21px;
    font-weight: 600;
    color: var(--md-ink);
    margin-bottom: 12px;
    line-height: 1.25;
}

.md-bento-desc {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 0;
}

.md-bento-highlight {
    background: linear-gradient(135deg, #02181c 0%, #082d33 100%);
    border-color: rgba(20, 184, 166, 0.3);
    color: #ffffff;
}

.md-bento-highlight .md-bento-title {
    color: #ffffff;
}

.md-bento-highlight .md-bento-desc {
    color: #a4c9c6;
}

.md-bento-highlight .md-bento-icon {
    background: var(--md-grad);
    color: #ffffff;
}

.md-bento-highlight .md-bento-tag {
    color: var(--md-enamel-300);
}

/* --------------------------------------------------------------------------
   Treatment Spectrum Showcase
   -------------------------------------------------------------------------- */

.md-spectrum-section {
    padding: 100px 0;
    background-color: var(--secondary-color);
    position: relative;
}

.md-spectrum-card {
    position: relative;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid var(--md-edge);
    box-shadow: 0 14px 34px -22px rgba(2, 40, 44, 0.28);
    transition: transform 0.3s var(--md-ease), box-shadow 0.3s var(--md-ease), border-color 0.3s var(--md-ease);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.md-spectrum-card:hover {
    transform: translateY(-5px);
    border-color: rgba(13, 148, 136, 0.45);
    box-shadow: 0 24px 50px -25px rgba(2, 40, 44, 0.38);
}

.md-spec-image {
    position: relative;
    height: 190px;
    overflow: hidden;
}

.md-spec-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--md-ease);
}

.md-spectrum-card:hover .md-spec-image img {
    transform: scale(1.06);
}

.md-spec-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 5px 12px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    font-family: var(--md-font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--md-enamel-900);
    text-transform: uppercase;
}

.md-spec-body {
    padding: 24px 24px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.md-spec-title {
    font-family: var(--md-font-display);
    font-size: 19px;
    font-weight: 600;
    color: var(--md-ink);
    margin-bottom: 8px;
}

.md-spec-desc {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-color);
    margin-bottom: 16px;
    flex-grow: 1;
}

.md-spec-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid rgba(13, 148, 136, 0.12);
    font-family: var(--md-font-mono);
    font-size: 11px;
    color: #5c7e7c;
}

.md-spec-meta span i {
    margin-right: 5px;
    color: var(--md-enamel-700);
}

.md-spec-link {
    color: var(--md-enamel-700);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.2s var(--md-ease);
}

.md-spec-link:hover {
    color: var(--md-enamel-900);
    gap: 8px;
}

/* --------------------------------------------------------------------------
   Dentist Platform (OS) Crossover Banner
   -------------------------------------------------------------------------- */

.md-crossover-section {
    padding: 70px 0 100px;
    background-color: var(--secondary-color);
}

.md-crossover-card {
    position: relative;
    border-radius: 28px;
    background: linear-gradient(135deg, #02181c 0%, #05262c 60%, #0b3d45 100%);
    border: 1px solid rgba(94, 234, 212, 0.28);
    padding: 60px 50px;
    color: #ffffff;
    box-shadow: 0 30px 70px -30px rgba(2, 40, 44, 0.65);
    overflow: hidden;
}

.md-crossover-card::before {
    content: "";
    position: absolute;
    inset: -30%;
    background: radial-gradient(circle at 80% 20%, rgba(20, 184, 166, 0.25), transparent 60%);
    pointer-events: none;
}

.md-crossover-tag {
    font-family: var(--md-font-mono);
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--md-enamel-300);
    margin-bottom: 12px;
    display: inline-block;
}

.md-crossover-title {
    font-family: var(--md-font-display);
    font-size: clamp(28px, 3.2vw, 42px);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 16px;
}

.md-crossover-title em {
    font-style: normal;
    color: var(--md-enamel-300);
}

.md-crossover-desc {
    font-size: 16px;
    line-height: 1.6;
    color: #a4c9c6;
    max-width: 580px;
    margin-bottom: 30px;
}

.md-crossover-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
}

.md-crossover-pill {
    padding: 6px 14px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-family: var(--md-font-mono);
    font-size: 11px;
    color: #ccfbf1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.md-crossover-pill i {
    color: var(--md-enamel-300);
}

/* --------------------------------------------------------------------------
   Patient Reviews / Testimonials Modern Grid
   -------------------------------------------------------------------------- */

.md-review-card {
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid var(--md-edge);
    padding: 28px;
    box-shadow: 0 14px 35px -24px rgba(2, 40, 44, 0.25);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.md-review-stars {
    color: #f59e0b;
    font-size: 13px;
    margin-bottom: 14px;
}

.md-review-text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--md-ink);
    margin-bottom: 20px;
    font-style: italic;
}

.md-review-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.md-review-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.md-review-name {
    font-family: var(--md-font-display);
    font-size: 14px;
    font-weight: 600;
    color: var(--md-ink);
    margin-bottom: 2px;
}

.md-review-badge {
    font-family: var(--md-font-mono);
    font-size: 10px;
    letter-spacing: 0.05em;
    color: var(--md-enamel-700);
}

/* --------------------------------------------------------------------------
   Footer polish helpers
   -------------------------------------------------------------------------- */

.md-footer-hours-pill {
    padding: 10px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: var(--md-font-mono);
    font-size: 11px;
    color: #a4c9c6;
    display: inline-flex;
    align-items: center;
}

.md-footer-contact-block .md-contact-label {
    font-family: var(--md-font-mono);
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--md-enamel-300);
    margin-bottom: 4px;
}

.md-footer-contact-block .md-contact-phone {
    display: block;
    font-family: var(--md-font-display);
    font-size: 17px;
    font-weight: 600;
    color: #ffffff;
    text-decoration: none;
    margin-bottom: 2px;
}

.md-footer-contact-block .md-contact-email {
    font-size: 13px;
    color: #a4c9c6;
    text-decoration: none;
}

.md-social-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    display: grid;
    place-items: center;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.md-social-btn:hover {
    background: var(--md-grad);
    color: #ffffff;
    transform: translateY(-2px);
}

.md-footer-legal a {
    font-size: 12px;
    color: #7fa19f;
    text-decoration: none;
    transition: color 0.2s;
}

.md-footer-legal a:hover {
    color: var(--md-enamel-300);
}

.text-teal {
    color: var(--md-enamel-500) !important;
}

/* --------------------------------------------------------------------------
   Multilingual Switcher Styles
   -------------------------------------------------------------------------- */
.md-lang-dropdown {
    position: relative;
    display: inline-block;
}

.md-lang-btn {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--md-edge);
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--md-enamel-900);
    box-shadow: 0 2px 6px rgba(2, 40, 44, 0.05);
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
}

.md-lang-btn i.fa-chevron-down {
    transition: transform 0.2s ease;
}

.md-lang-btn:hover,
.md-lang-btn:focus,
.md-lang-dropdown.show .md-lang-btn,
.md-lang-dropdown.open .md-lang-btn,
.md-lang-btn[aria-expanded="true"] {
    background: #ffffff;
    border-color: var(--md-enamel-500);
    color: var(--md-enamel-950);
    box-shadow: 0 4px 14px rgba(20, 184, 166, 0.2);
}

.md-lang-dropdown.show .md-lang-btn i.fa-chevron-down,
.md-lang-dropdown.open .md-lang-btn i.fa-chevron-down,
.md-lang-btn[aria-expanded="true"] i.fa-chevron-down {
    transform: rotate(180deg);
}

.md-lang-dropdown .md-lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    float: none;
    display: none;
    min-width: 190px;
    margin: 0;
    border-radius: 14px;
    padding: 8px;
    background: #ffffff;
    border: 1px solid var(--md-edge);
    box-shadow: 0 16px 36px -10px rgba(2, 40, 44, 0.22);
    z-index: 1060;
}

.md-lang-dropdown.show .md-lang-menu,
.md-lang-dropdown.open .md-lang-menu,
.md-lang-dropdown .md-lang-menu.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    animation: mdFadeSlideDown 0.18s var(--md-ease);
}

@keyframes mdFadeSlideDown {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.md-lang-menu .dropdown-item {
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    transition: all 0.15s ease;
}

.md-lang-menu .dropdown-item:hover {
    background-color: var(--md-enamel-50);
    color: var(--md-enamel-900);
}

.md-lang-menu .dropdown-item.active {
    background-color: var(--md-enamel-50);
    color: var(--md-enamel-700);
    font-weight: 600;
}

.md-lang-flag {
    font-size: 16px;
    line-height: 1;
}

.md-lang-code {
    font-family: var(--md-font-mono);
    font-size: 12px;
    letter-spacing: 0.5px;
}

.md-footer-lang-list {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.md-footer-lang-item {
    color: #a4c9c6;
    text-decoration: none;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 999px;
    transition: all 0.2s;
}

.md-footer-lang-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.md-footer-lang-item.active {
    color: #ffffff;
    background: var(--md-enamel-600);
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

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

/* --------------------------------------------------------------------------
   Modal & Backdrop Layering
   -------------------------------------------------------------------------- */
.modal-backdrop {
    z-index: 1050 !important;
}
.modal {
    z-index: 1055 !important;
}
.modal-dialog {
    z-index: 1056 !important;
}


/* --------------------------------------------------------------------------
   Booking wizard
   Four steps on one page: the old flow submitted the whole page three times
   before a visitor could type their name.
   -------------------------------------------------------------------------- */

.md-booking {
    padding: 80px 0 100px;
}

/* --- Progress bar --- */
.md-steps-bar {
    display: flex;
    gap: 6px;
    margin: 0 0 34px;
    padding: 0;
    list-style: none;
}

.md-steps-bar__item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    padding-top: 4px;
    text-align: center;
}

/* Connector rail between dots */
.md-steps-bar__item::before {
    content: "";
    position: absolute;
    top: 21px;
    left: -50%;
    width: 100%;
    border-top: 1px dashed rgba(13, 148, 136, 0.35);
    z-index: 0;
}

.md-steps-bar__item:first-child::before {
    display: none;
}

.md-steps-bar__dot {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-family: var(--md-font-mono);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-color);
    background: #fff;
    border: 1px dashed rgba(13, 148, 136, 0.45);
    transition: all 0.25s var(--md-ease);
}

.md-steps-bar__label {
    font-size: 12.5px;
    line-height: 1.3;
    color: var(--text-color);
}

.md-steps-bar__item.is-current .md-steps-bar__dot {
    background: var(--md-grad);
    border-style: solid;
    border-color: transparent;
    color: #fff;
    box-shadow: 0 0 0 5px rgba(45, 212, 191, 0.18);
}

.md-steps-bar__item.is-current .md-steps-bar__label {
    color: var(--md-ink);
    font-weight: 600;
}

.md-steps-bar__item.is-done .md-steps-bar__dot {
    background: rgba(13, 148, 136, 0.12);
    border-style: solid;
    border-color: rgba(13, 148, 136, 0.4);
    color: var(--md-enamel-700);
}

/* --- Step panes --- */
.md-step {
    animation: md-step-in 0.35s var(--md-ease) both;
}

@keyframes md-step-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

.md-step__title {
    font-family: var(--md-font-display);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--md-ink);
    margin-bottom: 6px;
}

.md-step__hint {
    color: var(--text-color);
    margin-bottom: 22px;
}

.md-step__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 30px;
}

.md-step__actions .btn-default:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.md-link-back {
    background: none;
    border: 0;
    padding: 8px 2px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
}

.md-link-back:hover {
    color: var(--md-enamel-700);
}

/* --- Choice cards --- */
.md-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.md-choice {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 18px 18px 16px;
    text-align: left;
    background: #fff;
    border: 1px solid var(--md-edge);
    border-radius: 16px;
    cursor: pointer;
    transition: border-color 0.2s var(--md-ease), box-shadow 0.2s var(--md-ease),
        transform 0.2s var(--md-ease);
}

.md-choice:hover {
    transform: translateY(-2px);
    border-color: rgba(13, 148, 136, 0.45);
    box-shadow: 0 14px 30px -22px rgba(2, 40, 44, 0.5);
}

.md-choice.is-picked {
    border-color: var(--md-enamel-700);
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.22);
}

.md-choice__name {
    font-family: var(--md-font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--md-ink);
    line-height: 1.25;
}

.md-choice__desc {
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-color);
}

.md-choice__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.md-tag {
    display: inline-block;
    padding: 3px 9px;
    font-family: var(--md-font-mono);
    font-size: 10px;
    letter-spacing: 0.06em;
    border-radius: 99px;
    color: var(--text-color);
    background: rgba(13, 148, 136, 0.08);
}

.md-tag--price {
    color: var(--md-enamel-900);
    background: rgba(45, 212, 191, 0.2);
    font-weight: 600;
}

.md-tag--ok {
    color: #0f766e;
    background: rgba(13, 148, 136, 0.14);
}

/* Dentist cards carry an avatar */
.md-choice--person {
    flex-direction: row;
    align-items: flex-start;
    gap: 13px;
}

.md-choice__avatar {
    flex: none;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    font-family: var(--md-font-display);
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    background: var(--md-grad);
}

.md-choice__body {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
}

/* --- Date & slots --- */
.md-date {
    max-width: 260px;
    margin-bottom: 26px;
}

.md-slots__hint {
    padding: 26px 18px;
    text-align: center;
    color: var(--text-color);
    background: rgba(13, 148, 136, 0.05);
    border: 1px dashed var(--md-edge);
    border-radius: 14px;
    margin: 0;
}

.md-slots__hint--load::after {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    vertical-align: -2px;
    border: 2px solid rgba(13, 148, 136, 0.3);
    border-top-color: var(--md-enamel-700);
    border-radius: 50%;
    animation: md-spin 0.7s linear infinite;
}

.md-slots__group + .md-slots__group {
    margin-top: 22px;
}

.md-slots__head {
    font-family: var(--md-font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--md-enamel-700);
    margin-bottom: 10px;
}

.md-slots__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 9px;
}

.md-slot {
    padding: 11px 6px;
    font-family: var(--md-font-mono);
    font-size: 13px;
    color: var(--md-ink);
    background: #fff;
    border: 1px solid var(--md-edge);
    border-radius: 11px;
    cursor: pointer;
    transition: all 0.18s var(--md-ease);
}

.md-slot:hover {
    border-color: rgba(13, 148, 136, 0.5);
    background: rgba(45, 212, 191, 0.1);
}

.md-slot.is-picked {
    color: #fff;
    background: var(--md-grad);
    border-color: transparent;
    box-shadow: 0 8px 18px -10px rgba(13, 148, 136, 0.8);
}

/* --- Returning patient lookup --- */
.md-lookup {
    padding: 20px 20px 16px;
    margin-bottom: 26px;
    background: rgba(13, 148, 136, 0.06);
    border: 1px solid var(--md-edge);
    border-radius: 16px;
}

.md-lookup__row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.md-lookup__row .form-control {
    flex: 1 1 200px;
}

.md-lookup__status {
    margin: 10px 0 0;
    font-size: 13.5px;
    min-height: 19px;
    color: var(--text-color);
}

.md-lookup__status.is-ok {
    color: var(--md-enamel-900);
    font-weight: 600;
}

.md-lookup__status.is-info {
    color: var(--text-color);
}

/* --- Patient fields --- */
.md-fields {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.md-field-2 { grid-column: span 3; }
.md-field-3 { grid-column: span 2; }

.md-fields .form-control.is-missing {
    border-color: rgba(225, 29, 72, 0.6);
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1);
}

.md-form-error {
    margin: 18px 0 0;
    padding: 12px 15px;
    font-size: 14px;
    color: #be123c;
    background: rgba(225, 29, 72, 0.08);
    border: 1px solid rgba(225, 29, 72, 0.3);
    border-radius: 12px;
}

/* --- Live summary --- */
.md-summary {
    position: sticky;
    top: 110px;
    padding: 26px 24px 22px;
    background: rgba(255, 255, 255, 0.88);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid var(--md-edge);
    border-radius: 20px;
    box-shadow: 0 20px 48px -30px rgba(2, 40, 44, 0.5);
}

.md-summary__title {
    font-family: var(--md-font-display);
    font-size: 17px;
    font-weight: 600;
    color: var(--md-ink);
    margin-bottom: 16px;
}

.md-summary__row {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 11px 0;
    border-bottom: 1px dashed var(--md-edge);
}

.md-summary__row:last-of-type {
    border-bottom: 0;
}

.md-summary__key {
    font-family: var(--md-font-mono);
    font-size: 9.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-color);
}

.md-summary__val {
    font-size: 15px;
    font-weight: 600;
    color: var(--md-ink);
}

.md-summary__val.is-empty {
    color: #a9c3c0;
    font-weight: 400;
}

.md-summary__note {
    margin: 16px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--md-edge);
    font-size: 12.5px;
    color: var(--text-color);
}

@media (max-width: 991px) {
    .md-summary {
        position: static;
        margin-top: 30px;
    }
}

@media (max-width: 767px) {
    .md-booking { padding: 50px 0 70px; }
    .md-steps-bar__label { display: none; }
    .md-steps-bar__item::before { top: 17px; }
    .md-fields { grid-template-columns: repeat(2, 1fr); }
    .md-field-2, .md-field-3 { grid-column: span 1; }
    .md-step__title { font-size: 22px; }
}

/* The booking wizard hides the choices that do not belong to the chosen
   clinic with the hidden attribute. .md-choice sets display:flex, which beats
   the browser default for [hidden], so it has to be said explicitly. */
.md-choice[hidden],
.md-choice-grid [hidden] {
    display: none !important;
}

/* Alternative dates offered when the chosen day has no free times, so the
   date step can never dead-end. */
.md-slots__alt {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.md-slots__alt-label {
    width: 100%;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--md-site-text-dim, #4a6b6a);
}

.md-slot--alt {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}

.md-slot--alt small {
    font-size: 10.5px;
    opacity: 0.7;
}

.md-slots__prompt {
    margin: 12px 0 0;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--md-site-accent, #0d9488);
}
