/* ==========================================================================
   Galería LATAM Partner Summit FY26
   ========================================================================== */

:root {
  --hv-red: #CC0000;
  --hv-black: #000000;
  --hv-bg: #F8F8F8;
}

/* Tipografia del sitio principal (font/fonts.css). No se toca [class^="icon-"]
   ni flaticon/icomoon/lightgallery, que dependen de sus propias fuentes. */
body,
button,
input,
select,
textarea,
h1, h2, h3, h4, h5, h6,
.topbar-nav .topbar-link,
.nav-btn, .day-btn, .sub-btn,
.gallery-count,
.fy26-footer,
.lg-sub-html {
  font-family: "Neue Haas Grotesk Display Pro", system-ui, sans-serif;
}

body {
  background: var(--hv-bg);
  color: #333333; /* style.css lo pone en #fff y deja el texto invisible */
}

.site-section h1,
.site-section h2,
.site-section h3,
.site-section h4 { color: #121212; }

.site-section p { color: #595959; }

/* ---------- Header ---------- */
.IDB_header {
  position: relative;
  width: 100%;
  height: 350px;
  background-color: #0b0b0b;
  background-image: linear-gradient(135deg, #000000 0%, #1a1a1a 55%, #3a0000 100%); /* respaldo si no hay banner */
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  display: flex;
  align-items: center;
}

.IDB_header .texto {
  position: relative;
  text-align: center;
}

.IDB_header .texto img {
  width: 60%;
  max-width: 620px;
  margin: 10px auto;
  display: block;
}

/* ---------- Navegación ---------- */
.navigation-section {
  background: #ffffff;
  padding: 40px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .1);
  margin-bottom: 30px;
}

.nav-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  background: var(--hv-black);
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 16px;
  transition: all .3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, .25);
  min-width: 200px;
  position: relative;
  overflow: hidden;
}

.nav-btn:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--hv-red);
  transition: left .3s ease;
  z-index: 1;
}

.nav-btn:hover:before { left: 0; }
.nav-btn span { position: relative; z-index: 2; }

.nav-btn:hover {
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(204, 0, 0, .35);
}

.nav-btn.active {
  background: var(--hv-red);
  box-shadow: 0 4px 15px rgba(204, 0, 0, .3);
}

.nav-btn i { margin-right: 8px; font-size: 18px; }

/* ---------- Filtros por día ---------- */
.day-filters {
  background: #f1f2f4;
  padding: 25px 0;
  margin-bottom: 30px;
}

.day-filters h4 { margin-bottom: 20px; color: #333; }

.day-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  background: #fff;
  color: #333;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  font-size: 14px;
  transition: all .3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
  min-width: 120px;
  margin: 5px;
  border: 2px solid #e9ecef;
  cursor: pointer;
}

.day-btn:hover {
  color: var(--hv-red);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
  border-color: var(--hv-red);
}

.day-btn.active,
.day-btn.active:hover {
  background: var(--hv-red);
  color: #fff;
  border-color: var(--hv-red);
}

.day-btn i { margin-right: 8px; font-size: 16px; }

/* ---------- Grid de la galería ---------- */
.gallery-grid { padding-bottom: 40px; }

.gallery-item {
  margin-bottom: 20px;
  transition: all .3s ease;
}

.gallery-item .gallery-thumb {
  display: block;
  width: 100%;
  height: 250px;
  overflow: hidden;
  border-radius: 6px;
  background: #e6e6e6;
  cursor: zoom-in;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.gallery-item:hover img { transform: scale(1.06); }

.gallery-item .gallery-thumb:after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(204, 0, 0, 0);
  transition: background .3s ease;
}

.gallery-item:hover .gallery-thumb:after { background: rgba(204, 0, 0, .18); }

/* Aviso de carpeta vacía */
.gallery-empty {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.gallery-empty i { font-size: 48px; display: block; margin-bottom: 15px; color: #bbb; }

/* Contador de fotos */
.gallery-count {
  text-align: center;
  color: #777;
  font-size: 14px;
  margin-bottom: 20px;
}

/* ---------- Videos ---------- */
.video-card {
  margin-bottom: 25px;
}

.video-card .ratio-box {
  padding: 56.25% 0 0 0; /* 16:9 */
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
}

.video-card .ratio-box iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Portada (index) ---------- */
.cover-card {
  display: block;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .08);
  text-decoration: none;
  color: #222;
  transition: transform .3s ease, box-shadow .3s ease;
  margin-bottom: 30px;
}

.cover-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .15);
  text-decoration: none;
  color: #222;
}

.cover-card .cover-img {
  position: relative;
  height: 200px;
  background: linear-gradient(135deg, #000 0%, #3a0000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 54px;
  overflow: hidden;
}

/* Portada con imagen real (foto del evento o miniatura de video):
   la imagen va de fondo y el icono queda encima con un velo oscuro. */
.cover-card .cover-img.con-foto {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.cover-card .cover-img.con-foto::before,
.cover-card .cover-img.con-pdf.cargado::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .15) 0%, rgba(0, 0, 0, .55) 100%);
  transition: background .3s ease;
}

.cover-card:hover .cover-img.con-foto::before,
.cover-card:hover .cover-img.con-pdf.cargado::before {
  background: linear-gradient(180deg, rgba(0, 0, 0, .05) 0%, rgba(0, 0, 0, .42) 100%);
}

.cover-card .cover-img.con-foto i,
.cover-card .cover-img.con-pdf i {
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .5);
}

/* Portada de "Presentaciones": primera pagina del PDF renderizada con pdf.js */
.cover-card .cover-img.con-pdf canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  z-index: 1;
}

.cover-card .cover-img.con-pdf.cargado i {
  display: none;
}

.cover-card .cover-body { padding: 20px; text-align: center; }
.cover-card .cover-body h3 { font-size: 20px; margin-bottom: 6px; color: #121212; }
.cover-card .cover-body p { color: #777; font-size: 14px; margin: 0; }

/* ---------- Video de fondo del footer (igual al de la pagina principal) ---------- */
.fabric-zone {
  position: relative;
}

.fabric-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

.fabric-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: rgba(244, 244, 242, .55);
}

.fabric-zone > footer {
  position: relative;
  z-index: 2;
  background: transparent;
  margin-top: 0;
}

/* ---------- Footer (igual al de la pagina principal) ---------- */
.fy26-footer {
  padding: 48px 0 30px;
  border-top: 1px solid #dfdfda;
  margin-top: 56px;
  background: rgba(255, 255, 255, .75);
}

.fy26-footer .footer-grid,
.fy26-footer .copyright {
  width: min(92%, 1180px);
  margin-left: auto;
  margin-right: auto;
}

.fy26-footer .footer-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 24px;
}

.fy26-footer .footer-brand { margin-bottom: 14px; display: inline-flex; }

.fy26-footer .brand-logo--footer {
  background: transparent;
  padding: 0;
  height: 46px;
  width: auto;
  display: block;
}

.fy26-footer .footer-grid h4 {
  margin: 0 0 10px;
  font-size: 0.96rem;
  font-weight: 700;
  color: #121212;
}

.fy26-footer .footer-grid a,
.fy26-footer .footer-grid p {
  display: block;
  margin: 0 0 8px;
  color: #595959;
  text-decoration: none;
  font-size: 0.91rem;
  line-height: 1.45;
}

.fy26-footer .footer-grid a:hover { color: #d71920; }

.fy26-footer .copyright {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid #dfdfda;
  color: #6b6b6b;
  font-size: 0.85rem;
}

@media (max-width: 991.98px) {
  .fy26-footer .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .fy26-footer .footer-brand { margin-left: auto; margin-right: auto; }
}

/* ---------- Responsivo ---------- */
@media (min-width: 768px) and (max-width: 992px) {
  .IDB_header { height: 250px; }
  .IDB_header .texto img { width: 50%; }
  .nav-btn { min-width: 180px; padding: 12px 25px; font-size: 14px; }
  .day-btn { min-width: 100px; padding: 10px 20px; font-size: 13px; }
  .gallery-item .gallery-thumb { height: 220px; }
}

@media (max-width: 767.98px) {
  .IDB_header { height: 200px; background-position: left top; }
  .IDB_header .texto img { width: 80%; }
  .nav-buttons { flex-direction: column; align-items: center; gap: 15px; }
  .nav-btn { min-width: 250px; padding: 12px 20px; font-size: 14px; }
  .navigation-section { padding: 30px 0; }
  .day-btn { min-width: 120px; margin: 5px 10px; }
  .gallery-item .gallery-thumb { height: 200px; }
  .video-card .ratio-box { padding: 56.25% 0 0 0; }
}

/* ---------- Topbar (igual al de la pagina principal) ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: linear-gradient(120deg, #d71920, #b90f16);
  border-bottom: 1px solid #930d12;
}

.topbar-wrap {
  width: min(92%, 1180px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 74px;
}

.topbar .brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.topbar .brand-logo {
  height: 28px;
  width: auto;
  display: block;
}

@media (max-width: 767.98px) {
  .topbar-wrap { min-height: 60px; }
  .topbar .brand-logo { height: 22px; }
}

/* ---------- Banner del evento (mismo GIF de la pagina principal) ---------- */
.event-banner { padding: 28px 0 8px; }

.event-banner img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(10, 10, 10, .14);
}

@media (max-width: 767.98px) {
  .event-banner { padding: 16px 0 4px; }
  .event-banner img { border-radius: 12px; }
}
/* ---------- Navegacion en dos niveles ----------
   Nivel 1 (.day-btn): los dias del evento, en pildoras grandes.
   Nivel 2 (.sub-btn): las secciones del dia activo. */
.day-nivel-1 { margin-bottom: 4px; }
.day-nivel-2 { margin-top: 16px; }

.gallery-grid .sub-btn,
.day-filters .sub-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 20px;
  margin: 5px;
  background: #fff;
  color: #666666;
  text-decoration: none;
  border: 1px solid #dcdcdc;
  border-radius: 25px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  transition: all .25s ease;
}

.day-filters .sub-btn:hover {
  color: var(--hv-red);
  border-color: var(--hv-red);
  text-decoration: none;
}

.day-filters .sub-btn.active,
.day-filters .sub-btn.active:hover {
  background: var(--hv-red);
  border-color: var(--hv-red);
  color: #fff;
}

/* ---------- Mosaico de fotos ----------
   Columnas CSS: cada foto conserva su proporcion real, se ve completa y sin
   franjas. El contenedor se acota porque a pantalla completa (2000px) las
   columnas salian de ~500px y las fotos se veian gigantes. */
.gallery-grid .container-fluid {
  max-width: 1360px;
  margin: 0 auto;
}

.gallery-grid #lightgallery.row {
  display: block;
  column-count: 4;
  column-gap: 12px;
  margin: 0;
}

.gallery-grid #lightgallery .gallery-item {
  width: 100% !important;
  max-width: 100% !important;
  flex: none !important;
  float: none !important;
  padding: 0 !important;
  display: block;
  margin: 0 0 12px 0;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
}

.gallery-grid #lightgallery .gallery-item .gallery-thumb {
  height: auto;
  background: #ececea;
  display: block;
}

.gallery-grid #lightgallery .gallery-item img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: initial;
  display: block;
}

@media (max-width: 1199.98px) {
  .gallery-grid #lightgallery.row { column-count: 3; }
}

@media (max-width: 767.98px) {
  .gallery-grid #lightgallery.row { column-count: 2; column-gap: 8px; }
  .gallery-grid #lightgallery .gallery-item { margin-bottom: 8px; }
}

@media (max-width: 479.98px) {
  .gallery-grid #lightgallery.row { column-count: 1; }
}

/* ---------- Portada con fotos que se alternan ----------
   Las imagenes se apilan y solo la activa queda visible; el cambio es un
   fundido suave. El velo oscuro y el icono van por encima. */
.cover-card .cover-img.con-slides .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 1s ease;
  z-index: 0;
}

.cover-card .cover-img.con-slides .slide.visible { opacity: 1; }

.cover-card .cover-img.con-foto::before { z-index: 1; }
.cover-card .cover-img.con-foto i { z-index: 2; }

/* ---------- Menu de la barra roja ---------- */
.topbar-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Mismo boton fantasma que el de documentos.php */
.topbar-nav .topbar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-weight: 700;
  font-size: .92rem;
  line-height: 1.2;
  text-decoration: none;
  transition: background .2s ease, transform .12s ease;
}

.topbar-nav .topbar-link:hover,
.topbar-nav .topbar-link:focus {
  background: rgba(255, 255, 255, .26);
  color: #fff;
  text-decoration: none;
}

.topbar-nav .topbar-link:active { transform: translateY(1px); }

.topbar-nav .topbar-link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .topbar-nav .topbar-link { transition: none; }
}

@media (max-width: 575px) {
  .topbar-nav .topbar-link { font-size: .82rem; padding: 9px 14px; }
}
