/* Encabezado público compartido de Fundación JCF */
body.jcf-shared-header { padding-top: 102px; }
body.jcf-shared-header.jcf-home-page { padding-top: 0; }

.jcf-site-header {
  background: linear-gradient(105deg, rgba(4, 20, 55, .99), rgba(8, 31, 75, .98));
  border-bottom: 2px solid #0aaef3;
  box-shadow: 0 8px 30px rgba(3, 15, 43, .16);
  color: #fff;
  left: 0;
  min-height: 102px;
  position: fixed;
  right: 0;
  top: 0;
  width: 100%;
  z-index: 500;
}

.jcf-site-header.site-header,
.jcf-site-header > :is(.site-pages-header-inner, .news-header-inner) {
  align-items: center;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(258px, 1fr) auto minmax(210px, 1fr);
  min-height: 102px;
  padding: 16px max(28px, calc((100vw - 1320px) / 2));
  position: relative;
  width: 100%;
}

.jcf-site-header.site-header {
  max-width: none;
  transform: none;
}

.jcf-site-header > :is(.site-pages-header-inner, .news-header-inner) {
  margin-inline: auto;
  max-width: none;
}

.jcf-site-header :is(.brand, .site-pages-brand, .news-brand) {
  align-items: center;
  display: flex;
  gap: 13px;
  justify-self: start;
  min-width: 258px;
}

.jcf-site-header :is(.brand, .site-pages-brand, .news-brand) img {
  background: #fff;
  border: 2px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .16);
  height: 66px;
  object-fit: cover;
  width: 66px;
}

.jcf-site-header :is(.brand, .site-pages-brand, .news-brand) :is(strong, small, span) { display: block; }
.jcf-site-header :is(.brand, .site-pages-brand, .news-brand) strong { color: #fff; font-size: 1rem; letter-spacing: -.025em; line-height: 1.25; }
.jcf-site-header :is(.brand, .site-pages-brand, .news-brand) small,
.jcf-site-header .news-brand > span > span { color: rgba(255, 255, 255, .74); font-size: .56rem; font-weight: 500; margin-top: 4px; }

.jcf-site-header :is(#main-navigation, .site-pages-nav, .site-pages-navigation, .news-site-nav) {
  align-items: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  display: flex;
  flex-direction: row;
  gap: clamp(20px, 2vw, 33px);
  justify-content: center;
  margin: 0;
  padding: 0;
  position: static;
  width: auto;
}

.jcf-site-header :is(#main-navigation, .site-pages-nav, .site-pages-navigation, .news-site-nav) a {
  border: 0;
  color: rgba(255, 255, 255, .9);
  font-size: .7rem;
  font-weight: 700;
  min-height: auto;
  padding: 10px 0;
  position: relative;
  white-space: nowrap;
  width: auto;
}

.jcf-site-header :is(#main-navigation, .site-pages-nav, .site-pages-navigation, .news-site-nav) a::after {
  background: #0aaef3;
  bottom: -7px;
  content: '';
  display: block;
  height: 2px;
  left: 0;
  position: absolute;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .2s ease;
  width: 100%;
}

.jcf-site-header :is(#main-navigation, .site-pages-nav, .site-pages-navigation, .news-site-nav) a:is(:hover, :focus-visible, [aria-current="page"]) { color: #fff; }
.jcf-site-header :is(#main-navigation, .site-pages-nav, .site-pages-navigation, .news-site-nav) a:is(:hover, :focus-visible, [aria-current="page"])::after { transform: scaleX(1); }

.jcf-site-header :is(.header-actions, .site-pages-actions, .site-pages-header-actions, .news-header-actions) {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-self: end;
  white-space: nowrap;
}

.jcf-site-header :is(.header-instagram, .header-whatsapp-channel, .site-pages-social, .site-pages-social-link, .news-instagram, .news-whatsapp-channel) {
  align-items: center;
  background: rgba(255, 255, 255, .02);
  border: 1px solid rgba(255, 255, 255, .36);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-size: 1.02rem;
  height: 40px;
  justify-content: center;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
  width: 40px;
}

.jcf-site-header :is(.header-instagram, .header-whatsapp-channel, .site-pages-social, .site-pages-social-link, .news-instagram, .news-whatsapp-channel):hover {
  background: rgba(255, 255, 255, .11);
  border-color: #0aaef3;
  transform: translateY(-1px);
}

.jcf-site-header :is(.header-donate, .site-pages-donate, .news-donate) {
  align-items: center;
  background: #0aaef3;
  border: 0;
  border-radius: 7px;
  box-shadow: 0 10px 28px rgba(10, 174, 243, .22);
  color: #fff;
  display: inline-flex;
  font-size: .59rem;
  font-weight: 800;
  gap: 7px;
  justify-content: center;
  min-height: 44px;
  padding: 11px 15px;
  text-transform: uppercase;
}

.jcf-site-header :is(.header-donate, .site-pages-donate, .news-donate) :is(svg, i) { font-size: 16px; height: 17px; width: 17px; }

.jcf-site-header :is(.menu-button, .site-pages-menu-button, .news-menu-button) {
  background: none;
  border: 0;
  color: #fff;
  display: none;
  height: 44px;
  justify-self: end;
  padding: 10px;
  width: 44px;
}

.jcf-site-header :is(.menu-button, .site-pages-menu-button, .news-menu-button) > span:not(.sr-only):not(.site-pages-sr-only) {
  background: #fff;
  border-radius: 2px;
  display: block;
  height: 2px;
  margin: 5px auto;
  width: 24px;
}

@media (max-width: 1220px) {
  .jcf-site-header.site-header,
  .jcf-site-header > :is(.site-pages-header-inner, .news-header-inner) { grid-template-columns: 1fr auto auto; }

  .jcf-site-header :is(.menu-button, .site-pages-menu-button, .news-menu-button) { display: block; grid-column: 2; grid-row: 1; }

  .jcf-site-header :is(#main-navigation, .site-pages-nav, .site-pages-navigation, .news-site-nav) {
    align-items: stretch;
    background: rgba(6, 22, 56, .99);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 10px;
    box-shadow: 0 18px 46px rgba(3, 15, 43, .28);
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 10px;
    position: absolute;
    right: max(28px, calc((100vw - 1320px) / 2));
    top: 88px;
    width: 255px;
  }

  .jcf-site-header :is(#main-navigation, .site-pages-nav, .site-pages-navigation, .news-site-nav):is(.nav-open, .is-open) { display: flex; }
  .jcf-site-header :is(#main-navigation, .site-pages-nav, .site-pages-navigation, .news-site-nav) a { border-bottom: 1px solid rgba(255, 255, 255, .12); padding: 13px 12px; width: 100%; }
  .jcf-site-header :is(#main-navigation, .site-pages-nav, .site-pages-navigation, .news-site-nav) a:last-child { border-bottom: 0; }
  .jcf-site-header :is(#main-navigation, .site-pages-nav, .site-pages-navigation, .news-site-nav) a::after { bottom: 5px; left: 12px; transform-origin: left; width: 28px; }
}

@media (max-width: 760px) {
  body.jcf-shared-header { padding-top: 84px; }
  body.jcf-shared-header.jcf-home-page { padding-top: 0; }
  .jcf-site-header { min-height: 84px; }
  .jcf-site-header.site-header,
  .jcf-site-header > :is(.site-pages-header-inner, .news-header-inner) { gap: 8px; min-height: 84px; padding: 10px 18px; }
  .jcf-site-header :is(.brand, .site-pages-brand, .news-brand) { min-width: 0; }
  .jcf-site-header :is(.brand, .site-pages-brand, .news-brand) img { height: 48px; width: 48px; }
  .jcf-site-header :is(.brand, .site-pages-brand, .news-brand) > span { display: none; }
  .jcf-site-header :is(.header-actions, .site-pages-actions, .site-pages-header-actions, .news-header-actions) { gap: 6px; }
  .jcf-site-header :is(#main-navigation, .site-pages-nav, .site-pages-navigation, .news-site-nav) { right: 18px; top: 76px; }
}

@media (max-width: 520px) {
  .jcf-site-header :is(.header-donate, .site-pages-donate, .news-donate) { font-size: 0; height: 40px; min-height: 40px; padding: 0; width: 40px; }
  .jcf-site-header :is(.header-donate, .site-pages-donate, .news-donate) :is(svg, i) { font-size: 16px; }
  .jcf-site-header :is(.header-instagram, .header-whatsapp-channel, .site-pages-social, .site-pages-social-link, .news-instagram, .news-whatsapp-channel) { height: 38px; width: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .jcf-site-header *, .jcf-site-header *::after { transition: none !important; }
}

/* Mantiene exactamente la misma altura aunque la página use un contenedor interno. */
.jcf-site-header { box-sizing: border-box; height: 102px; }
.jcf-site-header > :is(.site-pages-header-inner, .news-header-inner) { height: 100%; min-height: 0; }

@media (max-width: 760px) {
  .jcf-site-header { height: 84px; }
  .jcf-site-header > :is(.site-pages-header-inner, .news-header-inner) { height: 100%; min-height: 0; }
}
