/* ==========================================================================
   Public site stylesheet — کلینیک دکتر سارا محمدی
   Hand-written plain CSS (no frameworks). RTL-first.
   Palette: teal/emerald primary + warm stone neutrals.
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
    --background: #faf9f7;          /* warm off-white */
    --foreground: #292524;          /* stone-800 */
    --card: #ffffff;
    --card-foreground: #292524;

    --primary: #0f766e;             /* teal-700 */
    --primary-hover: #0d5f59;
    --primary-foreground: #f0fdfa;

    --secondary: #f0fdfa;           /* teal-50 */
    --secondary-foreground: #134e4a;/* teal-900 */

    --muted: #f5f5f4;               /* stone-100 */
    --muted-foreground: #57534e;    /* stone-600 */
    --muted-border: #e7e5e4;        /* stone-200 */

    --accent: #ecfdf5;              /* emerald-50 */
    --accent-foreground: #065f46;   /* emerald-800 */

    --destructive: #b91c1c;
    --destructive-foreground: #fef2f2;

    --border: #e7e5e4;
    --input-border: #d6d3d1;
    --ring: #14b8a6;                /* teal-500 */

    /* status badge colors */
    --amber-bg: #fef3c7;  --amber-text: #92400e;  --amber-border: #fde68a;
    --green-bg: #dcfce7;  --green-text: #166534;  --green-border: #bbf7d0;
    --red-bg: #fee2e2;    --red-text: #b91c1c;    --red-border: #fecaca;
    --teal-bg: #ccfbf1;   --teal-text: #115e59;   --teal-border: #99f6e4;
    --gray-bg: #f5f5f4;   --gray-text: #57534e;   --gray-border: #e7e5e4;

    --star: #f59e0b;
    --star-off: #d6d3d1;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;

    --shadow-sm: 0 1px 2px rgba(41, 37, 36, 0.06);
    --shadow-md: 0 6px 18px rgba(41, 37, 36, 0.10);

    --header-h: 64px;
}

/* ---------- 2. Reset / base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--background);
    color: var(--foreground);
    font-family: "Vazirmatn", Vazirmatn, Tahoma, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.8;
    text-align: right;
}

h1, h2, h3, h4 {
    margin: 0;
    line-height: 1.6;
    color: var(--foreground);
}

p {
    margin: 0;
}

ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

a:hover {
    color: var(--primary-hover);
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
}

::selection {
    background: rgba(20, 184, 166, 0.25);
}

/* Persian-flavored scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(15, 118, 110, 0.35);
    border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 118, 110, 0.55);
}

:focus-visible {
    outline: 3px solid rgba(20, 184, 166, 0.5);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ---------- 3. Sticky footer / shell ---------- */
.site-main {
    flex: 1;
    width: 100%;
}

/* ---------- 4. Layout helpers ---------- */
.container {
    max-width: 1080px;
    margin-inline: auto;
    padding-inline: 16px;
}

.page {
    max-width: 1080px;
    margin-inline: auto;
    padding: 32px 16px 48px;
}

.page-narrow {
    max-width: 672px;
    margin-inline: auto;
    padding: 48px 16px 56px;
}

.page-article {
    max-width: 768px;
    margin-inline: auto;
    padding: 32px 16px 48px;
}

.section + .section {
    margin-top: 48px;
}

.section-head {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

.section-head.center {
    text-align: center;
    align-items: center;
}

.section-title {
    font-size: 1.35rem;
    font-weight: 800;
}

.section-sub {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.section-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.section-head-row .section-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-icon {
    color: var(--primary);
    font-size: 1.1rem;
}

.ltr {
    direction: ltr;
    unicode-bidi: isolate;
}

.muted {
    color: var(--muted-foreground);
}

.skip-link {
    position: absolute;
    inset-inline-start: -9999px;
    top: 0;
    background: var(--primary);
    color: var(--primary-foreground);
    padding: 10px 16px;
    border-radius: 0 0 var(--radius-sm) 0;
    z-index: 100;
}

.skip-link:focus {
    inset-inline-start: 0;
}

/* ---------- 5. Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 20px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--foreground);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.6;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn:focus-visible {
    outline: 3px solid rgba(20, 184, 166, 0.5);
    outline-offset: 2px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    color: var(--primary-foreground);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: var(--primary-foreground);
}

.btn-outline {
    background: var(--card);
    border-color: var(--border);
    color: var(--foreground);
}

.btn-outline:hover {
    background: var(--accent);
    border-color: var(--primary);
    color: var(--primary-hover);
}

.btn-ghost {
    background: transparent;
    color: var(--muted-foreground);
}

.btn-ghost:hover {
    background: var(--muted);
    color: var(--foreground);
}

.btn-secondary {
    background: var(--primary-foreground);
    color: var(--primary);
}

.btn-secondary:hover {
    background: rgba(240, 253, 250, 0.9);
    color: var(--primary);
}

.btn-lg {
    min-height: 48px;
    padding: 10px 28px;
    font-size: 0.95rem;
}

/* Booking date grid — closed days: explicit, not an ambiguous ghost cell */
.day-closed {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
    border-style: dashed !important;
    background: var(--muted, #f8fafc) !important;
    filter: grayscale(0.35);
}

.day-closed .day-closed-date {
    text-decoration: line-through;
}

.day-closed .day-closed-tag {
    font-size: 0.62rem;
    font-weight: 700;
    color: #b91c1c;
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 999px;
    padding: 0 0.5rem;
    line-height: 1.5;
}

.btn-sm {
    min-height: 38px;
    padding: 5px 14px;
    font-size: 0.82rem;
}

.btn-block {
    width: 100%;
}

/* ---------- 6. Badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.8;
    white-space: nowrap;
}

.badge-secondary {
    background: var(--secondary);
    border-color: #ccfbf1;
    color: var(--secondary-foreground);
}

.badge-muted {
    background: var(--gray-bg);
    border-color: var(--gray-border);
    color: var(--gray-text);
}

.badge-PENDING {
    background: var(--amber-bg);
    border-color: var(--amber-border);
    color: var(--amber-text);
}

.badge-CONFIRMED {
    background: var(--green-bg);
    border-color: var(--green-border);
    color: var(--green-text);
}

.badge-CANCELLED {
    background: var(--red-bg);
    border-color: var(--red-border);
    color: var(--red-text);
}

.badge-COMPLETED {
    background: var(--teal-bg);
    border-color: var(--teal-border);
    color: var(--teal-text);
}

.badge-NO_SHOW {
    background: var(--red-bg);
    border-color: var(--red-border);
    color: var(--red-text);
}

/* ---------- 7. Cards ---------- */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.card-pad {
    padding: 20px;
}

.card-hover {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card-hover:hover {
    box-shadow: var(--shadow-md);
}

/* ---------- 8. Forms ---------- */
.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
}

.input,
.textarea {
    width: 100%;
    min-height: 44px;
    padding: 8px 14px;
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--foreground);
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.8;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus,
.textarea:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
}

.input::placeholder,
.textarea::placeholder {
    color: #a8a29e;
}

.textarea {
    min-height: 120px;
    resize: vertical;
}

.input[aria-invalid="true"],
.textarea[aria-invalid="true"] {
    border-color: var(--destructive);
}

.field-error {
    font-size: 0.75rem;
    color: var(--destructive);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 4px;
}

.honeypot {
    position: absolute;
    inset-inline-start: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------- 9. Alerts ---------- */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 16px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-size: 0.875rem;
    line-height: 1.9;
}

.alert-success {
    background: var(--accent);
    border-color: #a7f3d0;
    color: var(--accent-foreground);
}

.alert-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: var(--destructive);
}

.alert-warning {
    background: var(--amber-bg);
    border-color: var(--amber-border);
    color: var(--amber-text);
}

/* ---------- 10. Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    width: 100%;
    background: rgba(250, 249, 247, 0.9);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

/* NOTE: backdrop-filter creates a containing block for position:fixed
   descendants — the mobile sheet/backdrop live inside the header, so the blur
   must be disabled while the sheet can be open (mobile widths). */
@media (max-width: 900px) {
    .site-header {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        background: rgba(250, 249, 247, 0.97);
    }
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: var(--header-h);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    border-radius: var(--radius-sm);
}

.brand:hover {
    color: inherit;
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: var(--primary);
    color: var(--primary-foreground);
    font-size: 1.15rem;
    box-shadow: var(--shadow-sm);
}

.brand-text {
    text-align: right;
    line-height: 1.4;
}

.brand-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--foreground);
}

.brand-sub {
    display: block;
    font-size: 11px;
    color: var(--muted-foreground);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-foreground);
}

.nav-link:hover {
    background: var(--muted);
    color: var(--foreground);
}

.nav-link.active {
    background: var(--secondary);
    color: var(--secondary-foreground);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logout-form {
    display: inline-flex;
    margin: 0;
}

/* --- mobile hamburger --- */
.nav-toggle {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.nav-burger {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    cursor: pointer;
}

.burger-bar {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--foreground);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle:checked ~ .nav-burger .burger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle:checked ~ .nav-burger .burger-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle:checked ~ .nav-burger .burger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(41, 37, 36, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 50;
}

.nav-toggle:checked ~ .nav-backdrop {
    opacity: 1;
    visibility: visible;
}

.mobile-sheet {
    display: none;
}

@media (max-width: 900px) {
    .main-nav,
    .header-actions {
        display: none;
    }

    .nav-burger {
        display: flex;
    }

    .mobile-sheet {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(320px, 86vw);
        background: var(--card);
        box-shadow: var(--shadow-md);
        transform: translateX(100%);
        transition: transform 0.25s ease;
        z-index: 60;
        overflow-y: auto;
    }

    .nav-toggle:checked ~ .mobile-sheet {
        transform: translateX(0);
    }

    .sheet-head {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 20px 16px 14px;
        border-bottom: 1px solid var(--border);
    }

    .sheet-brand {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 999px;
        background: var(--primary);
        color: var(--primary-foreground);
        font-size: 1rem;
        flex-shrink: 0;
    }

    .sheet-title {
        display: block;
        font-size: 0.9rem;
        font-weight: 800;
    }

    .sheet-sub {
        display: block;
        font-size: 11px;
        color: var(--muted-foreground);
    }

    .sheet-nav {
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: 16px 16px 8px;
    }

    .sheet-link {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 8px 12px;
        border-radius: var(--radius-sm);
        text-align: right;
        font-size: 0.9rem;
        font-weight: 500;
        color: var(--muted-foreground);
        background: transparent;
        border: 0;
        width: 100%;
        cursor: pointer;
        font-family: inherit;
    }

    .sheet-link:hover {
        background: var(--muted);
        color: var(--foreground);
    }

    .sheet-link.active {
        background: var(--secondary);
        color: var(--secondary-foreground);
    }

    .sheet-logout {
        margin: 0;
        padding: 0;
    }

    .sheet-footer {
        margin-top: auto;
        padding: 16px;
    }
}

/* ---------- 11. Footer ---------- */
.site-footer {
    margin-top: auto;
    width: 100%;
    background: var(--primary);
    color: var(--primary-foreground);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
    padding-block: 40px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    font-size: 1.1rem;
}

.footer-name {
    font-weight: 800;
}

.footer-title {
    font-weight: 700;
    margin-bottom: 12px;
}

.footer-text {
    font-size: 0.85rem;
    line-height: 2;
    color: rgba(240, 253, 250, 0.85);
}

.footer-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    font-size: 0.85rem;
    color: rgba(240, 253, 250, 0.85);
}

.footer-link:hover {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.85rem;
    color: rgba(240, 253, 250, 0.85);
}

.footer-emoji {
    flex-shrink: 0;
    font-size: 0.9rem;
}

.socials-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.social-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    font-size: 1.15rem;
    transition: background-color 0.15s ease;
}

.social-circle:hover {
    background: rgba(255, 255, 255, 0.25);
}

.footer-muted {
    font-size: 0.85rem;
    color: rgba(240, 253, 250, 0.7);
}

.footer-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    font-size: 0.85rem;
    line-height: 1.9;
    color: rgba(240, 253, 250, 0.85);
}

.footer-sep {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-bottom {
    padding-block: 16px;
    text-align: center;
    font-size: 0.75rem;
    color: rgba(240, 253, 250, 0.75);
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

/* ---------- 12. Hero ---------- */
.hero {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 32px;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero-badge {
    align-self: flex-start;
    gap: 6px;
    padding: 5px 14px;
    font-size: 0.75rem;
}

.hero-title {
    font-size: clamp(1.6rem, 3.4vw, 2.35rem);
    font-weight: 800;
    line-height: 1.5;
}

.hero-subtitle {
    font-size: 0.95rem;
    line-height: 2.2;
    color: var(--muted-foreground);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding-top: 4px;
}

.hero-media .hero-img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .hero-media .hero-img {
        height: 288px;
    }
}

/* ---------- 13. Grids ---------- */
.grid-services {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.grid-cred {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 1024px) {
    .grid-services {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .grid-services,
    .grid-3,
    .grid-2,
    .grid-4,
    .grid-cred,
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- 14. Service cards ---------- */
.service-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 24px 16px;
}

.service-icon,
.icon-square {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: var(--secondary);
    color: var(--primary);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.icon-square.sm {
    width: 36px;
    height: 36px;
    font-size: 1rem;
}

.service-title {
    font-size: 0.95rem;
    font-weight: 700;
}

.service-desc {
    font-size: 0.85rem;
    line-height: 2;
    color: var(--muted-foreground);
}

/* ---------- 15. About strip / credentials ---------- */
.about-strip {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 24px 28px;
    border-radius: var(--radius-lg);
    background: var(--secondary);
}

.about-portrait {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.about-body {
    flex: 1;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.about-strip .about-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--secondary-foreground);
}

.about-strip .about-text {
    font-size: 0.875rem;
    line-height: 2.2;
    color: rgba(19, 78, 74, 0.85);
}

.cred-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px 16px;
}

.cred-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cred-title {
    font-weight: 700;
}

.bullet-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bullet-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.85rem;
    line-height: 2;
    color: var(--muted-foreground);
}

.bullet-list .bullet-check {
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 4px;
    font-size: 0.85rem;
}

/* ---------- 16. Working hours ---------- */
.hours-card {
    padding-block: 8px;
}

.hours-list {
    display: flex;
    flex-direction: column;
}

.hours-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 24px;
}

.hours-row + .hours-row {
    border-top: 1px solid var(--border);
}

.hours-day {
    font-size: 0.875rem;
    font-weight: 500;
}

.hours-periods {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px 12px;
    font-size: 0.85rem;
    color: var(--muted-foreground);
}

.hours-closed {
    font-size: 0.85rem;
    color: var(--muted-foreground);
}

/* ---------- 17. Posts / blog ---------- */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
}

.post-card {
    overflow: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.post-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
}

.post-link:hover {
    color: inherit;
}

.post-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 144px;
    background: var(--secondary);
    overflow: hidden;
}

.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-thumb-placeholder {
    font-size: 2.4rem;
    opacity: 0.65;
}

.post-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    flex: 1;
}

.post-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-link:hover .post-title {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.post-excerpt {
    font-size: 0.85rem;
    line-height: 2;
    color: var(--muted-foreground);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 4px;
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* --- search + chips --- */
.search-box {
    display: flex;
    gap: 8px;
    max-width: 576px;
    margin-inline: auto;
    width: 100%;
}

.search-input-wrap {
    position: relative;
    flex: 1;
}

.search-input-wrap .search-emoji {
    position: absolute;
    top: 50%;
    inset-inline-end: 12px;
    transform: translateY(-50%);
    font-size: 0.9rem;
    opacity: 0.55;
    pointer-events: none;
}

.search-input {
    padding-inline-end: 36px;
}

.chips-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--muted-foreground);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.category-chip:hover {
    background: var(--accent);
    color: var(--accent-foreground);
}

.category-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--primary-foreground);
}

.result-count {
    text-align: center;
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

/* --- pagination --- */
.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 6px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--foreground);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.page-btn:hover:not(.disabled) {
    background: var(--accent);
    color: var(--accent-foreground);
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-btn.current {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--primary-foreground);
}

.page-info {
    padding: 6px 10px;
    font-size: 0.82rem;
    color: var(--muted-foreground);
}

/* ---------- 18. Article ---------- */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    font-weight: 500;
    color: var(--primary);
}

.article-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.article-title {
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 800;
    line-height: 1.7;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;
    font-size: 0.8rem;
    color: var(--muted-foreground);
}

.article-meta .meta-item {
    gap: 6px;
}

.article-excerpt {
    padding: 16px;
    border-radius: var(--radius);
    background: rgba(240, 253, 250, 0.6);
    font-size: 0.875rem;
    line-height: 2.2;
    color: var(--secondary-foreground);
}

.article-image {
    width: 100%;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    object-fit: cover;
}

.article-body {
    font-size: 0.95rem;
    line-height: 2.4;
    color: rgba(41, 37, 36, 0.92);
}

.article-body p {
    margin: 0 0 1em;
}

.article-body p:last-child {
    margin-bottom: 0;
}

.divider {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 8px 0;
}

/* ---------- 19. Comments ---------- */
.comments-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.comment-card {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comment-card + .comment-card {
    margin-top: 12px;
}

.comment-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 700;
}

.comment-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--secondary);
    color: var(--primary);
    font-size: 0.75rem;
}

.comment-date {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.comment-body {
    font-size: 0.875rem;
    line-height: 2.2;
    color: rgba(41, 37, 36, 0.9);
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.comment-empty {
    padding: 32px 16px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    text-align: center;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.login-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 16px;
    margin-bottom: 16px;
    text-align: center;
}

.login-prompt p {
    font-size: 0.875rem;
    line-height: 2;
    color: var(--muted-foreground);
}

@media (min-width: 640px) {
    .login-prompt {
        flex-direction: row;
        justify-content: space-between;
        text-align: right;
    }
}

.cta-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 16px;
}

.cta-card p {
    font-size: 0.875rem;
    font-weight: 500;
}

@media (min-width: 640px) {
    .cta-card {
        flex-direction: row;
    }
}

/* ---------- 20. Testimonials ---------- */
.testimonial-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px 16px;
}

.stars-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.star {
    font-size: 0.95rem;
    line-height: 1;
    color: var(--star-off);
}

.star.on {
    color: var(--star);
}

.quote-icon {
    color: var(--muted-foreground);
    opacity: 0.6;
    font-size: 1.15rem;
}

.testimonial-text {
    font-size: 0.85rem;
    line-height: 2;
    color: var(--muted-foreground);
}

.testimonial-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 700;
}

/* ---------- 21. FAQ (details/summary) ---------- */
.faq-card {
    padding: 8px 16px;
}

@media (min-width: 640px) {
    .faq-card {
        padding: 8px 24px;
    }
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
    border-bottom: 0;
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    padding: 12px 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--foreground);
    list-style: none;
    transition: color 0.15s ease;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: var(--muted);
    color: var(--primary);
    font-size: 1rem;
    font-weight: 700;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.faq-item[open] summary::after {
    content: "−";
    background: var(--secondary);
}

.faq-item summary:hover {
    color: var(--primary);
}

.faq-answer {
    padding: 0 4px 16px;
    font-size: 0.85rem;
    line-height: 2.2;
    color: var(--muted-foreground);
}

/* ---------- 22. Contact ---------- */
.contact-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px 16px;
}

.contact-value {
    font-size: 0.85rem;
    line-height: 2;
    color: var(--muted-foreground);
    word-break: break-word;
}

.map-frame {
    display: block;
    width: 100%;
    height: 256px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.map-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 256px;
    padding: 24px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: rgba(240, 253, 250, 0.5);
    text-align: center;
}

.map-pin {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: var(--card);
    box-shadow: var(--shadow-sm);
    font-size: 1.35rem;
    color: var(--primary);
}

.socials-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.social-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 18px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--foreground);
}

.social-pill:hover {
    background: var(--accent);
    color: var(--accent-foreground);
}

/* ---------- 23. Track page ---------- */
.track-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    margin-bottom: 32px;
}

.track-head .title {
    font-size: clamp(1.5rem, 3vw, 1.9rem);
    font-weight: 800;
}

.track-head .sub {
    font-size: 0.875rem;
    line-height: 2;
    color: var(--muted-foreground);
}

.track-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    background: var(--secondary);
    color: var(--primary);
    font-size: 1.6rem;
    margin-bottom: 4px;
}

.code-input {
    min-height: 48px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.track-hint {
    margin-top: 12px;
    text-align: center;
    font-size: 0.75rem;
    line-height: 2;
    color: var(--muted-foreground);
}

.result-head {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 24px;
    background: var(--primary);
    color: var(--primary-foreground);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.result-head-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.result-code {
    direction: ltr;
    unicode-bidi: isolate;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.2em;
}

.result-body {
    padding: 24px 0;
    border: 1px solid var(--border);
    border-top: 0;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    background: var(--card);
}

.detail-list {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
    border-top: 1px solid var(--border);
}

.detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 24px;
}

.detail-row + .detail-row {
    border-top: 1px solid var(--border);
}

.detail-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.detail-value {
    font-size: 0.875rem;
    font-weight: 700;
    text-align: left;
}

.cancelled-note {
    margin: 0 24px;
    padding: 12px 16px;
    border: 1px solid rgba(185, 28, 28, 0.3);
    border-radius: var(--radius);
    background: rgba(254, 226, 226, 0.35);
    text-align: center;
    font-size: 0.85rem;
    color: var(--destructive);
}

.help-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: rgba(240, 253, 250, 0.5);
    text-align: center;
    font-size: 0.75rem;
    line-height: 2;
    color: var(--muted-foreground);
}

/* --- status history timeline --- */
.history-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 24px 24px 16px;
    font-size: 0.95rem;
    font-weight: 800;
}

.timeline {
    position: relative;
    margin: 0 28px 8px;
    padding-inline-start: 4px;
}

.timeline-item {
    position: relative;
    padding-inline-start: 24px;
    padding-bottom: 20px;
    border-inline-start: 2px solid var(--muted-border);
    margin-inline-start: 6px;
}

.timeline-item:last-child {
    border-inline-start-color: transparent;
    padding-bottom: 4px;
}

.timeline-dot {
    position: absolute;
    top: 2px;
    inset-inline-start: -8px;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: var(--card);
    border: 3px solid var(--muted-border);
    box-sizing: content-box;
    margin-inline-start: -8px;
}

.timeline-item.latest .timeline-dot {
    background: var(--primary);
    border-color: var(--primary);
}

.timeline-label {
    font-size: 0.875rem;
    font-weight: 700;
}

.timeline-date {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

/* ---------- 24. Empty state ---------- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 48px 16px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    text-align: center;
}

.empty-state .empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    border-radius: 999px;
    background: var(--secondary);
    color: var(--primary);
    font-size: 1.35rem;
}

.empty-state h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.empty-state p {
    font-size: 0.85rem;
    color: var(--muted-foreground);
    max-width: 384px;
}

.empty-state .empty-action {
    margin-top: 16px;
}

/* ---------- 25. CTA band ---------- */
.cta-band {
    padding: 40px 24px;
    border-radius: var(--radius-lg);
    background: var(--primary);
    color: var(--primary-foreground);
    text-align: center;
}

.cta-band .cta-title {
    font-size: 1.35rem;
    font-weight: 800;
}

.cta-band .cta-text {
    max-width: 576px;
    margin: 8px auto 0;
    font-size: 0.875rem;
    line-height: 2;
    color: rgba(240, 253, 250, 0.85);
}

.cta-band .btn {
    margin-top: 20px;
}

/* ---------- 26. Stats (optional about content) ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.stat-card {
    padding: 20px 16px;
    text-align: center;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--muted-foreground);
}

/* ---------- 27. Misc ---------- */
.inline-link {
    font-weight: 500;
    color: var(--primary);
}

.inline-link:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.stack-8 > * + * { margin-top: 8px; }
.stack-12 > * + * { margin-top: 12px; }
.stack-16 > * + * { margin-top: 16px; }
.stack-24 > * + * { margin-top: 24px; }
.stack-32 > * + * { margin-top: 32px; }
.stack-40 > * + * { margin-top: 40px; }

@media (max-width: 390px) {
    .container,
    .page,
    .page-narrow,
    .page-article {
        padding-inline: 12px;
    }

    .hero-media .hero-img {
        height: 220px;
    }

    .btn {
        min-height: 42px;
    }

    .result-code {
        font-size: 1.15rem;
        letter-spacing: 0.12em;
    }

    .detail-row,
    .hours-row {
        padding-inline: 16px;
    }
}

/* ---------- 20. Late additions (P5 integration pass) ---------- */

/* Two-column responsive field grid used by the booking wizard's quick-create
   profile form and the patient profiles panel. */
.grid2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}

/* Footer columns: keep content from overflowing the 4-col grid track. */
.footer-col {
    min-width: 0;
}

/* Visual variant for the mobile menu logout <button> styled as a sheet link. */
.sheet-link.as-button {
    width: 100%;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    text-align: start;
}
