/* ═══ Estilos compartidos por las páginas Anunciá y Quiénes somos (hero con imagen de
   fondo, bandas, botones, encabezados de sección). Los componentes conservan el
   prefijo `anuncia-` por historia; los usan las dos plantillas. ═══ */


:is(.template-anuncia, .template-quienes) {
  --anuncia-bg-alt: #f6f5f2;
  --anuncia-card: #fafaf9;
  --anuncia-border: rgba(30, 30, 30, 0.12);
  --anuncia-hero-h: 560px; /* altura única del hero (Anunciá y Quiénes somos) */
}

/* Las bandas de esta página van pegadas al footer: se anula el margin-bottom
   global de #main-content (index.css) solo acá. */
:is(.template-anuncia, .template-quienes) #main-content {
  margin-bottom: 0;
}

/* El header (ticker 36px + nav 72px = 108px) es fixed: sin este margen, los
   links internos (#contacto, #formatos) dejan el título de la sección tapado. */
:is(.template-anuncia, .template-quienes) #contacto,
:is(.template-anuncia, .template-quienes) #formatos {
  scroll-margin-top: 108px;
}

.admin-bar:is(.template-anuncia, .template-quienes) #contacto,
.admin-bar:is(.template-anuncia, .template-quienes) #formatos {
  scroll-margin-top: 140px;
}

/* ─── Contenedores ─── */
:is(.template-anuncia, .template-quienes) .anuncia-wrap {
  width: 100%;
  max-width: var(--max-width-desktop);
  margin: 0 auto;
}

:is(.template-anuncia, .template-quienes) .anuncia-band {
  padding: 4rem 0;
}

:is(.template-anuncia, .template-quienes) .anuncia-band--alt {
  background-color: var(--anuncia-bg-alt);
}

@media (max-width: 1280px) {
  :is(.template-anuncia, .template-quienes) .anuncia-wrap {
    max-width: var(--max-width-small-desktop);
  }
}

@media (max-width: 1100px) {
  :is(.template-anuncia, .template-quienes) .anuncia-band {
    padding: 3rem 0;
  }
  :is(.template-anuncia, .template-quienes) .anuncia-wrap {
    max-width: 100%;
    padding-left: 30px;
    padding-right: 30px;
  }
}

@media (max-width: 767px) {
  :is(.template-anuncia, .template-quienes) .anuncia-band {
    padding: 2.25rem 0;
  }
  :is(.template-anuncia, .template-quienes) .anuncia-wrap {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* ─── Botones ─── */
:is(.template-anuncia, .template-quienes) .anuncia-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font2);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.95rem 2.25rem;
  border-radius: 2px;
  border: 1px solid var(--color1);
  text-align: center;
  transition: background-color 0.2s, color 0.2s;
}

:is(.template-anuncia, .template-quienes) .anuncia-btn--dark {
  background-color: var(--color1);
  color: #fff;
}

:is(.template-anuncia, .template-quienes) .anuncia-btn--outline {
  background-color: transparent;
  color: var(--color1);
}

:is(.template-anuncia, .template-quienes) .anuncia-btn:is(:hover, :focus-visible, :active) {
  background-color: var(--color3);
  border-color: var(--color3);
  color: #fff;
}

/* ─── Placeholder de imagen (hero / historia sin imagen cargada) ─── */
:is(.template-anuncia, .template-quienes) .anuncia-img-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #d9d7d2;
}

:is(.template-anuncia, .template-quienes) .anuncia-img-placeholder span {
  font-family: var(--font2);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(30, 30, 30, 0.45);
}

/* ─── Encabezado de sección: TÍTULO ——— texto a la derecha ─── */
:is(.template-anuncia, .template-quienes) .anuncia-head {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

:is(.template-anuncia, .template-quienes) .anuncia-head-title {
  font-family: var(--font2);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color1);
  line-height: 1.3;
  flex-shrink: 0;
}

:is(.template-anuncia, .template-quienes) .anuncia-head-line {
  flex: 1;
  height: 1px;
  background-color: var(--anuncia-border);
}

:is(.template-anuncia, .template-quienes) .anuncia-head-label {
  font-family: var(--font2);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color3);
  text-align: right;
}

@media (max-width: 767px) {
  :is(.template-anuncia, .template-quienes) .anuncia-head {
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
  }
  :is(.template-anuncia, .template-quienes) .anuncia-head-line {
    display: none;
  }
  :is(.template-anuncia, .template-quienes) .anuncia-head-title,
  :is(.template-anuncia, .template-quienes) .anuncia-head-label {
    flex-shrink: 1;
    text-align: left;
    width: 100%;
  }
}

:is(.template-anuncia, .template-quienes) .anuncia-section-note {
  font-family: var(--font2);
  font-size: clamp(0.78rem, 1vw, 0.85rem);
  color: var(--color3);
  margin: -0.75rem 0 1.5rem;
}

/* ─── 1. Hero ─── */
:is(.template-anuncia, .template-quienes) .anuncia-hero {
  position: relative;
  width: 100%;
  background-color: var(--anuncia-bg-alt);
  overflow: hidden;
}

/* Hero a todo el ancho (la imagen llega al borde derecho); el padding izquierdo
   alinea el texto con el resto de las secciones (.anuncia-wrap). */
:is(.template-anuncia, .template-quienes) .anuncia-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  width: 100%;
  padding-left: max(30px, calc((100% - var(--max-width-desktop)) / 2));
  min-height: var(--anuncia-hero-h);
  max-height: var(--anuncia-hero-h);
}

@media (max-width: 1280px) {
  :is(.template-anuncia, .template-quienes) .anuncia-hero-inner {
    padding-left: max(30px, calc((100% - var(--max-width-small-desktop)) / 2));
  }
}

:is(.template-anuncia, .template-quienes) .anuncia-hero-text {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 1.25rem;
  padding: 4rem 2rem 4rem 0;
  position: relative;
  z-index: 1;
}

:is(.template-anuncia, .template-quienes) .anuncia-hero-text .anuncia-btn {
  align-self: flex-start;
}

:is(.template-anuncia, .template-quienes) .anuncia-eyebrow {
  font-family: var(--font2);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color3);
}

:is(.template-anuncia, .template-quienes) .anuncia-hero-title {
  font-family: var(--font1);
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  font-weight: 700;
  color: var(--color1);
  line-height: 1.08;
}

:is(.template-anuncia, .template-quienes) .anuncia-hero-lead {
  font-size: clamp(0.9rem, 1.1vw, 1rem);
  font-weight: 400;
  color: var(--color1);
  line-height: 1.6;
}

:is(.template-anuncia, .template-quienes) .anuncia-hero-desc {
  font-size: clamp(0.85rem, 1vw, 0.95rem);
  color: var(--color1);
  line-height: 1.65;
}

/* La imagen es un fondo: ocupa el 70% del ancho del hero, pegada a la derecha
   y detrás del texto, y se funde con el color de fondo por su borde izquierdo. */
:is(.template-anuncia, .template-quienes) .anuncia-hero-media {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 70%;
  z-index: 0;
}

:is(.template-anuncia, .template-quienes) .anuncia-hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  display: block;
}

:is(.template-anuncia, .template-quienes) .anuncia-hero-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to right, #f6f5f2 0%, rgba(246, 245, 242, 0.95) 20%, rgba(246, 245, 242, 0.75) 40%, rgba(246, 245, 242, 0.4) 62%, rgba(246, 245, 242, 0.12) 82%, rgba(246, 245, 242, 0) 100%);
  pointer-events: none;
}

@media (max-width: 1100px) {
  :is(.template-anuncia, .template-quienes) .anuncia-hero-inner {
    max-width: 100%;
    padding-left: 30px;
  }
}

@media (max-width: 900px) {
  :is(.template-anuncia, .template-quienes) .anuncia-hero-inner {
    grid-template-columns: 1fr;
    padding-left: 0;
    min-height: 0;
    max-height: none;
  }
  :is(.template-anuncia, .template-quienes) .anuncia-hero-text {
    padding: 2.5rem 30px 2rem;
  }
  /* La imagen sigue siendo fondo en todos los breakpoints. Acá el texto ocupa
     todo el ancho, así que la imagen pasa a cubrir el 100% del hero y el fade
     se usa completo como overlay (cubre toda la imagen) para que se lea bien. */
  :is(.template-anuncia, .template-quienes) .anuncia-hero-media {
    width: 100%;
  }
  :is(.template-anuncia, .template-quienes) .anuncia-hero-media::before {
    background: linear-gradient(to right, rgba(246, 245, 242, 0.95) 0%, rgba(246, 245, 242, 0.88) 55%, rgba(246, 245, 242, 0.75) 100%);
  }
}

@media (max-width: 767px) {
  :is(.template-anuncia, .template-quienes) .anuncia-hero-text {
    padding: 2rem 15px 1.5rem;
  }
}

