/* ───────────── Tema "Corporativo" (no-radio) ─────────────
   Sobrio y profesional: header limpio, hero con imagen opcional,
   noticias y accesos a Nosotros/Contacto. Hereda los colores de marca. */

/* Header */
.corp-nav { background: rgb(var(--surface)); border-bottom: 1px solid rgb(var(--border)); position: sticky; top: 0; z-index: 50; }
.corp-brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: rgb(var(--text)); text-decoration: none; }
.corp-brand img { height: 54px; width: auto; object-fit: contain; }
.corp-brand span { font-family: var(--font-heading); font-weight: 800; font-size: 19px; letter-spacing: -.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.corp-links { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 600; }
.corp-links a { color: rgb(var(--text) / .78); }
.corp-links a:hover { color: rgb(var(--primary)); }
.corp-cta { display: inline-flex; align-items: center; gap: 7px; background: rgb(var(--primary)); color: rgb(var(--on-primary)); font-weight: 700; padding: 10px 18px; border-radius: 10px; white-space: nowrap; }
.corp-cta:hover { background: rgb(var(--primary-strong)); }
.corp-cta-ghost { background: transparent; color: #fff; border: 1.5px solid rgb(255 255 255 / .6); }
.corp-cta-ghost:hover { background: rgb(255 255 255 / .14); }

/* Hero */
.corp-hero { position: relative; color: #fff; padding: clamp(72px, 13vw, 150px) 0; text-align: center; overflow: hidden;
  background: linear-gradient(135deg, rgb(var(--primary-strong)), rgb(var(--primary)));
  background-size: cover; background-position: center; }
/* Con foto de portada: la foto es el fondo y el degradado pasa a ser un velo
   encima (para que el texto y el logo se lean sin tapar la imagen). */
.corp-hero.has-cover { background-image: var(--corp-hero); }
.corp-hero.has-cover::before { content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, rgb(0 0 0 / .32), rgb(var(--primary-strong) / .74)); }
.corp-hero-in { position: relative; z-index: 1; max-width: 820px; }
/* Logo destacado en la portada (tarjeta blanca para que resalte sobre la foto) */
.corp-hero-logo { display: block; height: clamp(84px, 14vw, 120px); width: auto; object-fit: contain;
  margin: 0 auto clamp(18px, 3vw, 28px); background: #fff; border-radius: 22px; padding: 12px 18px;
  box-shadow: 0 18px 44px -18px rgb(0 0 0 / .55); }
.corp-hero h1 { font-family: var(--font-heading); font-weight: 800; font-size: clamp(30px, 6vw, 54px); line-height: 1.05; margin: 0;
  text-shadow: 0 2px 18px rgb(0 0 0 / .32); }
.corp-hero-lema { font-size: clamp(16px, 2.4vw, 20px); opacity: .95; max-width: 640px; margin: 16px auto 0; text-shadow: 0 1px 12px rgb(0 0 0 / .3); }
.corp-hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

/* Secciones */
.corp-sec { padding: clamp(40px, 7vw, 72px) 0; }
.corp-sec#noticias { background: rgb(var(--bg)); }

/* Accesos Nosotros / Contacto */
.corp-accesos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.corp-acceso { display: flex; flex-direction: column; gap: 4px; padding: 28px; border-radius: 18px;
  background: rgb(var(--surface)); border: 1px solid rgb(var(--border)); color: rgb(var(--text)); transition: transform .15s ease, box-shadow .2s ease; }
.corp-acceso:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -22px rgb(var(--primary) / .5); border-color: rgb(var(--primary) / .5); }
.corp-acceso .material-symbols-outlined { font-size: 34px; color: rgb(var(--primary)); margin-bottom: 8px; }
.corp-acceso b { font-family: var(--font-heading); font-size: 20px; font-weight: 800; }
.corp-acceso i { font-style: normal; color: rgb(var(--text) / .62); font-size: 14.5px; }

/* Página ESAL / Transparencia */
.esal-anio { font-family: var(--font-heading); font-weight: 800; font-size: 20px; margin: 28px 0 12px; color: rgb(var(--primary)); }
.esal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.esal-doc { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 14px;
  background: rgb(var(--surface)); border: 1px solid rgb(var(--border)); color: rgb(var(--text)); transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease; }
.esal-doc:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -22px rgb(var(--primary) / .5); border-color: rgb(var(--primary) / .5); }
.esal-pdf { font-size: 30px; color: #c0392b; flex: 0 0 auto; }
.esal-txt { flex: 1; min-width: 0; display: grid; }
.esal-txt b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.esal-txt i { font-style: normal; color: rgb(var(--text) / .6); font-size: 13px; }
.esal-dl { color: rgb(var(--primary)); flex: 0 0 auto; }

/* Galería */
.corp-galeria { background: rgb(var(--bg)); }
.corp-gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.corp-gal-item { position: relative; display: block; padding: 0; border: 0; cursor: pointer; border-radius: 16px;
  overflow: hidden; background: rgb(var(--surface)); aspect-ratio: 4 / 3; box-shadow: 0 10px 30px -20px rgb(0 0 0 / .5);
  transition: transform .18s ease, box-shadow .25s ease; }
.corp-gal-item:hover { transform: translateY(-3px); box-shadow: 0 22px 44px -22px rgb(var(--primary) / .55); }
.corp-gal-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.corp-gal-item:hover img { transform: scale(1.06); }
.corp-gal-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 14px 10px; text-align: left;
  font-size: 13.5px; font-weight: 600; color: #fff; background: linear-gradient(to top, rgb(0 0 0 / .72), transparent); }

/* Lightbox */
.corp-lightbox { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center;
  background: rgb(0 0 0 / .9); padding: 24px; opacity: 0; transition: opacity .2s ease; }
.corp-lightbox.on { display: flex; opacity: 1; }
.corp-lightbox figure { margin: 0; max-width: min(1100px, 92vw); max-height: 88vh; display: flex; flex-direction: column; gap: 10px; }
.corp-lightbox img { max-width: 100%; max-height: 82vh; object-fit: contain; border-radius: 12px; }
.corp-lightbox figcaption { color: #fff; text-align: center; font-size: 14.5px; opacity: .9; }
.corp-lb-close { position: absolute; top: 16px; right: 20px; background: transparent; border: 0; color: #fff;
  font-size: 40px; line-height: 1; cursor: pointer; opacity: .85; }
.corp-lb-close:hover { opacity: 1; }
.corp-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgb(255 255 255 / .12); border: 0;
  color: #fff; width: 52px; height: 52px; border-radius: 50%; font-size: 22px; cursor: pointer; transition: background .15s ease; }
.corp-lb-nav:hover { background: rgb(255 255 255 / .26); }
.corp-lb-prev { left: 18px; } .corp-lb-next { right: 18px; }
@media (max-width: 620px) { .corp-lb-nav { width: 42px; height: 42px; } .corp-lb-prev { left: 8px; } .corp-lb-next { right: 8px; } }

@media (max-width: 900px) { .corp-links { display: none; } }
@media (max-width: 760px) {
  .corp-accesos-grid { grid-template-columns: 1fr; }
  .corp-nav .nav-actions .corp-cta { display: none; } /* el "Contáctanos" del header va al menú en móvil */
}
