:root {
    --orange: #E86A33;
    --orange-light: #FF8A5C;
    --black: #0A0A0A;
    --charcoal: #2B2B2B;
    --white: #FEFEFE;
    --cream: #FDF8F5;
    --gray: #6B6B6B;
    --line: rgba(0, 0, 0, 0.08);
    --on-dark: rgba(255, 255, 255, 0.68);
    --on-dark-faint: rgba(255, 255, 255, 0.45);
    --line-dark: rgba(255, 255, 255, 0.14);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: var(--cream);
    color: var(--black);
    /* clip (not hidden) so sticky positioning keeps working */
    overflow-x: clip;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--orange);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ---------- Buttons (shared) ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    padding: 0.6rem 1.15rem;
    border-radius: 100px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.btn svg {
    flex-shrink: 0;
}

.btn-phone {
    background: var(--orange);
    color: #fff;
}

.btn-phone:hover {
    background: var(--orange-light);
}

.btn-whatsapp {
    background: #25D366;
    color: #fff;
}

.btn-whatsapp:hover {
    background: #1ebe5d;
}

.btn-book {
    background: var(--orange);
    color: #fff;
    font-size: 1rem;
    padding: 0.95rem 1.5rem;
    width: 100%;
}

.btn-book:hover {
    background: var(--orange-light);
}

.link-on-dark,
.link-btn {
    font: inherit;
    font-weight: 600;
    color: #fff;
    background: none;
    border: 0;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: var(--orange);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.link-on-dark:hover,
.link-btn:hover {
    color: var(--orange-light);
}

/* ---------- Split-screen booking page ---------- */
.split {
    display: grid;
    grid-template-columns: clamp(380px, 34vw, 900px) minmax(0, 1fr);
    min-height: 100vh;
}

.brand-panel {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    background: var(--charcoal);
    color: #fff;
    padding: clamp(2.5rem, 3.5vw, 4.5rem) clamp(2rem, 4vw, 6rem);
    display: flex;
    flex-direction: column;
}

.brand-panel > * {
    max-width: 520px;
}

.brand-panel .logo img {
    height: clamp(42px, 2.6vw, 56px);
    width: auto;
    display: block;
}

.panel-main {
    margin: auto 0;
    padding: 2.5rem 0;
}

.panel-main h1 {
    font-size: clamp(2.3rem, 3.2vw, 3.6rem);
    line-height: 1.08;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
}

.panel-main .tagline {
    color: var(--on-dark);
    font-size: clamp(1.05rem, 0.85vw, 1.25rem);
    line-height: 1.6;
    max-width: 32ch;
    margin-bottom: 1.75rem;
}

.contact-row {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.manage-line {
    color: var(--on-dark);
    font-size: 0.95rem;
}

.btn-book-wrap {
    display: none; /* mobile only */
}

.practitioner {
    padding-top: 1.5rem;
    border-top: 1px solid var(--line-dark);
    font-size: 0.9rem;
    line-height: 1.6;
}

.practitioner .name {
    font-weight: 600;
}

.practitioner .name span {
    color: var(--on-dark-faint);
    font-weight: 400;
}

.practitioner p {
    color: var(--on-dark);
    max-width: 40ch;
    margin: 0.2rem 0 0.5rem;
}

.panel-legal {
    margin-top: 1.25rem;
    font-size: 0.75rem;
    color: var(--on-dark-faint);
}

.panel-legal a {
    color: var(--on-dark);
}

/* Right side: the booking calendar */
.booking-pane {
    background: linear-gradient(180deg, var(--cream) 0%, #F5EDE8 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    padding: 2rem;
    min-height: 100vh;
}

.sheet-bar {
    display: none; /* mobile only */
}

.booking-card {
    width: min(860px, 100%);
    height: min(calc(100vh - 6rem), 1100px);
    height: min(calc(100dvh - 6rem), 1100px);
    min-height: 520px;
    background: var(--white);
    border-radius: 18px;
    overflow: hidden;
    display: grid;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 20px 40px -10px rgba(232, 106, 51, 0.12),
        0 0 0 1px rgba(0, 0, 0, 0.03);
}

.booking-card.is-loading {
    background: linear-gradient(90deg, var(--white), #FBF1EB, var(--white));
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

.booking-card iframe {
    border: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.fallback-line {
    font-size: 0.85rem;
    color: var(--gray);
}

.fallback-line a {
    color: var(--black);
    font-weight: 600;
    text-decoration-color: var(--orange);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

/* ---------- Profile dialog ---------- */
.profile-dialog {
    margin: auto;
    width: min(640px, calc(100% - 2rem));
    max-height: min(85vh, 760px);
    border: 0;
    border-radius: 18px;
    padding: 0;
    color: var(--black);
    background: var(--white);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.35);
}

.profile-dialog::backdrop {
    background: rgba(10, 10, 10, 0.55);
}

.dialog-head {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem 1.5rem 1rem 2rem;
    background: var(--white);
    border-bottom: 1px solid var(--line);
}

.dialog-head h2 {
    font-size: 1.35rem;
    letter-spacing: -0.01em;
}

.dialog-head .creds {
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 0.15rem;
}

.close-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0;
    background: #F3EEEB;
    color: var(--black);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.close-btn:hover {
    background: #EADFD9;
}

.dialog-body {
    padding: 1.25rem 2rem 2rem;
    line-height: 1.7;
}

.dialog-body p + p {
    margin-top: 0.9rem;
}

.dialog-foot {
    padding: 0 2rem 2rem;
}

.dialog-foot .btn-book {
    width: auto;
}

/* ---------- Mobile and tablet: stacked panel + booking sheet ---------- */
@media (max-width: 1199px) {
    .split {
        display: block;
    }

    .brand-panel {
        position: static;
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        overflow: visible;
        padding: 1.5rem 1.5rem 1.25rem;
    }

    .brand-panel > * {
        width: 100%;
        max-width: 460px;
        margin-left: auto;
        margin-right: auto;
    }

    .brand-panel .logo img {
        height: 34px;
    }

    .panel-main {
        padding: 2rem 0;
    }

    .panel-main h1 {
        font-size: 2.1rem;
        margin-bottom: 0.75rem;
    }

    .panel-main .tagline {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .btn-book-wrap {
        display: block;
        margin-bottom: 0.75rem;
    }

    /* Call and WhatsApp step back so Book is the one clear action */
    .contact-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
        margin-bottom: 1.25rem;
    }

    .contact-row .btn {
        background: transparent;
        border-color: var(--line-dark);
        color: #fff;
    }

    .contact-row .btn-phone svg {
        color: var(--orange-light);
    }

    .contact-row .btn-whatsapp svg {
        color: #25D366;
    }

    .contact-row .btn:hover {
        background: rgba(255, 255, 255, 0.06);
    }

    .contact-row .label-long {
        display: none;
    }

        /* The booking pane becomes a full-screen sheet, hidden until opened */
    .booking-pane {
        position: fixed;
        inset: 0;
        z-index: 50;
        min-height: 0;
        padding: 0;
        gap: 0;
        justify-content: flex-start;
        align-items: stretch;
        background: var(--white);
        transform: translateY(100%);
        visibility: hidden;
        transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.32s;
    }

    .booking-pane.is-open {
        transform: none;
        visibility: visible;
        transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s;
    }

    .sheet-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        height: 56px;
        flex-shrink: 0;
        padding: 0 0.75rem 0 1.25rem;
        border-bottom: 1px solid var(--line);
    }

    .sheet-bar strong {
        font-size: 1rem;
    }

    .sheet-actions {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .sheet-actions a {
        font-size: 0.85rem;
        color: var(--gray);
    }

    .booking-card {
        flex: 1;
        width: 100%;
        height: auto;
        min-height: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .fallback-line {
        display: none; /* moved into the sheet bar */
    }

    /* Profile opens as a bottom sheet */
    .profile-dialog {
        margin: auto 0 0;
        width: 100%;
        max-width: 100%;
        max-height: 88dvh;
        border-radius: 18px 18px 0 0;
    }

    .dialog-head {
        padding: 1.25rem 1rem 0.9rem 1.5rem;
    }

    .dialog-body {
        padding: 1rem 1.5rem 1.5rem;
    }

    .dialog-foot {
        padding: 0 1.5rem 1.5rem;
    }

    .dialog-foot .btn-book {
        width: 100%;
    }
}

@media (min-width: 1200px) {
    .label-short {
        display: none;
    }
}

@media (max-width: 1199px) {
    .label-short {
        display: inline;
    }
}

/* ---------- Privacy page (header, text, footer) ---------- */
.page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    position: sticky;
    top: 0;
    z-index: 10;
    height: 72px;
    padding: 0 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--white);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 1200px;
}

.logo-link img {
    height: 44px;
    width: auto;
    display: block;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.header-btn {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    white-space: nowrap;
    background: var(--orange);
    color: #fff;
}

.text-page {
    flex: 1;
    padding: 3rem 2rem 4rem;
    background: var(--white);
}

.text-page article {
    max-width: 68ch;
    margin: 0 auto;
    line-height: 1.7;
}

.text-page h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.text-page .updated {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.text-page h2 {
    font-size: 1.2rem;
    margin: 2.25rem 0 0.6rem;
}

.text-page p,
.text-page ul {
    margin-bottom: 1rem;
}

.text-page ul {
    padding-left: 1.25rem;
}

.text-page li {
    margin-bottom: 0.4rem;
}

.text-page a {
    color: var(--black);
    text-decoration-color: var(--orange);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    font-weight: 600;
}

footer {
    padding: 1.5rem 2rem;
    background: var(--black);
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    justify-content: center;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    gap: 1rem;
}

.footer-doctor {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.footer-doctor .name {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.footer-doctor .credentials {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
}

.footer-contact {
    text-align: right;
}

footer p {
    font-size: 0.875rem;
    line-height: 1.8;
}

.footer-copy {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
}

footer a {
    color: #25D366;
    text-decoration: none;
}

footer a.footer-call {
    color: var(--orange-light);
}

@media (max-width: 600px) {
    header {
        padding: 0 1rem;
        height: 60px;
    }

    .logo-link img {
        height: 32px;
    }

    .header-btn .btn-label {
        display: none;
    }

    .header-btn {
        padding: 0.45rem 0.6rem;
    }

    .text-page {
        padding: 2rem 1.25rem 3rem;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .footer-contact {
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
