/*
Theme Name: CEA Noticias
Theme URI: https://complejoeducativoalberdi.org/noticias/
Author: Complejo Educativo de Alberdi
Description: Tema institucional para las noticias del Complejo Educativo de Alberdi.
Version: 1.0.1
Text Domain: cea-noticias
*/

:root {
  --cea-blue: #161e69;
  --cea-blue-dark: #070d43;
  --cea-blue-light: #4a6aff;
  --cea-mint: #c5fad2;
  --cea-sky: #eaf2ff;
  --cea-paper: #f7f8fb;
  --cea-text: #19213d;
  --cea-muted: #66708c;
  --cea-white: #ffffff;
  --cea-border: rgba(22, 30, 105, 0.11);
  --cea-shadow: 0 18px 48px rgba(22, 30, 105, 0.11);
  --cea-radius: 20px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding-top: 75px;
  color: var(--cea-text);
  background: var(--cea-paper);
  font-family: "Mulish", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

a {
  color: inherit;
}

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

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 2000;
  width: auto;
  height: auto;
  padding: 12px 16px;
  clip: auto;
  color: var(--cea-blue);
  background: var(--cea-white);
  border-radius: 8px;
}

.cea-shell {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

/* Encabezado compartido con el sitio institucional. */
.cea-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: 75px;
  padding: 0 28px;
  color: var(--cea-white);
  background: rgba(14, 22, 100, 0.94);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(12px);
}

.cea-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 75px;
}

.cea-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 12px;
  color: var(--cea-white);
  text-decoration: none;
}

.cea-brand img {
  width: 50px;
  height: 50px;
  padding: 6px;
  object-fit: contain;
  background: var(--cea-white);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.cea-brand span {
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.25;
}

.cea-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 1.8vw, 2rem);
  padding: 0;
  margin: 0;
  list-style: none;
}

.cea-nav a,
.cea-submenu-toggle {
  color: var(--cea-white);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  opacity: 0.92;
}

.cea-nav a:hover,
.cea-nav a:focus-visible,
.cea-nav .is-active {
  color: var(--cea-mint);
  opacity: 1;
}

.cea-nav .cea-enrollment {
  padding: 9px 17px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.cea-submenu-parent {
  position: relative;
}

.cea-submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  padding: 8px 0;
  margin: 0;
  overflow: hidden;
  list-style: none;
  background: rgba(14, 22, 100, 0.98);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
}

.cea-submenu a {
  display: block;
  padding: 11px 16px;
}

.cea-submenu-parent:hover .cea-submenu,
.cea-submenu-parent:focus-within .cea-submenu {
  display: block;
}

.cea-menu-open,
.cea-menu-close {
  display: none;
  border: 0;
  color: var(--cea-white);
  background: transparent;
  cursor: pointer;
}

.cea-menu-open {
  font-size: 1.8rem;
}

.cea-menu-close {
  font-size: 2rem;
}

/* Hero compacto de Noticias. */
.news-hero {
  position: relative;
  padding: clamp(54px, 8vw, 92px) 0;
  overflow: hidden;
  color: var(--cea-white);
  background: linear-gradient(135deg, #111966 0%, #25358f 68%, #314bb5 100%);
}

.news-hero::before,
.news-hero::after {
  position: absolute;
  content: "";
  border-radius: 999px;
  pointer-events: none;
}

.news-hero::before {
  top: -95px;
  right: 5%;
  width: 310px;
  height: 310px;
  background: rgba(197, 250, 210, 0.14);
}

.news-hero::after {
  right: 25%;
  bottom: -120px;
  width: 240px;
  height: 240px;
  background: rgba(168, 196, 255, 0.16);
}

.news-hero__content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.news-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 13px;
  color: var(--cea-mint);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.news-eyebrow::before {
  width: 48px;
  height: 6px;
  content: "";
  background: #6dd5b0;
  border-radius: 999px;
}

.news-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.news-hero p:last-child {
  max-width: 670px;
  margin: 19px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 2vw, 1.22rem);
  font-weight: 600;
}

.news-main {
  padding: 46px 0 72px;
}

.news-section-title {
  margin: 0 0 22px;
  color: var(--cea-blue);
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.15;
}

/* Noticia más reciente. */
.featured-news {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  overflow: hidden;
  background: var(--cea-white);
  border: 1px solid var(--cea-border);
  border-radius: var(--cea-radius);
  box-shadow: var(--cea-shadow);
}

.featured-news__media {
  position: relative;
  min-width: 0;
  height: clamp(350px, 32vw, 430px);
  overflow: hidden;
  background: linear-gradient(135deg, #dce8ff, #eef4ff);
}

.featured-news__media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.featured-news:hover .featured-news__media img {
  transform: scale(1.025);
}

.featured-news__fallback,
.news-card__fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: rgba(22, 30, 105, 0.42);
  background: linear-gradient(135deg, #dce8ff, #eff8f3);
  font-size: 4rem;
  font-weight: 900;
}

.featured-news__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4vw, 52px);
}

.news-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
  color: var(--cea-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.news-category {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 4px 10px;
  color: var(--cea-blue);
  background: var(--cea-mint);
  border-radius: 999px;
  text-decoration: none;
}

.featured-news h2 {
  margin: 0;
  color: var(--cea-blue);
  font-size: clamp(1.8rem, 3.8vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.featured-news__excerpt {
  margin: 18px 0 25px;
  color: var(--cea-muted);
  font-size: 1rem;
}

.news-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  min-height: 45px;
  padding: 10px 18px;
  color: var(--cea-white);
  background: var(--cea-blue);
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.news-link:hover,
.news-link:focus-visible {
  background: #273aa4;
  transform: translateY(-2px);
}

/* Filtros y tarjetas. */
.news-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 44px 0 22px;
}

.news-toolbar h2 {
  margin: 0;
  color: var(--cea-blue);
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.news-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.news-filter {
  padding: 8px 13px;
  color: var(--cea-blue);
  background: var(--cea-white);
  border: 1px solid var(--cea-border);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.news-filter:hover,
.news-filter:focus-visible,
.news-filter.is-active {
  background: var(--cea-mint);
  border-color: #a8e9b9;
}

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

.news-card {
  min-width: 0;
  overflow: hidden;
  background: var(--cea-white);
  border: 1px solid var(--cea-border);
  border-radius: 17px;
  box-shadow: 0 12px 30px rgba(22, 30, 105, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 38px rgba(22, 30, 105, 0.14);
}

.news-card__media {
  display: block;
  height: 220px;
  overflow: hidden;
  background: var(--cea-sky);
  text-decoration: none;
}

.news-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.news-card:hover .news-card__media img {
  transform: scale(1.035);
}

.news-card__body {
  padding: 20px;
}

.news-card h3 {
  margin: 0;
  color: var(--cea-blue);
  font-size: 1.24rem;
  line-height: 1.25;
}

.news-card h3 a {
  text-decoration: none;
}

.news-card h3 a:hover {
  text-decoration: underline;
  text-decoration-color: #9fe4b2;
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

.news-card__excerpt {
  display: -webkit-box;
  margin: 11px 0 0;
  overflow: hidden;
  color: var(--cea-muted);
  font-size: 0.92rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.news-empty {
  padding: 44px 24px;
  text-align: center;
  background: var(--cea-white);
  border: 1px solid var(--cea-border);
  border-radius: var(--cea-radius);
}

.navigation.pagination {
  margin-top: 34px;
}

.nav-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.page-numbers {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 42px;
  padding: 6px 11px;
  color: var(--cea-blue);
  background: var(--cea-white);
  border: 1px solid var(--cea-border);
  border-radius: 10px;
  font-weight: 900;
  text-decoration: none;
}

.page-numbers.current,
.page-numbers:hover {
  background: var(--cea-mint);
}

/* Noticia individual. */
.article-hero {
  padding: clamp(45px, 7vw, 78px) 0 34px;
  color: var(--cea-white);
  background: linear-gradient(135deg, #101765, #263890);
}

.article-hero__inner {
  max-width: 920px;
}

.article-back {
  display: inline-flex;
  margin-bottom: 22px;
  color: var(--cea-mint);
  font-size: 0.9rem;
  font-weight: 900;
  text-decoration: none;
}

.article-hero h1 {
  margin: 0;
  font-size: clamp(2.25rem, 6vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.article-hero .news-meta {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.76);
}

.article-intro {
  max-width: 760px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 2.2vw, 1.24rem);
}

.article-wrap {
  padding: 36px 0 72px;
}

.article-cover {
  width: min(1040px, 100%);
  max-height: 650px;
  margin: 0 auto 32px;
  overflow: hidden;
  background: var(--cea-sky);
  border-radius: var(--cea-radius);
  box-shadow: var(--cea-shadow);
}

.article-cover img {
  width: 100%;
  max-height: 650px;
  object-fit: cover;
}

.article-content {
  width: min(780px, 100%);
  margin-inline: auto;
  color: #303956;
  font-size: 1.05rem;
}

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

.article-content h2,
.article-content h3 {
  margin-top: 1.8em;
  color: var(--cea-blue);
  line-height: 1.2;
}

.article-content a {
  color: #304bc0;
  font-weight: 800;
}

.article-content .wp-block-gallery {
  margin: 34px calc(50% - 48vw);
  width: 96vw;
  max-width: 1080px;
  transform: translateX(calc(48vw - 50%));
}

.article-content .wp-block-image img,
.article-content .wp-block-gallery img {
  border-radius: 14px;
}

.article-like {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(780px, 100%);
  margin: 42px auto 0;
  padding: 18px 20px;
  background: var(--cea-white);
  border: 1px solid var(--cea-border);
  border-radius: 15px;
}

.article-like p {
  margin: 0;
  color: var(--cea-blue);
  font-weight: 800;
}

.like-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 16px;
  color: var(--cea-blue);
  background: var(--cea-sky);
  border: 1px solid #cbdcff;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
}

.like-button__heart {
  font-size: 1.2rem;
  line-height: 1;
}

.like-button[aria-pressed="true"] {
  color: #126b35;
  background: #e7faed;
  border-color: #a7e6b8;
}

.related-news {
  margin-top: 56px;
}

/* Pie institucional. */
.cea-footer {
  padding: 34px 20px;
  color: var(--cea-white);
  background: var(--cea-blue-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cea-footer__inner {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr auto;
  align-items: center;
  gap: 28px;
}

.cea-footer__brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.cea-footer__brand img {
  width: 48px;
  height: 48px;
  padding: 6px;
  object-fit: contain;
  background: var(--cea-white);
  border-radius: 8px;
}

.cea-footer__brand strong,
.cea-footer__brand span,
.cea-footer__contact span,
.cea-footer__contact a {
  display: block;
}

.cea-footer__brand strong {
  line-height: 1.25;
}

.cea-footer__brand span,
.cea-footer__contact {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.9rem;
  font-weight: 600;
}

.cea-footer__contact {
  display: grid;
  gap: 4px;
}

.cea-footer a {
  color: var(--cea-white);
  text-decoration: none;
}

.cea-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.cea-footer__links a {
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

@media (max-width: 1000px) {
  .cea-nav__list {
    gap: 0.85rem;
  }

  .cea-nav a,
  .cea-submenu-toggle {
    font-size: 0.82rem;
  }

  .featured-news {
    grid-template-columns: 1.08fr 0.92fr;
  }

  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .cea-header {
    padding: 0 18px;
  }

  .cea-menu-open,
  .cea-menu-close {
    display: inline-grid;
    place-items: center;
  }

  .cea-nav {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 1002;
    width: min(86vw, 340px);
    height: 100dvh;
    padding: 84px 22px 26px;
    overflow-y: auto;
    background: #101865;
    box-shadow: -18px 0 42px rgba(0, 0, 0, 0.3);
    transform: translateX(105%);
    transition: transform 0.28s ease;
  }

  .cea-nav.is-open {
    transform: translateX(0);
  }

  .cea-menu-close {
    position: absolute;
    top: 18px;
    right: 18px;
  }

  .cea-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
  }

  .cea-nav a,
  .cea-submenu-toggle {
    display: flex;
    align-items: center;
    min-height: 50px;
    padding: 10px 12px;
    font-size: 0.98rem;
  }

  .cea-submenu {
    position: static;
    display: none;
    padding: 2px 0 7px 12px;
    box-shadow: none;
    background: transparent;
  }

  .cea-submenu-parent.is-open .cea-submenu {
    display: block;
  }

  .cea-submenu-parent:hover .cea-submenu {
    display: none;
  }

  .cea-submenu-parent.is-open:hover .cea-submenu {
    display: block;
  }

  .cea-nav .cea-enrollment {
    justify-content: center;
    margin-top: 8px;
  }

  .featured-news {
    grid-template-columns: 1fr;
  }

  .featured-news__media {
    height: 340px;
  }

  .news-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .news-filters {
    justify-content: flex-start;
  }

  .cea-footer__inner {
    grid-template-columns: 1fr 1fr;
  }

  .cea-footer__links {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 600px) {
  .cea-shell {
    width: min(100% - 28px, 1180px);
  }

  .cea-brand span {
    font-size: 0.88rem;
  }

  .cea-brand img {
    width: 45px;
    height: 45px;
  }

  .news-hero {
    padding: 45px 0 48px;
  }

  .news-hero h1 {
    font-size: clamp(2.35rem, 15vw, 3.4rem);
  }

  .news-main {
    padding: 28px 0 52px;
  }

  .featured-news__media {
    height: 235px;
  }

  .featured-news__body {
    padding: 25px 21px 28px;
  }

  .featured-news h2 {
    font-size: 1.75rem;
  }

  .news-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .news-card {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .news-card__media {
    height: 100%;
    min-height: 160px;
  }

  .news-card__body {
    padding: 16px;
  }

  .news-card h3 {
    font-size: 1.05rem;
  }

  .news-card__excerpt {
    -webkit-line-clamp: 2;
  }

  .article-hero {
    padding: 38px 0 28px;
  }

  .article-wrap {
    padding-top: 20px;
  }

  .article-cover {
    margin-bottom: 24px;
    border-radius: 14px;
  }

  .article-content {
    font-size: 1rem;
  }

  .article-like {
    align-items: flex-start;
    flex-direction: column;
  }

  .cea-footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .cea-footer__brand {
    justify-content: center;
  }

  .cea-footer__links {
    grid-column: auto;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
