/* =====================================================================
   Gnosis México · diseño Lovable ("Conócete a ti mismo")
   Hoja del sitio público, trasladada del diseño hecho en lovable.app:
   verde azulado profundo, oro, Cormorant Garamond + Karla.
   El panel de administración sigue con styles.css.
   ===================================================================== */

:root {
  color-scheme: dark;

  --bg: #021314;          /* oklch(17% .025 200) */
  --bg-deep: #010C0C;     /* oklch(14% .02 200) */
  --card: #061C1D;        /* oklch(21% .028 200) */
  --muted-bg: #102324;    /* oklch(24% .025 200) */
  --secondary: #10282A;   /* oklch(26% .03 200) */
  --accent: #123432;      /* oklch(30% .04 190) */
  --fg: #F1EADD;          /* oklch(94% .02 85) */
  --muted: #98AA9B;       /* oklch(72% .03 150) */
  --gold: #E7B551;        /* oklch(80% .13 82) */
  --gold-ink: #021314;
  --line: rgba(231, 181, 81, 0.18);
  --line-strong: rgba(231, 181, 81, 0.4);
  --glow: 0 0 40px -8px rgba(231, 181, 81, 0.45);
  --danger: #F08C7E;
  --ok: #8FD1A8;

  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Karla', system-ui, sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --gutter: 24px;
  --section: 112px;
  --max: 1280px;
  --r: 14px;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  position: relative;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--gold); color: var(--gold-ink); }
html { scrollbar-color: #1D3A38 var(--bg); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1D3A38; border: 2px solid var(--bg); border-radius: 10px; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
input, textarea, select { font: inherit; caret-color: var(--gold); }

h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 400; color: var(--fg); text-wrap: balance; }
h1 { font-size: clamp(3rem, 8vw, 6rem); line-height: 1; letter-spacing: 0.01em; }
h2 { font-size: clamp(2.2rem, 4vw, 3rem); line-height: 1.1; letter-spacing: 0.01em; }
h3 { font-size: clamp(1.5rem, 2vw, 1.875rem); line-height: 1.2; letter-spacing: 0.01em; }
h2.h3 { font-size: clamp(1.5rem, 2vw, 1.875rem); }
h1 em, h2 em { font-style: italic; color: var(--gold); }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.body-text { color: var(--muted); max-width: 62ch; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow svg { vertical-align: -2px; margin-right: 6px; }

.content-body a, .article-body a, .contact-info a, .registrar-escuela-note a,
.login-footer-note a, .privacy-note a, .contact-note a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 0.22em;
  text-decoration-color: rgba(231, 181, 81, 0.4);
}

/* ===== Botones (píldora, mayúsculas espaciadas) ===== */
.btn, .btn-login, .btn-logout {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px;
  padding: 0 32px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), box-shadow 300ms ease, background-color 200ms ease, color 200ms ease;
}
.btn:active, .btn-login:active, .btn-logout:active { transform: scale(0.97); }
.btn:disabled, .btn-login:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { min-height: 38px; padding: 0 20px; }
.btn-primary, .btn-solid-dark, .btn-login { background: var(--gold); color: var(--gold-ink); box-shadow: var(--glow); }
.btn-outline-dark, .btn-outline-light, .btn-logout { background: transparent; color: var(--gold); border-color: var(--gold); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover, .btn-solid-dark:hover, .btn-login:hover { box-shadow: 0 0 56px -6px rgba(231, 181, 81, 0.6); }
  .btn-outline-dark:hover, .btn-outline-light:hover, .btn-logout:hover { background: rgba(231, 181, 81, 0.1); }
}

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.72rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--gold);
}
.link-arrow svg { transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .link-arrow:hover svg { transform: translateX(4px); } }

/* ===== Encabezado ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(2, 19, 20, 0.7);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.page-index .site-header { position: fixed; left: 0; right: 0; }
.site-header .container { display: flex; align-items: center; gap: 32px; min-height: 65px; }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand img { height: 34px; width: auto; }
.brand span { font-family: var(--serif); font-size: 1.5rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); }
.main-nav { display: flex; align-items: center; gap: 32px; }
.main-nav a { font-size: 0.75rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--muted); transition: color 200ms ease; }
.main-nav a[aria-current="page"], .main-nav a:hover { color: var(--gold); }
.header-social, .site-header .btn { display: none; }
.nav-toggle { display: none; width: 44px; height: 44px; place-items: center; background: none; border: 0; cursor: pointer; color: var(--gold); }
.nav-toggle svg { width: 24px; height: 24px; }
@media (max-width: 960px) {
  .nav-toggle { display: grid; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    min-height: calc(100svh - 65px);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px var(--gutter) 28px;
    background: var(--bg);
    opacity: 0; transform: translateY(-8px); visibility: hidden;
    transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s linear 200ms;
  }
  .main-nav.is-open { opacity: 1; transform: none; visibility: visible; transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out), visibility 0s; }
  .main-nav a { padding: 18px 0; font-family: var(--serif); font-size: 1.6rem; letter-spacing: 0.04em; text-transform: none; color: var(--fg); border-bottom: 1px solid var(--line); }
}

/* ===== Migas ===== */
.breadcrumb { margin: 28px 0 0; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.breadcrumb a { color: var(--muted); transition: color 160ms ease; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb .sep { margin: 0 10px; color: var(--gold); opacity: 0.6; }

/* ===== Pie ===== */
.site-footer { margin-top: var(--section); border-top: 1px solid var(--line); background: var(--bg-deep); }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; padding: 72px 0 48px; }
.footer-grid h4 { margin-bottom: 18px; font-family: var(--sans); font-size: 0.72rem; font-weight: 400; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); }
.footer-grid a:not(.social-icons a) { display: block; width: fit-content; padding: 5px 0; color: var(--muted); font-size: 0.95rem; transition: color 160ms ease; }
.footer-grid a:not(.social-icons a):hover { color: var(--fg); }
.social-icons { display: flex; gap: 8px; margin-top: 14px; }
.social-icons a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); color: var(--muted); transition: color 160ms ease, border-color 160ms ease; }
.social-icons a:hover { color: var(--gold); border-color: var(--line-strong); }
.social-icons svg { width: 18px; height: 18px; }
.footer-bottom { border-top: 1px solid var(--line); padding: 24px 0 32px; font-size: 0.8rem; color: var(--muted); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 20px; padding: 56px 0 36px; } }

/* ===== Superficies ===== */
.resource-card, .conf-card, .blog-card, .escuela-card, .webinar-card,
.info-card, .sidebar-card, .form-card, .login-card, .gate-card, .contact-info,
.empty-state, .modal-box, .confirm-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

/* ===== Cabeceras internas ===== */
.page-hero, .form-hero, .area-hero { padding-top: 40px; }
.page-hero h1, .form-hero h1, .area-hero h1, .perfil-header h1, .content-wrap > h1, .login-card h1 { font-size: clamp(2.6rem, 5.5vw, 4.5rem); }
.page-hero h1 { max-width: 18ch; }
.page-hero > p, .page-hero-top p { margin-top: 20px; color: var(--muted); max-width: 60ch; font-size: 1.05rem; }
.page-hero-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }
@media (max-width: 760px) { .page-hero-top { flex-direction: column; align-items: flex-start; } }

.filters-block { display: flex; flex-wrap: wrap; gap: 24px 48px; margin-top: 40px; }
.filter-label { margin-bottom: 12px; font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.page-hero > .chip-row { margin-top: 32px; }
.chip {
  min-height: 36px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--muted);
  font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease, transform 160ms var(--ease-out);
}
.chip:active { transform: scale(0.97); }
.chip:hover { color: var(--fg); border-color: var(--line-strong); }
.chip.is-active { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }

.search-bar-row { margin-top: 28px; max-width: 560px; }
.search-bar-row input, .home-search input {
  width: 100%; min-height: 50px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 4px;
  background: var(--card); color: var(--fg); font-size: 0.95rem;
  transition: border-color 180ms ease;
}
.search-bar-row input::placeholder, .home-search input::placeholder { color: var(--muted); }
.search-bar-row input:focus, .home-search input:focus { outline: none; border-color: var(--gold); }
.result-count { margin-top: 18px; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); font-variant-numeric: tabular-nums; }

.empty-state { display: none; grid-column: 1 / -1; padding: 64px 24px; text-align: center; }
.empty-state.is-visible, .page-conferencias .empty-state { display: block; }
.empty-state h3, .empty-state h2 { margin-bottom: 10px; }
.empty-state p { color: var(--muted); max-width: 46ch; margin: 0 auto 22px; }

/* ===== Repositorio ===== */
.resource-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 0; margin-top: 40px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.resource-grid .resource-card, .resource-grid .empty-state { border-radius: 0; border-width: 0 1px 1px 0; }
.resource-card { display: flex; flex-direction: column; padding: 24px; background: transparent; transition: background-color 300ms ease; }
.resource-card:hover { background: var(--card); }
.resource-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.format-icon { color: var(--gold); }
.level-tag { font-size: 0.68rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); }
.resource-card h3 { font-size: 1.5rem; margin-bottom: 8px; }
.resource-meta { color: var(--muted); font-size: 0.9rem; flex: 1; }
.resource-format-label { margin-top: 14px; font-size: 0.8rem; color: var(--muted); }
.resource-card .link-arrow { margin-top: 16px; }
.cargar-mas { display: flex; justify-content: center; padding: 32px 0; grid-column: 1 / -1; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ===== Modal ===== */
.modal-overlay { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(1, 12, 12, 0.75); backdrop-filter: blur(6px); }
.modal-overlay.is-open { display: flex; animation: fade-in 200ms var(--ease-out); }
.modal-box { width: 100%; max-width: 560px; max-height: calc(100dvh - 40px); overflow-y: auto; padding: 40px 36px 32px; animation: modal-in 260ms var(--ease-out); }
.modal-box h3 { font-size: 2rem; margin-bottom: 14px; padding-right: 40px; }
.modal-box > p { color: var(--muted); }
.modal-close { position: absolute; top: 20px; right: 20px; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.modal-close:hover { color: var(--gold); border-color: var(--line-strong); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.pending-note, .note-box, .privacy-note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: rgba(231, 181, 81, 0.06); color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.pending-note svg, .note-box svg, .privacy-note svg { flex-shrink: 0; margin-top: 2px; color: var(--gold); }
.privacy-note { margin-top: 14px; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }

/* ===== Campos ===== */
.modal-box label, .field label, .contact-field label { display: block; margin: 20px 0 8px; font-size: 0.7rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--gold); }
.modal-box input, .modal-box select, .modal-box textarea, .field input, .field select, .field textarea, .contact-field input, .contact-field textarea {
  width: 100%; min-height: 48px; padding: 12px 16px;
  border: 1px solid var(--line); border-radius: 4px;
  background: var(--bg); color: var(--fg); font-size: 1rem;
  transition: border-color 180ms ease;
}
.modal-box select, .field select { appearance: none; background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23E7B551" stroke-width="2" stroke-linecap="round"><polyline points="6 9 12 15 18 9"/></svg>') no-repeat right 16px center / 14px, var(--bg); padding-right: 44px; }
.modal-box textarea, .field textarea, .contact-field textarea { min-height: 120px; resize: vertical; }
.modal-box input::placeholder, .modal-box textarea::placeholder, .field input::placeholder, .field textarea::placeholder, .contact-field input::placeholder, .contact-field textarea::placeholder { color: var(--muted); opacity: 0.8; }
.modal-box input:focus, .modal-box select:focus, .modal-box textarea:focus, .field input:focus, .field select:focus, .field textarea:focus, .contact-field input:focus, .contact-field textarea:focus { outline: none; border-color: var(--gold); }
.hint { margin-top: 8px; font-size: 0.85rem; color: var(--muted); }
input:-webkit-autofill { -webkit-text-fill-color: var(--fg); -webkit-box-shadow: inset 0 0 0 1000px var(--card); }

.upload-box { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 30px 20px; border: 1px dashed var(--line-strong); border-radius: 8px; text-align: center; color: var(--muted); font-size: 0.95rem; cursor: pointer; transition: background-color 180ms ease, border-color 180ms ease; }
.upload-box svg { color: var(--gold); pointer-events: none; }
.upload-box p { pointer-events: none; }
.upload-box input[type="file"] { display: none; }
.upload-box:hover, .upload-box.is-dragover { border-color: var(--gold); background: rgba(231, 181, 81, 0.06); }
.upload-link { color: var(--gold); }
.upload-counter { margin-top: 8px; font-size: 0.85rem; color: var(--muted); }
.upload-counter.is-complete { color: var(--ok); }
.preview-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.preview-grid:empty { display: none; }
.preview-item { position: relative; width: 96px; height: 96px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.preview-item img, .preview-item video { width: 100%; height: 100%; object-fit: cover; }
.preview-item .file-label { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; height: 100%; padding: 8px; font-size: 0.72rem; color: var(--muted); text-align: center; word-break: break-all; }
.preview-item:has(.file-label) { width: auto; min-width: 160px; max-width: 260px; }
.remove-btn { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(1, 12, 12, 0.85); color: var(--fg); cursor: pointer; }

/* ===== Video / conferencias ===== */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.video-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-thumb { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform 700ms var(--ease-out); }
.video-frame:hover .video-thumb { transform: scale(1.03); }
.play-btn { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%; background: var(--gold); color: var(--gold-ink); box-shadow: var(--glow); transition: transform 200ms var(--ease-out); }
.play-btn svg { width: 26px; height: 26px; margin-left: 4px; fill: currentColor; }
.play-btn:active { transform: scale(0.95); }
.video-caption { position: absolute; left: 14px; bottom: 12px; font-size: 0.7rem; color: rgba(241, 234, 221, 0.7); }
.conf-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 18px 0; font-size: 0.85rem; color: var(--muted); }
.conf-meta span:empty { display: none; }
.featured-conf { margin-top: 48px; padding: 32px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.featured-conf .body-text { color: var(--muted) !important; }
.conf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 0; margin-top: 48px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.conf-grid .conf-card, .conf-grid .empty-state { border-radius: 0; border-width: 0 1px 1px 0; }
.conf-card { display: grid; grid-template-columns: 96px 1fr; gap: 20px; padding: 24px; background: transparent; }
.conf-card .thumb { display: grid; place-items: center; aspect-ratio: 1; border: 1px solid var(--line-strong); border-radius: 50%; }
.conf-card .thumb svg { width: 26px; height: 26px; color: var(--gold); }
.conf-card .thumb svg polygon { fill: var(--gold); stroke: var(--gold); }
.card-meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 8px; }
.excerpt { color: var(--muted); font-size: 0.92rem; margin-bottom: 12px; }

/* ===== Blog ===== */
.blog-grid, .card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 0; margin-top: 40px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.blog-card { display: flex; flex-direction: column; border: 0; border-radius: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent; transition: background-color 300ms ease; margin: 0 -1px -1px 0; }
.blog-card:hover { background: var(--card); }
.blog-card > a { display: flex; flex-direction: column; height: 100%; }
.blog-card .thumb { aspect-ratio: 16 / 10; background-color: var(--card); background-size: cover; background-position: center; }
.blog-card .card-body { display: flex; flex-direction: column; gap: 12px; padding: 28px 24px 32px; flex: 1; }
.blog-card h3 { font-size: 1.75rem; }
.blog-card .card-body > p:not(.card-meta):not(.tag) { color: var(--muted); font-size: 0.92rem; }
.blog-card .card-meta { margin: auto 0 0; padding-top: 6px; font-size: 0.78rem; }
.tag, .article-tag { font-size: 0.68rem; letter-spacing: 0.35em; text-transform: uppercase; color: var(--gold); }

.loading-state, .loading-msg { padding: 80px 0; text-align: center; color: var(--muted); }
.article-wrap { max-width: 760px; margin: 0 auto; padding: 48px var(--gutter) 0; }
.article-title { margin: 14px 0 18px; font-size: clamp(2.6rem, 5.5vw, 4.25rem); }
.article-meta { color: var(--muted); font-size: 0.85rem; }
.article-hero-thumb { aspect-ratio: 16 / 8; margin: 40px 0 48px; border: 1px solid var(--line); border-radius: 8px; background-color: var(--card); }
.article-body { font-size: 1.1rem; line-height: 1.8; color: #D9D4C7; }
.article-body > * + * { margin-top: 1.2em; }
.article-body h2 { margin-top: 1.6em; font-size: clamp(1.9rem, 3vw, 2.4rem); }
.article-body h3 { margin-top: 1.4em; }
.article-body blockquote { margin: 1.6em 0; padding-left: 24px; border-left: 1px solid var(--gold); font-family: var(--serif); font-style: italic; font-size: 1.5rem; color: var(--fg); }
.article-body img { border-radius: 8px; margin: 1.6em 0; }
.article-body ul, .article-body ol, .content-body ul, .content-body ol { padding-left: 1.2em; }
.article-body li + li, .content-body li + li { margin-top: 0.5em; }
.article-body li::marker, .content-body li::marker { color: var(--gold); }
.article-cta, .content-cta { display: flex; justify-content: space-between; align-items: center; gap: 32px; max-width: 760px; margin: 72px auto 0; padding: 40px; border: 1px solid var(--line); border-radius: var(--r); background: linear-gradient(135deg, var(--card), var(--bg)); }
.content-cta { width: calc(100% - 2 * var(--gutter)); max-width: calc(var(--max) - 2 * var(--gutter)); }
.content-cta > div:last-child { flex-wrap: nowrap !important; flex-shrink: 0; }
.article-cta h3, .content-cta h3 { font-size: 2rem; margin-bottom: 8px; }
.article-cta p, .content-cta p { color: var(--muted); }
@media (max-width: 760px) { .article-cta, .content-cta { flex-direction: column; align-items: flex-start; margin-left: var(--gutter); margin-right: var(--gutter); padding: 28px; } .content-cta > div:last-child { flex-wrap: wrap !important; } }
.back-link { max-width: 760px; margin: 32px auto 0; padding: 0 var(--gutter); }

/* ===== Institucionales y contacto ===== */
.content-wrap { max-width: var(--max); margin: 0 auto; padding: 48px var(--gutter) 0; }
.content-wrap .subtitle { margin-top: 20px; font-size: 1.15rem; color: var(--muted); max-width: 52ch; }
.content-body { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--line); font-size: 1.08rem; line-height: 1.8; color: #D9D4C7; max-width: 68ch; }
.content-body > * + * { margin-top: 1.1em; }
.content-body h2 { margin-top: 1.6em; font-size: clamp(1.9rem, 3vw, 2.4rem); }
.content-body strong { color: var(--fg); font-weight: 500; }
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; margin-top: 48px; align-items: start; }
.contact-field:first-child label { margin-top: 0; }
#contactoForm .btn { margin-top: 28px; }
.contact-info { padding: 28px; }
.contact-info h3, .contact-info h2 { margin-bottom: 16px; }
.contact-info .row { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.95rem; }
.contact-info .row svg { flex-shrink: 0; color: var(--gold); margin-top: 3px; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

/* ===== Escuelas ===== */
.view-toggle { display: inline-flex; margin-top: 28px; padding: 4px; gap: 4px; border: 1px solid var(--line); border-radius: 999px; }
.view-toggle button { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; cursor: pointer; transition: background-color 200ms ease, color 200ms ease; }
.view-toggle button.is-active { background: var(--gold); color: var(--gold-ink); }
.escuelas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 16px; margin-top: 40px; }
.escuela-card { display: grid; grid-template-columns: 170px 1fr; overflow: hidden; transition: border-color 300ms ease; }
.escuela-card:hover { border-color: var(--line-strong); }
.escuela-card .photo { min-height: 100%; background-color: var(--muted-bg); background-size: cover; background-position: center; }
.escuela-card .info { padding: 22px 24px; display: flex; flex-direction: column; gap: 4px; }
.info-top { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 4px; }
.info-top h3 { font-size: 1.6rem; }
.city { color: var(--muted); font-size: 0.92rem; }
.meta-line { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.85rem; }
.meta-line svg { flex-shrink: 0; color: var(--gold); }
.card-actions { margin-top: 14px; }
.escuela-card.is-highlighted { border-color: var(--gold); box-shadow: var(--glow); }
@media (max-width: 420px) { .escuela-card { grid-template-columns: 1fr; } .escuela-card .photo { aspect-ratio: 16/9; } }
.badge-solid, .badge-gratuito { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--gold); font-size: 0.66rem; letter-spacing: 0.25em; text-transform: uppercase; white-space: nowrap; }
.map-view { display: none; margin-top: 40px; }
.map-view.is-active { display: block; }
.list-view.is-hidden, .escuelas-grid.is-hidden { display: none; }
.map-box, .map-box-lg, .zone-map { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.map-box-lg { height: min(70vh, 620px); }
.zone-map { height: 300px; margin-top: 16px; }
.map-note { position: absolute; left: 14px; bottom: 14px; z-index: 500; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(2, 19, 20, 0.85); color: var(--muted); font-size: 0.75rem; pointer-events: none; }
.leaflet-container { background: var(--card) !important; font-family: var(--sans) !important; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--card) !important; color: var(--fg) !important; border: 1px solid var(--line); }
.leaflet-popup-content a { color: var(--gold) !important; }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted) !important; }
.leaflet-bar a, .leaflet-bar a:hover { background: var(--card) !important; color: var(--gold) !important; border-color: var(--line) !important; }
.leaflet-control-attribution { background: rgba(2, 19, 20, 0.75) !important; color: var(--muted) !important; }
.leaflet-control-attribution a { color: var(--muted) !important; }

.perfil-header { padding-top: 32px; }
.perfil-title-row { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.perfil-sub { margin-top: 12px; color: var(--muted); font-size: 1.05rem; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 40px 0 0; }
.gallery.is-empty { display: none; }
.gallery-photo { aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: 8px; background-size: cover; background-position: center; background-color: var(--card); }
.gallery-photo:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.perfil-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 56px; margin-top: 56px; align-items: start; }
.perfil-grid h2 { font-size: clamp(1.9rem, 3vw, 2.4rem); margin-bottom: 14px; }
.perfil-grid h2:not(:first-child) { margin-top: 48px; }
.info-card { position: sticky; top: 90px; padding: 28px; }
.info-row { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.info-row:first-child { padding-top: 0; }
.info-row .ic { color: var(--gold); flex-shrink: 0; margin-top: 2px; }
.info-row .label { font-size: 0.66rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); }
.info-row .value { margin-top: 4px; }
.info-card .btn { width: 100%; margin-top: 24px; }
@media (max-width: 860px) { .perfil-grid { grid-template-columns: 1fr; } .info-card { position: static; } .gallery-photo:first-child { grid-column: auto; grid-row: auto; aspect-ratio: 4/3; } }

/* ===== Formularios largos ===== */
.form-hero { display: flex; flex-direction: column; align-items: flex-start; }
.form-hero h1 { max-width: 18ch; }
.form-hero p { margin-top: 20px; color: var(--muted); max-width: 60ch; font-size: 1.05rem; }
.form-hero .badge-gratuito { order: 3; margin-top: 18px; }
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; margin-top: 48px; align-items: start; }
.form-card { padding: clamp(24px, 4vw, 44px); }
.form-section + .form-section { margin-top: 44px; padding-top: 40px; border-top: 1px solid var(--line); }
.form-section-head { display: flex; align-items: center; gap: 16px; margin-bottom: 6px; }
.form-section-head h2 { font-size: clamp(1.7rem, 2.6vw, 2.1rem); }
.form-section-num { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--gold); font-family: var(--serif); font-size: 1.1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
#mapaPicker { border-radius: 8px !important; border: 1px solid var(--line) !important; overflow: hidden; }
.form-submit-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 44px; padding-top: 32px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.sidebar-card { position: sticky; top: 90px; padding: 28px; }
.sidebar-card h3 { margin-bottom: 22px; }
.sidebar-step { display: flex; gap: 14px; position: relative; padding-bottom: 22px; }
.sidebar-step:last-child { padding-bottom: 0; }
.sidebar-step:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 32px; bottom: 2px; width: 1px; background: var(--line); }
.sidebar-step .dot { display: grid; place-items: center; width: 28px; height: 28px; flex-shrink: 0; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--gold); font-size: 0.8rem; }
.sidebar-step p { font-size: 0.92rem; margin: 2px 0 0; }
.step-title { color: var(--fg); }
.step-desc { color: var(--muted); }
@media (max-width: 960px) { .form-layout { grid-template-columns: 1fr; } .sidebar-card { position: static; order: -1; } }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.confirm-card { display: none; max-width: 640px; margin: 64px auto 0; padding: 64px 32px; text-align: center; }
.confirm-card.is-visible { display: flex; flex-direction: column; align-items: center; animation: modal-in 400ms var(--ease-out); }
.confirm-card .confirm-status { order: 3; margin: 0 0 22px; }
.confirm-card p { order: 4; }
.confirm-card .btn { order: 5; }
.confirm-icon { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 20px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--gold); box-shadow: var(--glow); }
.confirm-status { display: inline-block; padding: 4px 12px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--gold); font-size: 0.66rem; letter-spacing: 0.25em; text-transform: uppercase; }
.confirm-card h2 { margin-bottom: 14px; }
.confirm-card p { color: var(--muted); max-width: 46ch; margin: 0 auto 28px; }

/* ===== Misioneros ===== */
.login-wrap { display: grid; place-items: center; padding: 56px var(--gutter) 0; }
.login-card { width: 100%; max-width: 460px; padding: 44px 36px 32px; }
.login-card .sub { margin-top: 10px; color: var(--muted); }
.login-card form { margin-top: 18px; }
.btn-login { width: 100%; margin-top: 28px; }
.login-footer-note { margin-top: 22px; font-size: 0.9rem; color: var(--muted); text-align: center; }
.error-box { display: none; margin-top: 20px; padding: 12px 16px; border: 1px solid rgba(240, 140, 126, 0.35); border-radius: 8px; color: var(--danger); font-size: 0.9rem; }
.error-box.is-visible { display: block; }
.gate-card { max-width: 560px; margin: 64px auto 0; padding: 48px 36px; text-align: center; }
.gate-card h2 { margin-bottom: 12px; }
.gate-card p { color: var(--muted); margin-bottom: 26px; }
.area-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.area-hero p { margin-top: 14px; color: var(--muted); max-width: 52ch; }
.user-pill { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 0.9rem; }
.webinar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; margin-top: 44px; }
.webinar-card { overflow: hidden; }
.webinar-thumb { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--accent), var(--bg)); }
.webinar-thumb .play-btn { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
.webinar-body { padding: 22px; }
.webinar-body h3 { margin-bottom: 6px; }
.webinar-meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 10px; }
.webinar-desc { color: var(--muted); font-size: 0.92rem; margin-bottom: 14px; }

/* ===== SweetAlert2 ===== */
.swal2-popup { background: var(--card) !important; color: var(--fg) !important; border: 1px solid var(--line) !important; border-radius: var(--r) !important; font-family: var(--sans) !important; }
.swal2-title { color: var(--fg) !important; font-family: var(--serif) !important; font-weight: 400 !important; }
.swal2-html-container { color: var(--muted) !important; }
.swal2-confirm { background: var(--gold) !important; color: var(--gold-ink) !important; border-radius: 999px !important; letter-spacing: 0.2em !important; text-transform: uppercase !important; font-size: 0.75rem !important; }

/* =====================================================================
   INICIO (estructura del diseño Lovable)
   ===================================================================== */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
  text-align: center;
}
.hero-slide {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: heroFade 21s infinite, kenburns 21s ease-in-out infinite alternate;
}
/* Fundido cruzado: cada foto entra mientras la anterior sale; nunca queda el fondo vacío. */
.hero-slide:nth-child(1) { animation-delay: -1.3s, 0s; }
.hero-slide:nth-child(2) { animation-delay: 5.7s, 0s; }
.hero-slide:nth-child(3) { animation-delay: 12.7s, 0s; }
@keyframes heroFade { 0% { opacity: 0; } 6% { opacity: 1; } 33% { opacity: 1; } 39% { opacity: 0; } 100% { opacity: 0; } }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.15) translate(-2%, -2%); } }
.veil { position: absolute; inset: 0; background: linear-gradient(rgba(2, 19, 20, 0.3), rgba(2, 19, 20, 0.95)); }
.sacred {
  position: absolute;
  width: 80vmin; height: 80vmin;
  color: var(--gold);
  opacity: 0.2;
  pointer-events: none;
  animation: spinSlow 60s linear infinite;
}
@keyframes spinSlow { to { transform: rotate(360deg); } }
.hero-content { position: relative; z-index: 1; padding: 0 var(--gutter); animation: floatUp 1.4s var(--ease-out) both; }
@keyframes floatUp { from { opacity: 0; transform: translateY(24px); } }
.hero h1 { margin-top: 24px; font-size: clamp(3.75rem, 9vw, 6rem); }
.hero-lead { max-width: 28rem; margin: 32px auto 0; color: var(--muted); }
.hero-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 40px; }

.section { padding: var(--section) 0; border-top: 1px solid var(--line); }
.section.no-rule { border-top: 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 40px; }
.section-head h2 { margin-top: 16px; }
.section-sub { margin-top: 20px; color: var(--muted); max-width: 60ch; }
@media (max-width: 640px) { .section-head { flex-direction: column; align-items: flex-start; } }

/* Conferencia de la semana */
.conf-week { display: grid; grid-template-columns: 2fr 3fr; gap: 48px; align-items: center; }
.conf-week h2 { margin-top: 16px; }
.conf-week .conf-meta { margin: 16px 0 0; }
.conf-week .body-text { margin-top: 14px; }
.conf-week .link-arrow { margin-top: 28px; }
@media (max-width: 860px) { .conf-week { grid-template-columns: 1fr; } }

/* Escuelas */
.home-search { display: flex; flex-wrap: wrap; gap: 16px; max-width: 640px; margin-top: 36px; }
.home-search input { flex: 1 1 260px; border-radius: 4px; }
.escuelas-home .link-arrow { margin-top: 24px; }

/* Biblioteca */
.lib-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-top: 48px; }
.lib-item { display: flex; flex-direction: column; justify-content: space-between; min-height: 230px; padding: 20px; border-right: 1px solid var(--line); transition: background-color 300ms ease; }
.lib-item:last-child { border-right: 0; }
.lib-item:hover { background: var(--card); }
.lib-item .eyebrow { font-size: 0.66rem; }
.lib-item h3 { font-size: 1.5rem; }
.lib-item small { display: block; margin-top: 8px; color: var(--muted); font-size: 0.78rem; }
.biblioteca .link-arrow { margin-top: 32px; }
@media (max-width: 960px) { .lib-grid { grid-template-columns: 1fr 1fr; } .lib-item:nth-child(2) { border-right: 0; } .lib-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 520px) { .lib-grid { grid-template-columns: 1fr; } .lib-item { border-right: 0; border-bottom: 1px solid var(--line); min-height: 160px; } .lib-item:last-child { border-bottom: 0; } }

/* Misioneros */
.mision-box { padding: clamp(32px, 5vw, 56px); border: 1px solid var(--line); border-radius: var(--r); background: linear-gradient(135deg, var(--card), var(--bg)); }
.mision-box h2 { margin-top: 16px; max-width: 20ch; }
.mision-box .body-text { margin-top: 20px; }
.mision-box .btn { margin-top: 32px; }

/* Contacto */
.contacto-home { text-align: center; }
.contacto-home h2 { margin-top: 16px; }
.contacto-home .mail { display: inline-block; margin-top: 24px; font-size: 1.15rem; color: var(--gold); }
.social-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 32px; }
.social-pills a { padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.7rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--fg); transition: border-color 200ms ease, color 200ms ease; }
.social-pills a:hover { border-color: var(--gold); color: var(--gold); }
.page-index .site-footer { margin-top: 0; }

/* Revelado */
.reveal { transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out); }
.js .reveal:not(.is-visible) { opacity: 0.001; transform: translateY(24px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; }
  .hero-slide { animation: none !important; opacity: 0; } .hero-slide:nth-child(1) { opacity: 1; }
  .reveal, .js .reveal:not(.is-visible) { opacity: 1; transform: none; }
}

/* Remodelación */
.page-en_remodelacion { min-height: 100svh; display: grid; place-items: center; padding: 40px var(--gutter); text-align: center; }
.page-en_remodelacion .wrap { max-width: 640px; }
.page-en_remodelacion .logo-glow img { width: 120px; margin: 0 auto 36px; }
.page-en_remodelacion .lead { margin-top: 22px; color: var(--muted); }
.page-en_remodelacion .divider { width: 64px; height: 1px; margin: 36px auto; background: var(--gold); }
.page-en_remodelacion .contact-note { color: var(--muted); }
.page-en_remodelacion .brand-name { margin-top: 44px; font-family: var(--serif); letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); }
