/* Código Profético — codigoprofetico.org */
:root {
  --bg:       #fcf5e4;
  --bg-side:  #ede4cc;
  --border:   #d8cfb4;
  --text:     #262626;
  --muted:    #666;
  --accent:   #f5c45c;
  --link:     #cc6400;
  --link-h:   #a05000;
  --sw:       260px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.75;
}

/* Layout */
.layout { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: var(--sw);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: var(--bg-side) url('images/fondo1.jpg') center center / cover no-repeat;
  border-right: 1px solid var(--border);
}
.site-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 16px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.site-logo img { width: 90%; max-width: 90%; height: auto; object-fit: contain; border-radius: 8px; margin-bottom: 12px; }
.site-tagline  { font-size: 17px; font-weight: 700; color: var(--muted); }

/* Navigation */
.nav { padding: 8px 0 16px; }
.nav-root { list-style: none; }

.nav-root > li > a {
  display: block;
  padding: 5px 16px;
  font-size: 13.5px;
  color: var(--muted);
  text-decoration: none;
  border-left: 2px solid transparent;
}
.nav-root > li > a:hover    { color: var(--text); }
.nav-root > li.active > a   {
  color: var(--text);
  font-weight: 600;
  border-left-color: var(--accent);
  background: rgba(245,196,92,.12);
}

.nav-section > details > summary {
  padding: 14px 16px 4px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}
.nav-section > details > summary::-webkit-details-marker { display: none; }
.nav-section > details > summary::before { content: "▸ "; font-weight: normal; text-transform: none; letter-spacing: 0; color: var(--muted); }
.nav-section > details[open] > summary::before { content: "▾ "; }
.nav-children { list-style: none; border-left: 1px solid var(--border); margin-left: 22px; }

.nav-book > details > summary {
  display: block;
  padding: 3px 16px 3px 8px;
  font-size: 14px;
  font-weight: normal;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}
.nav-book > details > summary::-webkit-details-marker { display: none; }
.nav-book > details > summary::before { content: "▸ "; color: var(--muted); }
.nav-book > details[open] > summary::before { content: "▾ "; }
.nav-book ul { list-style: none; border-left: 1px solid var(--border); margin-left: 8px; }
.nav-book ul li > a {
  display: block;
  padding: 2px 16px 2px 10px;
  font-size: 14px;
  font-weight: normal;
  color: var(--muted);
  text-decoration: none;
  border-left: 2px solid transparent;
}
.nav-book ul li > a:hover  { color: var(--text); }
.nav-book ul li.active > a {
  color: var(--text);
  font-weight: 700;
  border-left-color: var(--accent);
  background: rgba(245,196,92,.12);
}

.nav-children > li > a {
  display: block;
  padding: 2px 16px 2px 8px;
  font-size: 14px;
  font-weight: normal;
  color: var(--muted);
  text-decoration: none;
  border-left: 2px solid transparent;
}
.nav-children > li > a:hover  { color: var(--text); }
.nav-children > li.active > a {
  color: var(--text);
  font-weight: 700;
  border-left-color: var(--accent);
  background: rgba(245,196,92,.12);
}

/* Content */
.content { flex: 1; padding: 40px 48px; }
article  { max-width: 760px; }

/* Typography */
article h1,h2,h3,h4,h5 { margin: 1.5em 0 .5em; line-height: 1.3; }
article h1 { font-size: 1.75em; }
article h2 { font-size: 1.25em; border-bottom: 1px solid var(--border); padding-bottom: .3em; }
article h3 { font-size: 1.05em; }
article p  { margin: .8em 0; }
article ul,article ol { margin: .8em 0; padding-left: 1.6em; }
article li { margin: .25em 0; }
article blockquote {
  margin: 1em 0;
  padding: .5em 1em;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  background: rgba(245,196,92,.07);
  font-style: italic;
}
article a { color: var(--link); text-decoration: none; }
article a:hover { color: var(--link-h); text-decoration: underline; }
article hr { border: none; border-top: 1px solid var(--border); margin: 2em 0; }
article table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: .9em; }
article th, article td { border: 1px solid var(--border); padding: 6px 10px; }
article th { background: var(--bg-side); font-weight: 600; }
article img { max-width: 100%; height: auto; }
article code { background: var(--bg-side); padding: 1px 4px; border-radius: 3px; font-size: .88em; font-family: monospace; }
article pre  { background: var(--bg-side); padding: 1em; border-radius: 6px; overflow-x: auto; margin: 1em 0; }
article small { font-size: .85em; color: var(--muted); }
.post-meta { font-size: .82em; color: var(--muted); margin: -.4em 0 1.4em; text-align: right; }
.article-nav { display: flex; justify-content: space-between; gap: 1em; margin-top: 2.5em; padding-top: 1em; border-top: 1px solid var(--border); }
.article-nav__prev, .article-nav__next { color: var(--link); text-decoration: none; font-size: .88em; max-width: 48%; line-height: 1.4; }
.article-nav__prev:hover, .article-nav__next:hover { color: var(--link-h); text-decoration: underline; }
.article-nav__next { text-align: right; margin-left: auto; }
.broken { color: var(--muted); text-decoration: line-through; font-style: italic; }

/* BVV banner — pegado al tope y bordes del área de contenido */
.bvv-banner {
  margin: -40px -48px 2.5em -48px;
  padding: 22px 48px;
  background: #000;
}
.bvv-label {
  color: #ff7d00;
  font-size: .8em;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  align-self: center;
  width: 180px;
  text-align: center;
  flex-shrink: 0;
}
.bvv-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bvv-input {
  flex: 1;
  padding: 10px 14px;
  font-size: 1em;
  font-family: inherit;
  background: #2a2a2a;
  border: 1px solid #ff7d00;
  border-radius: 6px;
  color: #f0e8d0;
  outline: none;
}
.bvv-input::placeholder { color: #666; }
.bvv-input:focus { border-color: #ff7d00; box-shadow: 0 0 0 2px rgba(255,125,0,.25); }
.bvv-btn {
  flex-shrink: 0;
  background: #ff7d00;
  color: #2e2a1e;
  font-weight: 700;
  font-size: .95em;
  font-family: inherit;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity .15s;
}
.bvv-btn:hover { opacity: .85; }
.bvv-results { padding-top: 1.5em; }
.bvv-back {
  display: inline-block; margin-bottom: 1.5em;
  background: #ff7d00; border: none; border-radius: 5px;
  padding: 5px 28px; color: #2e2a1e;
  font-weight: 700; font-size: .75em; font-family: inherit;
  cursor: pointer; white-space: nowrap; transition: opacity .15s;
}
.bvv-back:hover { opacity: .85; }
.bvv-block { margin-bottom: 2.2em; }
.bvv-ref {
  color: var(--text); font-weight: 700; font-size: 1.15em;
  margin: 0 0 .7em; border-bottom: 1px solid var(--border); padding-bottom: .3em;
}
.bvv-passage p {
  font-size: 1.05em; line-height: 1.9; margin-bottom: 1em; text-align: justify;
}
.bvv-passage sup {
  color: var(--muted); font-size: .68em; vertical-align: super;
  line-height: 0; margin-right: 1px;
}
.bvv-search-header { font-size: .85em; color: var(--muted); margin-bottom: 1em; }
.bvv-search-list { font-size: 1em; line-height: 1.75; }
.bvv-search-row { margin-bottom: .3em; }
.bvv-ref--link { cursor: pointer; color: var(--link); font-weight: 700; white-space: nowrap; }
.bvv-ref--link:hover { color: var(--link-h); text-decoration: underline; }
mark { background: #ffe066; border-radius: 2px; padding: 0 2px; }
.bvv-nav {
  display: flex; justify-content: space-between;
  margin: .5em 0 1.5em; padding: .5em 0;
}
.bvv-nav-btn {
  background: none; border: 1px solid var(--border); border-radius: 4px;
  padding: 5px 18px; cursor: pointer; color: var(--link);
  font-size: 1.1em; font-family: inherit; transition: background .15s;
}
.bvv-nav-btn:hover { background: var(--bg-side); }
.bvv-nav-btn:disabled { visibility: hidden; }
.bvv-parashah-label {
  font-size: 1.3em; font-weight: 700; color: var(--text);
  letter-spacing: .04em; margin-bottom: 1.5em;
  border-left: 4px solid var(--accent); padding-left: .6em;
}
.bvv-loading { color: var(--muted); font-style: italic; font-size: .95em; margin: 1em 0; }
.bvv-error { color: #c0392b; font-size: .95em; margin: 1em 0; }
.bvv-muted { color: var(--muted); font-size: .95em; margin: 1em 0; }
/* Hebreo */
.verse-heb {
  font-family: 'Frank Ruhl Libre', 'Times New Roman', serif;
  font-size: 1.15em; direction: rtl; text-align: right;
  line-height: 1.9; color: var(--text); margin: .25em 0;
}
.verse-heb sup { font-size: .65em; color: var(--muted); margin-left: .4em; }
/* Interlineal */
.verse-es { margin: .2em 0; padding-bottom: .3em; border-bottom: 1px solid var(--border); }
/* Comentarios */
.comm-btns { display: inline-flex; gap: 2px; vertical-align: middle; margin-left: 3px; }
.comm-btn {
  display: inline-block; padding: 0 4px; font-size: .68em; line-height: 1.6;
  background: #e8f0e8; color: var(--link); border: 1px solid #b8d0b8;
  border-radius: 3px; cursor: pointer;
  font-family: 'Frank Ruhl Libre', 'Times New Roman', serif;
  vertical-align: middle; transition: background .15s;
}
.comm-btn:hover { background: #c8e0c8; }
.comm-btn.active { background: var(--link); color: #fff; border-color: var(--link-h); }
.comm-panel {
  display: none; margin: 2px 0 14px; padding: 10px 16px;
  background: #f2f7f2; border-left: 3px solid var(--link);
  border-radius: 0 4px 4px 0; font-size: .93em; line-height: 1.75;
}
.comm-source {
  font-weight: 700; color: var(--link); font-size: .78em;
  letter-spacing: .04em; text-transform: uppercase; margin-bottom: 5px;
}
@media (max-width: 768px) {
  .bvv-banner { margin: -56px -20px 2em; padding: 18px 20px; }
  .date-bar { margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 480px) {
  .bvv-banner { margin: -52px -16px 2em; padding: 16px 16px; }
  .date-bar { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .bvv-row { flex-direction: column; }
}

/* Homepage entries */
.home-entry { overflow: hidden; margin-bottom: 0; }
.home-entry--dark {
  background: #2e2a1e;
  color: #f0e8d0;
  padding: 22px 48px;
  margin-left: -48px;
  margin-right: -48px;
}
@media (max-width: 768px) {
  .home-entry--dark { margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 480px) {
  .home-entry--dark { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
}
.home-entry--dark a { color: var(--accent); }
.home-entry--dark a:hover { color: #fff; }
.home-entry blockquote { border-left: 3px solid var(--accent); margin: .8em 0 .8em 1em; padding-left: .8em; font-style: italic; opacity: .85; }
.home-entry blockquote p { margin: 0; }
.card-divider { border: none; border-top: 1px solid var(--border); margin: 1.8em -48px; }
.card-divider + .home-entry--dark { margin-top: -1.8em; }
.entry-img  { float: right; width: 150px; margin: 18px 0 10px 18px; border-radius: 5px; object-fit: cover; }
.entry-img--yt { width: 240px; aspect-ratio: 16/9; object-fit: cover; }
.entry-date { font-size: .82em; color: var(--muted); margin-bottom: .2em; }
.build-ts { font-size: .72em; color: var(--muted); margin-top: .5em; }
.site-footer { margin: 3em -48px 0; padding: 1em 48px 0; border-top: 1px solid var(--border); font-size: .78em; color: var(--muted); line-height: 1.7; text-align: center; }
.site-footer a { color: #7ab8d4; }
.site-footer a:hover { color: #a8d4e8; }
.date-bar { font-size: .72em; line-height: 1.2; color: var(--muted); padding: .4em 48px .6em; text-align: center; margin-top: -2.3em; margin-left: -48px; margin-right: -48px; border-bottom: 1px solid var(--border); margin-bottom: 1.5em; }
.entry-title { font-size: 1em; font-weight: 700; margin: 0 0 .4em; }
.entry-pres p { margin: 0; }
.entry-sep  { margin: 2em 0; }
@media (max-width: 600px) {
  .entry-img { float: none; display: block; width: 100%; max-width: 340px; margin: 0 auto .8em; }
  .entry-img--yt { max-width: 100%; aspect-ratio: 16/9; }
}

/* Hamburger (mobile) */
.menu-btn {
  display: none;
  position: fixed;
  top: 10px; left: 10px;
  z-index: 1000;
  background: var(--bg-side);
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 36px; height: 36px;
  font-size: 17px;
  cursor: pointer;
  color: var(--text);
  align-items: center;
  justify-content: center;
}

/* Backdrop */
.backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 998;
  background: rgba(0,0,0,.35);
}
body.nav-open .backdrop { display: block; }

@media (max-width: 768px) {
  .menu-btn { display: flex; }

  .sidebar {
    position: fixed;
    left: -280px;
    top: 0; height: 100vh;
    z-index: 999;
    transition: left .25s ease;
    width: 260px;
  }
  body.nav-open .sidebar { left: 0; }

  .content { padding: 56px 20px 40px; }

  /* Imágenes flotantes: apiladas en móvil */
  article img[style*="float"] {
    float: none !important;
    display: block;
    width: 100% !important;
    max-width: 320px;
    margin: 0 auto 1em !important;
    border-radius: 6px;
  }

  /* Tablas con scroll horizontal */
  article table { display: block; overflow-x: auto; }

  /* Tipografía ajustada */
  body { font-size: 25px; }
  article h1 { font-size: 1.4em; }
  article h2 { font-size: 1.15em; }
  article p, article li { line-height: 1.85; }
  .content { max-width: 100%; }
}

@media (max-width: 480px) {
  .content { padding: 52px 16px 40px; }
  body { font-size: 25px; }
}
