/*
Theme Name: Oncologos Santiago
Theme URI: https://oncologossantiago.cl
Author: Camilo Jerez / sitio propio
Description: Tema clínico para Oncologos Santiago. Misma arquitectura de secciones que un centro de oncología (hero, especialistas, estudios, tratamientos, exámenes y blog), con textos y fotos propios. No incluye assets de cdiem.cl.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: oncologos-santiago
*/

:root {
  --navy: #12344d;
  --ink: #292929;
  --muted: #5c6b73;
  --teal: #0e7c7b;
  --teal-dark: #0a5e5d;
  --sand: #f4f7f6;
  --line: #e3eae8;
  --white: #fff;
  --shadow: 0 16px 40px rgba(18, 52, 77, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: Poppins, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-dark); text-decoration-thickness: 1px; }
h1, h2, h3 { line-height: 1.2; color: var(--navy); }
h1 { font-size: clamp(2rem, 4vw, 3.3rem); margin: 0.2em 0 0.4em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0.2em 0 0.5em; }
.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 12px; top: 12px; background: #fff; padding: 8px; z-index: 9; }

.topbar { background: var(--navy); color: #d7e4ea; font-size: 0.85rem; }
.topbar a { color: #fff; }
.topbar-inner, .header-inner, .hero-actions, .studies-inner { display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.topbar-inner { padding: 8px 0; }
.topbar-links { display: flex; gap: 16px; }

.site-header { position: sticky; top: 0; background: rgba(255,255,255,0.96); border-bottom: 1px solid var(--line); z-index: 20; }
.header-inner { padding: 14px 0; }
.brand { display: flex; gap: 12px; align-items: center; color: var(--navy); text-decoration: none; }
.brand strong { display: block; }
.brand small { color: var(--muted); }
.brand-mark {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; background: var(--teal); color: #fff; font-weight: 700;
}
.custom-logo { max-height: 56px; width: auto; }
.menu { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; align-items: center; }
.menu a { color: var(--navy); text-decoration: none; font-weight: 500; }
.primary-nav { display: flex; gap: 18px; align-items: center; }
.nav-toggle { display: none; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 12px; }

.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--teal); color: #fff; border-radius: 999px; padding: 12px 18px;
  text-decoration: none; font-weight: 600; border: 0;
}
.btn:hover { background: var(--teal-dark); }
.btn-ghost { background: transparent; color: var(--navy); border: 1px solid var(--navy); }
.btn-small { padding: 8px 14px; }
.kicker { letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); font-size: 0.78rem; font-weight: 700; margin: 0; }
.lead { font-size: 1.05rem; color: var(--muted); max-width: 58ch; }

.hero { background: linear-gradient(180deg, #f3f8f7 0%, #fff 100%); padding: 56px 0 32px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 32px; align-items: start; }
.hero-panel { display: grid; gap: 12px; }
.hero-panel article, .service, .person, .post-card, .note, .page-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow);
}
.hero-panel h2 { font-size: 1.05rem; margin: 0 0 6px; }
.hero-panel p { margin: 0 0 8px; color: var(--muted); }
.badges { display: flex; gap: 8px; padding: 0; list-style: none; flex-wrap: wrap; }
.badges li { background: #e7f4f3; color: var(--teal-dark); border-radius: 999px; padding: 6px 10px; font-size: 0.85rem; }

.band { padding: 64px 0; }
.band-alt { background: var(--sand); }
.section-head { margin-bottom: 24px; }
.cards { display: grid; gap: 16px; }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.person { text-align: center; }
.person h3, .service h3, .post-card h3 { margin: 8px 0 4px; }
.person p, .service p { color: var(--muted); margin: 0 0 8px; }
.avatar { height: 160px; border-radius: 12px; background: #d7ebe9; display: grid; place-items: center; overflow: hidden; }
.avatar span { font-size: 2rem; color: var(--navy); font-weight: 700; }
.avatar img { width: 100%; height: 160px; object-fit: cover; }
.is-placeholder { opacity: 0.85; border-style: dashed; }
.text-link { font-weight: 600; }

.studies { background: var(--navy); color: #e8eef1; padding: 56px 0; }
.studies h2, .studies .kicker { color: #fff; }
.studies .btn-ghost { color: #fff; border-color: #fff; }
.mission { padding: 64px 0; }
.split { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 24px; align-items: start; }
.meta { color: var(--muted); font-size: 0.85rem; margin: 8px 0 0; }
.post-card img { border-radius: 12px; height: 180px; width: 100%; object-fit: cover; }

.page-hero { padding: 48px 0 12px; }
.entry { width: min(760px, 100%); }
.entry-content > * + * { margin-top: 1em; }
.form { display: grid; gap: 12px; }
.form input, .form textarea, .form select {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 12px; font: inherit;
}
.notice { background: #e7f4f3; border-radius: 12px; padding: 12px 14px; }

.site-footer { background: #0d2434; color: #d5e0e6; padding: 40px 0 16px; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; }
.footer-brand, .footer-title { color: #fff; font-weight: 700; }
.footer-menu { list-style: none; padding: 0; margin: 0; }
.footer-base { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 24px; padding-top: 12px; font-size: 0.85rem; }

@media (max-width: 900px) {
  .hero-grid, .split, .cards-4, .cards-3, .footer-grid { grid-template-columns: 1fr 1fr; }
  .studies-inner, .header-inner { align-items: flex-start; }
}
@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; padding: 16px; border-bottom: 1px solid var(--line); }
  .primary-nav.is-open { display: grid; gap: 12px; }
  .menu { display: grid; }
  .hero-grid, .split, .cards-4, .cards-3, .cards-2, .footer-grid, .studies-inner, .topbar-inner { grid-template-columns: 1fr; display: grid; }
  .hero-actions { display: grid; }
}
