/* =========================
   Header institucional (Club)
   Variantes: default | home
   ========================= */

:root{
  --club-green-900: #0b3d2e;
  --club-green-800: #0a3427;

  --header-radius: 0px;              /* institucional: recto */
  --header-padding-x: 24px;
  --header-padding-y: 16px;

  --header-logo-size: 46px;
  --header-title-size: 18px;
  --header-subtitle-size: 13px;

  --header-overlay: linear-gradient(
    90deg,
    rgba(11, 61, 46, 0.96) 0%,
    rgba(11, 61, 46, 0.82) 42%,
    rgba(11, 61, 46, 0.28) 72%,
    rgba(11, 61, 46, 0.06) 100%
  );

  /* alturas por variante */
  --header-h-default: 78px;
  --header-h-home: 220px;
}

/* contenedor principal */
.site-header,
.site-header--home{
    min-height: 68px;
    padding: 0 32px;

    display: flex;
    align-items: center;

    background: #0b3d2e;

    border-bottom:
        1px solid rgba(255,255,255,.06);

    box-shadow:
        0 4px 18px rgba(0,0,0,.12);
}

/* Fondo */
.site-header__bg{
  position: absolute;
  inset: 0;
  z-index: 0;

  background-image: var(--header-bg-image);
  background-position: var(--header-bg-position, center);
  background-size: cover;
  background-repeat: no-repeat;

  transform: scale(1.03);
}

/* Overlay para legibilidad */
.site-header__overlay{
  position: absolute;
  inset: 0;
  z-index: 1;

  background: var(--header-overlay);
}

/* Contenido */
.site-header__inner{
  position: relative;
  z-index: 2;

  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

/* Brand */
.site-header__brand{
    display:flex;
    align-items:center;
    gap:14px;
    height:100%;
}

.site-header__logo{
    width:42px;
    height:auto;
    display:block;
}

.site-header__text{
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
}

.site-header__title{
  color: #ffffff;
  font-size: var(--header-title-size);
  font-weight: 800;
  letter-spacing: 0.2px;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  text-shadow: 0 1px 0 rgba(0,0,0,.18);
  line-height: 1;
}

.site-header__subtitle{
  color: rgba(255,255,255,.78);
  font-size: var(--header-subtitle-size);
  opacity: 0.92;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* CTA (futuro) */
.site-header__cta{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 12px;
  border-radius: 12px;

  background: rgba(255,255,255,0.14);
  color: #fff;
  text-decoration: none;
  font-weight: 700;

  transition: transform 160ms ease, background 160ms ease;
  white-space: nowrap;
}

.site-header__cta:hover{
  background: rgba(255,255,255,0.22);
  transform: translateY(-1px);
}

/* HOME: tipografías un poco más hero */
.site-header--home .site-header__title{
  font-size: 28px;
  font-weight: 800;
}

.site-header--home .site-header__subtitle{
  font-size: 15px;
}

/* Separación visual con sidebar (cuando el main arranca) */
.layout__main .site-header{
  border-left: 1px solid rgba(0,0,0,0.08);
}

/* Responsive */
@media (max-width: 900px){
  :root{
    --header-padding-x: 16px;
    --header-logo-size: 42px;
    --header-h-home: 200px;
  }

  .site-header--home .site-header__title{ font-size: 22px; }
}

@media (max-width: 640px){
  :root{
    --header-h-default: 72px;
    --header-h-home: 180px;
  }

  .site-header__cta{ padding: 9px 10px; }
  .site-header__subtitle{ font-size: 12px; }
}

@media (max-width: 520px){
  .site-header__subtitle{ display: none; }
  .site-header--home .site-header__title{ font-size: 20px; }
}

/* mejora institucional final */
.site-header{
  border-bottom: 1px solid rgba(0,0,0,0.12);
}

.site-header__bg{
  filter: contrast(1.05) brightness(0.92);
}

.site-header--home .site-header__bg{
  filter: contrast(1.08) brightness(0.88);
}

/* =========================
   Breadcrumb + Infobar
   ========================= */

.site-header__crumbs{
  position: relative;
  z-index: 2;
  margin-top: 10px;
}

.crumbs{
  display: flex;
  gap: 8px;
  align-items: center;

  list-style: none;
  padding: 0;
  margin: 0;

  font-size: 12px;
  opacity: 0.92;
}

.crumbs__item{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.crumbs__item::after{
  content: "›";
  opacity: 0.7;
}

.crumbs__item:last-child::after{
  content: "";
}

.crumbs__link{
  color: rgba(255,255,255,0.95);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.25);
}

.crumbs__link:hover{
  border-bottom-color: rgba(255,255,255,0.55);
}

.crumbs__current{
  color: rgba(255,255,255,0.95);
  font-weight: 700;
}

/* Infobar */
.site-header__infobar{
  position: relative;
  z-index: 2;
  margin-top: 12px;
}

.infobar{
  display: flex;
  gap: 10px;
  align-items: center;

  padding: 10px 12px;
  border-radius: 12px;

  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.16);

  color: #fff;
  text-decoration: none;
}

.infobar__label{
  font-weight: 900;
  letter-spacing: 0.3px;
  font-size: 11px;

  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(31,191,132,0.24);
  border: 1px solid rgba(31,191,132,0.35);
}

.infobar__text{
  font-weight: 650;
  font-size: 13px;
  opacity: 0.95;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* HOME: que el breadcrumb/infobar respiren mejor */
.site-header--home .site-header__crumbs{ margin-top: 14px; }
.site-header--home .site-header__infobar{ margin-top: 14px; }

/* Responsive */
@media (max-width: 640px){
  .crumbs{ font-size: 11px; }
  .infobar__text{ font-size: 12px; }
}

/* =========================
   Sticky + Shrink (pro)
   ========================= */

.site-header{
  position: sticky;
  top: 0;
  z-index: 10; /* sidebar está en 50, no la tapa */
  padding: 0 24px 0 12px;
}

/* Transición suave */
.site-header{
  transition: padding 180ms ease, min-height 180ms ease;
}

/* Estado shrink (se activa con JS) */
.site-header.is-shrink{
  min-height: 64px;           /* interiores */
  padding-top: 12px;
  padding-bottom: 12px;
}

/* HOME shrink: baja el hero cuando scrolleás */
.site-header--home.is-shrink{
  min-height: 110px;          /* de 180–240 a 110 */
  padding-top: 16px;
  padding-bottom: 16px;
}

/* En shrink: oculto breadcrumb + infobar para limpiar */
.site-header.is-shrink .site-header__crumbs,
.site-header.is-shrink .site-header__infobar{
  display: none;
}

/* En shrink: título un toque más chico en HOME */
.site-header--home.is-shrink .site-header__title{
  font-size: 20px;
}

/* Container institucional del header */
.site-header__inner,
.site-header__crumbs,
.site-header__infobar{
  max-width: 1200px;
  margin-left: 0;
  margin-right: auto;
}

.site-header::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  height: 1px;

  /* background: linear-gradient(
    90deg,
    rgba(0,0,0,0.18),
    rgba(0,0,0,0.08),
    rgba(0,0,0,0.18)
  ); */
}

/* HOME: header compacto tipo barra institucional */
.site-header--home{
  min-height: 76px;
  padding-top: 14px;
  padding-bottom: 14px;

  background: var(--color-primary);
  align-items: center;
}

.site-header--home .site-header__bg,
.site-header--home .site-header__overlay{
  display: none;
}

.site-header--home .site-header__crumbs,
.site-header--home .site-header__infobar{
  display: none;
}

.site-header--home .site-header__title{
  font-size: 18px;
}

.site-header--home .site-header__subtitle{
  font-size: 13px;
}

/* =========================
   Header institucional final
   ========================= */

.site-header,
.site-header.site-header--home {
  min-height: 68px;
  padding: 0 18px;

  display: flex;
  align-items: center;

  background:
    linear-gradient(
      90deg,
      #03291f 0%,
      #073f30 48%,
      #03291f 100%
    );

  border-bottom: 1px solid rgba(255,255,255,.08);

  box-shadow:
    0 8px 24px rgba(0,0,0,.12);
}

/* anulamos imagen/overlay del header */
.site-header__bg,
.site-header__overlay,
.site-header::after {
  display: none !important;
}

.site-header__inner,
.site-header__inner--premium {
  width: 100%;
  max-width: none;

  margin: 0;
  padding: 0 28px 0 6px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;

}

/* Brand */
.site-header__brand {
  display: flex;
  align-items: center;
  gap: 14px;

  color: #ffffff;
  text-decoration: none;
}

.site-header__logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.site-header__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-header__title,
.site-header--home .site-header__title {
  color: #ffffff;

  font-size: 19px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.035em;
}

.site-header__subtitle,
.site-header--home .site-header__subtitle {
  color: rgba(255,255,255,.72);

  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
}

/* Actions */
.site-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-header__search {
  min-height: 38px;
  padding: 0 15px;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  border-radius: 999px;

  color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);

  font-size: 13px;
  font-weight: 850;
  text-decoration: none;

  transition:
    background .2s ease,
    border-color .2s ease,
    transform .2s ease;
}

.site-header__search::before {
  content: "⌕";
  font-size: 15px;
}

.site-header__search:hover {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.22);
  transform: translateY(-1px);
}

.site-header__social {
  width: 38px;
  height: 38px;

  display: grid;
  place-items: center;

  border-radius: 999px;

  color: rgba(255,255,255,.82);
  background: rgba(255,255,255,.075);
  border: 1px solid rgba(255,255,255,.10);

  font-size: 11px;
  font-weight: 950;
  text-decoration: none;

  transition:
    background .2s ease,
    color .2s ease,
    transform .2s ease;
}

.site-header__social:hover {
  color: #ffffff;
  background: rgba(255,255,255,.14);
  transform: translateY(-1px);
}

/* Header home alineado hacia la sidebar */
.site-header.site-header--home {
  padding-left: 24px !important;
  padding-right: 32px !important;
}

.site-header--home .site-header__inner,
.site-header--home .site-header__inner--premium {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;

  padding-left: 0 !important;
  padding-right: 0 !important;
}

.site-header--home .site-header__brand {
  margin-left: 0 !important;
}

/* =========================================
   HEADER V1 FINAL
========================================= */

.site-header,
.site-header.site-header--home {
    position: sticky;
    top: 0;
    z-index: 120;

    min-height: 74px;

    background:
        linear-gradient(
            90deg,
            #03291f 0%,
            #074232 50%,
            #03291f 100%
        );

    border-bottom:
        1px solid rgba(255,255,255,.06);

    backdrop-filter: blur(14px);

    box-shadow:
        0 10px 28px rgba(0,0,0,.14);
}

/* eliminamos todo lo hero viejo */
.site-header__bg,
.site-header__overlay,
.site-header__crumbs,
.site-header__infobar,
.site-header::after {
    display: none !important;
}

.site-header__inner--premium {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 24px;

    padding: 0 22px 0 10px;
}

/* BRAND */

.site-header__brand {
    display: flex;
    align-items: center;
    gap: 14px;

    text-decoration: none;
}

.site-header__logo {
    width: 54px;
    height: 54px;
    object-fit: contain;

    filter:
        drop-shadow(0 4px 12px rgba(0,0,0,.18));
}

.site-header__text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.site-header__title,
.site-header--home .site-header__title {
    color: #ffffff;

    font-size: 20px;
    line-height: 1;

    font-weight: 950;
    letter-spacing: -0.04em;
}

.site-header__subtitle,
.site-header--home .site-header__subtitle {
    color: rgba(255,255,255,.68);

    font-size: 12px;
    line-height: 1.1;

    font-weight: 700;
}

/* ACTIONS */

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-header__social {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;

    background: rgba(255,255,255,.08);

    border:
        1px solid rgba(255,255,255,.10);

    color: rgba(255,255,255,.88);

    text-decoration: none;

    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;

    transition:
        transform .2s ease,
        background .2s ease,
        border-color .2s ease;
}

.site-header__social:hover {
    transform: translateY(-1px);

    background: rgba(255,255,255,.14);

    border-color:
        rgba(255,255,255,.22);

    color: #fff;
}

.site-header__cta {
    height: 40px;

    padding: 0 16px;

    border-radius: 999px;

    background: #ffffff;
    color: #052e26;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 13px;
    font-weight: 900;

    text-decoration: none;

    transition:
        transform .2s ease,
        background .2s ease;
}

.site-header__cta:hover {
    transform: translateY(-1px);

    background: #f3f4f6;
}

/* MOBILE */

@media (max-width: 768px) {

    .site-header,
    .site-header.site-header--home {
        min-height: 68px;
        padding: 0 12px;
    }

    .site-header__title {
        font-size: 17px;
    }

    .site-header__subtitle {
        display: none;
    }

    .site-header__logo {
        width: 42px;
        height: 42px;
    }

    .site-header__social {
        width: 34px;
        height: 34px;
        font-size: 10px;
    }

    .site-header__cta {
        display: none;
    }
}

.site-header::before{
    content:"";

    position:absolute;
    left:0;
    right:0;
    bottom:0;

    height:1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(31,191,132,.45),
            transparent
        );
}

/* =========================================
   MOBILE HEADER ACTION
========================================= */

.site-header__menu {
  display: none;
}

@media (max-width: 768px) {
  .site-header__inner--premium {
    padding: 0 !important;
    gap: 12px;
  }

  .site-header__menu {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    flex: 0 0 auto;

    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px;

    color: #ffffff;
    background: rgba(255,255,255,.09);

    cursor: pointer;
  }

  .site-header__menu .icon {
    width: 22px;
    height: 22px;
  }

  .site-header__brand {
    min-width: 0;
    flex: 1;
  }

  .site-header__title {
    max-width: 170px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .site-header__actions {
    display: none;
  }
}

/* =========================================
   HEADER MOBILE POLISH
========================================= */

@media (max-width: 768px) {

  .site-header,
  .site-header.site-header--home {
    min-height: 64px;
    padding: 0 12px !important;
  }

  .site-header__inner--premium {
    min-height: 64px;
  }

  .site-header__logo {
    width: 38px;
    height: 38px;
  }

  .site-header__title,
  .site-header--home .site-header__title {
    font-size: 16px;
    letter-spacing: -0.035em;
  }
}

/* =========================================
   HEADER TOUCH POLISH
========================================= */

@media (max-width: 768px) {

  .site-header__menu,
  .site-header__social {
    transition:
      transform .16s ease,
      background .16s ease,
      border-color .16s ease;
  }

  .site-header__menu:active,
  .site-header__social:active {
    transform: scale(.96);
  }

  .site-header {
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }
}

/* =========================================
   HEADER TABLET / NOTEBOOK POLISH
========================================= */

@media (min-width: 769px) and (max-width: 1180px) {

  .site-header,
  .site-header.site-header--home {
    min-height: 68px;
    padding: 0 18px !important;
  }

  .site-header__inner--premium {
    padding: 0 !important;
    gap: 18px;
  }

  .site-header__logo {
    width: 44px;
    height: 44px;
  }

  .site-header__title,
  .site-header--home .site-header__title {
    font-size: 18px;
  }

  .site-header__social {
    width: 36px;
    height: 36px;
    font-size: 10px;
  }
}

/* =========================================
   MOBILE FIXED HEADER FINAL
========================================= */

@media (max-width: 768px) {

  .site-header,
  .site-header.site-header--home {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;

    z-index: 1000;

    height: 60px;
    min-height: 60px;

    background: rgba(4, 36, 28, .96);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    border-bottom: 1px solid rgba(255,255,255,.08);

    box-shadow: 0 8px 24px rgba(0,0,0,.16);
  }

  .site-header__inner--premium {
    height: 60px;
    min-height: 60px;
  }

  .layout__main {
    padding-top: 60px;
  }
}