:root{
  --primary:#6A0F1B;
  --accent:#B11226;
  --bg:#F7F7F7;
  --card:#FFFFFF;
  --gray30:#B3B3B3;
  --text:#1b1b1b;
  --stroke: rgba(0,0,0,.08);
}

*{ box-sizing:border-box; }

html.theme-loading body{ visibility:hidden; }
html.theme-ready body{ visibility:visible; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
}

.header{
  position:sticky;
  top:0;
  z-index:10;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  color:#fff;
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  box-shadow:0 6px 18px rgba(0,0,0,.12);
}

.header__left{
  display:flex;
  gap:12px;
  align-items:center;
  min-width:0;
}

.logo{
  width:72px;
  height:46px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background: rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.18);
  overflow:hidden;
  flex:0 0 auto;
}

.logo img{
  width:100%;
  height:100%;
  object-fit:contain;
  background:transparent;
}

.logoFallback{
  font-size:22px;
  line-height:1;
}

.header__titles{ min-width:0; }

.header__titles .h1{
  font-weight:800;
  letter-spacing:.2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.header__titles .h2{
  opacity:.9;
  font-size:13px;
  margin-top:2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.header__actions{
  display:flex;
  gap:8px;
  align-items:center;
  flex:0 0 auto;
}

.iconBtn{
  width:42px;
  height:42px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.12);
  color:#fff;
  cursor:pointer;
  display:grid;
  place-items:center;
  text-decoration:none;
  font-size:18px;
}

.iconBtn[disabled]{
  opacity:.45;
  cursor:not-allowed;
}

.iconBtn.is-playing{
  background: rgba(255,255,255,.24);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}

.wrap{
  padding:16px 16px 88px;
}

.sectionTitle{
  margin:8px 2px 12px;
  color: rgba(0,0,0,.55);
  font-weight:700;
  font-size:14px;
}

.grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.card{
  text-decoration:none;
  background:var(--card);
  border:1px solid var(--stroke);
  border-radius:18px;
  padding:16px;
  min-height:120px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:10px;
  box-shadow:0 10px 24px rgba(0,0,0,.06);
  transition: transform .15s ease, box-shadow .15s ease;
}

.card:hover{
  transform: translateY(-2px);
  box-shadow:0 14px 30px rgba(0,0,0,.10);
}

.card__text{
  text-align:center;
  font-weight:800;
  color:var(--primary);
  line-height:1.15;
}

.card__icon svg{
  width:44px;
  height:44px;
  fill:none;
  stroke: var(--accent);
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.bottomNav{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  background: var(--primary);
  display:flex;
  padding:10px 10px calc(10px + env(safe-area-inset-bottom));
  gap:8px;
  box-shadow:0 -10px 22px rgba(0,0,0,.14);
  z-index:20;
}

.bottomNav__item{
  flex:1;
  color: rgba(255,255,255,.85);
  text-decoration:none;
  text-align:center;
  padding:10px 8px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  font-weight:700;
  font-size:13px;
}

.bottomNav__item.active{
  background: rgba(255,255,255,.14);
  color:#fff;
}

.pageContent{
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 16px;
  box-shadow:0 10px 24px rgba(0,0,0,.06);
  line-height: 1.6;
}

.pageContentInner{
  line-height:1.7;
}

.pageContent h2,
.pageContent h3,
.pageContentInner h2,
.pageContentInner h3{
  color: var(--primary);
  margin-top: 12px;
}

.pageContent a,
.pageContentInner a{
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.pageContent a:hover,
.pageContentInner a:hover{
  text-decoration: underline;
}

.devotionalCard{
  background:linear-gradient(180deg, rgba(255,255,255,1), rgba(248,248,248,1));
  border:1px solid var(--stroke);
  border-left:5px solid var(--accent);
  border-radius:18px;
  padding:18px;
}

.contactCard{
  background:linear-gradient(180deg, rgba(255,255,255,1), rgba(249,249,249,1));
  border:1px solid var(--stroke);
  border-radius:18px;
  padding:18px;
}

.mediaCard{
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 12px;
  box-shadow:0 10px 24px rgba(0,0,0,.06);
  margin-bottom:14px;
}

.mediaCard h3{
  margin:0 0 10px;
  color:var(--primary);
  font-size:16px;
}

.mediaCard video{
  width:100%;
  border-radius:14px;
  display:block;
  background:#000;
}

.mediaCard audio{
  width:100%;
}

.galleryGrid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}

.galleryItem{
  border:0;
  padding:0;
  background:transparent;
  cursor:pointer;
}

.galleryItem img{
  width:100%;
  height:150px;
  object-fit:cover;
  display:block;
  border-radius:14px;
  border:1px solid rgba(0,0,0,.08);
  box-shadow:0 6px 18px rgba(0,0,0,.08);
}

/* ACORDEÓN */
.accordionBlock{
  display:grid;
  gap:12px;
  margin-top:18px;
}

.accordionItem{
  border:1px solid rgba(0,0,0,.08);
  border-radius:18px;
  overflow:hidden;
  background:linear-gradient(180deg, #ffffff 0%, #fcfcfc 100%);
  box-shadow:0 8px 22px rgba(0,0,0,.05);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.accordionItem.is-open{
  border-color:rgba(177,18,38,.18);
  box-shadow:0 12px 28px rgba(0,0,0,.08);
}

.accordionHeader{
  width:100%;
  border:0;
  background:transparent;
  padding:15px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  cursor:pointer;
  text-align:left;
}

.accordionTitle{
  font-weight:900;
  color:var(--primary);
  font-size:15px;
  line-height:1.35;
}

.accordionIcon{
  width:30px;
  height:30px;
  border-radius:999px;
  background:rgba(177,18,38,.08);
  display:grid;
  place-items:center;
  font-size:18px;
  font-weight:900;
  color:var(--accent);
  flex:0 0 auto;
}

.accordionPanel{
  border-top:1px solid rgba(0,0,0,.06);
  background:linear-gradient(180deg, #fafafa 0%, #f7f7f7 100%);
}

.accordionPanelInner{
  padding:16px 16px 18px;
  color:var(--text);
}

/* CONTENIDO RICO DEL ACORDEÓN */
.richContent{
  font-size:15px;
  line-height:1.8;
  color:var(--text);
}

.richContent > :first-child{
  margin-top:0;
}

.richContent > :last-child{
  margin-bottom:0;
}

.richContent p{
  margin:0 0 14px;
}

.richContent strong,
.richContent b{
  color:var(--primary);
  font-weight:800;
}

.richContent em,
.richContent i{
  font-style:italic;
}

.richContent h1,
.richContent h2,
.richContent h3,
.richContent h4{
  color:var(--primary);
  line-height:1.3;
  margin:18px 0 10px;
  font-weight:900;
}

.richContent h1{ font-size:24px; }
.richContent h2{ font-size:21px; }
.richContent h3{ font-size:18px; }
.richContent h4{ font-size:16px; }

.richContent ul,
.richContent ol{
  margin:0 0 14px 0;
  padding-left:22px;
}

.richContent li{
  margin:0 0 8px;
}

.richContent blockquote{
  margin:14px 0;
  padding:12px 14px;
  border-left:4px solid var(--accent);
  background:rgba(177,18,38,.05);
  border-radius:12px;
  color:#4a1a20;
}

.richContent a{
  color:var(--accent);
  font-weight:800;
  text-decoration:none;
}

.richContent a:hover{
  text-decoration:underline;
}

.richContent hr{
  border:0;
  border-top:1px solid rgba(0,0,0,.08);
  margin:18px 0;
}

.richContent br{
  line-height:1.8;
}

.galleryLightbox{
  position:fixed;
  inset:0;
  z-index:999;
  display:none;
}

.galleryLightbox.is-open{
  display:block;
}

.galleryLightbox__backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.72);
}

.galleryLightbox__content{
  position:relative;
  z-index:2;
  width:min(92vw,900px);
  margin:6vh auto;
  background:#111;
  border-radius:18px;
  padding:16px;
}

.galleryLightbox__content img{
  width:100%;
  max-height:78vh;
  object-fit:contain;
  display:block;
  border-radius:12px;
}

.galleryLightbox__close{
  position:absolute;
  top:8px;
  right:8px;
  width:40px;
  height:40px;
  border-radius:12px;
  border:0;
  background:rgba(255,255,255,.12);
  color:#fff;
  font-size:18px;
  cursor:pointer;
}

@media (max-width: 640px){
  .grid{ grid-template-columns:1fr 1fr; }
  .logo{ width:64px; height:42px; }
  .header__titles .h1{ font-size:15px; }
  .header__titles .h2{ font-size:12px; }
  .galleryGrid{ grid-template-columns:1fr 1fr; }
  .galleryItem img{ height:120px; }
  .richContent{ font-size:14px; }
}