/* ============================================
   ESTILOS ESPECÍFICOS PARA INDEX.BLADE.PHP
   Mapa Interactivo de Clanes
   ============================================ */

/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img{
    width: 100%;
}

/* Body principal */
.index-body {
    font-family: 'Nunito', system-ui, -apple-system, sans-serif;
    background-color: var(--clanes-bg, #b00970);
    color: var(--color-1);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Contenedor principal */
.index-container {
    min-height: 100vh;
    position: relative;
    z-index: 10;
    width: 100%;
}

/* Main content */
.index-main {
    width: 100%;
    min-height: calc(100vh - 100px);
    position: relative;
}

/* ============================================
   BARRA SUPERIOR (NAVBAR)
   ============================================ */

.index-navbar {
    width: 100%;
    height: 80px;
    background-color: #ffffff;
    box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2),
                0px 1px 1px 0px rgba(0, 0, 0, 0.14),
                0px 1px 3px 0px rgba(0, 0, 0, 0.12);
    position: relative;
 
}

.navbar-content {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* ============================================
   FONDO ANIMADO DE CLANES
   ============================================ */

/* Contenedor del texto animado */
.clanes-marquee {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Capas de texto */
.clanes-layer {
    position: absolute;
    left: -50%;
    width: 200%;
    white-space: nowrap;
    font-family: 'Gregor', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 900;
    letter-spacing: 0em;
    word-spacing: 0.1em;
    text-transform: uppercase;
    color: #ffffff;
    opacity: 0.05;
}

/* Tamaños y posiciones distintas para simular profundidad */
.clanes-layer--1 {
    top: -18%;
    font-size: clamp(10rem, 16vw, 12rem);
    animation: clanes-left 60s linear infinite;
}

.clanes-layer-0 {
    top: 15%;
    font-size: clamp(2.2rem, 6vw, 4.3rem);
    animation: clanes-right 58s linear infinite;
}

.clanes-layer-1 {
    top: 22%;
    font-size: clamp(10rem, 16vw, 12rem);
    animation: clanes-left 60s linear infinite;
}

.clanes-layer-2 {
    top: 54%;
    font-size: clamp(2.2rem, 6vw, 4.3rem);
    animation: clanes-right 58s linear infinite;
}

.clanes-layer-3 {
    top: 60%;
    font-size: clamp(10rem, 16vw, 12rem);
    animation: clanes-left 60s linear infinite;
}

.clanes-layer-4 {
    top: 90%;
    font-size: clamp(2.2rem, 6vw, 4.3rem);
    animation: clanes-right 58s linear infinite;
}

.clanes-layer-5 {
    top: 96%;
    font-size: clamp(10rem, 16vw, 12rem);
    animation: clanes-left 60s linear infinite;
}

/* Animaciones */
@keyframes clanes-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(50%);
    }
}

@keyframes clanes-right {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablets */
@media (max-width: 1024px) {
    /* Ocultar acciones de la derecha en tablets y móviles */
    .navbar-right {
        display: none;
    }

    .clanes-layer--1,
    .clanes-layer-1,
    .clanes-layer-3,
    .clanes-layer-5 {
        font-size: clamp(8rem, 14vw, 10rem);
    }
    
    .clanes-layer-0,
    .clanes-layer-2,
    .clanes-layer-4 {
        font-size: clamp(1.8rem, 5vw, 3.5rem);
    }
}

/* Disposición vertical cuando la pantalla está en orientación vertical */
@media (orientation: portrait) {
    .index-main-content {
        flex-direction: column;
        gap: 30px;
    }

    .portrait-footer {
        display: block !important;
    }
}

/* Móviles */
@media (max-width: 768px) {
    .clanes-layer--1,
    .clanes-layer-1,
    .clanes-layer-3,
    .clanes-layer-5 {
        font-size: clamp(6rem, 12vw, 8rem);
    }
    
    .clanes-layer-0,
    .clanes-layer-2,
    .clanes-layer-4 {
        font-size: clamp(1.5rem, 4vw, 2.5rem);
    }
    
    .index-body {
        font-size: 14px;
    }
    
    /* Barra superior en móviles */
    .index-navbar {
        height: 80px;
    }

    .index-main {
        min-height: calc(100vh - 70px);
    }
    
    .navbar-content {
        padding: 0 16px;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .clanes-layer--1,
    .clanes-layer-1,
    .clanes-layer-3,
    .clanes-layer-5 {
        font-size: clamp(4rem, 10vw, 6rem);
    }
    
    .clanes-layer-0,
    .clanes-layer-2,
    .clanes-layer-4 {
        font-size: clamp(1.2rem, 3vw, 2rem);
    }
}

/* ============================================
   ACCESIBILIDAD Y RENDIMIENTO
   ============================================ */

/* Preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    .clanes-layer {
        animation: none;
    }
}

/* Modo oscuro (si se implementa) */
@media (prefers-color-scheme: dark) {
    .index-body {
        background-color: var(--clanes-bg, #b00970);
    }
}

/* ============================================
   UTILIDADES
   ============================================ */

/* Ocultar elementos visualmente pero mantenerlos accesibles */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Clearfix */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

.navbar-logo {
    width: 150px;
    padding: 15px;
    
}

.navbar-logos {
    width: 100px;

    padding-right: 16px;
    border-right: 1px solid #531337;
}

.index-main-content {
    width: 100%;
    min-height: calc(100vh - 100px);
    display: flex;
    justify-content: center;
    align-items: stretch;
    padding: 20px;
}

.index-main-content-left{
    max-width: 680px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: flex-start;
    flex: 1;

}

.index-main-content-left-title{
    width: 80%;
}

.index-main-content-left-description {
    color: white;
}

.index-main-content-right{
    position: relative;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    
}

/* Footer mostrado solo en orientación vertical */
.portrait-footer {
    display: none;
}

.portrait-footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background-color: #ffffff;
}

.popup {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    height: 100vh;
    max-width: 500px;
    z-index: 10;
    background-color: rgb(255, 255, 255);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
}

.popup-content {
   width: 100%;
   height: 100vh;
    display: flex;
    flex-direction: column;
}

.popup-content-close {
    display: flex;
    justify-content: flex-end;
    padding: 20px;
    gap: 16px;
}

.popup-content-body {
    display: flex;
    flex-direction: column;
    /*gap: 16px;*/
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.Cards-container {
    width: 100%;
    padding: 20px;
    overflow-y: auto;
    display: none;
}

.Cards-container.active {
    display: block;
}

.point-name-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--color-2);
    text-transform: uppercase;
}

.point-content {
    width: 100%;
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.popup.active {

    transform: translateX(0);
}

.organizations-cards{
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.Card{
  position: relative;
  height: 100px;            
  border-radius: 22px;
  overflow: hidden;
  cursor: pointer;
}

.Card img.Card-thumb{
  width: 100%;
  height: 100%;
  object-fit: cover;        /* ✅ recorte visual */
  object-position: center;
  display: block;
}

/* gradiente para que el texto blanco se lea */
.Card::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,0) 65%);
  pointer-events:none;
}

/* overlay con título e iconos */
.Card-overlay{
  position:absolute;
  inset:0;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  padding: 16px;
  z-index: 2;
}

.Card-title{
  color:#fff;
  font-weight: 700;
  font-size: 20px;          /* ajusta */
  line-height: 1.05;
  max-width: 70%;
  text-shadow: 0 6px 20px rgba(0,0,0,.35);
}

.Card-icons{
  display:flex;
  gap: 10px;
}

.Card-icon{
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-6);
  color: #fff;
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
}

.Card-icon i{ font-size: 15px; }

.popup .popup-content-body{
  position: relative;
}

.popup .popup-content-body::before{
  content:"";
  position:absolute;
  inset:0;
  background: url("/img/flor.png") no-repeat left top / 200px auto;
  opacity:.70;
  pointer-events:none;
  z-index:0;
}

.popup .popup-content-body > *{
  position:relative;
  z-index:1;
}
.nav-shadow-bottom{
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.651);
  position: relative;
  z-index: 50; /* para que quede por encima */
}


.index-main-content-left-buttons{	
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    width: 100%;
}

.index-main-content-left-button{
    border: solid 4px var(--color-10);
    border-radius: 5px;
    padding: 5px 20px;
    color: var(--color-10);
    font-family: 'Nunito';
    font-weight: 900;
    width: 90%;
    max-width: 250px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 100%;
}

/* Tooltips de puntos del mapa */
.map-point-tooltip {
    position: absolute;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    white-space: nowrap;
    z-index: 10;
}

.map-point-tooltip.visible {
    opacity: 1;
}

/* Tooltip del contador (arriba) */
.map-point-tooltip-count {
    /* Ajustar posición: arriba del punto */
    transform: translate(-50%, calc(-100% - 50px));
    /* Estilos personalizables */
    background-color: rgba(255, 81, 219, 0.9);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: bold;
    font-family: 'Nunito', sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Tooltip del nombre (abajo) */
.map-point-tooltip-name {
    /* Ajustar posición: abajo del punto */
    transform: translate(-50%, 10px);
    /* Estilos personalizables */
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Nunito', sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}