/**
 * Estilos para el plugin EnoMapa
 */
article#provincias{
    padding:80px 0;
}
/* Contenedor principal */
.enomapa-container {
    margin: 0px 0;
    padding: 80px 0 80px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Título del mapa */
.enomapa-title {
    margin-bottom: 20px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;;
}

/* Wrapper del mapa y listado */
.enomapa-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* Controles móviles */
/*.enomapa-mobile-controls {
    display: none;
    width: 100%;
    margin-bottom: 15px;
}

.enomapa-toggle-button {
    width: 100%;
    padding: 10px;
    background-color: #4a89dc;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}
*/
.enomapa-mobile-controls {
    display: none;
    margin-bottom: 15px;
    text-align: center;
}

.enomapa-toggle-button {
    background-color: #A52A2A;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.enomapa-toggle-button:hover {
    background-color: #800000;
}
/* Contenedor SVG */
.enomapa-svg-container {
    flex: 1;
    min-width: 300px;
    height: auto;
    background-color: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.enomapa-svg-container svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Estilos para los paths del SVG */
.enomapa-svg-container svg path {
    fill: #b3b3b3;
    stroke: #ffffff;
    stroke-width: 1px;
    transition: fill 0.3s ease;
    cursor: pointer;
}

.enomapa-svg-container svg path[id]:hover{
    fill: #A52A2A;
}

.enomapa-svg-container svg path[id].active,
.enomapa-svg-container svg path.active{
    fill: #800000;
}

.enomapa-svg-container svg path.provincia-sin-contenido {
    fill: #e6e6e6; /* Color base */
    cursor: default; /* Cursor normal */
}

/* Evitar que cambien de color al hacer hover */
.enomapa-svg-container svg path.provincia-sin-contenido:hover {
    fill: #e6e6e6 !important;
}

/* Tooltip */
#enomapa-tooltip {
    position: absolute;
    display: none;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 14px;
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Listado de regiones */
/*
.enomapa-regions-list {
    flex: 1;
    min-width: 250px;
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    padding: 15px;
    background-color: #f9f9f9;
}*/
.enomapa-regions-list {
    flex: 1;
    min-width: 250px;
    max-width:320px;
    background-color: rgba(165, 42, 42, 0.05);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Listado de comunidades autónomas */
.enomapa-comunidades-list {
    /*max-height: 500px;
    overflow-y: auto;*/
}

/* Item de comunidad */
.enomapa-comunidad-item {
    margin-bottom: 10px;
    border-bottom: 1px solid #e6e6e6;
    padding-bottom: 10px;
}

.enomapa-comunidad-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Nombre de la comunidad */
.enomapa-comunidad-name {
    background-color: #A52A2A;
    color: white;
    font-weight: bold;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.enomapa-comunidad-name:hover {
    background-color: #800000;
}

.enomapa-comunidad-item.active .bodegas-comunidad-name {
    background-color: #800000;
}

/* Listado de provincias */
.enomapa-provincias-list {
    display: none;
    padding: 8px 0 8px 15px;
    margin-top: 2px;
    border-left: 2px solid #A52A2A;
}

.enomapa-comunidad-item.active .enomapa-provincias-list {
    display: block;
}

/* Item de provincia */
.enomapa-provincia-item {
    padding: 5px 0;
    transition: transform 0.2s ease;
}

.enomapa-provincia-item:hover {
    transform: translateX(5px);
}

.enomapa-provincia-item a {
    color: #A52A2A;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s ease;
}

.enomapa-provincia-item a:hover {
    color: #800000;
    text-decoration: underline;
}

.enomapa-provincia-item.active a {
    font-weight: bold;
    color: #800000;
}

/* Página de provincia */
.enomapa-provincia-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.enomapa-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.enomapa-comunidad-info {
    font-size: 16px;
}

.enomapa-comunidad-label {
    font-weight: bold;
    margin-right: 5px;
}

.enomapa-comunidad-value {
    font-weight: normal;
}

.enomapa-volver-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #a52a2a;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.enomapa-volver-btn:hover {
    background-color: #8b0000;
    color: #ffffff;
    text-decoration: none;
}

/* Grid de contenidos */
.enomapa-contenidos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.enomapa-contenido-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.enomapa-contenido-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.enomapa-contenido-imagen {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.enomapa-contenido-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.enomapa-contenido-card:hover .enomapa-contenido-imagen img {
    transform: scale(1.05);
}

.enomapa-sin-imagen {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    background-color: #f0f0f0;
    color: #999;
    font-size: 14px;
}

.enomapa-contenido-info {
    padding: 15px;
}

.enomapa-contenido-titulo {
    font-size: 18px;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.enomapa-contenido-titulo a {
    color: #a52a2a;
    text-decoration: none;
}

.enomapa-contenido-titulo a:hover {
    color: #8b0000;
}

.enomapa-contenido-direccion,
.enomapa-contenido-servicios {
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.enomapa-label {
    font-weight: bold;
    margin-right: 5px;
}

.enomapa-ver-detalles {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 12px;
    background-color: #a52a2a;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    transition: background-color 0.3s ease;
}

.enomapa-ver-detalles:hover {
    background-color: #8b0000;
    color: #ffffff;
    text-decoration: none;
}

.enomapa-no-contenidos {
    text-align: center;
    padding: 50px 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    color: #666;
}

/* Mensaje de error */
.enomapa-error {
    color: #d9534f;
    text-align: center;
    padding: 20px;
    border: 1px solid #d9534f;
    border-radius: 4px;
    background-color: #f9f2f2;
}

/* Responsive */
@media (max-width: 768px) {
    .enomapa-mobile-controls {
        display: block;
    }

    .enomapa-wrapper {
        flex-direction: column;
    }

    .enomapa-svg-container {
        display: none;
    }

    .enomapa-svg-container.active {
        display: block;
    }

    /* Hacer que el contenedor de regiones ocupe todo el ancho disponible */
    .enomapa-regions-list {
        min-width: 100%;
    }

    /* Mostrar las comunidades autónomas en dos columnas */
    .enomapa-comunidades-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* Ajustar el espacio entre items */
    .enomapa-comunidad-item {
        margin-bottom: 10px;
    }

    /* Ajustar el tamaño de fuente para que quepa mejor */
    .enomapa-comunidad-name {
        font-size: 14px;
        padding: 6px 10px;
    }

    /* Cuando una comunidad está expandida, mostrar sus provincias en una columna */
    .enomapa-comunidad-item.active {
        grid-column: span 2; /* Ocupar ambas columnas cuando está activo */
    }

    /* Asegurar que el listado de provincias aparezca correctamente */
    .enomapa-provincias-list {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .enomapa-provincia-contenidos {
        grid-template-columns: 1fr;
    }
}