/* Iglesia Bautista Peniel — Links */

:root {
  --bg: #f7f3ea;
  --surface: rgba(255,255,255,.90);
  --surface-solid: #fff;
  --text: #322f2a;
  --muted: #777168;
  --gold: #b88a18;
  --gold-dark: #88630d;
  --gold-soft: #f4e8c8;
  --green: #51785e;
  --green-soft: #eaf3ed;
  --blue: #526d89;
  --blue-soft: #edf2f7;
  --line: rgba(103,85,48,.14);
  --shadow: 0 15px 38px rgba(83,68,37,.09);
  --radius: 22px;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 50% -80px, rgba(208,164,55,.15), transparent 330px),
    linear-gradient(180deg,#fbfaf6 0%,#f4eee2 100%);
}

.page {
  width: min(calc(100% - 30px), 690px);
  margin: 0 auto;
  padding: 30px 0 36px;
}

.hero { text-align:center; padding: 4px 10px 28px; }

.logo-wrap {
  width: min(100%, 310px);
  margin: 0 auto 14px;
  overflow:hidden;
  border-radius: 27px;
  box-shadow: 0 14px 40px rgba(67,58,41,.07);
  background:#f4f4f4;
}

.logo {
  display:block;
  width:100%;
  aspect-ratio:1;
  object-fit:cover;
}

.welcome {
  margin:0 0 5px;
  font: 19px Georgia, "Times New Roman", serif;
  color:var(--gold-dark);
}

.subtitle {
  max-width:430px;
  margin:0 auto;
  color:var(--muted);
  font-size:14px;
  line-height:1.55;
}

.links { display:grid; gap:12px; }

.card,
.route-folder > summary {
  min-height:78px;
  display:grid;
  grid-template-columns:50px 1fr auto;
  align-items:center;
  gap:14px;
  padding:13px 15px;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:var(--surface);
  box-shadow:0 4px 14px rgba(74,61,31,.035);
}

.card {
  color:inherit;
  text-decoration:none;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.card:hover {
  transform:translateY(-2px);
  box-shadow:var(--shadow);
  border-color:rgba(184,138,24,.30);
}

.card-icon,
.folder-icon {
  width:50px;
  height:50px;
  display:grid;
  place-items:center;
  color:var(--gold-dark);
  border:1px solid rgba(184,138,24,.17);
  border-radius:16px;
  background:linear-gradient(145deg,#fff9e8,#f3e6c4);
}

.card-icon svg,
.folder-icon svg,
.chevron svg,
.whatsapp-badge svg {
  width:23px;
  height:23px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.facebook-icon svg { fill:currentColor; stroke:none; }

.card-text { min-width:0; }
.card-text strong,.card-text small,.eyebrow { display:block; }
.card-text strong { margin-bottom:3px; font-size:15.5px; }
.card-text small { color:var(--muted); font-size:12.5px; line-height:1.35; }

.eyebrow {
  margin-bottom:2px;
  color:var(--gold-dark);
  font-size:10px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.arrow { color:#a79c82; font-size:19px; }

.person-card { grid-template-columns:54px 1fr auto; }

.person-photo {
  width:54px;
  height:54px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border-radius:50%;
  border:2px solid #fff;
  box-shadow:0 0 0 1px rgba(184,138,24,.21),0 4px 12px rgba(86,68,28,.11);
}

.person-photo img { width:100%; height:100%; object-fit:cover; }

.placeholder-photo {
  background:linear-gradient(145deg,#efdba4,#c5a04b);
  color:#fff;
  font:700 13px Georgia,"Times New Roman",serif;
}

.whatsapp-badge {
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  color:var(--green);
  background:var(--green-soft);
  border-radius:50%;
}

/* Carpeta */
.route-folder > summary {
  cursor:pointer;
  list-style:none;
  user-select:none;
}
.route-folder > summary::-webkit-details-marker { display:none; }

.chevron {
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  color:#958b73;
  transition:transform .2s ease;
}

.route-folder[open] .chevron { transform:rotate(180deg); }

.route-list {
  display:grid;
  gap:8px;
  margin:8px 7px 0;
  padding:10px 8px 8px;
  border:1px solid rgba(184,138,24,.12);
  border-top:0;
  border-radius:0 0 20px 20px;
  background:rgba(255,255,255,.48);
  animation:reveal .2s ease both;
}

@keyframes reveal {
  from { opacity:0; transform:translateY(-5px); }
  to { opacity:1; transform:none; }
}

.route-person {
  min-height:72px;
  display:grid;
  grid-template-columns:48px minmax(0,1fr) auto;
  align-items:center;
  gap:11px;
  padding:9px 10px;
  border-radius:17px;
}

.route-person:hover { background:rgba(255,255,255,.78); }

.route-person .person-photo {
  width:48px;
  height:48px;
}

.route-info { min-width:0; }
.route-info strong,.route-info small { display:block; }
.route-info strong { margin-bottom:2px; font-size:13.5px; }
.route-info small { color:var(--muted); font-size:11.5px; }

.route-actions {
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.mini-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:31px;
  padding:6px 9px;
  border-radius:999px;
  text-decoration:none;
  font-size:10px;
  font-weight:750;
  white-space:nowrap;
}

.mini-button.whatsapp { color:var(--green); background:var(--green-soft); }
.mini-button.location { color:var(--blue); background:var(--blue-soft); }

footer {
  padding:34px 10px 5px;
  text-align:center;
  color:#8c8475;
  font-size:11.5px;
}
footer p { margin:5px 0 0; }
.footer-mark { color:var(--gold); }

/* Admin pages */
.admin-page {
  width:min(calc(100% - 28px),600px);
  margin:0 auto;
  padding:38px 0;
}

.admin-header { margin-bottom:22px; }
.admin-header a { color:var(--gold-dark); text-decoration:none; font-size:12px; font-weight:700; }
.admin-header h1 {
  margin:12px 0 6px;
  font:700 clamp(27px,7vw,38px) Georgia,"Times New Roman",serif;
}
.admin-header p { color:var(--muted); line-height:1.5; margin:0; }

.admin-box {
  padding:22px;
  border:1px solid var(--line);
  border-radius:24px;
  background:rgba(255,255,255,.88);
  box-shadow:var(--shadow);
}

.field { display:grid; gap:7px; margin-bottom:16px; }
.field label { font-size:12px; font-weight:750; }
.field input,.field select {
  width:100%;
  min-height:46px;
  border:1px solid rgba(91,77,49,.18);
  border-radius:13px;
  padding:10px 12px;
  background:#fff;
  color:var(--text);
  font:inherit;
}
.field input:focus,.field select:focus {
  outline:3px solid rgba(184,138,24,.16);
  border-color:rgba(184,138,24,.45);
}

.permanent-link {
  display:flex;
  gap:7px;
  align-items:center;
  padding:10px 11px;
  margin-bottom:18px;
  border-radius:13px;
  background:#f5f1e8;
  font-size:11px;
  color:#6f685d;
}
.permanent-link code {
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  flex:1;
}
.copy-button {
  border:0;
  border-radius:9px;
  padding:7px 9px;
  cursor:pointer;
  background:#fff;
  color:var(--gold-dark);
  font-weight:750;
}

.button-row { display:flex; gap:9px; flex-wrap:wrap; }

.primary-button,.secondary-button {
  border:0;
  border-radius:13px;
  min-height:44px;
  padding:10px 15px;
  cursor:pointer;
  font:700 13px inherit;
}
.primary-button { background:var(--gold-dark); color:#fff; }
.secondary-button { background:#ece8df; color:#605a50; }

.status {
  display:none;
  margin-top:16px;
  padding:11px 12px;
  border-radius:12px;
  font-size:12px;
  line-height:1.45;
}
.status.ok { display:block; color:#355944; background:#e8f2eb; }
.status.error { display:block; color:#854841; background:#f7e9e7; }

.admin-note {
  margin-top:18px;
  color:var(--muted);
  font-size:11px;
  line-height:1.55;
}

.route-title {
  display:inline-block;
  margin-bottom:8px;
  color:var(--gold-dark);
  font-size:11px;
  font-weight:800;
  letter-spacing:.12em;
}

@media (max-width:540px) {
  .page { width:min(calc(100% - 20px),690px); padding-top:22px; }
  .logo-wrap { width:min(100%,280px); }
  .card,.route-folder > summary {
    grid-template-columns:46px 1fr auto;
    gap:11px;
    padding:11px 12px;
    border-radius:19px;
  }
  .card-icon,.folder-icon { width:46px; height:46px; border-radius:14px; }
  .route-list { margin-left:3px; margin-right:3px; padding-left:5px; padding-right:5px; }

  .route-person {
    grid-template-columns:44px 1fr;
    align-items:center;
  }

  .route-person .person-photo { width:44px; height:44px; }

  .route-actions {
    grid-column:2;
    justify-content:flex-start;
  }

  .admin-box { padding:18px 15px; }
}

@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation:none!important; transition:none!important; }
}
