/* ================================== */
/* ARCHIVO: estilos-personalizados.css */
/* ================================== */


/* Estilos del Acordeón */
.continent-accordion-group {
  max-width: 1200px; /* Ancho aumentado para las tarjetas */
  margin: 0 auto;
  padding: 20px;
}
.continent-accordion {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.2);
  margin-bottom: 10px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}
.continent-accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-weight: 600;
  font-size: 18px;
  transition: background-color 0.2s ease;
}
.continent-accordion summary::-webkit-details-marker { display: none; }
.continent-accordion[open] summary { background-color: rgba(255, 255, 255, 0.1); }
.continent-accordion .chevron { width: 12px; height: 12px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform 0.2s ease; flex-shrink: 0; }
.continent-accordion[open] .chevron { transform: rotate(45deg); }
.continent-accordion .accordion-content {
  padding: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  background-color: rgba(0, 0, 0, 0.1);
}
.section-title {
  text-align: center;
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 40px;
}

/* ====== Estilos de las Tarjetas (Añadidos desde home demo.html) ====== */
.impact-card {
  --p: .80;
  --bar1:#7e57c2;
  --bar2:#b39ddb;
  transition: box-shadow .3s ease, transform .2s ease;
  overflow: hidden;
}
.impact-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(2,22,60,.18);
}
.bar {
  height:6px;
  background:#e8e8e8;
  border-radius:4px;
  overflow:hidden;
}
.bar__fill {
  height:100%;
  width:0;
  border-radius:4px;
  background: linear-gradient(90deg, var(--bar1), var(--bar2));
  transition: width .6s ease;
}
.impact-card:hover .bar__fill {
  width: calc(var(--p) * 100%);
}
.reveal {
  max-height:0;
  opacity:0;
  overflow:hidden;
  transition:max-height .55s ease, opacity .4s ease;
  background:#0f0f10;
  border-top:1px solid #191919;
}
.impact-card:hover .reveal {
  max-height: 420px; /* Aumentado para que quepan las 9 categorías */
  opacity:1;
}
.media {
  position:relative;
  width:100%;
  height: 330px; /* Aumentado de 220px */
  isolation:isolate;
}
.media img {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  filter:brightness(.55) saturate(1.05);
  z-index:0;
}
.media::after {
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg, rgba(0,0,0,.10), rgba(0,0,0,.40));
  z-index:1;
}

/* === ESTILOS ACTUALIZADOS Y NUEVOS PARA EL CONTENIDO DE LAS TARJETAS === */
.overlay {
  position:absolute;
  inset:0;
  z-index:2;
  color:#fff;
  padding:20px 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

/* Encabezado de la tabla de dimensiones */
.category-header-row {
  width: 100%;
  max-width: 300px;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: #FF6A13;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 4px;
}

.category-bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px; /* Espacio entre filas */
  width: 100%;
  max-width: 300px;
}

/* Ajuste de filas para 3 columnas: Etiqueta | Barra | Número */
.category-bars li {
  display: grid;
  grid-template-columns: 95px 1fr 30px;
  align-items: center;
  gap: 10px;
}

.category-label {
  display: block;
  font: 600 9px/1.2 'Inter', sans-serif;
  text-align: left;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.category-bar {
  height: 5px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  overflow: hidden;
}
.category-bar-fill {
  height: 100%;
  background-color: #0BA3B8;
  border-radius: 5px;
}

.category-rank-num {
  font-size: 11px;
  font-weight: 700;
  text-align: right;
  color: #fff;
}

.overlay h4, .subs { display: none; }
.ranking-info { display: none; } /* Ocultamos el ranking antiguo del centro */

.yellow{ --bar1:#f4b400; --bar2:#ffd666; }
.purple{ --bar1:#7e57c2; --bar2:#b39ddb; }
.green { --bar1:#2ecc71; --bar2:#7ee2a8; }
.teal  { --bar1:#0BA3B8; --bar2:#6dd5e7; }
.orange{ --bar1:#FF6A13; --bar2:#ff9b66; }
.navy  { --bar1:#0A3A66; --bar2:#3c6b95; }

/* ========== NUEVOS ESTILOS PARA FUN FACTS ========== */
#fun-facts .container { max-width: 1200px; }
.fun-fact-box {
  background-color: rgba(116, 116, 116, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 25px 15px;
  text-align: center;
  color: #fff;
  transition: background-color 0.3s ease;
}
.fun-fact-box:hover {
  background-color: rgba(10, 20, 30, 0.6);
}
.fun-fact-box h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 42px;
  font-weight: 700;
  margin: 0 0 10px 0;
  line-height: 1.1;
}
.fun-fact-box h3 i {
  color: #1a1a1a;
  font-size: 36px;
  margin-right: 10px;
  vertical-align: -2px;
}
.fun-fact-box h6 {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}
@media (max-width: 767px) {
  .fun-fact-col {
    margin-bottom: 20px;
  }
}

/* ========== ESTILO FINAL PARA ICONO IESE ========== */
#social-icons .social-icons li a.logo-iese {
  background-image: url(../images/logo-iese-blanc.png);
  background-repeat: no-repeat;
  background-size: 50%;
  background-position: 50% 50% !important;
}

/* =============================================
   ESTILOS PARA EL INTERRUPTOR DE IDIOMA (MODIFICADO)
   ============================================= */
.language {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 20px;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.25); /* Caja sutil blanca */
  border-radius: 30px;
  background-color: rgba(255, 255, 255, 0.08); /* Fondo leve para destacar */
  position: relative;
  top: 0px;
}

.language input.check {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  width: 40px;
  height: 20px;
  background-color: rgba(255, 255, 255, 0.2); /* Óvalo blanco semi-transparente */
  border: 1px solid #ffffff; /* Borde blanco sólido */
  border-radius: 20px;
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
}

.language input.check::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: #ffffff; /* Botón (círculo) blanco sólido */
  top: 2px;
  left: 2px;
  transition: transform 0.3s ease;
}

.language input.check:checked::before {
  transform: translateX(20px);
}

/* Ajuste de los textos SPA / ENG para que sean blancos y legibles */
.language .espanol, .language .ingles {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

/* Clases de estado (Actualizadas para fondo oscuro) */
.section #header .language span.lang-active {
    color: #ffffff !important; /* Texto activo en blanco puro */
    font-weight: 800 !important;
    opacity: 1 !important;
    text-shadow: 0 0 8px rgba(255,255,255,0.3);
}

.section #header .language span.lang-inactive {
    color: #ffffff !important;
    opacity: 0.4 !important; /* Texto inactivo blanco muy tenue */
}

/* =============================================
   AJUSTE FINAL DE TARJETAS DENTRO DE ACORDEONES (GLASSMORPHISM)
   ============================================= */
.continent-accordion .impact-card {
  background: rgba(25, 25, 25, 0.45) !important;
  backdrop-filter: blur(10px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(10px) saturate(150%) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  color: #fff !important;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.continent-accordion .impact-card:hover {
  background: rgba(35, 35, 35, 0.6) !important;
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.continent-accordion .impact-card h3,
.continent-accordion .impact-card .text-brand-ink,
.continent-accordion .impact-card .text-brand-primary {
  color: #fff !important;
}

.continent-accordion .impact-card .text-brand-accent {
  color: #FF6A13 !important;
}
/* =============================================
   CONTEXTO DE POSICIONAMIENTO PARA ELEMENTOS ABSOLUTOS
   ============================================= */
   .welcome-box {
    position: relative;
  }

/* === MODIFICACIÓN CLAVE === */
/* Espacio para el contenido debajo del header */
.ranking-ticker-container {
    margin-top: 20px; /* Ajusta este valor según sea necesario */
}

/* =============================================
   HEADER FIJO QUE SE OCULTA AL HACER SCROLL
   ============================================= */
body #header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    width: 100% !important;
    z-index: 1000 !important;
    background-color: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.3s ease-in-out;
    padding: 10px 0 !important; 
}

/* Achicar la imagen del logo específicamente */
#logo img {
    height: 45px !important; 
    width: auto !important;
}

body #header.header-hidden {
    transform: translateY(-100%) !important;
}

/* Agregar espacio superior al contenido para compensar el header fijo */
body .section-inner {
    padding-top: 55px !important;
}

/* Responsive: ajustar padding en pantallas móviles */
@media only screen and (max-width: 767px) {
    body .section-inner {
        padding-top: 80px !important; 
    }

    body #header {
        position: fixed !important;
        top: 0 !important;
        bottom: auto !important;
    }
}

/* =============================================
   ELIMINAR ESPACIO EXTRA EN LA PARTE INFERIOR
   ============================================= */
body .section-inner {
    padding-bottom: 0 !important;
}

body .section,
body .animated-row {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* Asegurar que fullpage no añada espacio extra */
body #fullpage,
body .fullpage-default {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

body .fp-scrollable {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    /* Sobrescribir la altura que deja 200px de espacio abajo */
    height: 100vh !important;
}

/* Asegurar que las secciones ocupen la altura completa */
body .section.fp-auto-height {
    min-height: 100vh !important;
}

body .fp-tableCell {
    height: auto !important;
}

/* =============================================
   CORRECCIÓN DEFINITIVA DE SCROLL
   ============================================= */
.search-results-dropdown {
    max-height: 300px;
    overflow-y: auto;
    /* Esta propiedad es clave para contener el scroll */
    overscroll-behavior: contain; 
    z-index: 9999;
}

/* Diseño de la barra de desplazamiento */
.search-results-dropdown::-webkit-scrollbar {
    width: 6px;
}
.search-results-dropdown::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}
.search-results-dropdown::-webkit-scrollbar-thumb {
    background-color: #0BA3B8;
    border-radius: 3px;
}

/* Asegura que el contenido tenga un margen inferior para que el último acordeón no pegue al borde */
.continent-accordion-group {
    padding-bottom: 48px !important;
}

/* Forzar a que las celdas de fullpage se adapten al contenido real */
.fp-section.fp-table, 
.fp-section.fp-auto-height,
.fp-tableCell {
    height: auto !important;
    display: block !important;
}

/* Corrección para que el scroll interno funcione correctamente con contenido dinámico */
.iScrollIndicator {
    background: rgba(255, 255, 255, 0.4) !important;
}


/* ============================================ */
/* TABLA DE CALOR: BRECHA HACIA EL LIDERAZGO   */
/* ============================================ */

.gap-heatmap-title {
    margin-top: 8px !important;
    margin-bottom: 4px !important;
}

.gap-heatmap-section {
    padding: 28px 32px 32px;
    background: rgba(40, 40, 55, 0.55);
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    margin-top: 10px;
}

.gap-heatmap-sub {
    text-align: center;
    color: rgba(255,255,255,0.55);
    font-size: 13px;
    margin: 0 0 8px;
    font-style: italic;
}

/* ── Sort controls ── */
.gap-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-bottom: 14px;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.gap-controls::-webkit-scrollbar { display: none; }
.gap-ctrl-label {
    font-family: 'Barlow Condensed', 'Raleway', sans-serif;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.42);
    flex-shrink: 0;
    margin-right: 4px;
}
.gap-pill {
    font-family: 'Barlow Condensed', 'Raleway', sans-serif;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 4px 9px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    background: transparent;
    color: rgba(255,255,255,0.45);
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}
.gap-pill:hover {
    background: rgba(200,169,110,0.12);
    border-color: #C8A96E;
    color: #C8A96E;
}
.gap-pill.active {
    background: #C8A96E;
    border-color: #C8A96E;
    color: #0F1117;
}

/* ── Chart scroll container ── */
.gap-chart-scroll {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 520px;
    border-radius: 10px;
}
.gap-chart-wrap {
    min-width: 900px;
}

/* ── Column labels (sticky header) ── */
.gap-col-labels {
    display: grid;
    grid-template-columns: 160px repeat(9, 1fr);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 12px 0 8px;
    background: rgba(40, 40, 55, 0.95);
    backdrop-filter: blur(6px);
}
.gap-col-labels-city { /* spacer */ }
.gap-col-label {
    text-align: center;
    cursor: pointer;
    padding: 0 2px;
    transition: opacity .2s;
}
.gap-col-label:hover { opacity: 0.65; }
.gap-col-label.sorted .gap-cl-icon,
.gap-col-label.sorted .gap-cl-txt { color: #C8A96E; }
.gap-cl-icon {
    font-size: 15px;
    display: block;
    margin-bottom: 2px;
    line-height: 1;
    color: rgba(255,255,255,0.7);
}
.gap-cl-txt {
    font-family: 'Barlow Condensed', 'Raleway', sans-serif;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.42);
    display: block;
    line-height: 1.25;
    transition: color .2s;
}

/* ── City row ── */
.gap-city-row {
    display: grid;
    grid-template-columns: 160px repeat(9, 1fr);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    transition: background .15s;
    opacity: 0;
    transform: translateY(5px);
    animation: gapRise .38s ease forwards;
}
.gap-city-row:hover { background: rgba(255,255,255,0.022); }
@keyframes gapRise { to { opacity:1; transform:translateY(0); } }

.gap-city-meta {
    padding: 10px 12px 10px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid rgba(255,255,255,0.07);
}
.gap-city-rank-lbl {
    font-family: 'Barlow Condensed', 'Raleway', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #C8A96E;
    opacity: 0.7;
    margin-bottom: 2px;
}
.gap-city-name-lbl {
    font-family: 'Barlow Condensed', 'Raleway', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    line-height: 1.05;
    letter-spacing: 0.2px;
}
.gap-city-country-lbl {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    font-weight: 300;
    margin-top: 2px;
}

/* ── Dimension cell + bars ── */
.gap-dim-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 6px 4px;
    position: relative;
    gap: 3px;
}

.gap-bar-area {
    width: 22px;
    height: 76px;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    background: transparent;
}

.gap-bar-achieved {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    border-radius: 3px 3px 0 0;
    z-index: 0;
}

.gap-bar-gap {
    position: absolute;
    top: 0; left: 0; right: 0;
    border-radius: 0 0 3px 3px;
    min-height: 3px;
    z-index: 1;
}

.gap-leader-orb {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #3ECFB2 0%, rgba(62,207,178,0.55) 100%);
    box-shadow: 0 0 12px rgba(62,207,178,0.5);
    z-index: 2;
    border-radius: 4px;
}

.gap-dim-number {
    font-family: 'Barlow Condensed', 'Raleway', sans-serif;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.3px;
    z-index: 1;
}

.gap-dim-number-label {
    font-family: 'Barlow Condensed', 'Raleway', sans-serif;
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.42);
    line-height: 1;
}

/* ── Tooltip ── */
.gap-tooltip {
    position: fixed;
    background: rgba(30,35,51,0.95);
    border: 1px solid rgba(200,169,110,0.22);
    color: #fff;
    font-size: 12px;
    padding: 9px 14px;
    border-radius: 8px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .12s;
    z-index: 9999;
    white-space: nowrap;
    box-shadow: 0 8px 32px rgba(0,0,0,0.55);
    backdrop-filter: blur(8px);
}
.gap-tooltip.show { opacity: 1; }
.gap-tt-dim {
    font-family: 'Barlow Condensed', 'Raleway', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #C8A96E;
    display: block;
    margin-bottom: 3px;
}

/* Leyenda */
.gap-heatmap-legend {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 18px;
}

.ghl-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

.ghl-swatch {
    width: 22px;
    height: 8px;
    border-radius: 3px;
    flex-shrink: 0;
}

.ghl-star {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

/* Fuente */
.gap-heatmap-source {
    text-align: center;
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    font-style: italic;
    margin-top: 16px;
}

@media (max-width: 768px) {
    .gap-heatmap-section { padding: 40px 16px 36px; }
}

/* Título del ticker */
.ticker-title {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  margin: 0 0 6px 0;
  letter-spacing: 0.5px;
  opacity: 0.85;
}

/* Título Compara tu ciudad – centrado sobre el buscador izquierdo */
.compare-title {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  margin: 0 0 2px 0;
  letter-spacing: 0.5px;
  width: 100%;
  max-width: 450px;
}
