/* ===== Cosmed header v2 ===== */
.ch-header {
    --ch-ink: #1d1d20;
    --ch-muted: #6b6b70;
    --ch-line: #e6e6e2;
    --ch-purple: #7a45d6;
    --ch-purple-dark: #5f30b5;
    --ch-h: 76px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9990;
    font-family: Helvetica, Arial, sans-serif;
    color: var(--ch-ink);
    border-bottom: 1px solid var(--ch-line);
    transition: box-shadow .3s ease;
}
/* Frosted background lives on a pseudo-element: backdrop-filter on the header itself
   would trap the fixed mobile drawer inside the header box. */
.ch-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
            backdrop-filter: saturate(160%) blur(12px);
    transition: background-color .3s ease;
}
.ch-header.is-scrolled::before { background: rgba(255, 255, 255, .97); }
.ch-header.is-scrolled { --ch-h: 64px; box-shadow: 0 6px 24px rgba(29, 29, 32, .06); }
.ch-header *, .ch-header *::before, .ch-header *::after { box-sizing: border-box; }
.ch-header ul, .ch-header li { list-style: none; margin: 0; padding: 0; }
.ch-header li::marker { content: none; }
.ch-spacer { height: 76px; }
@media (max-width: 1080px) { .ch-spacer { height: 64px; } }
.ch-header p { margin: 0; padding: 0; }
.ch-header a { color: inherit; text-decoration: none; }
.ch-header button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.ch-header :focus-visible { outline: 2px solid var(--ch-purple); outline-offset: 3px; border-radius: 4px; }

.ch-bar {
    display: flex;
    align-items: center;
    gap: 32px;
    max-width: 1360px;
    height: var(--ch-h);
    margin: 0 auto;
    padding: 0 32px;
    transition: height .3s ease;
}
.ch-logo { flex: none; display: block; }
.ch-logo img { display: block; height: 52px; width: auto; transition: height .3s ease; }
.ch-header.is-scrolled .ch-logo img { height: 44px; }

/* ---- Desktop menu ---- */
.ch-nav { flex: 1; height: 100%; }
.ch-menu { display: flex; align-items: center; justify-content: center; gap: 4px; height: 100%; }
.ch-item { height: 100%; display: flex; align-items: center; }
.ch-header .ch-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: .01em;
    color: var(--ch-ink);
    white-space: nowrap;
}
.ch-link::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 2px;
    height: 1.5px;
    border-radius: 2px;
    background: linear-gradient(90deg, #9958f3, #56e8ca);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
}
.ch-link:hover::after,
.ch-trigger[aria-expanded="true"]::after { transform: scaleX(1); }
.ch-caret {
    width: 7px;
    height: 7px;
    margin-top: -3px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    opacity: .6;
    transition: transform .25s ease, margin .25s ease;
}
.ch-trigger[aria-expanded="true"] .ch-caret { transform: rotate(-135deg); margin-top: 3px; }

/* ---- Panels ---- */
.ch-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border-top: 1px solid var(--ch-line);
    box-shadow: 0 24px 48px rgba(29, 29, 32, .08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
}
.ch-has-panel.is-open .ch-panel {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .22s ease, transform .22s ease;
}
.ch-panel__inner { max-width: 1360px; margin: 0 auto; padding: 36px 32px 0; }

.ch-cols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 32px; padding-bottom: 32px; }
.ch-col__title {
    display: inline-block;
    font-family: "Lora", Georgia, serif;
    font-size: 19px;
    font-weight: 500;
    color: var(--ch-ink);
}
.ch-col__title:hover { color: var(--ch-purple); }
.ch-col__tag {
    margin: 4px 0 16px !important;
    font-size: 12px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ch-muted);
}
.ch-header .ch-col li { padding: 6px 0; font-size: 14px; line-height: 1.4; color: #3a3a3f; }
.ch-col li a { color: #3a3a3f; transition: color .15s ease; }
.ch-col li a:hover { color: var(--ch-purple); }
.ch-col .ch-inline { color: var(--ch-muted); }
.ch-col .ch-inline a { margin-left: 10px; }
.ch-col .ch-inline a + a { padding-left: 10px; border-left: 1px solid var(--ch-line); }

.ch-panel__foot {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 24px;
    padding: 18px 0 22px;
    border-top: 1px solid var(--ch-line);
    font-size: 14px;
}
.ch-foot__sep { width: 1px; height: 16px; background: var(--ch-line); }
.ch-foot__label { color: var(--ch-muted); margin-right: -8px; }
.ch-arrow { color: var(--ch-purple) !important; }
.ch-arrow::after { content: " →"; transition: margin .2s ease; }
.ch-arrow:hover::after { margin-left: 4px; }

.ch-clinics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding-bottom: 36px; }
.ch-clinic { padding: 22px 24px; border: 1px solid var(--ch-line); border-radius: 14px; transition: border-color .2s ease; }
.ch-clinic:hover { border-color: #cfc4ec; }
.ch-clinic__area { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ch-muted); }
.ch-clinic__name { display: inline-block; margin: 4px 0 6px; font-family: "Lora", Georgia, serif; font-size: 21px; font-weight: 500; }
.ch-clinic__addr { font-size: 14px; color: #3a3a3f; }
.ch-clinic__links { display: flex; gap: 18px; margin-top: 14px; font-size: 14px; }
.ch-clinic__links a { color: var(--ch-purple); border-bottom: 1px solid rgba(122, 69, 214, .3); }
.ch-clinic__links a:hover { border-bottom-color: var(--ch-purple); }

/* ---- Right actions ---- */
.ch-actions { flex: none; display: flex; align-items: center; gap: 20px; }
.ch-phone { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ch-ink); }
.ch-phone svg { width: 16px; height: 16px; fill: currentColor; opacity: .75; }
.ch-phone:hover { color: var(--ch-purple); }
.ch-book {
    display: inline-flex;
    align-items: center;
    height: 44px;
    padding: 0 24px;
    border-radius: 999px;
    background: var(--ch-purple);
    color: #fff !important;
    font-size: 15px;
    font-weight: 500;
    transition: background-color .2s ease;
}
.ch-book:hover { background: var(--ch-purple-dark); }
.ch-burger { display: none; width: 40px; height: 40px; position: relative; }
.ch-burger span {
    position: absolute;
    left: 10px;
    right: 10px;
    height: 1.5px;
    background: var(--ch-ink);
    border-radius: 2px;
    transition: transform .3s ease, top .3s ease;
}
.ch-burger span:nth-child(1) { top: 15px; }
.ch-burger span:nth-child(2) { top: 24px; }
.ch-burger[aria-expanded="true"] span:nth-child(1) { top: 19.5px; transform: rotate(45deg); }
.ch-burger[aria-expanded="true"] span:nth-child(2) { top: 19.5px; transform: rotate(-45deg); }

/* ---- Drawer (tablet & mobile) ---- */
.ch-drawer {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--ch-h);
    bottom: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-top: 1px solid var(--ch-line);
    animation: chDrawerIn .28s ease;
}
.ch-drawer[hidden] { display: none; }
@keyframes chDrawerIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.ch-drawer__scroll { flex: 1; overflow-y: auto; padding: 8px 24px 24px; -webkit-overflow-scrolling: touch; }
.ch-acc { border-bottom: 1px solid var(--ch-line); }
.ch-acc > summary, .ch-drawer__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    font-family: "Lora", Georgia, serif;
    font-size: 21px;
    font-weight: 500;
    color: var(--ch-ink);
    list-style: none;
    cursor: pointer;
}
.ch-acc > summary::-webkit-details-marker { display: none; }
.ch-acc > summary::after {
    content: "";
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-right: 1.5px solid var(--ch-muted);
    border-bottom: 1.5px solid var(--ch-muted);
    transform: rotate(45deg);
    transition: transform .25s ease;
}
.ch-acc[open] > summary::after { transform: rotate(-135deg); }
.ch-drawer__link { border-bottom: 1px solid var(--ch-line); }
.ch-acc__body { padding: 0 0 16px; }
.ch-acc--sub { border-bottom: 0; }
.ch-acc--sub > summary { padding: 10px 0; font-family: Helvetica, Arial, sans-serif; font-size: 16px; color: #3a3a3f; }
.ch-acc--sub ul { padding: 0 0 8px 14px; border-left: 1px solid var(--ch-line); margin-left: 2px; }
.ch-acc--sub li a { display: block; padding: 8px 0; font-size: 15px; color: #45454b; }
.ch-drawer__all { display: inline-block; margin-top: 10px; font-size: 15px; color: var(--ch-purple) !important; }
.ch-drawer__clinic { display: block; padding: 10px 0; }
.ch-drawer__clinic strong { display: block; font-size: 16px; font-weight: 500; }
.ch-drawer__clinic span { font-size: 14px; color: var(--ch-muted); }
.ch-drawer__ai { display: flex; flex-direction: column; gap: 12px; padding-top: 22px; font-size: 15px; }
.ch-drawer__ai a { color: var(--ch-purple); }
.ch-drawer__cta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 14px 24px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--ch-line);
    background: #fff;
}
.ch-drawer__cta a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 500;
}
.ch-drawer__call { border: 1px solid var(--ch-ink); color: var(--ch-ink); }
.ch-drawer__book { background: var(--ch-purple); color: #fff !important; }
html.ch-lock, html.ch-lock body { overflow: hidden; }
html.ch-lock .chaty { display: none !important; }   /* hide the chat bubble while the menu is open */

/* ---- Breakpoints ---- */
@media (max-width: 1240px) {
    .ch-phone span { display: none; }
    .ch-bar { gap: 20px; }
    .ch-header .ch-link { padding: 8px 10px; }
}
@media (max-width: 1080px) {
    .ch-header { --ch-h: 64px; }
    .ch-header.is-scrolled { --ch-h: 60px; }
    .ch-nav, .ch-phone { display: none; }
    .ch-bar { justify-content: space-between; padding: 0 16px 0 20px; }
    .ch-logo img, .ch-header.is-scrolled .ch-logo img { height: 40px; }
    .ch-actions { gap: 8px; }
    .ch-book { height: 38px; padding: 0 16px; font-size: 14px; }
    .ch-burger { display: block; }
}
@media (max-width: 360px) {
    .ch-logo img, .ch-header.is-scrolled .ch-logo img { height: 34px; }
    .ch-book { padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .ch-header *, .ch-header *::before, .ch-header *::after { transition: none !important; animation: none !important; }
}

/* ---- Category icons ---- */
.ch-icon { display: block; width: 24px; height: 24px; fill: none; stroke: url(#chIconGrad); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ch-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #f6f3fd;
    transition: background-color .2s ease, transform .3s ease;
}
.ch-icon-wrap img { display: block; width: 22px; height: 22px; object-fit: contain; }   /* uploaded custom icons */
/* Icon and title share one row; the tagline sits below, aligned with the icon's left edge. */
.ch-col__head { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 10px; margin-bottom: 14px; }
.ch-col__head > div { display: contents; }
.ch-col__head .ch-col__title { grid-column: 2; }
.ch-col__head .ch-col__tag { grid-column: 1 / -1; margin: 8px 0 0 !important; line-height: 1.45; letter-spacing: .05em; }
.ch-col__head .ch-icon-wrap { width: 34px; height: 34px; border-radius: 10px; }
.ch-col__head .ch-icon-wrap .ch-icon, .ch-col__head .ch-icon-wrap img { width: 20px; height: 20px; }
.ch-col:hover .ch-icon-wrap { background: #efe9fc; transform: translateY(-1px); }
.ch-sum { display: inline-flex; align-items: center; gap: 12px; }
.ch-icon-wrap--sm { width: 32px; height: 32px; border-radius: 10px; }
.ch-icon-wrap--sm .ch-icon, .ch-icon-wrap--sm img { width: 18px; height: 18px; }

/* ---- WordPress admin bar (logged-in preview) ---- */
.admin-bar .ch-header { top: 32px; }
.admin-bar .ch-drawer { top: calc(var(--ch-h) + 32px); }
@media (max-width: 782px) {
    .admin-bar .ch-header { top: 46px; }
    .admin-bar .ch-drawer { top: calc(var(--ch-h) + 46px); }
}
@media (max-width: 600px) {
    .admin-bar .ch-header { top: 0; }
    .admin-bar .ch-drawer { top: var(--ch-h); }
}
