/*
Theme Name: Diario de Luz
Theme URI: https://jarmvl.es/
Author: Javier & Codex
Description: Tema editorial, luminoso y accesible creado para Mi diario reflexivo. Diseñado para devocionales, artículos extensos, predicaciones en audio y la página de Biblia.
Version: 1.4.3
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: diario-de-luz
*/

:root {
  --ink: #0b2545;
  --ink-soft: #13315c;
  --indigo: #134074;
  --indigo-dark: #0b2545;
  --gold: #8da9c4;
  --gold-dark: #134074;
  --cream: #eef4ed;
  --paper: #fbfdfb;
  --mist: #dce7ee;
  --line: #cad8e3;
  --white: #ffffff;
  --black: #0b2545;
  --shadow-sm: 0 8px 30px rgba(19, 49, 92, .10);
  --shadow-lg: 0 24px 70px rgba(11, 37, 69, .20);
  --radius: 18px;
  --content: 1160px;
  --reading: 760px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}
body > main { flex: 1 0 auto; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--indigo); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--gold-dark); }
button, input, select, textarea { font: inherit; }
button, input[type="submit"] { cursor: pointer; }
:focus-visible { outline: 3px solid rgba(141,169,196,.70); outline-offset: 3px; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link:focus { position: fixed !important; top: 10px; left: 10px; width: auto; height: auto; padding: .7rem 1rem; margin: 0; clip: auto; z-index: 9999; background: #fff; }
.wrap { width: min(calc(100% - 40px), var(--content)); margin-inline: auto; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; color: var(--ink); background: rgba(251,253,251,.97); border-bottom: 1px solid rgba(19,64,116,.14); box-shadow: 0 8px 28px rgba(19,49,92,.07); backdrop-filter: blur(12px); }
.admin-bar .site-header { top: 32px; }
.header-inner { min-height: 76px; display: flex; align-items: center; gap: 32px; }
.site-branding { display: flex; align-items: center; gap: 13px; margin-right: auto; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(19,64,116,.28); border-radius: 50%; color: var(--indigo); background: var(--white); font-family: Georgia, serif; font-size: 25px; }
.brand-copy { display: grid; line-height: 1.1; }
.site-title { color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: 20px; font-weight: 700; letter-spacing: .015em; }
.site-tagline { margin-top: 5px; color: var(--ink-soft); font-size: 11px; letter-spacing: .11em; text-transform: uppercase; }
.custom-logo-link img { max-height: 50px; width: auto; }
.primary-menu { display: flex; align-items: center; gap: 28px; margin: 0; padding: 0; list-style: none; }
.primary-menu a { position: relative; color: var(--ink-soft); font-size: 14px; font-weight: 650; text-decoration: none; }
.primary-menu a::after { content: ""; position: absolute; left: 0; bottom: -8px; width: 100%; height: 2px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .2s ease; }
.primary-menu a:hover, .primary-menu .current-menu-item > a, .primary-menu .current_page_item > a { color: var(--indigo); }
.primary-menu a:hover::after, .primary-menu .current-menu-item > a::after, .primary-menu .current_page_item > a::after { transform: scaleX(1); }
.menu-toggle { display: none; width: 44px; height: 44px; padding: 10px; border: 1px solid rgba(19,64,116,.26); border-radius: 10px; color: var(--ink); background: var(--white); }
.menu-toggle span { display: block; height: 2px; margin: 5px 0; background: currentColor; }

/* Home hero */
.home-hero { position: relative; overflow: hidden; color: var(--ink); background: linear-gradient(135deg, #fbfdfb 0%, #eef4ed 58%, #dce7ee 100%); border-bottom: 1px solid var(--line); }
.home-hero::before { content: ""; position: absolute; inset: 0; opacity: .50; background: radial-gradient(circle at 83% 12%, rgba(141,169,196,.42) 0, transparent 27%), radial-gradient(circle at 8% 90%, rgba(19,64,116,.10) 0, transparent 32%); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.03fr .97fr; min-height: 590px; align-items: center; gap: 70px; padding-block: 76px; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; color: var(--ink-soft); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 32px; height: 1px; background: currentColor; }
.hero-title { max-width: 760px; margin: 0; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: clamp(44px, 6vw, 76px); font-weight: 400; line-height: 1.04; letter-spacing: -.035em; }
.hero-intro { max-width: 590px; margin: 26px 0 32px; color: var(--ink-soft); font-size: 19px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border: 1px solid transparent; border-radius: 999px; font-size: 14px; font-weight: 750; text-decoration: none; transition: transform .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-gold { color: var(--ink); background: var(--gold); }
.button-gold:hover { color: var(--black); background: var(--cream); }
.hero-feature { position: relative; }
.hero-feature::before { content: ""; position: absolute; inset: -18px 18px 18px -18px; border: 1px solid rgba(19,64,116,.25); border-radius: 26px; }
.hero-card { position: relative; overflow: hidden; min-height: 420px; border-radius: 24px; box-shadow: var(--shadow-lg); background: var(--ink-soft); }
.hero-card img { width: 100%; height: 420px; object-fit: cover; }
.hero-card::after { content: ""; position: absolute; inset: 35% 0 0; background: linear-gradient(transparent, rgba(11,37,69,.95)); }
.hero-card-content { position: absolute; z-index: 2; right: 0; bottom: 0; left: 0; padding: 34px; }
.hero-card .post-category a { color: var(--cream); }
.hero-card h2 { margin: 8px 0 12px; color: #fff; font-family: Georgia, serif; font-size: clamp(25px,3vw,35px); line-height: 1.18; }
.hero-card h2 a { color: inherit; text-decoration: none; }
.hero-card .post-meta { color: rgba(255,255,255,.68); }
.hero-fallback { position: absolute; inset: 0; background: linear-gradient(145deg,var(--gold),var(--ink)); }

/* Sections and cards */
.home-section { padding-block: 86px; }
.home-section.tint { background: var(--cream); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.section-kicker { margin: 0 0 8px; color: var(--gold-dark); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.section-title { margin: 0; font-family: Georgia, serif; font-size: clamp(34px,4vw,48px); font-weight: 400; line-height: 1.15; letter-spacing: -.025em; }
.section-link { flex: none; font-size: 14px; font-weight: 750; }
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.post-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-sm); transition: transform .22s ease, box-shadow .22s ease; }
.post-card:hover { transform: translateY(-5px); box-shadow: 0 16px 42px rgba(19,49,92,.16); }
.card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: linear-gradient(140deg,var(--cream),var(--gold)); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .card-media img { transform: scale(1.035); }
.card-placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: rgba(19,64,116,.50); font-family: Georgia, serif; font-size: 60px; }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 25px; }
.post-category { color: var(--gold-dark); font-size: 11px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.post-category a { color: inherit; text-decoration: none; }
.card-title { margin: 9px 0 12px; font-family: Georgia, serif; font-size: 25px; font-weight: 500; line-height: 1.22; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-excerpt { margin: 0 0 20px; color: var(--ink-soft); font-size: 15px; line-height: 1.65; }
.post-meta { margin-top: auto; color: var(--ink-soft); font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.post-meta a { color: inherit; text-decoration: none; }

.feature-links { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.feature-panel { position: relative; overflow: hidden; min-height: 290px; padding: 42px; border: 1px solid #13315c; border-radius: 22px; color: #fff; background: #13315c; box-shadow: 0 14px 32px rgba(11,37,69,.13); }
.feature-panel:first-child .section-kicker { color: #8da9c4; }
.feature-panel:first-child a { color: #fff; }
.feature-panel:nth-child(2) { color: #0b2545; border-color: #8da9c4; background: #8da9c4; }
.feature-panel:nth-child(2) .section-kicker { color: #134074; }
.feature-panel::after { content: "✦"; position: absolute; right: 28px; bottom: -38px; opacity: .09; font-family: Georgia,serif; font-size: 190px; }
.feature-panel h3 { max-width: 460px; margin: 10px 0 13px; color: inherit; font-family: Georgia,serif; font-size: 35px; font-weight: 400; line-height: 1.15; }
.feature-panel p { max-width: 500px; margin: 0 0 25px; opacity: .84; }
.feature-panel a { color: inherit; font-weight: 800; }

/* Inner pages */
.page-hero { padding: 72px 0 58px; text-align: center; background: var(--cream); border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 900px; margin: 0 auto; font-family: Georgia,serif; font-size: clamp(38px,5vw,60px); font-weight: 400; line-height: 1.1; letter-spacing: -.025em; }
.page-hero .archive-description { max-width: 680px; margin: 18px auto 0; color: var(--ink-soft); }
.content-area { padding-block: 70px 92px; }
.content-with-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 68px; }
.article-shell { max-width: var(--reading); margin-inline: auto; }
.single-header { margin-bottom: 34px; text-align: center; }
.single-header h1 { margin: 12px 0 20px; font-family: Georgia,serif; font-size: clamp(38px,5.4vw,64px); font-weight: 400; line-height: 1.08; letter-spacing: -.035em; }
.single-header .post-meta { font-size: 13px; }
.single-featured { overflow: hidden; width: min(calc(100% - 40px), 1040px); max-height: 580px; margin: 0 auto 54px; border-radius: 22px; box-shadow: var(--shadow-lg); }
.single-featured img { width: 100%; max-height: 580px; object-fit: cover; }
.entry-content { color: var(--black); font-family: Georgia, "Times New Roman", serif; font-size: 20px; line-height: 1.85; }
.entry-content > * { max-width: 100%; }
.entry-content h2, .entry-content h3, .entry-content h4 { color: var(--ink); line-height: 1.25; }
.entry-content h2 { margin-top: 2em; font-size: 34px; }
.entry-content h3 { margin-top: 1.8em; font-size: 27px; }
.entry-content a { color: var(--indigo); }
.entry-content blockquote { position: relative; margin: 2.2em 0; padding: 30px 34px 30px 58px; border: 0; border-radius: 14px; color: var(--indigo-dark); background: var(--cream); font-size: 23px; font-style: italic; line-height: 1.62; }
.entry-content blockquote::before { content: "“"; position: absolute; top: 10px; left: 20px; color: var(--gold); font-size: 64px; line-height: 1; }
.entry-content iframe { max-width: 100%; border-radius: 12px; }
.entry-content select, .entry-content input[type="text"], .entry-content input[type="search"], .entry-content textarea { max-width: 100%; min-height: 48px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); }
.entry-content button, .entry-content input[type="submit"] { min-height: 46px; padding: 0 20px; border: 0; border-radius: 9px; color: #fff; background: var(--indigo); }
.wp-block-image img { border-radius: 14px; }
.post-tags { margin-top: 38px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 14px; }
.single .content-area.article-shell { padding-bottom: 34px; }
.post-navigation { max-width: 900px; margin: 24px auto 64px; padding-inline: 20px; }
.post-navigation .nav-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.post-navigation .nav-previous, .post-navigation .nav-next { min-width: 0; }
.post-navigation a { display: block; padding: 24px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; background: var(--white); }
.post-navigation .nav-next { text-align: right; }
.nav-label { display: block; margin-bottom: 6px; color: var(--gold-dark); font-size: 11px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }

.page-card { max-width: 980px; margin-inline: auto; padding: clamp(28px,5vw,62px); border: 1px solid var(--line); border-radius: 22px; background: var(--white); box-shadow: var(--shadow-sm); }
.page-card .entry-content { font-family: inherit; font-size: 17px; }
.page-card .entry-content > :first-child { margin-top: 0; }

/* Lists, sidebar, search */
.archive-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 28px; }
.sidebar { position: sticky; top: 104px; }
.widget { margin-bottom: 22px; padding: 26px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.widget-title { margin: 0 0 16px; font-family: Georgia,serif; font-size: 22px; font-weight: 500; }
.widget ul { margin: 0; padding: 0; list-style: none; }
.widget li + li { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.widget a { color: var(--ink-soft); font-size: 14px; text-decoration: none; }
.search-form { display: flex; gap: 8px; }
.search-field { min-width: 0; width: 100%; height: 45px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; }
.search-submit { width: 46px; height: 45px; padding: 0; border: 0; border-radius: 8px; color: #fff; background: var(--indigo); }
.pagination { margin-top: 42px; }
.nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.page-numbers { display: grid; place-items: center; min-width: 42px; height: 42px; padding-inline: 10px; border: 1px solid var(--line); border-radius: 9px; text-decoration: none; background: var(--white); }
.page-numbers.current { color: #fff; border-color: var(--indigo); background: var(--indigo); }
.empty-state { padding: 50px; text-align: center; border: 1px solid var(--line); border-radius: 18px; background: var(--cream); }

/* Footer */
.site-footer { flex: none; color: rgba(238,244,237,.82); background: linear-gradient(180deg, #0b2545 0%, #06182d 68%, #04111f 100%); border-top: 1px solid #13315c; }
.footer-main { display: grid; grid-template-columns: 1.3fr .7fr .7fr; gap: 64px; padding-block: 66px 48px; }
.footer-title { margin: 0 0 14px; color: #eef4ed; font-family: Georgia,serif; font-size: 27px; }
.footer-copy { max-width: 420px; margin: 0; font-size: 14px; }
.footer-heading { margin: 0 0 15px; color: #8da9c4; font-size: 12px; letter-spacing: .13em; text-transform: uppercase; }
.footer-menu, .footer-categories { margin: 0; padding: 0; list-style: none; }
.footer-menu li + li, .footer-categories li + li { margin-top: 8px; }
.footer-menu a, .footer-categories a { color: rgba(238,244,237,.82); font-size: 14px; text-decoration: none; }
.footer-menu a:hover, .footer-categories a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-block: 22px; border-top: 1px solid rgba(141,169,196,.24); font-size: 12px; }
.footer-bottom a { color: inherit; }

.alignwide { width: min(100vw - 40px, 1040px); max-width: none !important; margin-left: 50%; transform: translateX(-50%); }
.alignfull { width: 100vw; max-width: none !important; margin-left: 50%; transform: translateX(-50%); }

@media (max-width: 980px) {
  .menu-toggle { display: block; }
  .primary-navigation { position: absolute; top: 76px; right: 0; left: 0; display: none; padding: 12px 20px 24px; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px rgba(19,49,92,.14); }
  .primary-navigation.is-open { display: block; }
  .primary-menu { display: block; }
  .primary-menu li { border-bottom: 1px solid var(--line); }
  .primary-menu a { display: block; padding: 14px 2px; }
  .primary-menu a::after { display: none; }
  .hero-grid { grid-template-columns: 1fr 1fr; gap: 35px; }
  .posts-grid { grid-template-columns: repeat(2,1fr); }
  .posts-grid .post-card:last-child { display: none; }
  .content-with-sidebar { grid-template-columns: 1fr; }
  .sidebar { position: static; display: grid; grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 720px) {
  .wrap { width: min(calc(100% - 28px), var(--content)); }
  .admin-bar .site-header { top: 46px; }
  .site-tagline { display: none; }
  .header-inner { min-height: 68px; }
  .primary-navigation { top: 68px; }
  .hero-grid { display: block; min-height: 0; padding-block: 62px; }
  .hero-title { font-size: clamp(42px,13vw,60px); }
  .hero-intro { font-size: 17px; }
  .hero-feature { margin-top: 52px; }
  .hero-card, .hero-card img { min-height: 350px; height: 350px; }
  .hero-card-content { padding: 25px; }
  .home-section { padding-block: 64px; }
  .section-head { display: block; }
  .section-link { display: inline-block; margin-top: 13px; }
  .posts-grid, .archive-grid, .feature-links, .footer-main, .sidebar { grid-template-columns: 1fr; }
  .post-navigation .nav-links { grid-template-columns: 1fr; }
  .posts-grid .post-card:last-child { display: flex; }
  .feature-panel { min-height: 260px; padding: 30px; }
  .page-hero { padding: 52px 0 42px; }
  .content-area { padding-block: 50px 70px; }
  .single-featured { width: calc(100% - 28px); margin-bottom: 38px; border-radius: 14px; }
  .entry-content { font-size: 18px; line-height: 1.78; }
  .entry-content blockquote { padding: 25px 24px 25px 48px; font-size: 20px; }
  .post-navigation .nav-next { text-align: left; }
  .footer-main { gap: 36px; }
  .footer-bottom { display: block; }
  .footer-bottom span { display: block; margin-top: 5px; }
}

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