body, html {
    overflow-x: hidden; /* Evita el scroll horizontal globalmente */
}

#map-container {
    display: flex;
    position: relative;
    width: 100%;
    height: calc(100vh - 110px);
    transition: all 0.6s ease-in-out;
    flex-direction: column;
    overflow: hidden;
}

#column-map {
    display: flex;
    width: 100%;
    height: auto;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease-in-out;
}

#column-map h2 {
    margin: 60px 0px;
}

/* Estado inicial: solo el mapa visible */
#map-container.fullscreen #column-map {
    width: 100%;
}

/* Cuando el state-info aparece, el mapa se reduce suavemente */
#map-container.show-info #column-map {
    width: 75%; /* Un poco más de espacio para el mapa */
}

#column-map #visiomap
{
    height: calc(100vh - 200px);
    display: flex;
    position: relative;
    flex-direction: row;
    align-content: stretch;
    align-items: center;
    width: 100%;
    justify-content: space-between;
    padding-bottom: 12vh;
}

/* Estilo del contenedor de información */
#state-info {
    width: 25%;
    overflow: hidden;
    background: #ffffff;
    border-left: 1px solid #ddd;
    box-shadow: -2px 10px 10px 0px rgba(0, 0, 0, 0.1);
    transition: all 0.6s ease-out;
    position: absolute;
    top: 0;
    right: 0%;
    height: 100%;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateX(100%);
    z-index: 1002;
}

/* Cuando aparece la información */
#map-container.show-info #state-info {
    width: 25%;
    transform: translateX(0);
    opacity: 1;
    overflow-y: auto;
    transition: all 0.6s ease-out;
}

#map-container #state-info .state-info-container {
    padding: 20px;
}

#map-container #state-info .state-info-container h6 {
    color: #2A2B39!important;
    font-weight: 600!important;
}

#map-container .map-cta-container a {
    width: 100%!important;
    position: relative;
    display: block;
    padding: 20px;
    margin-top: -20px;
    color: #2A2B39!important;
    background-color: #90DDFF!important;
}

#map-container .map-cta-container a:hover {
    color: #2A2B39!important;
    background-color: #F99D1C!important;
}


/* Botón de cierre */
#map-container .close-btn {
    position: absolute;
    top: 20px;
    right: 15px;
    background: #ccc;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    background-color: #51626F;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 16px;
    z-index: 9999;
}

#map-container .close-btn.hidden {
    display: none;
}

#state-info .close-btn:hover {
    background-color: #34B6EF;
}

/* Imagen principal */
#state-info img.main-img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    margin-bottom: 15px;
}

#state-info p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

/* Tarjetas */
#state-info .extra-info-container {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

#state-info .extra-info-item {
    flex: 1;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.1);
    text-align: left;
}

#state-info .extra-info-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
}
#state-info .extra-info-item span.title {
    font-size: 18px;
    font-weight: 600;
    display: block;
    padding-top: 10px;
}

#state-info .extra-info-item p {
    font-size: 12px;
    color: #777;
}

/* Botones */
#state-info .buttons {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

#state-info .buttons a {
    flex: 1;
    padding: 10px;
    text-align: center;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}

#state-info .buttons .cta-primary {
    background: #002868;
}

#state-info .buttons .cta-secondary {
    background: #ddd;
    color: #333;
}

#state-info .buttons .cta-primary:hover {
    background: #ffcc00;
    color: #002868;
}

#state-info .buttons .cta-secondary:hover {
    background: #bbb;
}

/* -------------------
 🔹 SOLO Estados Destacados (highlighted)
--------------------- */
#visiomap .highlighted {
	cursor: pointer!important;
}
#visiomap .highlighted .state-path {
    fill: #90DDFF !important; /* Color de base */
    stroke-width: 2px;
    cursor: pointer; /* SOLO los destacados tienen cursor pointer */
    transition: fill 0.3s ease, stroke 0.3s ease;
}

/* -------------------
 🔹 Hover: SOLO Estados Destacados
--------------------- */
#visiomap .highlighted:hover .state-path {
    fill: #0A3272 !important; /* Color más oscuro en hover */
    stroke-width: 3px;
}

/* -------------------
 🔹 SOLO el texto de estados destacados
--------------------- */
#visiomap .highlighted .state-text {
    cursor: pointer;
    fill: #2A2B39; /* Color base para el texto */
    font-weight: bold;
}

/* -------------------
 🔹 Hover: SOLO texto de estados destacados
--------------------- */
#visiomap .highlighted:hover .state-text:not(.outside) {
    fill: #ffffff !important; /* Cambio de color al hacer hover */
}

/* -------------------
 🔹 Vinculación de hover entre PATH y TEXT
--------------------- */
#visiomap .highlighted:hover + text:not(.outside),
#visiomap text:not(.outside):hover + .highlighted {
    fill: #ffffff !important; /* Asegura que el texto cambie con el path */
}


/* -------------------
 🔹 Hover: SOLO texto de estados destacados
--------------------- */
#visiomap .highlighted:hover .outside {
    fill: #0A3272 !important; /* Cambio de color al hacer hover */
}

/* -------------------
 🔹 Vinculación de hover entre PATH y TEXT
--------------------- */
#visiomap .highlighted:hover + text.outside,
#visiomap text.outside:hover + .highlighted {
    fill: #0A3272 !important; /* Asegura que el texto cambie con el path */
}


@media screen and (max-width: 1024px) {
	#map-container {
		height: auto;
	}
	#column-map #visiomap {
		height: auto;
		padding-bottom: 40px;
		padding-top: 20px
	}
	#map-container.show-info #state-info {
		width: 100%;
		position: fixed;
		z-index: 9999;
		height: calc(100vh - 84px);
		top: 83px;
	}
	#state-info {
		width: 100%;
		position: fixed;
		z-index: 9999;
		height: calc(100vh - 84px);
		top: 83px;
	}
	/* Cuando el state-info aparece, el mapa se reduce suavemente */
	#map-container.show-info #column-map {
		width: 100%; /* Un poco más de espacio para el mapa */
	}
    #map-container .close-btn {
        top: 100px;
        position: fixed;
    }

    .map-cta-container {
        margin-bottom: 60px;
    }
}