:root {
  --azul-profundo: #355a78;
  --azul-logo: #4b84b3;
  --azul-vivo: #0b78a8;
  --azul-cielo: #dceff7;
  --azul-muy-claro: #f2f8fb;
  --azul-oscuro: #183e59;
  --blanco: #ffffff;
  --texto: #193244;
  --sombra: 0 12px 35px rgba(24, 62, 89, .14);
  --radio: 8px;
  --max: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--texto);
  background: var(--blanco);
  line-height: 1.6;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
}

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.97);
  border-top: 4px solid var(--azul-logo);
  box-shadow: 0 3px 18px rgba(24,62,89,.10);
}

.header-inner {
  min-height: 92px;
  width: min(calc(100% - 48px), 1240px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.brand img {
  width: 160px;
  height: 86px;
  object-fit: contain;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  font-weight: 700;
  color: var(--azul-profundo);
}

.main-nav a {
  position: relative;
  padding: 8px 0;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--azul-vivo);
  transition: right .25s ease;
}

.main-nav a:hover::after {
  right: 0;
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  padding: 8px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 27px;
  height: 3px;
  margin: 5px 0;
  background: var(--azul-profundo);
}

/* HERO / CARRUSEL */
.hero-carousel {
  position: relative;
  height: min(76vh, 720px);
  min-height: 540px;
  overflow: hidden;
  background: var(--azul-oscuro);
}

.slides,
.slide {
  position: absolute;
  inset: 0;
}

.slide {
  opacity: 0;
  visibility: hidden;
  transition: opacity .7s ease;
}

.slide.is-active {
  opacity: 1;
  visibility: visible;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10,70,101,.78) 0%, rgba(10,92,126,.42) 42%, rgba(10,92,126,.10) 78%),
    linear-gradient(0deg, rgba(12,48,70,.38), transparent 55%);
}

.slide-caption {
  position: absolute;
  left: max(24px, calc((100vw - var(--max)) / 2));
  bottom: 110px;
  width: min(570px, calc(100% - 48px));
  color: var(--blanco);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 13px;
  font-weight: 800;
}

.eyebrow.blue {
  color: var(--azul-vivo);
}

.slide-caption h1,
.slide-caption h2 {
  margin: 0 0 16px;
  font-size: clamp(40px, 5.4vw, 78px);
  line-height: .98;
  letter-spacing: -.035em;
}

.slide-caption p {
  max-width: 560px;
  margin: 0 0 24px;
  font-size: clamp(16px, 1.6vw, 21px);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 22px;
  border-radius: 4px;
  font-weight: 800;
  border: 2px solid transparent;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-light {
  color: var(--azul-oscuro);
  background: var(--blanco);
}

.button-primary {
  color: var(--blanco);
  background: var(--azul-vivo);
  cursor: pointer;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 50%;
  background: rgba(8,55,79,.34);
  color: white;
  font-size: 35px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.carousel-arrow:hover {
  background: rgba(8,55,79,.7);
}

.carousel-arrow.prev { left: 22px; }
.carousel-arrow.next { right: 22px; }

.carousel-dots {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  gap: 9px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid white;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.carousel-dot.is-active {
  background: white;
}

/* SECCIONES */
.section {
  padding: 100px 0;
}

.section-light {
  background: var(--blanco);
}

.section-blue {
  color: var(--blanco);
  background: linear-gradient(135deg, var(--azul-oscuro), var(--azul-profundo));
}

.section-heading {
  max-width: 700px;
  margin-bottom: 44px;
}

.section-heading h2,
.split h2,
.contact h2,
.history-box h2,
.publications h2 {
  margin: 0 0 18px;
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1;
  letter-spacing: -.035em;
}

.section-heading p {
  margin: 0;
  font-size: 18px;
  opacity: .84;
}

.section-heading.dark {
  color: var(--texto);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.split p {
  margin-top: 0;
  font-size: 19px;
}

.text-link {
  color: var(--azul-vivo);
  font-weight: 800;
}

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

.card {
  min-height: 310px;
  padding: 30px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radio);
  background: rgba(255,255,255,.08);
  transition: transform .25s ease, background .25s ease;
}

.card:hover {
  transform: translateY(-6px);
  background: rgba(255,255,255,.13);
}

.card-number {
  color: #8fd0ea;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 50px;
}

.card h3 {
  font-size: 26px;
  line-height: 1.1;
  margin: 0 0 14px;
}

.card p {
  opacity: .86;
}

.card a {
  display: inline-block;
  margin-top: 12px;
  color: #bce6f5;
  font-weight: 800;
}

/* ACTIVIDADES */
.activity-list {
  border-top: 1px solid #c8dbe4;
}

.activity-list article {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 20px;
  padding: 27px 0;
  border-bottom: 1px solid #c8dbe4;
}

.activity-list article > span {
  color: var(--azul-logo);
  font-size: 14px;
  font-weight: 800;
}

.activity-list h3 {
  margin: 0 0 5px;
  font-size: 25px;
}

.activity-list p {
  margin: 0;
}

/* PUBLICACIONES */
.publications {
  color: var(--blanco);
  background: var(--azul-vivo);
}

.publication-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 60px;
  align-items: center;
}

.publications p {
  max-width: 520px;
  font-size: 19px;
  margin-bottom: 28px;
}

.publication-image {
  overflow: hidden;
  border-radius: var(--radio);
  box-shadow: var(--sombra);
}

.publication-image img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

/* HISTORIA */
.history {
  background: var(--azul-muy-claro);
}

.history-box {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.history-box p {
  font-size: 20px;
}

/* CONTACTO */
.contact {
  color: var(--blanco);
  background: var(--azul-oscuro);
}

.contact-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 70px;
}

.contact form {
  display: grid;
  gap: 17px;
}

.contact label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.contact input,
.contact textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 4px;
  background: rgba(255,255,255,.08);
  color: white;
  font: inherit;
}

.contact input:focus,
.contact textarea:focus {
  outline: 2px solid #7dc9e5;
  outline-offset: 1px;
}

.form-note {
  margin: 0;
  font-size: 13px;
  opacity: .68;
}

/* FOOTER */
.site-footer {
  padding: 35px 0;
  color: var(--blanco);
  background: #102d40;
}

.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 25px;
}

.footer-inner img {
  width: 100px;
  height: 70px;
  object-fit: contain;
}

.footer-inner p {
  margin: 3px 0 0;
  opacity: .7;
  font-size: 14px;
}

.footer-inner > a {
  color: #9bd6e9;
  font-weight: 800;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .main-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 92px;
    display: none;
    padding: 18px 24px 25px;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    background: white;
    box-shadow: 0 15px 25px rgba(24,62,89,.12);
  }

  .main-nav.is-open {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .hero-carousel {
    min-height: 610px;
  }

  .slide-caption {
    bottom: 90px;
  }

  .split,
  .publication-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 35px;
  }

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

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

  .footer-inner > a {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .container {
    width: min(calc(100% - 32px), var(--max));
  }

  .header-inner {
    width: calc(100% - 32px);
  }

  .brand img {
    width: 125px;
    height: 72px;
  }

  .hero-carousel {
    height: 74vh;
    min-height: 560px;
  }

  .slide img {
    object-position: center;
  }

  .slide-overlay {
    background:
      linear-gradient(90deg, rgba(10,70,101,.78), rgba(10,92,126,.20)),
      linear-gradient(0deg, rgba(12,48,70,.58), transparent 70%);
  }

  .slide-caption {
    left: 16px;
    bottom: 88px;
    width: calc(100% - 32px);
  }

  .slide-caption h1,
  .slide-caption h2 {
    font-size: 42px;
  }

  .carousel-arrow {
    width: 40px;
    height: 40px;
    font-size: 28px;
  }

  .carousel-arrow.prev { left: 10px; }
  .carousel-arrow.next { right: 10px; }

  .section {
    padding: 72px 0;
  }

  .section-heading h2,
  .split h2,
  .contact h2,
  .history-box h2,
  .publications h2 {
    font-size: 42px;
  }

  .publication-image img {
    height: 270px;
  }
}

/* COMUNIDAD CEPES / DONACIONES */
.community {
  background: linear-gradient(180deg, var(--azul-muy-claro), #ffffff);
}

.community-intro {
  max-width: 760px;
  margin: 0 auto 45px;
  text-align: center;
}

.community-intro h2 {
  margin: 0 0 18px;
  color: var(--azul-oscuro);
  font-size: clamp(42px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -.035em;
}

.community-intro p {
  margin: 0;
  font-size: 19px;
  color: var(--texto);
}

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

.donation-card {
  min-height: 190px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #b8d5e2;
  border-radius: var(--radio);
  background: white;
  color: var(--azul-oscuro);
  box-shadow: 0 8px 24px rgba(24, 62, 89, .08);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.donation-card:hover {
  transform: translateY(-5px);
  background: var(--azul-vivo);
  color: white;
  box-shadow: 0 14px 30px rgba(24, 62, 89, .18);
}

.donation-label {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 12px;
  font-weight: 800;
  opacity: .75;
}

.donation-card strong {
  display: block;
  margin: 8px 0;
  font-size: clamp(32px, 3.2vw, 46px);
  line-height: 1;
  letter-spacing: -.03em;
}

.donation-action {
  font-weight: 800;
  color: var(--azul-vivo);
}

.donation-card:hover .donation-action {
  color: white;
}

.community-note {
  max-width: 780px;
  margin: 25px auto 0;
  text-align: center;
  color: #617987;
  font-size: 13px;
}

@media (max-width: 900px) {
  .donation-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .donation-grid {
    grid-template-columns: 1fr;
  }

  .donation-card {
    min-height: 160px;
  }
}

/* PÁGINAS INTERIORES */
.detail-hero {
  padding: 110px 0 90px;
  background: linear-gradient(135deg, var(--azul-muy-claro), var(--azul-cielo));
  border-bottom: 1px solid rgba(53,90,120,.10);
}

.detail-hero-inner { max-width: 980px; }
.detail-hero h1 {
  max-width: 950px;
  margin: 0 0 18px;
  color: var(--azul-oscuro);
  font-size: clamp(44px, 6vw, 82px);
  line-height: .98;
  letter-spacing: -.045em;
}
.detail-hero p {
  margin: 0;
  color: var(--azul-profundo);
  font-size: 20px;
  font-weight: 700;
}

.detail-content { background: var(--blanco); }
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr);
  gap: 70px;
  align-items: start;
}
.detail-section {
  padding: 0 0 52px;
  margin-bottom: 48px;
  border-bottom: 1px solid #dce8ee;
}
.detail-section:last-child { margin-bottom: 0; }
.detail-section h2 {
  margin: 0 0 18px;
  color: var(--azul-oscuro);
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.05;
}
.detail-section h3 { color: var(--azul-vivo); margin-bottom: 8px; }
.detail-section p, .detail-section li { font-size: 18px; }
.detail-section ul { padding-left: 22px; }
.detail-image {
  position: sticky;
  top: 125px;
  overflow: hidden;
  border-radius: var(--radio);
  box-shadow: var(--sombra);
}
.detail-image img { width: 100%; height: auto; }
.editable-box {
  margin-top: 20px;
  padding: 22px;
  border-left: 4px solid var(--azul-vivo);
  background: var(--azul-muy-claro);
  color: var(--azul-profundo);
}
.detail-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.detail-columns > div {
  padding: 22px;
  border: 1px solid #dce8ee;
  border-radius: var(--radio);
  background: #fbfdfe;
}
.detail-columns p { font-size: 16px; margin-bottom: 0; }
.detail-cta {
  padding: 0 0 100px;
  background: var(--blanco);
}

/* PREVISUALIZACIÓN DEL INSTITUTO */
.institute-preview {
  background: var(--azul-muy-claro);
}
.institute-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.institute-grid h2 {
  margin: 0;
  color: var(--azul-oscuro);
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1;
  letter-spacing: -.035em;
}
.institute-grid p { font-size: 19px; margin-top: 0; }

@media (max-width: 1050px) {
  .main-nav { gap: 15px; font-size: 13px; }
  .header-inner { gap: 18px; }
}

@media (max-width: 900px) {
  .main-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px 24px 22px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 12px 24px rgba(24,62,89,.12);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 11px 0; }
  .menu-toggle { display: block; }
  .detail-layout, .institute-grid { grid-template-columns: 1fr; gap: 45px; }
  .detail-image { position: static; max-width: 720px; }
}

@media (max-width: 700px) {
  .container { width: min(calc(100% - 32px), var(--max)); }
  .header-inner { width: min(calc(100% - 32px), 1240px); min-height: 78px; }
  .brand img { width: 92px; height: 58px; }
  .hero-carousel { min-height: 560px; height: 72vh; }
  .slide-caption { left: 20px; bottom: 92px; width: calc(100% - 40px); }
  .slide-caption h1, .slide-caption h2 { font-size: clamp(34px, 10vw, 52px); }
  .section { padding: 72px 0; }
  .split, .cards, .detail-columns { grid-template-columns: 1fr; gap: 28px; }
  .publication-grid, .contact-grid { grid-template-columns: 1fr; }
  .detail-hero { padding: 80px 0 65px; }
  .detail-hero h1 { font-size: clamp(40px, 12vw, 60px); }
}

/* =========================================================
   REDISEÑO CEPES — CABECERA Y ESTÉTICA INSTITUCIONAL
   ========================================================= */
:root {
  --azul-header: #0d6f98;
  --azul-header-2: #164b67;
  --azul-acento: #1598ca;
  --azul-suave: #eaf5f9;
  --gris-fondo: #f5f9fb;
  --radio: 8px;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #fff;
}

/* CABECERA */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border: 0;
  background: linear-gradient(100deg, #0b91bd 0%, #0c6f96 45%, #173f55 100%);
  box-shadow: 0 5px 20px rgba(8, 54, 76, .20);
}

.header-inner {
  width: min(calc(100% - 44px), 1560px);
  min-height: 96px;
  gap: 20px;
}

.brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.brand img {
  width: 255px;
  height: 78px;
  object-fit: contain;
}

.anniversary {
  flex: 0 0 auto;
  min-height: 58px;
  padding-left: 24px;
  border-left: 1px solid rgba(255,255,255,.55);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.02;
}

.anniversary strong {
  font-size: 31px;
  letter-spacing: .02em;
  font-weight: 700;
}

.anniversary span {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .07em;
}

.main-nav {
  flex: 1 1 auto;
  justify-content: flex-end;
  gap: clamp(12px, 1.25vw, 23px);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.main-nav a {
  padding: 8px 0;
  opacity: .98;
  transition: opacity .2s ease, transform .2s ease;
}

.main-nav a::after {
  height: 2px;
  background: #fff;
}

.main-nav a:hover {
  opacity: .72;
  transform: translateY(-1px);
}

.social-links {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 2px;
}

.social-icon {
  width: 37px;
  height: 37px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--azul-header-2);
  background: #fff;
  border: 1px solid rgba(255,255,255,.55);
  transition: transform .2s ease, background .2s ease, color .2s ease;
}

.social-icon:hover {
  transform: translateY(-2px);
  color: #fff;
  background: var(--azul-acento);
}

.social-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-icon:nth-child(2) svg,
.social-icon:nth-child(4) svg,
.social-icon:nth-child(5) svg {
  fill: currentColor;
  stroke: none;
}

.menu-toggle {
  color: #fff;
}

.menu-toggle span {
  background: #fff;
}

/* HERO SPLIT, COMO EN LA REFERENCIA */
.hero-carousel {
  height: min(64vh, 620px);
  min-height: 500px;
  background: #edf7fa;
}

.slide {
  display: grid;
  grid-template-columns: 34% 66%;
  background: #f4fafc;
}

.slide img {
  grid-column: 2;
  grid-row: 1;
  object-position: center;
}

.slide-overlay {
  display: none;
}

.slide-caption {
  position: relative;
  left: auto;
  bottom: auto;
  z-index: 2;
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  width: auto;
  padding: 50px clamp(28px, 5vw, 82px);
  color: var(--azul-profundo);
}

.slide-caption .eyebrow {
  color: var(--azul-vivo);
  font-size: 12px;
  letter-spacing: .2em;
}

.slide-caption h1,
.slide-caption h2 {
  max-width: 480px;
  margin: 0 0 18px;
  color: #146a92;
  font-size: clamp(42px, 4.2vw, 68px);
  line-height: .98;
  letter-spacing: -.045em;
}

.slide-caption p {
  max-width: 430px;
  margin: 0 0 25px;
  color: #4e7183;
  font-size: 17px;
  line-height: 1.55;
}

.button {
  min-height: 44px;
  padding: 10px 23px;
  border-radius: 999px;
}

.button-light {
  color: #fff;
  background: var(--azul-acento);
  box-shadow: 0 8px 20px rgba(21,152,202,.20);
}

.button-light:hover {
  background: #0d7fa9;
}

.carousel-arrow {
  width: 43px;
  height: 43px;
  border: 0;
  background: #fff;
  color: var(--azul-vivo);
  box-shadow: 0 4px 15px rgba(24,62,89,.15);
  font-size: 31px;
}

.carousel-arrow:hover {
  background: #fff;
  color: var(--azul-oscuro);
}

.carousel-arrow.prev { left: 36%; }
.carousel-arrow.next { right: 18px; }

.carousel-dots {
  left: 68%;
  bottom: 18px;
  gap: 10px;
}

.carousel-dot {
  width: 9px;
  height: 9px;
  border-color: #fff;
  background: transparent;
  box-shadow: 0 1px 5px rgba(0,0,0,.25);
}

.carousel-dot.is-active {
  background: #fff;
}

/* SECCIONES */
.section {
  padding: 76px 0;
}

.section-light,
.section-blue,
.history,
.community {
  background: #f7fbfc;
}

.section-heading,
.community-intro {
  margin-bottom: 28px;
}

.section-heading h2,
.split h2,
.contact h2,
.history-box h2,
.publications h2,
.community-intro h2 {
  color: #156b92;
  font-size: clamp(38px, 4vw, 56px);
}

.eyebrow {
  color: var(--azul-vivo);
  font-size: 11px;
  letter-spacing: .22em;
}

/* TARJETAS DE PROYECTOS */
#proyectos.section-blue {
  color: var(--texto);
  background: linear-gradient(180deg, #eef7fa 0%, #f9fcfd 100%);
}

#proyectos .section-heading p {
  color: #587789;
}

.cards {
  gap: 20px;
}

.card {
  min-height: 0;
  padding: 0 0 22px;
  overflow: hidden;
  border: 1px solid #cfe1e8;
  border-radius: 8px;
  background: #fff;
  color: var(--texto);
  box-shadow: 0 6px 18px rgba(24,62,89,.06);
  transition: transform .25s ease, box-shadow .25s ease;
}

.card:hover {
  transform: translateY(-5px);
  background: #fff;
  box-shadow: 0 14px 30px rgba(24,62,89,.12);
}

.card-image {
  height: 145px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

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

.card-number,
.card h3,
.card p,
.card a {
  margin-left: 20px;
  margin-right: 20px;
}

.card-number {
  margin-top: 16px;
  margin-bottom: 4px;
  color: var(--azul-vivo);
  font-size: 11px;
}

.card h3 {
  margin-bottom: 10px;
  color: #155e80;
  font-size: 22px;
}

.card p {
  color: #5b7787;
  font-size: 15px;
}

.card a {
  color: var(--azul-vivo);
  font-size: 14px;
}

/* BLOQUES INSTITUCIONALES */
.institute-preview {
  background: #fff;
  border-top: 1px solid #e0edf2;
  border-bottom: 1px solid #e0edf2;
}

.institute-grid,
.publication-grid {
  align-items: center;
}

.publications {
  background: linear-gradient(100deg, #0b91bd, #126c94);
}

.community {
  background: #f7fbfc;
}

.donation-card {
  border-radius: 9px;
}

/* FOOTER */
.site-footer {
  background: #103e56;
}

.footer-inner img {
  width: 180px;
  height: 72px;
}

/* PÁGINAS INTERIORES */
.detail-hero {
  padding: 80px 0 70px;
  background: linear-gradient(120deg, #eef8fb, #dceff7);
}

.detail-content {
  background: #fff;
}

/* RESPONSIVE DEL REDISEÑO */
@media (max-width: 1250px) {
  .brand img { width: 220px; }
  .anniversary { display: none; }
  .main-nav { gap: 14px; font-size: 11.5px; }
  .social-icon { width: 34px; height: 34px; }
}

@media (max-width: 1080px) {
  .header-inner { min-height: 82px; }
  .main-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 82px;
    display: none;
    padding: 18px 24px 25px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: #114e69;
    box-shadow: 0 15px 25px rgba(24,62,89,.20);
  }
  .main-nav.is-open { display: flex; }
  .menu-toggle { display: block; }
  .social-links { margin-left: auto; }
  .hero-carousel { min-height: 470px; }
}

@media (max-width: 760px) {
  .header-inner { width: calc(100% - 28px); }
  .brand img { width: 190px; height: 65px; }
  .social-links { display: none; }
  .slide { grid-template-columns: 1fr; }
  .slide img {
    grid-column: 1;
    grid-row: 1;
    opacity: .32;
  }
  .slide-caption {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    padding: 35px 24px 82px;
  }
  .slide-caption h1,
  .slide-caption h2 { font-size: 42px; }
  .slide-caption p { color: #355a6e; }
  .carousel-arrow.prev { left: 12px; }
  .carousel-arrow.next { right: 12px; }
  .carousel-dots { left: 50%; }
  .cards { grid-template-columns: 1fr; }
  .card-image { height: 175px; }
}

@media (max-width: 600px) {
  .brand img { width: 165px; height: 60px; }
  .hero-carousel { height: 620px; min-height: 620px; }
  .section { padding: 62px 0; }
  .slide-caption h1,
  .slide-caption h2 { font-size: 38px; }
}

/* PROYECTOS QUE TRANSFORMAN — interfaz de tarjetas */
.projects-transform {
  background: linear-gradient(180deg, #f5fbfe 0%, #ffffff 100%);
  color: var(--texto);
  padding-top: 72px;
  padding-bottom: 72px;
}

.projects-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 30px;
}

.projects-header .eyebrow {
  margin-bottom: 8px;
  color: var(--azul-vivo);
  font-size: 11px;
  letter-spacing: .22em;
}

.projects-header h2 {
  margin: 0;
  color: #116b98;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: -.035em;
}

.projects-all-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  padding: 10px 20px 10px 24px;
  border: 1.5px solid #1698d0;
  border-radius: 999px;
  color: #117cad;
  background: rgba(255,255,255,.82);
  font-size: 14px;
  font-weight: 800;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.projects-all-button span {
  font-size: 21px;
  line-height: 1;
}

.projects-all-button:hover {
  transform: translateY(-2px);
  background: #fff;
  box-shadow: 0 8px 22px rgba(17,124,173,.12);
}

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

.project-card-transform {
  overflow: hidden;
  background: #fff;
  border: 1px solid #d3e2e9;
  border-radius: 8px;
  box-shadow: 0 7px 22px rgba(24,62,89,.07);
  border-left: 4px solid #1596cf;
  transition: transform .25s ease, box-shadow .25s ease;
}

.project-card-transform:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 32px rgba(24,62,89,.13);
}

.project-card-photo {
  height: 150px;
  overflow: hidden;
  background: #dceff7;
}

.project-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .35s ease;
}

.project-card-transform:hover .project-card-photo img {
  transform: scale(1.035);
}

.project-card-content {
  min-height: 196px;
  padding: 15px 18px 16px;
}

.project-card-content h3 {
  margin: 0 0 7px;
  color: #075d89;
  font-size: 21px;
  line-height: 1.15;
}

.project-card-content p {
  margin: 0 0 11px;
  color: #4a7590;
  font-size: 14px;
  line-height: 1.45;
}

.project-card-content a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #0794cf;
  font-size: 13px;
  font-weight: 800;
}

.project-card-content a span {
  font-size: 19px;
  line-height: 1;
  transition: transform .2s ease;
}

.project-card-content a:hover span {
  transform: translateX(4px);
}

@media (max-width: 900px) {
  .projects-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-cards-transform {
    grid-template-columns: 1fr;
  }

  .project-card-photo {
    height: 190px;
  }
}

@media (max-width: 560px) {
  .projects-transform {
    padding-top: 55px;
    padding-bottom: 55px;
  }

  .projects-header h2 {
    font-size: 35px;
  }

  .projects-all-button {
    width: 100%;
    justify-content: center;
  }

  .project-card-content {
    min-height: auto;
  }
}

/* ==========================================================
   PÁGINAS NUEVAS: ACTIVIDADES + COMUNIDAD CEPES
   ========================================================== */

/* Mejor contraste en las secciones azules del inicio */
.publications h2,
.contact h2,
.publications .eyebrow,
.contact .eyebrow {
  color: #ffffff !important;
}

.publications .button-light {
  color: var(--azul-oscuro);
}

/* Agenda semanal */
.activities-hero,
.community-hero {
  background: linear-gradient(135deg, #eaf5f9 0%, #d8edf5 100%);
}

.activities-page {
  background: #fff;
}

.weekly-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.day-card {
  min-width: 0;
  border: 1px solid #c7dce5;
  border-radius: var(--radio);
  background: #f9fcfd;
  overflow: hidden;
  box-shadow: 0 7px 20px rgba(24,62,89,.07);
}

.day-card > header {
  padding: 17px 14px 14px;
  color: #fff;
  background: linear-gradient(135deg, #156b92, #0b78a8);
}

.day-card > header span {
  display: block;
  margin-bottom: 3px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .15em;
  opacity: .78;
}

.day-card > header strong {
  font-size: 20px;
  line-height: 1.1;
}

.schedule-item {
  padding: 16px 14px;
  border-bottom: 1px solid #dbe8ed;
}

.schedule-item:last-child {
  border-bottom: 0;
}

.schedule-item time {
  display: inline-block;
  margin-bottom: 6px;
  color: #0b78a8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}

.schedule-item h3 {
  margin: 0 0 5px;
  color: #183e59;
  font-size: 16px;
  line-height: 1.2;
}

.schedule-item p {
  margin: 0;
  color: #5b7180;
  font-size: 12px;
  line-height: 1.45;
}

.day-card-empty .empty-day {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  color: #708792;
}

.day-card-empty .empty-day span {
  font-size: 30px;
  color: #b2c9d3;
}

.day-card-empty .empty-day p {
  margin: 8px 0 0;
  font-size: 13px;
}

.calendar-note {
  max-width: 900px;
  margin: 22px auto 0;
  text-align: center;
  color: #657b87;
  font-size: 13px;
}

/* Comunidad CEPES */
.community-page {
  background: linear-gradient(180deg, #f7fbfc, #fff);
}

.community-page-intro {
  max-width: 820px;
  margin: 0 auto 42px;
  text-align: center;
}

.community-page-intro h2 {
  margin: 0 0 18px;
  color: #156b92;
  font-size: clamp(38px, 4vw, 56px);
  line-height: 1;
  letter-spacing: -.035em;
}

.community-page-intro p {
  margin: 0;
  color: var(--texto);
  font-size: 18px;
}

.benefits-section {
  background: #fff;
}

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

.benefit-card {
  min-height: 205px;
  padding: 25px;
  border: 1px solid #c7dce5;
  border-radius: var(--radio);
  background: #f9fcfd;
  box-shadow: 0 7px 20px rgba(24,62,89,.06);
}

.benefit-card > span {
  display: block;
  margin-bottom: 24px;
  color: #0b78a8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
}

.benefit-card h3 {
  margin: 0 0 10px;
  color: #183e59;
  font-size: 21px;
  line-height: 1.18;
}

.benefit-card p {
  margin: 0;
  color: #5b7180;
  font-size: 14px;
}

.community-how {
  background: #eaf5f9;
}

.community-how-inner {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 70px;
  align-items: start;
}

.community-how h2 {
  margin: 0;
  color: #156b92;
  font-size: clamp(38px, 4vw, 56px);
  line-height: 1;
}

.community-how p {
  margin: 0;
  font-size: 19px;
}

@media (max-width: 1100px) {
  .weekly-calendar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .weekly-calendar,
  .benefits-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .community-how-inner {
    grid-template-columns: 1fr;
    gap: 25px;
  }
}

@media (max-width: 520px) {
  .weekly-calendar,
  .benefits-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================
   HEROES INTERNOS — FOTO + AZUL PROFUNDO
   ========================================================== */
.detail-hero {
  position: relative;
  isolation: isolate;
  min-height: 360px;
  padding: 105px 0 95px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
  background: #123f58;
  border-bottom: 0;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: .19;
  transform: scale(1.015);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 48, 69, .96) 0%, rgba(13, 70, 96, .86) 52%, rgba(16, 67, 91, .82) 100%),
    linear-gradient(0deg, rgba(5, 34, 50, .38), rgba(5, 34, 50, .12));
}

/* Una imagen relacionada con cada sección. La foto queda deliberadamente
   tenue para funcionar como textura visual sin competir con el texto. */
.about-hero::before { background-image: url("imagenes/cepes-ext.png"); }
.activities-hero::before { background-image: url("imagenes/talleres-cepes.png"); }
.ediciones-hero::before { background-image: url("imagenes/libros-cepes.png"); }
.community-hero::before { background-image: url("imagenes/ronda-cepes.png"); }
.cultura-hero::before { background-image: url("imagenes/fijo-cultu.png"); }
.institute-hero::before { background-image: url("imagenes/dr-discurso.png"); }
.proyecto-hero::before { background-image: url("imagenes/peron-cepes.png"); }
.trabajo-hero::before { background-image: url("imagenes/trabajo-soc.png"); }

.detail-hero-inner {
  position: relative;
  z-index: 1;
}

.detail-hero .eyebrow,
.detail-hero .eyebrow.blue {
  color: rgba(255,255,255,.90);
}

.detail-hero h1 {
  color: #fff;
  text-shadow: 0 2px 18px rgba(3, 28, 42, .20);
}

.detail-hero p {
  color: rgba(255,255,255,.90);
}

/* Evita que las reglas específicas anteriores de Actividades y Comunidad
   vuelvan a convertir estos heroes en un bloque celeste plano. */
.activities-hero,
.community-hero {
  background: #123f58;
}

@media (max-width: 700px) {
  .detail-hero {
    min-height: 310px;
    padding: 82px 0 70px;
  }

  .detail-hero::before {
    opacity: .16;
  }

  .detail-hero::after {
    background:
      linear-gradient(90deg, rgba(8, 48, 69, .96), rgba(13, 70, 96, .88)),
      linear-gradient(0deg, rgba(5, 34, 50, .34), rgba(5, 34, 50, .12));
  }
}
