/* ============================================================
   HERO.CSS — Portadas, heroes de página y página de artículo
   ============================================================ */

/* ── Hero del blog index ─────────────────────────────────────── */

.blog-hero {
  background: var(--gradient-primary);
  padding: var(--space-16) 0 var(--space-12);
  text-align: center;
}

.blog-hero__label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.blog-hero__title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 5vw, var(--text-6xl));
  font-weight: var(--weight-extrabold);
  color: white;
  line-height: var(--leading-tight);
  margin-bottom: var(--space-4);
}

.blog-hero__desc {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.8);
  max-width: 55ch;
  margin: 0 auto var(--space-8);
  line-height: var(--leading-loose);
}

.blog-hero__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* ── Hero de landing / artículo con imagen ───────────────────── */

.page-hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.page-hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.page-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(19,58,96,0.3) 0%,
    rgba(19,58,96,0.75) 100%
  );
}

.page-hero__content {
  position: relative;
  z-index: 1;
  padding: var(--space-12) 0;
  width: 100%;
}

.page-hero__breadcrumb {
  margin-bottom: var(--space-4);
}

.page-hero__breadcrumb .breadcrumb {
  color: rgba(255,255,255,0.7);
}

.page-hero__breadcrumb .breadcrumb a {
  color: rgba(255,255,255,0.9);
}

.page-hero__breadcrumb .breadcrumb-sep {
  color: rgba(255,255,255,0.4);
}

.page-hero__cat {
  margin-bottom: var(--space-3);
}

.page-hero__title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  font-weight: var(--weight-extrabold);
  color: white;
  line-height: var(--leading-tight);
  max-width: 70%;
  margin-bottom: var(--space-4);
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.page-hero__meta {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.8);
}

.page-hero__meta svg {
  width: 14px;
  height: 14px;
}

/* ── Hero de landing sin imagen ──────────────────────────────── */

.landing-hero {
  background: var(--gradient-primary);
  padding: var(--space-16) 0;
}

.landing-hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--space-12);
}

.landing-hero__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.landing-hero__label svg {
  width: 14px;
  height: 14px;
}

.landing-hero__title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  font-weight: var(--weight-extrabold);
  color: white;
  line-height: var(--leading-tight);
  margin-bottom: var(--space-5);
}

.landing-hero__desc {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.8);
  line-height: var(--leading-loose);
  margin-bottom: var(--space-8);
}

.landing-hero__cta {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.landing-hero__image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.landing-hero__image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

@media (max-width: 1024px) {
  .landing-hero__inner {
    grid-template-columns: 1fr;
  }

  .landing-hero__image {
    display: none;
  }

  .page-hero__title {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .page-hero {
    min-height: 320px;
  }

  .blog-hero {
    padding: var(--space-12) 0 var(--space-10);
  }
}

/* ── Destello animado en heroes de fondo sólido ─────────────── */

.blog-hero,
.landing-hero {
  position: relative;
  overflow: hidden;
}

.blog-hero::after,
.landing-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 55% at 70% 30%, rgba(232,144,26,0.10) 0%, transparent 65%),
    radial-gradient(ellipse 40% 40% at 15% 75%, rgba(255,255,255,0.05) 0%, transparent 55%);
  animation: hero-glow 9s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

/* Asegura que los hijos directos queden encima del destello */
.blog-hero > *,
.landing-hero > * {
  position: relative;
  z-index: 1;
}

@keyframes hero-glow {
  0%   { opacity: 0.6; transform: scale(1)    translateX(0); }
  50%  { opacity: 1;   transform: scale(1.04) translateX(1.5%); }
  100% { opacity: 0.7; transform: scale(0.97) translateX(-1%); }
}

@media (prefers-reduced-motion: reduce) {
  .blog-hero::after,
  .landing-hero::after { display: none; }
}
