/* =============================================
   DIARIO CULIPARDO – Hoja de estilos principal
   ============================================= */

/* ---- Variables ---- */
:root {
  --brown-dark:   #1E0F06;
  --brown-mid:    #3A1E0A;
  --brown-warm:   #5C3317;
  --gold:         #C9A84C;
  --gold-light:   #E2C97A;
  --gold-pale:    #F5EAC8;
  --cream:        #FAF4E8;
  --cream-dark:   #EDE3CE;
  --text-dark:    #1A0E06;
  --text-mid:     #4A3520;
  --text-light:   #7A6048;
  --wa-green:     #25D366;
  --wa-dark:      #128C7E;
  --white:        #FFFFFF;

  --font-serif:   'Playfair Display', Georgia, serif;
  --font-body:    'Source Serif 4', 'EB Garamond', Georgia, serif;
  --font-ui:      system-ui, -apple-system, sans-serif;

  --radius:       4px;
  --shadow:       0 2px 12px rgba(30, 15, 6, 0.12);
  --shadow-lg:    0 4px 24px rgba(30, 15, 6, 0.18);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--cream);
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  min-height: 100vh;
}

a { color: var(--brown-warm); text-decoration: none; }
a:hover { color: var(--gold); }

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

/* ---- WhatsApp FAB (floating button) ---- */
.whatsapp-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--wa-green);
  color: var(--white);
  padding: 12px 20px 12px 14px;
  border-radius: 50px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
.whatsapp-fab:hover {
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
}

/* ---- Header ---- */
.site-header {
  background: var(--brown-dark);
  border-bottom: 3px solid var(--gold);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}

.header-logo { flex-shrink: 0; }
.logo-img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  border-radius: 50%;
  border: 2px solid var(--gold);
  transition: transform 0.3s;
}
.logo-img:hover { transform: rotate(-5deg) scale(1.05); }

.header-text { text-align: center; }

.header-tagline-top,
.header-tagline-bottom {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-light);
  opacity: 0.8;
}

.site-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 900;
  color: var(--gold);
  letter-spacing: -0.01em;
  line-height: 1.1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  margin: 4px 0;
}

.header-whatsapp {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.whatsapp-header-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--wa-green);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 6px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
  white-space: nowrap;
}
.whatsapp-header-btn:hover {
  background: #20bc5a;
  color: var(--white);
  transform: translateY(-1px);
}

.header-date {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--gold-pale);
  opacity: 0.7;
  text-align: right;
}

/* ---- Navigation ---- */
.site-nav {
  background: var(--brown-mid);
  border-top: 1px solid rgba(201,168,76,0.3);
}

.site-nav ul {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  list-style: none;
  gap: 0;
}

.site-nav a {
  display: block;
  padding: 10px 18px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-pale);
  opacity: 0.8;
  transition: opacity 0.2s, background 0.2s;
}
.site-nav a:hover,
.site-nav a.active {
  opacity: 1;
  color: var(--gold);
  background: rgba(201,168,76,0.1);
}

/* ---- Ad containers ---- */
.ad-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 0;
  background: var(--cream-dark);
  border-top: 1px solid var(--cream-dark);
  border-bottom: 1px solid #ddd;
}

.ad-leaderboard { padding: 10px; }
.ad-footer { margin-top: 0; border-top: 1px solid #ccc; }

.ad-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 728px;
  max-width: 100%;
  height: 90px;
  background: #e8e0d0;
  border: 1px dashed #b0a080;
  border-radius: var(--radius);
  color: var(--text-light);
  font-family: var(--font-ui);
  font-size: 11px;
}
.ad-placeholder span { font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; }
.ad-placeholder small { opacity: 0.6; }
.ad-placeholder--sidebar {
  width: 300px;
  height: 250px;
}

.ad-inline { padding: 16px 0; }
.ad-sidebar { display: flex; justify-content: center; margin-bottom: 4px; }

/* ---- WhatsApp Banner ---- */
.whatsapp-banner {
  background: linear-gradient(135deg, #0d5c3a 0%, #128C7E 100%);
  padding: 0;
}

.whatsapp-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.wa-icon { color: var(--white); flex-shrink: 0; opacity: 0.95; }

.wa-text {
  flex: 1;
  min-width: 200px;
  color: var(--white);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wa-text strong { font-size: 15px; }
.wa-text span { opacity: 0.9; }

.wa-btn {
  background: var(--white);
  color: var(--wa-dark);
  padding: 10px 20px;
  border-radius: 6px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  transition: transform 0.2s, box-shadow 0.2s;
}
.wa-btn:hover {
  color: var(--wa-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ---- Main Layout ---- */
.site-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

/* ---- Section Header ---- */
.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brown-warm);
  white-space: nowrap;
}

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--gold), transparent);
}

/* ---- News Posts ---- */
.news-post {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  margin-bottom: 24px;
  border-left: 4px solid var(--cream-dark);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.news-post:hover {
  box-shadow: var(--shadow-lg);
  border-left-color: var(--gold);
}

.news-post.featured {
  border-left-color: var(--gold);
  background: linear-gradient(to bottom right, var(--white), #fffbf3);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.post-date {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light);
}

.post-badge {
  background: var(--gold);
  color: var(--brown-dark);
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
}

.post-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--brown-dark);
  line-height: 1.25;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--cream-dark);
}

.post-body p {
  margin-bottom: 14px;
  color: var(--text-mid);
  font-size: 16px;
}

/* ---- News List ---- */
.news-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.news-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15.5px;
  color: var(--text-mid);
  line-height: 1.5;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--cream-dark);
}
.news-list li:last-child { border-bottom: none; padding-bottom: 0; }

.news-category {
  display: inline-block;
  background: var(--brown-dark);
  color: var(--gold-light);
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ---- In-post WhatsApp CTA ---- */
.post-footer-wa {
  background: #f0faf4;
  border: 1px solid #c3e6cb;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.post-footer-wa p {
  flex: 1;
  min-width: 180px;
  margin: 0;
  font-size: 14px;
  color: #2d6a4f;
}
.wa-inline-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--wa-green);
  color: var(--white);
  padding: 8px 16px;
  border-radius: 5px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s;
}
.wa-inline-btn:hover { background: #1db954; color: var(--white); }

/* ---- Sidebar ---- */
.sidebar { display: flex; flex-direction: column; gap: 24px; }

.sidebar-widget {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.about-widget { text-align: center; }
.sidebar-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 2px solid var(--gold);
}

.sidebar-widget h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brown-dark);
  margin-bottom: 10px;
}

.sidebar-widget p {
  font-size: 14px;
  color: var(--text-mid);
  margin-bottom: 10px;
  line-height: 1.6;
}
.sidebar-widget p:last-child { margin-bottom: 0; }

/* WhatsApp Sidebar Widget */
.whatsapp-widget {
  background: linear-gradient(135deg, #0d5c3a 0%, #1a7a5e 100%);
  text-align: center;
}

.wa-widget-icon {
  color: var(--white);
  margin-bottom: 10px;
  opacity: 0.95;
  display: flex;
  justify-content: center;
}

.whatsapp-widget h3 { color: var(--white); }
.whatsapp-widget p { color: rgba(255,255,255,0.85); }

.wa-sidebar-btn {
  display: block;
  background: var(--white);
  color: var(--wa-dark);
  padding: 12px 16px;
  border-radius: 6px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 14px;
  margin-top: 14px;
  transition: transform 0.2s, box-shadow 0.2s;
  text-align: center;
}
.wa-sidebar-btn:hover {
  color: var(--wa-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.wa-stats {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.wa-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  color: rgba(255,255,255,0.8);
  font-family: var(--font-ui);
}
.wa-stat strong { font-size: 18px; }

/* ---- Footer ---- */
.site-footer {
  background: var(--brown-dark);
  border-top: 3px solid var(--gold);
  color: var(--gold-pale);
  padding: 32px 0 20px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 50%;
  border: 1px solid var(--gold);
  opacity: 0.9;
}

.footer-brand strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--gold);
}
.footer-brand span {
  font-size: 12px;
  opacity: 0.6;
  font-family: var(--font-ui);
}

.footer-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--gold-pale);
  font-family: var(--font-ui);
  font-size: 13px;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.footer-links a:hover { opacity: 1; color: var(--gold); }

.footer-legal {
  text-align: right;
  font-family: var(--font-ui);
  font-size: 11px;
  opacity: 0.5;
  line-height: 1.6;
}

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .ad-sidebar { grid-column: 1 / -1; }
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 20px;
  }
  .footer-brand { justify-content: center; }
  .footer-legal { text-align: center; }
}

@media (max-width: 680px) {
  .header-inner {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 12px;
  }
  .header-whatsapp {
    grid-column: 1 / -1;
    align-items: center;
    flex-direction: row;
    justify-content: center;
  }
  .header-text { text-align: left; }
  .logo-img { width: 64px; height: 64px; }
  .site-title { font-size: 1.8rem; }
  .news-post { padding: 20px 18px; }
  .post-title { font-size: 1.3rem; }
  .sidebar { grid-template-columns: 1fr; }
  .whatsapp-fab span { display: none; }
  .whatsapp-fab { padding: 14px; }
  .ad-placeholder { width: 320px; height: 50px; }
  .whatsapp-banner-inner { justify-content: center; text-align: center; }
  .wa-icon { display: none; }
}

/* =============================================
 *  AÑADIDOS SESIÓN 1 WEB — pegar al final de style.css
 *  No modifica nada de lo anterior.
 *  ============================================= */

/* ---- Botón "Ver boletines anteriores" (portada) ---- */
.ver-mas-wrap {
  margin-top: 8px;
}

.ver-mas-btn {
  display: inline-block;
  background: var(--brown-dark);
  color: var(--gold-light);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 12px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--gold);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.ver-mas-btn:hover {
  background: var(--gold);
  color: var(--brown-dark);
  transform: translateY(-1px);
}

/* ---- Página de listado de boletines ---- */
.archive-intro {
  margin-bottom: 28px;
  color: var(--text-mid);
  font-size: 16px;
  max-width: 640px;
}

.boletin-list {
  list-style: none;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.boletin-list li {
  border-bottom: 1px solid var(--cream-dark);
}
.boletin-list li:last-child {
  border-bottom: none;
}

.boletin-list a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 24px;
  color: var(--text-dark);
  transition: background 0.18s;
}
.boletin-list a:hover {
  background: var(--cream);
  color: var(--text-dark);
}

.boletin-list .b-fecha {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light);
  white-space: nowrap;
  min-width: 150px;
}

.boletin-list .b-titulo {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brown-dark);
  line-height: 1.3;
  flex: 1;
  min-width: 220px;
}

.boletin-list a:hover .b-titulo {
  color: var(--brown-warm);
}

/* Aviso cuando aún no hay boletines */
.archive-empty {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 24px;
  text-align: center;
  color: var(--text-light);
  font-size: 15px;
}

@media (max-width: 680px) {
  .boletin-list a { padding: 16px 18px; gap: 6px; }
  .boletin-list .b-fecha { min-width: 0; }
  .boletin-list .b-titulo { font-size: 1.05rem; }
}

/* ---- Empujar "Boletines anteriores" al extremo derecho del menú ---- */
.site-nav .nav-derecha {
  margin-left: auto;
}
/* =============================================
   AÑADIDOS SESIÓN 1 WEB (2) — pegar al final de style.css
   Estilos para la plantilla del boletín individual.
   ============================================= */

/* ---- Enlace "Volver a boletines anteriores" ---- */
.volver-link {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 16px;
  transition: color 0.18s;
}
.volver-link:hover {
  color: var(--brown-warm);
}

/* ---- Cuerpo del boletín individual ---- */
.boletin-individual {
  /* Hereda de .news-post.featured. Solo retoques específicos. */
}

.boletin-cuerpo {
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--text-dark);
}

.boletin-cuerpo p {
  margin-bottom: 18px;
}
.boletin-cuerpo p:last-child {
  margin-bottom: 0;
}

.boletin-cuerpo strong {
  color: var(--brown-dark);
  font-weight: 700;
}

.boletin-cuerpo a {
  color: var(--brown-warm);
  border-bottom: 1px dotted var(--gold);
  transition: color 0.18s, border-color 0.18s;
}
.boletin-cuerpo a:hover {
  color: var(--gold);
  border-bottom-color: var(--brown-warm);
}

/* Separador sutil entre noticias del boletín (si n8n usa <hr>) */
.boletin-cuerpo hr {
  border: none;
  border-top: 1px solid var(--cream-dark);
  margin: 22px 0;
}

/* Listas dentro del boletín (por si n8n las genera) */
.boletin-cuerpo ul,
.boletin-cuerpo ol {
  margin: 0 0 18px 24px;
}
.boletin-cuerpo li {
  margin-bottom: 6px;
}
