/*
Theme Name: Compra La Verdad
Theme URI: https://compralaverdadynolavendas.com/
Author: Compra La Verdad
Description: Tema accesible y adaptable para una biblioteca cristiana de estudios, libros y presentaciones.
Version: 1.0.3
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: compra-la-verdad
*/

:root {
  --clv-navy: #2f4a3e;
  --clv-navy-dark: #1d3028;
  --clv-gold: #a65338;
  --clv-gold-light: #d8a18b;
  --clv-cream: #f5f0e7;
  --clv-paper: #fffdf9;
  --clv-ink: #2d312e;
  --clv-muted: #676d68;
  --clv-border: #d8d0c4;
  --clv-shadow: 0 8px 20px rgba(29, 48, 40, 0.08);
  --clv-radius: 7px;
  --clv-content: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--clv-cream);
  color: var(--clv-ink);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.7;
}

a {
  color: var(--clv-navy);
  text-decoration-color: var(--clv-gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover,
a:focus {
  color: #7a5718;
}

img {
  display: block;
  height: auto;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.screen-reader-text:focus {
  clip: auto;
  clip-path: none;
  background: #fff;
  color: #000;
  height: auto;
  left: 1rem;
  padding: 0.75rem 1rem;
  top: 1rem;
  width: auto;
  z-index: 10000;
}

.site-shell {
  margin: 0 auto;
  max-width: var(--clv-content);
  padding-inline: 24px;
}

.site-header {
  background: var(--clv-paper);
  border-bottom: 1px solid var(--clv-border);
  box-shadow: 0 3px 12px rgba(29, 48, 40, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-bar .site-header {
  top: 32px;
}

.header-inner {
  align-items: center;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  min-height: 112px;
}

.site-branding {
  align-items: center;
  display: flex;
  gap: 13px;
  min-width: 390px;
  text-decoration: none;
}

.brand-mark {
  border: 0;
  flex: 0 0 132px;
  height: 86px;
  object-fit: contain;
  width: 132px;
}

.brand-copy {
  display: grid;
}

.brand-title {
  color: var(--clv-navy-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.1;
}

.brand-subtitle {
  color: #8b432e;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-top: 5px;
  text-transform: uppercase;
}

.custom-logo {
  max-height: 54px;
  width: auto;
}

.menu-toggle {
  background: var(--clv-navy);
  border: 0;
  border-radius: 10px;
  color: white;
  cursor: pointer;
  display: none;
  padding: 10px 14px;
}

.primary-menu {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 5px 22px;
  justify-content: flex-end;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-menu > li {
  position: relative;
}

.primary-menu a {
  color: var(--clv-navy-dark);
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
}

.primary-menu a:hover,
.primary-menu a:focus {
  color: var(--clv-gold);
}

.primary-menu > .current-menu-item > a,
.primary-menu > .current_page_item > a {
  border-bottom: 3px solid var(--clv-gold);
  padding-bottom: 8px;
}

.primary-menu .sub-menu {
  background: var(--clv-paper);
  border: 1px solid var(--clv-border);
  box-shadow: var(--clv-shadow);
  display: none;
  left: -18px;
  list-style: none;
  margin: 0;
  min-width: 240px;
  padding: 12px 0;
  position: absolute;
  top: calc(100% + 10px);
  z-index: 200;
}

.primary-menu .sub-menu a {
  display: block;
  font-size: 15px;
  line-height: 1.3;
  padding: 9px 18px;
  white-space: normal;
}

.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu {
  display: block;
}

.hero {
  background: var(--clv-navy-dark);
  border-left: 6px solid var(--clv-gold);
  color: white;
  padding: 42px 0 40px;
  position: relative;
}

.hero-content {
  margin: 0 auto;
  max-width: 1000px;
  position: relative;
  text-align: center;
  z-index: 1;
}

.eyebrow {
  color: var(--clv-gold-light);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  margin: 0 0 18px;
  text-transform: uppercase;
}

.hero h1 {
  color: white;
  font-family: Georgia, "Times New Roman", serif;
  border-top: 1px solid var(--clv-gold);
  font-size: clamp(38px, 5vw, 58px);
  letter-spacing: 0.01em;
  line-height: 1.08;
  margin: 0 auto 8px;
  max-width: 1000px;
  padding-top: 10px;
  text-transform: uppercase;
}

.hero-motto {
  color: var(--clv-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(25px, 3.5vw, 39px);
  font-style: italic;
  line-height: 1.2;
  margin: 0 0 8px;
}

.hero-lead {
  color: #e8edf0;
  font-size: clamp(17px, 1.8vw, 21px);
  margin: 0 auto 16px;
  max-width: 820px;
}

.hero-search {
  background: white;
  border-radius: 4px;
  box-shadow: none;
  display: flex;
  margin: 0 auto;
  max-width: 740px;
  padding: 7px;
}

.hero-search label {
  flex: 1;
}

.hero-search input[type="search"] {
  border: 0;
  color: var(--clv-ink);
  outline: 0;
  padding: 13px 15px;
  width: 100%;
}

.hero-search button,
.button {
  background: var(--clv-gold);
  border: 0;
  border-radius: 2px;
  color: var(--clv-navy-dark);
  cursor: pointer;
  display: inline-block;
  font-weight: 800;
  padding: 13px 20px;
  text-decoration: none;
}

.hero-search button:hover,
.hero-search button:focus,
.button:hover,
.button:focus {
  background: var(--clv-gold-light);
  color: var(--clv-navy-dark);
}

.section {
  padding: 34px 0;
}

.section-paper {
  background: var(--clv-paper);
  border-block: 1px solid var(--clv-border);
}

.section-heading {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 22px;
}

.section-heading h2,
.page-title,
.entry-title {
  color: var(--clv-navy-dark);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.15;
}

.section-heading h2 {
  align-items: center;
  display: flex;
  flex: 1;
  font-size: clamp(28px, 3vw, 38px);
  gap: 22px;
  justify-content: center;
  margin: 0;
  text-align: center;
}

.section-heading h2::before,
.section-heading h2::after {
  background: var(--clv-gold);
  content: "";
  height: 1px;
  max-width: 420px;
  width: 100%;
}

.section-heading p {
  color: var(--clv-muted);
  margin: 8px 0 0;
}

.text-link {
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.category-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, 1fr);
}

.resource-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(3, 1fr);
}

.resource-card {
  align-items: center;
  background: var(--clv-paper);
  border: 1px solid #c99079;
  border-radius: 7px;
  color: var(--clv-ink);
  display: grid;
  gap: 17px;
  grid-template-columns: 86px 1fr auto;
  min-height: 140px;
  padding: 18px 15px;
  text-decoration: none;
  transition: border-color 180ms ease, transform 180ms ease;
}

.resource-card:hover,
.resource-card:focus {
  border-color: #7e3927;
  color: var(--clv-ink);
  transform: translateY(-2px);
}

.resource-icon {
  align-items: center;
  display: flex;
  height: 78px;
  justify-content: center;
  width: 78px;
}

.resource-icon svg {
  fill: none;
  height: 72px;
  stroke: var(--clv-navy);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
  width: 72px;
}

.resource-copy {
  display: grid;
  gap: 5px;
}

.resource-copy strong {
  color: var(--clv-navy-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  line-height: 1.05;
}

.resource-copy small {
  color: var(--clv-ink);
  font-size: 15px;
  line-height: 1.35;
}

.resource-arrow {
  color: #93472f;
  font-family: Georgia, serif;
  font-size: 42px;
  line-height: 1;
}

.category-card,
.study-card,
.content-card {
  background: var(--clv-paper);
  border: 1px solid var(--clv-border);
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(22, 50, 74, 0.04);
}

.category-card {
  min-height: 190px;
  padding: 28px;
  text-decoration: none;
  transition: border-color 180ms ease, transform 180ms ease;
}

.category-card:hover,
.category-card:focus {
  border-color: var(--clv-gold);
  transform: translateY(-4px);
}

.category-number {
  color: var(--clv-gold);
  display: block;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  margin-bottom: 34px;
}

.category-card h3 {
  color: var(--clv-navy-dark);
  font-family: Georgia, serif;
  font-size: 22px;
  line-height: 1.25;
  margin: 0 0 5px;
}

.category-card p {
  color: var(--clv-muted);
  font-size: 15px;
  margin: 0;
}

.study-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, 1fr);
}

.home .study-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
}

.home .study-card-image {
  aspect-ratio: auto;
  min-height: 100%;
}

.home .study-card-body {
  padding: 15px 16px;
}

.home .study-card h3 {
  font-size: 19px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.home .study-card p {
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 8px;
}

.home .study-card .study-meta {
  display: none;
}

.home .study-card .text-link {
  font-size: 13px;
}

.study-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.study-card-image {
  aspect-ratio: 16 / 9;
  background: #e8ede9;
  border-right: 1px solid var(--clv-border);
  overflow: hidden;
  position: relative;
}

.study-card-image img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.study-card-placeholder {
  align-items: center;
  color: var(--clv-navy);
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  justify-content: center;
  padding: 18px;
  position: relative;
}

.study-card-placeholder::before {
  background: var(--clv-gold);
  content: "";
  height: 5px;
  left: 0;
  position: absolute;
  top: 0;
  width: 42%;
}

.study-card-placeholder svg {
  fill: none;
  height: 70px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.5;
  width: 70px;
}

.study-card-placeholder small {
  color: var(--clv-gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.study-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px;
}

.study-meta {
  color: #8a6726;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.11em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.study-card h3 {
  font-family: Georgia, serif;
  font-size: 22px;
  line-height: 1.3;
  margin: 0 0 12px;
}

.study-card h3 a {
  color: var(--clv-navy-dark);
  text-decoration: none;
}

.study-card p {
  color: var(--clv-muted);
  font-size: 15px;
  margin: 0 0 22px;
}

.study-card .text-link {
  margin-top: auto;
}

.intro-panel {
  align-items: center;
  background: var(--clv-navy);
  border-radius: 6px;
  color: white;
  display: grid;
  gap: 46px;
  grid-template-columns: 1fr 1.6fr;
  padding: 50px;
}

.verse-band {
  background: var(--clv-navy);
  border-block: 1px solid #2c4f6d;
  color: white;
  padding: 24px 0 18px;
}

.verse-band blockquote {
  color: white;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(21px, 2.4vw, 29px);
  font-style: italic;
  line-height: 1.35;
  margin: 0;
  text-align: center;
}

.verse-band blockquote > span {
  color: var(--clv-gold);
  font-size: 52px;
  font-style: normal;
  line-height: 0;
  margin-inline: 16px;
  vertical-align: -14px;
}

.verse-band cite {
  color: var(--clv-gold);
  display: block;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 17px;
  font-style: normal;
  font-weight: 700;
  margin-top: 8px;
}

.intro-verse {
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  font-family: Georgia, serif;
  font-size: 31px;
  line-height: 1.3;
  margin: 0;
  padding-right: 44px;
}

.intro-verse cite {
  color: var(--clv-gold-light);
  display: block;
  font-family: "Source Sans 3", sans-serif;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-top: 20px;
  text-transform: uppercase;
}

.intro-copy h2 {
  color: white;
  font-family: Georgia, serif;
  font-size: 36px;
  margin: 0 0 12px;
}

.intro-copy p {
  color: #dfe8ed;
  margin: 0;
}

.content-wrap {
  display: grid;
  gap: 34px;
  grid-template-columns: minmax(0, 1fr) 300px;
  padding-block: 64px;
}

.content-card {
  border: 0;
  border-top: 5px solid var(--clv-gold);
  box-shadow: 0 1px 0 var(--clv-border);
  padding: clamp(24px, 5vw, 54px);
}

.page-title,
.entry-title {
  font-size: clamp(34px, 5vw, 54px);
  margin: 0 0 16px;
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content {
  font-size: 19px;
  line-height: 1.72;
  max-width: 780px;
  overflow-wrap: anywhere;
}

.entry-content p {
  margin: 0 0 1.05em;
}

.entry-content p:empty,
.entry-content p:has(> br:only-child) {
  display: none;
}

.entry-content h2,
.entry-content h3 {
  color: var(--clv-navy-dark);
  font-family: Georgia, serif;
  line-height: 1.25;
  scroll-margin-top: 150px;
}

.entry-content h2 {
  border-bottom: 1px solid var(--clv-border);
  font-size: clamp(28px, 4vw, 38px);
  margin: 1.7em 0 0.65em;
  padding-bottom: 0.25em;
}

.entry-content h3 {
  font-size: clamp(23px, 3vw, 29px);
  margin: 1.5em 0 0.55em;
}

.entry-content h4,
.entry-content h5,
.entry-content h6 {
  color: var(--clv-navy-dark);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.3;
  margin: 1.4em 0 0.5em;
  scroll-margin-top: 150px;
}

.entry-content strong {
  color: #202723;
}

.entry-content u {
  text-decoration-color: var(--clv-gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.entry-content blockquote {
  background: #eef1ed;
  border-left: 5px solid var(--clv-gold);
  color: var(--clv-navy-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08em;
  margin: 1.6em 0;
  padding: 18px 24px;
}

.entry-content blockquote p:last-child {
  margin-bottom: 0;
}

.entry-content ul,
.entry-content ol {
  margin: 0 0 1.25em;
  padding-left: 1.5em;
}

.entry-content li {
  margin-bottom: 0.45em;
  padding-left: 0.2em;
}

.entry-content table {
  border-collapse: collapse;
  display: block;
  margin: 1.5em 0;
  max-width: 100%;
  overflow-x: auto;
  width: max-content;
}

.entry-content th,
.entry-content td {
  border: 1px solid var(--clv-border);
  min-width: 120px;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.entry-content th {
  background: var(--clv-navy);
  color: white;
}

.entry-content img {
  height: auto;
  margin-block: 1.25em;
  max-width: 100%;
}

.entry-content iframe,
.entry-content object,
.entry-content embed {
  border: 1px solid var(--clv-border);
  display: block;
  min-height: min(75vh, 900px);
  width: 100%;
}

.entry-content .MsoNormal,
.entry-content .MsoBodyText,
.entry-content .MsoListParagraph {
  color: inherit !important;
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
  margin: 0 0 1.05em !important;
}

.entry-content .MsoTitle,
.entry-content .MsoHeading1,
.entry-content .MsoHeading2 {
  color: var(--clv-navy-dark) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  line-height: 1.25 !important;
}

.entry-content a[href$=".doc" i],
.entry-content a[href$=".docx" i] {
  align-items: center;
  background: var(--clv-navy);
  color: white;
  display: inline-flex;
  font-weight: 800;
  gap: 10px;
  margin-block: 0.5em;
  padding: 11px 15px;
  text-decoration: none;
}

.entry-content a[href$=".doc" i]::before,
.entry-content a[href$=".docx" i]::before {
  border: 1px solid rgba(255, 255, 255, 0.55);
  content: "DOCX";
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 3px 5px;
}

.entry-content a[href$=".doc" i]:hover,
.entry-content a[href$=".doc" i]:focus,
.entry-content a[href$=".docx" i]:hover,
.entry-content a[href$=".docx" i]:focus {
  background: var(--clv-gold);
  color: white;
}

.entry-content iframe,
.entry-content embed {
  max-width: 100%;
}

.post-list {
  display: grid;
  gap: 22px;
}

.post-list .study-card {
  display: grid;
  grid-template-columns: 260px 1fr;
}

.sidebar {
  align-self: start;
  border-left: 1px solid var(--clv-border);
  display: grid;
  gap: 0;
  padding-left: 30px;
}

.widget {
  background: transparent;
  border: 0;
  border-top: 3px solid var(--clv-navy);
  border-radius: 0;
  padding: 20px 0 24px;
}

.widget-title {
  color: var(--clv-navy-dark);
  font-family: Georgia, serif;
  font-size: 23px;
  margin: 0 0 14px;
  position: relative;
}

.widget-title::after {
  background: var(--clv-gold);
  content: "";
  display: block;
  height: 3px;
  margin-top: 8px;
  width: 36px;
}

.widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.widget li + li {
  border-top: 1px solid var(--clv-border);
  margin-top: 9px;
  padding-top: 9px;
}

.widget .wp-block-search__inside-wrapper {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.widget .wp-block-search__input,
.widget input[type="search"] {
  background: var(--clv-paper);
  border: 1px solid #8b918d;
  border-radius: 0;
  min-width: 0;
  padding: 10px 12px;
}

.widget .wp-block-search__button,
.widget button {
  background: var(--clv-gold);
  border: 0;
  border-radius: 0;
  color: white;
  cursor: pointer;
  font-weight: 700;
  margin: 0;
  padding: 10px 15px;
}

.widget .wp-block-search__button:hover,
.widget .wp-block-search__button:focus,
.widget button:hover,
.widget button:focus {
  background: var(--clv-navy);
}

.site-footer {
  background: var(--clv-navy-dark);
  color: #cbd7de;
  padding: 30px 0 20px;
}

.footer-grid {
  display: grid;
  gap: 36px;
  grid-template-columns: 1.5fr 1fr;
}

.footer-title {
  color: white;
  font-family: Georgia, serif;
  font-size: 24px;
  margin: 0 0 10px;
}

.footer-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: flex-end;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-menu a {
  color: white;
  font-size: 14px;
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 13px;
  margin-top: 34px;
  padding-top: 22px;
}

.footer-bottom a {
  color: white;
  font-weight: 700;
  text-decoration-color: var(--clv-gold-light);
}

.pagination {
  margin-top: 32px;
}

@media (max-width: 900px) {
  .site-branding {
    min-width: auto;
  }

  .brand-mark {
    flex-basis: 96px;
    height: 68px;
    width: 96px;
  }

  .brand-title {
    font-size: 20px;
  }

  .menu-toggle {
    display: block;
  }

  .primary-navigation {
    background: var(--clv-paper);
    border-bottom: 1px solid var(--clv-border);
    display: none;
    left: 0;
    padding: 18px 24px;
    position: absolute;
    top: 100%;
    width: 100%;
  }

  .primary-navigation.is-open {
    display: block;
  }

  .primary-menu {
    align-items: flex-start;
    flex-direction: column;
  }

  .primary-menu .sub-menu {
    border: 0;
    box-shadow: none;
    display: block;
    margin: 7px 0 0 16px;
    min-width: 0;
    padding: 0;
    position: static;
  }

  .primary-menu > .current-menu-item > a,
  .primary-menu > .current_page_item > a {
    padding-bottom: 3px;
  }

  .category-grid,
  .study-grid,
  .resource-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .content-wrap {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-left: 0;
    padding-left: 0;
  }

  .intro-panel {
    grid-template-columns: 1fr;
  }

  .intro-verse {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    border-right: 0;
    padding-bottom: 34px;
    padding-right: 0;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 17px;
  }

  .admin-bar .site-header {
    top: 46px;
  }

  .site-shell {
    padding-inline: 18px;
  }

  .hero {
    padding: 70px 0 64px;
  }

  .hero-search {
    align-items: stretch;
    flex-direction: column;
  }

  .category-grid,
  .study-grid,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 54px 0;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading h2::before,
  .section-heading h2::after {
    max-width: 70px;
  }

  .intro-panel {
    padding: 30px 24px;
  }

  .post-list .study-card {
    display: flex;
  }

  .home .study-card {
    display: grid;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-menu {
    justify-content: flex-start;
  }
}
