/* ============================================================
   SHICHIM ONCOCARE — additions for the dynamic site
   (detail pages, search, prose, list pages). Uses the tokens
   from shichim.css.
   ============================================================ */

/* ---- header: the menu is dynamic (8 items by default), so keep every item on one line,
        tighten the gaps a little, and switch to the hamburger a bit earlier than the
        original 1080px so nothing ever wraps. ---- */
.logo-lockup{flex-shrink:0;}
.nav > ul{gap:22px;}
.nav a{white-space:nowrap;}
.header-cta.call{white-space:nowrap;}
.header-actions{flex-shrink:0;}
/* never let the logo and the first menu item touch */
.site-header .header-inner{gap:clamp(16px,2vw,40px);}
@media (max-width:1560px){.nav > ul{gap:18px;} .nav a{font-size:14px;}}
/* the phone is in the dark top strip on every page, so the header copy of it can go earlier */
@media (max-width:1560px){.header-cta.call{display:none;}}
@media (max-width:1280px){.nav{display:none;} .mobile-toggle{display:block;}}

/* ---- header / footer search ---- */
.topbar-search{display:inline-flex;align-items:center;gap:6px;}
.mobile-search,.footer-search{display:flex;gap:0;margin:18px 0 22px;border-radius:100px;overflow:hidden;background:rgba(255,255,255,0.08);}
.mobile-search input,.footer-search input{flex:1;background:transparent;border:none;color:#fff;padding:12px 18px;font-family:inherit;font-size:14.5px;outline:none;}
.mobile-search input::placeholder,.footer-search input::placeholder{color:rgba(255,255,255,0.5);}
.mobile-search button,.footer-search button{color:#fff;padding:0 16px;background:var(--brand);}
.footer-search{max-width:300px;margin-top:22px;}

/* ---- generic prose (CMS body html) ---- */
.prose{font-size:17px;line-height:1.75;color:var(--ink-soft);max-width:760px;}
.prose p{margin-bottom:18px;}
.prose h2{font-size:clamp(24px,2.6vw,32px);margin:38px 0 14px;}
.prose h3{font-size:21px;margin:30px 0 10px;}
.prose ul,.prose ol{margin:0 0 18px 22px;list-style:disc;}
.prose ol{list-style:decimal;}
.prose li{margin-bottom:8px;}
.prose a{color:var(--brand-dark);text-decoration:underline;text-underline-offset:3px;}
.prose strong{color:var(--ink);}
.prose img{border-radius:var(--radius);margin:24px 0;}
/* the opening paragraph leads, without anyone having to type a CSS class */
.prose .lead-para,.prose > p:first-of-type{font-size:19px;color:var(--ink);}

/* ---- detail page layout (cancer type / treatment / centre / article) ---- */
.detail-section{padding:80px 0;}
.detail-grid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:64px;align-items:start;}
.detail-side{position:sticky;top:110px;display:grid;gap:22px;}
.side-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:26px 24px;}
.side-card.brand{background:linear-gradient(135deg,var(--ink),var(--brand-dark));color:#fff;border:none;}
.side-card.brand h4{color:#fff;}
.side-card.brand p{color:rgba(255,255,255,0.78);font-size:14.5px;margin:8px 0 18px;}
.side-card h4{font-size:17px;margin-bottom:12px;}
.side-card ul{display:grid;gap:8px;}
.side-card li a{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border-radius:10px;background:var(--mist);font-size:14.5px;font-weight:600;color:var(--ink);transition:all .2s;}
.side-card li a:hover{background:var(--mist-deep);color:var(--brand-dark);}
.side-card li a .icon{width:15px;height:15px;flex-shrink:0;}
.side-card .btn{width:100%;}
.side-card .contact-line{display:flex;gap:10px;align-items:flex-start;font-size:14.5px;margin-bottom:10px;color:var(--ink-soft);}
.side-card .contact-line .icon{width:17px;height:17px;flex-shrink:0;color:var(--brand);margin-top:2px;}
.detail-hero-img{border-radius:var(--radius);overflow:hidden;margin-bottom:34px;box-shadow:var(--shadow);}
.detail-hero-img img{width:100%;aspect-ratio:3/2;object-fit:cover;}
.detail-toc{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:34px;}
.detail-toc a{font-size:13px;font-weight:700;padding:8px 14px;border-radius:100px;background:var(--mist);color:var(--brand-dark);}
.detail-toc a:hover{background:var(--mist-deep);}
.content-block{scroll-margin-top:110px;margin-bottom:38px;}
.content-block h2{display:flex;align-items:center;gap:12px;font-size:clamp(22px,2.4vw,30px);margin-bottom:14px;}
.content-block h2 .icon{width:26px;height:26px;color:var(--brand);}
.chip-row{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 6px;}
.chip-row span{font-size:12.5px;font-weight:700;padding:6px 12px;border-radius:100px;background:var(--mist);color:var(--brand-dark);}
.medical-note{background:var(--mist);border-left:4px solid var(--gold);border-radius:10px;padding:16px 20px;font-size:14px;color:var(--muted);margin-top:34px;}
@media (max-width:1000px){.detail-grid{grid-template-columns:1fr;gap:40px;}.detail-side{position:static;}}

/* ---- list pages ---- */
.list-section{padding:80px 0;}
.type-card.link{display:block;color:inherit;}
.type-card.link p{font-size:14px;color:var(--muted);margin-top:8px;line-height:1.55;}
.type-card.link .more{display:inline-flex;align-items:center;gap:6px;margin-top:12px;font-size:13.5px;font-weight:700;color:var(--brand-dark);}
.type-card.link .more .icon{width:14px;height:14px;}
.centres-list .centre-card{display:flex;flex-direction:column;}
.centre-body .centre-meta{display:grid;gap:6px;margin:14px 0;font-size:14px;color:var(--muted);}
.centre-body .centre-meta div{display:flex;gap:8px;align-items:flex-start;}
.centre-body .centre-meta .icon{width:16px;height:16px;flex-shrink:0;color:var(--brand);margin-top:2px;}
.tcard.link{display:block;color:inherit;}
.tcard.link .more{display:inline-flex;align-items:center;gap:6px;margin-top:14px;font-size:13.5px;font-weight:700;color:var(--brand-dark);}
.tcard.link .more .icon{width:14px;height:14px;}
.treat-block h3 a{color:inherit;}
.treat-block h3 a:hover{color:var(--brand-dark);}
.treat-meta{display:flex;gap:12px;flex-wrap:wrap;align-items:center;}
.treat-meta .section-link{margin-top:0;}
.team-card .team-photo,.bio-card .team-photo{width:110px;height:110px;border-radius:50%;object-fit:cover;margin:0 auto 18px;border:4px solid #fff;box-shadow:var(--shadow-sm);}
.team-card .bio-name,.bio-card .bio-name{display:block;font-family:var(--font-display);font-size:19px;color:var(--ink);}
.team-card .bio-cred{display:block;font-size:13px;color:var(--muted);margin-top:6px;}
.team-card .pl-tags{justify-content:center;margin-top:12px;}
.team-card .pl-tags span{font-size:12px;font-weight:700;padding:5px 10px;border-radius:100px;background:#fff;color:var(--brand-dark);}
.team-card a,.bio-card a{color:inherit;display:block;}
.member-hero{display:grid;grid-template-columns:200px 1fr;gap:40px;align-items:center;}
.member-hero img{width:200px;height:200px;border-radius:50%;object-fit:cover;border:5px solid rgba(255,255,255,0.2);}
.member-hero .team-avatar{width:200px;height:200px;margin:0;}
@media (max-width:700px){.member-hero{grid-template-columns:1fr;text-align:center;justify-items:center;}}

/* ---- article page ---- */
.article-meta{display:flex;flex-wrap:wrap;gap:16px;font-size:13.5px;color:var(--muted);font-weight:600;margin-bottom:26px;}
.article-meta span{display:inline-flex;align-items:center;gap:6px;}
.article-meta .icon{width:15px;height:15px;}
.article-source{margin-top:36px;padding:18px 22px;border:1px dashed var(--line);border-radius:var(--radius-sm);font-size:14.5px;color:var(--muted);}
.article-source a{color:var(--brand-dark);font-weight:700;}

/* ---- search page ---- */
.search-box{display:flex;gap:0;max-width:720px;margin:0 auto 46px;border-radius:100px;overflow:hidden;background:#fff;border:1.5px solid var(--line);box-shadow:var(--shadow-sm);}
.search-box input{flex:1;border:none;padding:18px 26px;font-size:17px;font-family:inherit;outline:none;color:var(--ink);}
.search-box button{background:var(--brand);color:#fff;padding:0 28px;font-weight:700;display:inline-flex;align-items:center;gap:8px;}
.search-box button:hover{background:var(--brand-dark);}
.search-count{text-align:center;color:var(--muted);margin-bottom:34px;font-size:15px;}
.search-results{max-width:820px;margin:0 auto;display:grid;gap:14px;}
.search-hit{display:grid;grid-template-columns:110px 1fr;gap:20px;background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:18px;transition:all .25s;color:inherit;}
.search-hit:hover{border-color:var(--brand-light);box-shadow:var(--shadow-sm);transform:translateY(-2px);}
.search-hit .thumb{width:110px;height:82px;border-radius:12px;overflow:hidden;background:var(--mist);display:flex;align-items:center;justify-content:center;color:var(--brand);}
.search-hit .thumb img{width:100%;height:100%;object-fit:cover;}
.search-hit .thumb .icon{width:30px;height:30px;}
.search-hit .type{font-size:11.5px;font-weight:800;letter-spacing:1.5px;text-transform:uppercase;color:var(--brand-dark);}
.search-hit h3{font-size:18px;margin:4px 0 6px;}
.search-hit p{font-size:14.5px;color:var(--muted);line-height:1.55;}
.search-hit mark{background:var(--gold-light);color:var(--ink);border-radius:3px;padding:0 2px;}
.search-empty{text-align:center;max-width:620px;margin:0 auto 40px;color:var(--muted);}
.search-empty h3{margin-bottom:10px;}
@media (max-width:600px){.search-hit{grid-template-columns:1fr;}.search-hit .thumb{width:100%;height:150px;}}

/* ---- contact page ---- */
.contact-grid{display:grid;grid-template-columns:1fr 1fr;gap:40px;align-items:start;}
.contact-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:34px 30px;}
.contact-card h3{font-size:22px;margin-bottom:18px;}
.contact-card .contact-line{display:flex;gap:12px;align-items:flex-start;margin-bottom:14px;font-size:15.5px;}
.contact-card .contact-line .icon{width:20px;height:20px;color:var(--brand);flex-shrink:0;margin-top:2px;}
.contact-card .contact-line a{color:var(--brand-dark);font-weight:600;}
.map-frame{border-radius:var(--radius);overflow:hidden;border:1px solid var(--line);min-height:320px;}
.map-frame iframe{width:100%;height:100%;min-height:320px;border:0;display:block;}
@media (max-width:900px){.contact-grid{grid-template-columns:1fr;}}

/* ---- error page ---- */
.error-section{padding:100px 0;text-align:center;}
.error-section .code{font-family:var(--font-display);font-size:96px;color:var(--brand-light);line-height:1;}
.error-section h1{font-size:34px;margin:12px 0 10px;}
.error-section p{color:var(--muted);max-width:520px;margin:0 auto 28px;}

/* ---- blogs / media sections + gallery ---- */
.blogs-section{background:var(--mist);}
.media-section{background:var(--bg);}
.event-card .acard-media{position:relative;}
.event-card .photo-count{position:absolute;right:12px;bottom:12px;background:rgba(42,27,61,.75);color:#fff;font-size:12px;font-weight:700;padding:5px 10px;border-radius:100px;display:inline-flex;align-items:center;gap:5px;}
.event-card .photo-count .icon{width:13px;height:13px;}
.photo-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;}
.photo-grid .photo{position:relative;display:block;border-radius:14px;overflow:hidden;background:var(--mist);aspect-ratio:4/3;}
.photo-grid .photo img{width:100%;height:100%;object-fit:cover;transition:transform .4s ease;}
.photo-grid .photo:hover img{transform:scale(1.05);}
.photo-grid .photo .cap{position:absolute;left:0;right:0;bottom:0;padding:22px 12px 10px;font-size:12.5px;font-weight:600;color:#fff;background:linear-gradient(transparent,rgba(42,27,61,.8));}
@media (max-width:900px){.photo-grid{grid-template-columns:repeat(2,1fr);}}
.lightbox{position:fixed;inset:0;background:rgba(20,10,30,.94);z-index:400;display:none;align-items:center;justify-content:center;padding:20px;}
.lightbox.open{display:flex;}
.lightbox figure{max-width:min(1200px,92vw);max-height:90vh;text-align:center;margin:0;}
.lightbox img{max-width:100%;max-height:82vh;border-radius:12px;box-shadow:0 30px 80px -30px rgba(0,0,0,.8);}
.lightbox figcaption{color:rgba(255,255,255,.8);margin-top:12px;font-size:14.5px;}
.lightbox button{position:absolute;color:#fff;width:48px;height:48px;border-radius:50%;background:rgba(255,255,255,.12);display:flex;align-items:center;justify-content:center;}
.lightbox button:hover{background:var(--brand);}
.lightbox .icon{width:24px;height:24px;}
.lightbox .icon.flip{transform:rotate(180deg);}
.lb-close{top:20px;right:20px;}
.lb-prev{left:20px;top:50%;transform:translateY(-50%);}
.lb-next{right:20px;top:50%;transform:translateY(-50%);}

/* ---- admin "edit this page" pill (only rendered for a logged-in admin) ---- */
.admin-edit-pill{position:fixed;left:18px;bottom:18px;z-index:350;background:var(--ink);color:#fff;font-weight:700;font-size:13px;padding:10px 16px;border-radius:100px;box-shadow:var(--shadow);opacity:.92;}
.admin-edit-pill:hover{background:var(--brand);opacity:1;}
@media (max-width:900px){.admin-edit-pill{bottom:76px;}}

/* ---- misc ---- */
.faq-item .faq-body{padding:0 24px 22px;color:var(--muted);font-size:15.5px;}
.faq-item .faq-body p{padding:0;margin-bottom:10px;}
.faq-item .faq-body a{color:var(--brand-dark);text-decoration:underline;}
.hero-video-hidden{display:none;}

/* ============================================================
   Photos are shown WHOLE, never cropped (object-fit:contain).
   The boxes keep their height, so any spare space shows a soft
   ground instead of cutting off the sides of the picture.
   Loaded after shichim.css, so these win over the cover rules.
   ============================================================ */
.acard-media img,
.centre-media img,
.tcard-media img,
.type-media img,
.treat-visual img,
.detail-hero-img img,
.search-hit .thumb img,
.photo-grid .photo img,
.team-card .team-photo,
.bio-card .team-photo,
.member-hero img{object-fit:contain;}

/* a clean ground behind the letterboxed area */
.acard-media,
.tcard-media,
.detail-hero-img,
.photo-grid .photo,
.search-hit .thumb{background:var(--mist);}
.team-card .team-photo,
.bio-card .team-photo,
.member-hero img{background:#fff;}

/* ============================================================
   Top strip on every page (Settings -> Header can limit it to home).
   On a phone the long e-mail address used to push the whole page
   sideways, so it is dropped below 620px and nothing can overflow.
   ============================================================ */
@media (max-width:620px){
  .topbar-left a[href^="mailto:"]{display:none;}
  .topbar-left{gap:12px;}
  .topbar{font-size:12px;}
}
