/**
 * Estilos para Plugin TheGem Atracciones
 */

/* Variables de colores */
:root {
    --tga-naranja: #FF6600;
    --tga-gris-oscuro: #333333;
    --tga-gris-claro: #f5f5f5;
    --tga-blanco: #FFFFFF;
    --tga-overlay: rgba(0, 0, 0, 0.6);
}

/* Contenedor del shortcode [lista_atracciones] - para usar dentro de widget Shortcode de Elementor u otro contenedor */
#tga-atracciones {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Evitar que el tema o el mapa apliquen opacidad al main cuando está el shortcode */
main:has(#tga-atracciones) {
    filter: none !important;
}

/* En detalle de una atracción (solo mapa), anular filter del main que aplica el tema */
body.single-atraccion main {
    filter: none !important;
}

/* ============================================
   FILTROS SECTION
   ============================================ */

#tga-atracciones .atracciones-filtros-section {
    padding: 60px 20px 40px;
    background: var(--tga-blanco);
}

#tga-atracciones .atracciones-filtros-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--tga-gris-oscuro);
    text-align: center;
    margin: 0 0 40px 0;
}

#tga-atracciones .atracciones-filtros {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

#tga-atracciones .filtro-icono {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--tga-gris-claro);
    border: 2px solid transparent;
    text-align: center;
}

#tga-atracciones .filtro-icono:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#tga-atracciones .filtro-icono.active {
    background: var(--tga-naranja);
    border-color: var(--tga-naranja);
    color: var(--tga-blanco);
}

#tga-atracciones .filtro-icono.active .filtro-icon {
    color: var(--tga-blanco) !important;
}

#tga-atracciones .filtro-icon {
    font-size: 1.4rem;
    margin-bottom: 5px;
    color: #5A7A8C;
}

#tga-atracciones .filtro-label {
    font-size: 13px;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

#tga-atracciones .filtro-id {
    font-size: 0.7rem;
    opacity: 0.7;
    font-weight: 400;
}

/* ============================================
   MAIN SECTION - LAYOUT 2 COLUMNAS
   ============================================ */

#tga-atracciones .atracciones-main-section {
    padding: 40px 20px;
    background: var(--tga-blanco);
}

#tga-atracciones .atracciones-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: start;
}

#tga-atracciones .atracciones-lista-columna {
    min-height: 600px;
}

#tga-atracciones .atracciones-lista-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--tga-gris-oscuro);
    margin: 0 0 20px 0;
    line-height: 1.3;
}

#tga-atracciones .highlight-orange {
    color: var(--tga-naranja);
}

#tga-atracciones .atracciones-contador {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--tga-gris-claro);
}

#tga-atracciones #atracciones-contador-texto {
    font-size: 1rem;
    color: var(--tga-gris-oscuro);
    font-weight: 500;
}

/* ============================================
   TARJETAS DE ATRACCIONES
   ============================================ */

#tga-atracciones .atracciones-lista {
    display: flex;
    flex-direction: column;
    gap: 0;
}

#tga-atracciones .atraccion-card {
    display: flex;
    gap: 20px;
    padding: 20px;
    border-bottom: none;
    background: var(--tga-gris-claro);
    border-radius: 8px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    opacity: 1;
}

#tga-atracciones .atraccion-card:hover {
    transform: translateY(-2px);
}

#tga-atracciones .atraccion-card.highlighted {
    border: 2px solid var(--tga-naranja);
}

#tga-atracciones .atraccion-thumbnail-wrapper {
    flex-shrink: 0;
}

#tga-atracciones .atraccion-thumbnail {
    position: relative;
    width: 180px;
    height: 180px;
    border-radius: 8px;
    overflow: hidden;
}

#tga-atracciones .atraccion-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#tga-atracciones .categoria-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--tga-naranja);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 2;
}

#tga-atracciones .atraccion-marker-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: white;
    color: var(--tga-gris-oscuro);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

#tga-atracciones .atraccion-marker-badge i {
    font-size: 14px;
}

#tga-atracciones .atraccion-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#tga-atracciones .atraccion-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

#tga-atracciones .atraccion-title a {
    color: var(--tga-gris-oscuro);
    text-decoration: none;
    transition: color 0.3s;
}

#tga-atracciones .atraccion-title a:hover {
    color: var(--tga-naranja);
}

#tga-atracciones .atraccion-descripcion {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 10px 0;
    flex: 1;
    display: block;
}

#tga-atracciones .atraccion-descripcion p {
    margin: 0 0 8px 0;
}

#tga-atracciones .atraccion-descripcion p:last-child {
    margin-bottom: 0;
}

#tga-atracciones .atraccion-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

#tga-atracciones .atraccion-tours-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: #666;
}

#tga-atracciones .tours-icon {
    font-size: 1rem;
    color: var(--tga-naranja);
}

#tga-atracciones .atraccion-coordenadas {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: #666;
    margin: 10px 0;
    padding: 8px 12px;
    background: var(--tga-gris-claro);
    border-radius: 4px;
    min-height: 36px;
}

#tga-atracciones .coordenada-label {
    font-size: 1rem;
}

#tga-atracciones .coordenada-texto {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    color: #555;
}

#tga-atracciones .coordenada-vacia {
    color: #999;
    font-style: italic;
    font-family: inherit;
}

#tga-atracciones .atraccion-categorias {
    margin: 8px 0;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    flex-wrap: wrap;
}

#tga-atracciones .categorias-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

#tga-atracciones .categoria-tag {
    display: inline-block;
    padding: 5px 12px;
    background: var(--tga-naranja);
    color: var(--tga-blanco);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#tga-atracciones .categoria-tag:hover {
    background: #e55a00;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(255, 102, 0, 0.3);
}

#tga-atracciones .btn-ver-mas {
    display: inline-block;
    background: var(--tga-naranja);
    color: var(--tga-blanco);
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    align-self: flex-start;
    margin-top: 5px;
}

#tga-atracciones .btn-ver-mas:hover {
    background: #e55a00;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 102, 0, 0.3);
}

#tga-atracciones .no-atracciones {
    padding: 40px;
    text-align: center;
    color: #666;
    font-size: 1.1rem;
}

/* ============================================
   PAGINACIÓN
   ============================================ */

#tga-atracciones .atracciones-paginacion {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--tga-gris-claro);
}

#tga-atracciones .atracciones-paginacion .page-numbers {
    display: flex;
    gap: 10px;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

#tga-atracciones .atracciones-paginacion .page-numbers li {
    margin: 0;
}

#tga-atracciones .atracciones-paginacion .page-numbers a,
#tga-atracciones .atracciones-paginacion .page-numbers span {
    display: inline-block;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    color: var(--tga-blanco);
    background: var(--tga-naranja);
    transition: all 0.3s;
    font-weight: 600;
    min-width: 36px;
    text-align: center;
}

#tga-atracciones .atracciones-paginacion .page-numbers a:hover {
    background: #e55a00;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(255, 102, 0, 0.3);
}

#tga-atracciones .atracciones-paginacion .page-numbers .current {
    background: var(--tga-naranja);
    color: var(--tga-blanco);
}

#tga-atracciones .atracciones-paginacion .page-numbers .prev,
#tga-atracciones .atracciones-paginacion .page-numbers .next {
    padding: 8px 16px;
}

/* ============================================
   MAPA
   ============================================ */

#tga-atracciones .atracciones-mapa-columna {
    position: sticky;
    top: 80px;
}

#tga-atracciones #mapa-atracciones {
    height: 600px;
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

/* Marcadores numerados circulares */
#tga-atracciones .location-marker-numbered {
    background: transparent;
    border: none;
}

#tga-atracciones .marker-number-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--tga-naranja);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid white;
}

#tga-atracciones .marker-number {
    color: white;
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
}

#tga-atracciones .location-marker-numbered:hover .marker-number-circle {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.5);
}

#tga-atracciones .marker-highlighted .marker-number-circle {
    transform: scale(1.3);
    box-shadow: 0 4px 16px rgba(255, 102, 0, 0.7);
    z-index: 1000;
}

/* Marcador con logo (isologo-vgo.svg) */
#tga-atracciones .location-marker-logo {
    background: transparent;
    border: none;
}

#tga-atracciones .marker-logo-wrap {
    display: block;
    line-height: 0;
}

#tga-atracciones .marker-logo-img {
    width: 40px;
    height: auto;
    max-height: 42px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.2s ease;
}

#tga-atracciones .location-marker-logo:hover .marker-logo-img {
    transform: scale(1.15);
}

#tga-atracciones .marker-logo-fallback {
    font-size: 24px;
    color: var(--tga-naranja);
}

/* Popup del mapa */
#tga-atracciones .mapa-popup-container .leaflet-popup-content-wrapper {
    padding: 0;
    border-radius: 8px;
}

#tga-atracciones #mapa-atracciones .leaflet-popup-content {
    max-width: 211px;
    margin: 0;
    overflow: hidden;
}

#tga-atracciones .mapa-popup {
    min-width: 0;
    max-width: 211px;
    background: var(--tga-blanco);
}

#tga-atracciones .mapa-popup-imagen {
    width: 100%;
    height: 180px;
    overflow: hidden;
    margin: 0;
    background: var(--tga-gris-claro);
    display: flex;
    align-items: center;
    justify-content: center;
}

#tga-atracciones .mapa-popup-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

#tga-atracciones .mapa-popup-imagen:hover img {
    transform: scale(1.05);
}

#tga-atracciones .mapa-popup-content {
    padding: 15px;
}

#tga-atracciones .mapa-popup-title {
    margin: 0 0 12px 0;
    color: var(--tga-gris-oscuro);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

#tga-atracciones .mapa-popup-descripcion {
    margin: 0 0 15px 0;
    font-size: 11px;
    line-height: 1.6;
    color: #666;
    max-height: 120px;
    overflow-y: auto;
}

#tga-atracciones .mapa-popup-descripcion::-webkit-scrollbar {
    width: 4px;
}

#tga-atracciones .mapa-popup-descripcion::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#tga-atracciones .mapa-popup-descripcion::-webkit-scrollbar-thumb {
    background: var(--tga-naranja);
    border-radius: 2px;
}

#tga-atracciones .btn-popup-ver-mas {
    display: inline-block;
    background: var(--tga-naranja);
    color: var(--tga-blanco) !important;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

#tga-atracciones .btn-popup-ver-mas:hover {
    background: #e55a00;
    color: var(--tga-blanco) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 102, 0, 0.3);
}

/* Tours relacionados en popup */
#tga-atracciones .mapa-popup-tours {
    margin: 15px 0;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

#tga-atracciones .mapa-popup-tours-title {
    margin: 0 0 10px 0;
    color: var(--tga-gris-oscuro);
    font-size: 1rem;
    font-weight: 600;
}

#tga-atracciones .mapa-popup-tours-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#tga-atracciones .mapa-popup-tour-item {
    margin-bottom: 10px;
}

#tga-atracciones .mapa-popup-tour-item:last-child {
    margin-bottom: 0;
}

#tga-atracciones .mapa-popup-tour-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 4px;
    background: var(--tga-gris-claro);
}

#tga-atracciones .mapa-popup-tour-link:hover {
    background: #e8e8e8;
    transform: translateX(3px);
}

#tga-atracciones .mapa-popup-tour-imagen {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

#tga-atracciones .mapa-popup-tour-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

#tga-atracciones .mapa-popup-tour-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--tga-naranja);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
}

#tga-atracciones .mapa-popup-tour-link:hover .mapa-popup-tour-title {
    color: #e55a00;
    text-decoration: underline;
}

#tga-atracciones .mapa-popup-tour-price {
    font-size: 14px;
    color: var(--tga-naranja);
    font-weight: 600;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    #tga-atracciones .atracciones-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    #tga-atracciones .atracciones-mapa-columna {
        position: static;
        order: -1;
    }
    
    #tga-atracciones #mapa-atracciones {
        height: 400px;
    }
}

@media (max-width: 768px) {
    #tga-atracciones .atracciones-hero-title {
        font-size: 1.5rem;
    }
    
    #tga-atracciones .atracciones-hero-text {
        font-size: 0.9rem;
    }
    
    #tga-atracciones .atracciones-filtros {
        gap: 15px;
    }
    
    #tga-atracciones .filtro-icono {
        width: 80px;
        height: 80px;
    }
    
    #tga-atracciones .filtro-icon {
        font-size: 1.25rem;
    }
    
    #tga-atracciones .atracciones-lista-title,
    #tga-atracciones .atracciones-filtros-title {
        font-size: 1.2rem;
    }
    
    #tga-atracciones .atraccion-card {
        flex-direction: column;
        gap: 15px;
    }
    
    #tga-atracciones .atraccion-thumbnail {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 480px) {
    #tga-atracciones .atracciones-filtros {
        gap: 10px;
    }
    
    #tga-atracciones .filtro-icono {
        width: 70px;
        height: 70px;
    }
    
    #tga-atracciones .filtro-label {
        font-size: 12px;
    }
    
    #tga-atracciones .filtro-icon {
        font-size: 1.1rem;
    }
}

/* ============================================
   MAPA SOLO (DETALLE DE UNA ATRACCIÓN)
   ============================================ */

#tga-atracciones .mapa-atraccion-single-wrapper {
    width: 100%;
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

#tga-atracciones .mapa-atraccion-single {
    width: 100% !important;
    min-height: 400px;
    height: 400px;
}

#tga-atracciones .location-marker-single .marker-single-pin {
    font-size: 1.5rem;
    color: var(--tga-naranja);
    text-align: center;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

#tga-atracciones .location-marker-single .marker-single-pin i {
    display: block;
}

#tga-atracciones .mapa-popup-container-single .mapa-popup-title {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
}
