/* ==============================================================================
   ESTILOS DE NOTICIAS, ARCHIVO Y ENTRADAS INDIVIDUALES
   Escuela Mi Rincón Mágico — Puente Alto
   ============================================================================== */

/* ------------------------------------------------------------------------------
   1. CABECERA Y FILTROS DEL ARCHIVO DE NOTICIAS (/noticias/)
   ------------------------------------------------------------------------------ */
.noticias-page-main {
  background: #FFFDF7;
  min-height: 80vh;
}

.noticias-hero-header {
  padding: 60px 24px 30px;
  background: linear-gradient(180deg, #F9F5EA 0%, #FFFDF7 100%);
  border-bottom: 2px dashed #EAE0CC;
}

.noticias-hero-container {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.noticias-main-h1 {
  margin: 0;
  font-family: var(--mrm-font-display, 'Baloo 2', cursive);
  font-weight: 800;
  font-size: clamp(36px, 4.5vw, 54px);
  line-height: 1.05;
  color: #1E2225;
}

.noticias-main-subt {
  margin: 0;
  max-width: 540px;
  font-size: 18px;
  line-height: 1.5;
  color: #4A4F55;
}

/* Chips de Filtro */
.noticias-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 18px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 22px;
  border-radius: 999px;
  font-family: var(--mrm-font-display, 'Baloo 2', cursive);
  font-weight: 700;
  font-size: 16px;
  color: #1E2225;
  background: #FFFDF7;
  border: 2px solid #E2CF9E;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(60, 40, 0, 0.04);
}

.filter-chip:hover {
  background: #FFF3C4;
  border-color: #FDCB0A;
  transform: translateY(-2px);
}

.filter-chip.chip-active {
  background: #FDCB0A;
  border-color: #FDCB0A;
  color: #1E2225;
  box-shadow: 0 6px 14px rgba(253, 203, 10, 0.3);
}

/* ------------------------------------------------------------------------------
   2. GRILLA DE NOTICIAS (3 columnas escritorio, 2 tablet, 1 móvil)
   ------------------------------------------------------------------------------ */
.noticias-grid-section {
  padding: 60px 24px 80px;
  max-width: 1180px;
  margin: 0 auto;
}

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

@media (max-width: 1024px) {
  .noticias-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 640px) {
  .noticias-cards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.noticia-grid-card {
  background: #FFFDF7;
  border-radius: 28px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 28px rgba(60, 40, 0, 0.07);
  border: 1px solid rgba(226, 207, 158, 0.35);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.noticia-grid-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(60, 40, 0, 0.12);
}

.noticia-card-thumb {
  position: relative;
  height: 220px;
  border-radius: 20px;
  background: #F4ECD8;
  overflow: hidden;
  border: 2px dashed #E2CF9E;
}

.noticia-thumb-link {
  display: block;
  width: 100%;
  height: 100%;
}

.noticia-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.noticia-grid-card:hover .noticia-thumb-img {
  transform: scale(1.04);
}

.noticia-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #8A7A55;
  font-weight: 700;
  font-size: 14px;
}

.noticia-card-content {
  padding: 18px 10px 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.noticia-card-badge {
  align-self: flex-start;
  font-family: var(--mrm-font-display, 'Baloo 2', cursive);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.8px;
  padding: 3px 12px;
  border-radius: 999px;
  background: #FDCB0A;
  color: #1E2225;
}

.noticia-card-title {
  margin: 0;
  font-family: var(--mrm-font-display, 'Baloo 2', cursive);
  font-weight: 800;
  font-size: 22px;
  line-height: 1.18;
  color: #1E2225;
}

.noticia-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.noticia-card-title a:hover {
  color: #D81F26;
}

.noticia-card-excerpt {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: #4A4F55;
  flex: 1;
}

.noticia-card-readmore {
  align-self: flex-start;
  font-family: var(--mrm-font-display, 'Baloo 2', cursive);
  font-weight: 700;
  font-size: 15px;
  color: #D81F26;
  text-decoration: none;
  margin-top: 6px;
  transition: transform 0.2s ease;
}

.noticia-card-readmore:hover {
  text-decoration: underline;
  transform: translateX(3px);
}

/* Paginación Pills */
.noticias-pagination {
  margin-top: 50px;
  display: flex;
  justify-content: center;
}

.noticias-pagination ul.page-numbers {
  list-style: none;
  display: flex;
  gap: 10px;
  padding: 0;
  margin: 0;
}

.noticias-pagination a.page-numbers,
.noticias-pagination span.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 999px;
  background: #FFFDF7;
  border: 2px solid #E2CF9E;
  font-family: var(--mrm-font-display, 'Baloo 2', cursive);
  font-weight: 700;
  font-size: 16px;
  color: #1E2225;
  text-decoration: none;
  transition: all 0.2s ease;
}

.noticias-pagination span.current {
  background: #FDCB0A;
  border-color: #FDCB0A;
}

.noticias-pagination a:hover {
  background: #FFF3C4;
  border-color: #FDCB0A;
}

/* ------------------------------------------------------------------------------
   3. ENTRADA INDIVIDUAL (single.php)
   ------------------------------------------------------------------------------ */
.noticia-single-main {
  background: #FFFDF7;
  padding-bottom: 80px;
}

.noticia-single-header {
  padding: 44px 24px 20px;
  background: linear-gradient(180deg, #F9F5EA 0%, #FFFDF7 100%);
  border-bottom: 1px solid #EAE0CC;
}

.noticia-header-container {
  max-width: 860px;
  margin: 0 auto 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Migas de pan */
.mrm-breadcrumbs {
  font-size: 14px;
  color: #71767C;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.mrm-breadcrumbs a {
  color: #71767C;
  text-decoration: none;
  transition: color 0.2s;
}

.mrm-breadcrumbs a:hover {
  color: #D81F26;
  text-decoration: underline;
}

.mrm-bc-sep {
  color: #B5B9BE;
}

.mrm-bc-current {
  color: #1E2225;
  font-weight: 600;
}

/* Meta Top */
.noticia-meta-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.noticia-single-cat-pill {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: #D81F26;
  color: #FFFFFF;
  font-family: var(--mrm-font-display, 'Baloo 2', cursive);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
  text-decoration: none;
}

.noticia-single-time {
  font-size: 15px;
  color: #71767C;
}

.noticia-single-h1 {
  margin: 0;
  font-family: var(--mrm-font-display, 'Baloo 2', cursive);
  font-weight: 800;
  font-size: clamp(34px, 4.2vw, 54px);
  line-height: 1.08;
  color: #1E2225;
}

/* Contenedor Imagen Destacada */
.noticia-feat-img-container {
  max-width: 1040px;
  margin: 20px auto 0;
  padding: 0 16px;
}

.noticia-feat-img-wrapper {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 16px 38px rgba(60, 40, 0, 0.12);
  border: 4px solid #FFFFFF;
  background: #F4ECD8;
}

.noticia-single-feat-img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.noticia-single-feat-caption {
  text-align: center;
  font-size: 14px;
  color: #6C7278;
  font-style: italic;
  margin-top: 10px;
}

/* ------------------------------------------------------------------------------
   4. TIPOGRAFÍA Y CUERPO DEL CONTENIDO (max-width: 760px)
   ------------------------------------------------------------------------------ */
.noticia-single-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px 0;
}

.noticia-content-wrap.mrm-prose {
  max-width: 760px;
  margin: 0 auto;
}

.noticia-content-wrap.mrm-prose p {
  font-family: var(--mrm-font-body, 'Nunito Sans', sans-serif);
  font-size: 18px;
  line-height: 1.7;
  color: #303438;
  margin-top: 0;
  margin-bottom: 24px;
}

.noticia-content-wrap.mrm-prose h2 {
  font-family: var(--mrm-font-display, 'Baloo 2', cursive);
  font-weight: 800;
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1.15;
  color: #1E2225;
  margin-top: 44px;
  margin-bottom: 18px;
}

.noticia-content-wrap.mrm-prose h3 {
  font-family: var(--mrm-font-display, 'Baloo 2', cursive);
  font-weight: 700;
  font-size: clamp(22px, 2.6vw, 28px);
  line-height: 1.2;
  color: #1E2225;
  margin-top: 32px;
  margin-bottom: 14px;
}

.noticia-content-wrap.mrm-prose ul {
  padding-left: 24px;
  margin-bottom: 28px;
}

.noticia-content-wrap.mrm-prose li {
  font-family: var(--mrm-font-body, 'Nunito Sans', sans-serif);
  font-size: 18px;
  line-height: 1.65;
  color: #303438;
  margin-bottom: 12px;
}

.noticia-content-wrap.mrm-prose strong {
  font-weight: 700;
  color: #1E2225;
}

/* Caja "En resumen" (GEO Key Block) */
.mrm-resumen {
  background: #FFFDF7;
  border: 3px dashed #FDCB0A;
  border-radius: 24px;
  padding: 24px 28px;
  margin: 32px 0 36px;
  box-shadow: 0 10px 24px rgba(253, 203, 10, 0.12);
  position: relative;
}

.mrm-resumen p {
  font-size: 17px !important;
  line-height: 1.65 !important;
  color: #2F3337 !important;
  margin: 0 !important;
}

.mrm-resumen strong {
  color: #D81F26 !important;
  font-size: 18px;
}

/* Imagen individual en el artículo */
.mrm-single-foto,
.wp-block-image {
  margin: 34px 0;
}

.mrm-single-foto img,
.wp-block-image img {
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(60, 40, 0, 0.08);
  width: 100%;
  height: auto;
  display: block;
}

.wp-block-image figcaption {
  text-align: center;
  font-size: 14px;
  color: #6C7278;
  font-style: italic;
  margin-top: 10px;
}

/* Galería de WordPress (Gutenberg) */
.mrm-galeria-noticia,
.wp-block-gallery {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 14px !important;
  margin: 34px 0 !important;
  padding: 0 !important;
}

@media (max-width: 768px) {
  .mrm-galeria-noticia,
  .wp-block-gallery {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
}

@media (max-width: 480px) {
  .mrm-galeria-noticia,
  .wp-block-gallery {
    grid-template-columns: 1fr !important;
  }
}

.wp-block-gallery .wp-block-image {
  margin: 0 !important;
}

.wp-block-gallery img {
  border-radius: 18px !important;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  height: 100%;
  transition: transform 0.25s ease;
  box-shadow: 0 6px 16px rgba(60, 40, 0, 0.08);
}

.wp-block-gallery img:hover {
  transform: scale(1.03);
}

/* Embeds Responsivos */
.wp-block-embed,
.wp-block-embed iframe {
  border-radius: 18px;
  overflow: hidden;
  max-width: 100%;
}

/* Barra de Compartir */
.noticia-share-bar {
  background: #FFFDF7;
  border: 2px solid #EAE0CC;
  border-radius: 20px;
  padding: 16px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 44px 0;
}

.share-title {
  font-family: var(--mrm-font-display, 'Baloo 2', cursive);
  font-weight: 700;
  font-size: 16px;
  color: #1E2225;
}

.share-links {
  display: flex;
  gap: 12px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  color: #FFFFFF !important;
  text-decoration: none;
  font-family: var(--mrm-font-body, 'Nunito Sans', sans-serif);
  font-weight: 700;
  font-size: 14px;
  transition: opacity 0.2s, transform 0.2s;
}

.share-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.share-wa {
  background: #25D366;
}

.share-fb {
  background: #1877F2;
}

/* CTA Final de la Entrada */
.noticia-cta-box,
.mrm-cta-noticia-caja {
  background: #1E2225;
  color: #FFFFFF;
  border-radius: 28px;
  padding: 44px 32px;
  text-align: center;
  margin: 50px 0;
  position: relative;
  box-shadow: 0 16px 36px rgba(30, 34, 37, 0.15);
}

.noticia-cta-title,
.mrm-cta-noticia-caja h3 {
  font-family: var(--mrm-font-display, 'Baloo 2', cursive);
  font-weight: 800;
  font-size: clamp(24px, 3vw, 32px);
  color: #FFFFFF;
  margin: 10px 0 14px;
}

.noticia-cta-desc,
.mrm-cta-noticia-caja p {
  font-size: 16px;
  line-height: 1.6;
  color: #E2E4E8;
  max-width: 540px;
  margin: 0 auto 24px;
}

.mrm-cta-enlaces a {
  color: #FDCB0A !important;
  text-decoration: none;
}

.mrm-cta-enlaces a:hover {
  text-decoration: underline;
}

.btn-cta-whatsapp-lg,
.mrm-btn-ws {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: #FFFFFF !important;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--mrm-font-display, 'Baloo 2', cursive);
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35);
  transition: all 0.2s ease;
}

.btn-cta-whatsapp-lg:hover,
.mrm-btn-ws:hover {
  background: #20BA5A;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(37, 211, 102, 0.45);
}

/* ------------------------------------------------------------------------------
   5. MÁS NOTICIAS (Sección Relacionados al pie de single.php)
   ------------------------------------------------------------------------------ */
.noticia-related-section {
  background: #FDFBF7;
  border-top: 2px dashed #EAE0CC;
  padding: 60px 24px 40px;
  margin-top: 60px;
}

.noticia-related-container {
  max-width: 1180px;
  margin: 0 auto;
}

.related-header {
  text-align: center;
  margin-bottom: 34px;
}

.related-title {
  margin: 0;
  font-family: var(--mrm-font-display, 'Baloo 2', cursive);
  font-weight: 800;
  font-size: clamp(28px, 3.5vw, 40px);
  color: #1E2225;
}

/* ------------------------------------------------------------------------------
   6. BANDA CTA FINAL (template-parts/cta-banner.php y archivos)
   ------------------------------------------------------------------------------ */
.section-cta-final {
  background: #FDCB0A;
  padding: 64px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-final-box {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.cta-final-title {
  margin: 0;
  font-family: var(--mrm-font-display, 'Baloo 2', cursive);
  font-weight: 800;
  font-size: clamp(30px, 3.8vw, 44px);
  color: #1E2225;
}

.cta-final-info {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1E2225;
}
