/**
 * CSS específico para Resource Explorer
 * Complementa el CSS del route-explorer con elementos únicos
 */


.infotourist-explorer-wrap {
    height: 800px !important; 
    max-height: 800px !important; 
    min-height: 600px; 
}


.infotourist-filters-container {
    position: relative !important;
    width: 100% !important;
    background: #fff !important;
    border-radius: 10px 10px 0 0 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    margin-bottom: 0 !important;
    z-index: 10 !important;
    max-height: none !important;
    overflow: visible !important;
}

.infotourist-main-content {
    height: 800px !important; 
    min-height: 600px;
    border-radius: 0 0 10px 10px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    margin-top: 0 !important;
}

.infotourist-filters {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    padding: 15px;
    width: 100%;
    gap: 10px;
    max-height: none !important;
    overflow: visible !important;
}

.filter-group.accordion-sort {
    order: -1;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.filter-group.accordion-sort .filter-group-label {
    display: block;
    font-weight: 600;
    font-size: 16px;
    color: #45c4a0;
    margin-bottom: 8px;
}

.taxonomy-accordion {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.accordion-item {
    border: none;
    border-radius: 0;
    overflow: visible !important; 
    background-color: transparent;
    margin-bottom: 8px;
}

.accordion-header {
    display: flex;
    align-items: center;
    background-color: transparent;
    cursor: pointer;
    transition: none;
    border-bottom: none;
    gap: 10px;
}

.accordion-header:hover {
    background-color: transparent;
}

.accordion-header.expanded {
    background-color: transparent;
    color: inherit;
}

.accordion-header.expanded:hover {
    background-color: transparent;
}

.accordion-arrow {
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    width: 16px;
    height: 16px;
    order: -1; 
}

.accordion-header.expanded .accordion-arrow {
    transform: rotate(90deg);
}

.accordion-arrow svg {
    width: 100%;
    height: 100%;
}

.accordion-title {
    flex: 1;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin: 0;
    padding: 8px 0;
}

.accordion-title small {
    font-weight: 400;
    color: #666;
    font-size: 12px;
    margin-left: 5px;
}

.accordion-content {
    padding: 10px 0;
    transition: all 0.3s ease;
    /* SIN LÍMITE DE ALTURA */
    max-height: none !important;
    overflow: visible !important;
}

.accordion-content.collapsed {
    display: none;
}

.accordion-content.expanded {
    display: block;
}

.taxonomy-checkboxes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
    max-height: none !important;
    overflow-y: visible !important;
}

.checkbox-item-grid {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    gap: 8px;
}

.checkbox-item-grid:hover {
    background: #e9ecef;
    border-color: #45c4a0;
}

.checkbox-item-grid input[type="checkbox"] {
    margin: 0;
    accent-color: #45c4a0;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.checkbox-visual {
    display: none; 
}

.term-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.term-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 3px;
}

.checkbox-item-grid .checkbox-label {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
    margin: 0;
}

.checkbox-item-grid input[type="checkbox"]:checked ~ .checkbox-label {
    color: #45c4a0;
    font-weight: 600;
}

.infotourist-routes-list.infotourist-routes-list {
    position: relative !important;
    flex: 1 !important; 
    overflow-y: visible !important; 
    overflow-x: hidden !important; 
    width: 100% !important;
    max-height: none !important; 
    padding: 15px !important;
    display: block !important;
    grid-template-columns: unset !important;
    gap: unset !important;
    column-count: auto !important;
    column-width: 350px !important; 
    column-gap: 30px !important;
    column-fill: balance !important;
}

.route-item.route-item {
    position: relative !important;
    padding: 0 !important;
    margin-bottom: 30px !important; 
    border-radius: 16px !important;
    background-color: #fff !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    display: block !important;
    flex-direction: unset !important;
    overflow: hidden !important;
    border: none !important;
    height: auto !important; 
    max-width: none !important; 
    width: 100% !important;
    break-inside: avoid !important; 
    page-break-inside: avoid !important; 
}

.route-item.route-item:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
}

.route-item.route-item.selected {
    border: 1px solid #45c4a0 !important;
    box-shadow: 0 0 0 2px rgba(69, 196, 160, 0.2) !important;
}

.route-content {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    min-height: 0 !important; 
}

.route-image {
    width: 100% !important;
    height: 160px !important;
    min-height: 160px !important;
    max-height: 160px !important; 
    margin-bottom: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    background-color: #eee !important;
    position: relative !important;
    flex-shrink: 0 !important; 
}

.route-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.3s ease !important;
}

.route-item.route-item:hover .route-image img {
    transform: scale(1.05) !important;
}

.route-metrics {
    display: flex !important;
    justify-content: flex-start !important;
    margin-bottom: 0 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #333 !important;
    background: #fff !important;
    padding: 12px 15px 0 !important;
    border-radius: 0 !important;
    border-bottom: none !important;
    gap: 8px !important;
    flex-shrink: 0 !important; 
}

.metric {
    display: flex !important;
    align-items: center !important;
    padding: 0 !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    text-align: left !important;
    justify-content: flex-start !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #555 !important;
}

.metric i {
    margin-right: 5px !important;
    color: #45c4a0 !important;  
    font-size: 14px !important;
}

.route-title {
    font-size: 1.2em !important;
    font-weight: 700 !important;
    margin: 12px 15px 8px !important;
    color: #e74c3c !important;
    line-height: 1.2 !important;
    flex-shrink: 0 !important; 
}

.route-excerpt {
    color: #666 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    margin: 0 15px !important;
    padding-bottom: 15px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important; 
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex: 1 !important; 
    min-height: 60px !important; 
    max-height: 80px !important; 
}

.resource-taxonomies {
    margin: 0 15px 15px !important;
    flex-shrink: 0 !important; 
    max-height: none !important; 
    overflow-y: visible !important; 
}

.taxonomy-terms {
    margin-bottom: 8px !important;
}

.term-tag {
    display: inline-block !important;
    background: #f0f0f0 !important;
    color: #666 !important;
    padding: 4px 8px !important;
    border-radius: 12px !important;
    font-size: 11px !important;
    margin-right: 5px !important;
    margin-bottom: 3px !important;
    white-space: nowrap !important;
}

.route-actions {
    display: flex !important;
    justify-content: center !important;
    margin: 0 15px 15px !important;
    margin-top: auto !important; 
    flex-shrink: 0 !important; 
    padding-top: 10px !important;
    border-top: 1px solid #f0f0f0 !important;
}

.route-button {
    display: inline-block !important;
    padding: 10px 20px !important;
    background-color: #45c4a0 !important; 
    border-radius: 30px !important;
    text-decoration: none !important;
    transition: background-color 0.2s !important;
    border: none !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-align: center !important;
    cursor: pointer !important;
    width: 120px !important;
    color: white !important;
}

.route-button:hover {
    background-color: #20b393 !important;
    transform: translateY(-1px) !important;
    color: white !important;
}

@media (max-width: 1200px) {
    .infotourist-routes-list.infotourist-routes-list {
        column-width: 300px !important;
        column-gap: 25px !important;
    }
}

@media (max-width: 768px) {
    .infotourist-routes-list.infotourist-routes-list {
        column-width: 280px !important;
        column-gap: 20px !important;
    }
    
    .route-excerpt {
        min-height: 50px !important;
        max-height: 60px !important;
    }
}

.modality-checkboxes,
.difficulty-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    gap: 8px;
}

.checkbox-item:hover {
    background: #e9ecef;
    border-color: #45c4a0;
}

.checkbox-item input[type="checkbox"] {
    margin: 0;
    accent-color: #45c4a0;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.checkbox-item .checkbox-label {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
    margin: 0;
}

.checkbox-item input[type="checkbox"]:checked ~ .checkbox-label {
    color: #45c4a0;
    font-weight: 600;
}

.accordion-content {
    padding: 10px 0;
    transition: all 0.3s ease;
}

.filter-group-label { cursor:default; display:flex; align-items:center; }
.taxonomy-toggle .filter-group-label { cursor:pointer; }
.taxonomy-toggle .filter-group-label::after { content:none; }
.taxonomy-group .filter-group-label { display:none; }
.filter-group.collapsed .modality-checkboxes,
.filter-group.collapsed .difficulty-checkboxes {
    display: none;
}

.modality-checkboxes,
.difficulty-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    gap: 8px;
}

.checkbox-item:hover {
    background: #e9ecef;
    border-color: #45c4a0;
}

.checkbox-item input[type="checkbox"] {
    margin: 0;
    accent-color: #45c4a0;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.checkbox-label {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
    margin: 0;
}

@media (max-width: 1024px) {
    .infotourist-filters {
        flex-direction: column;
    }
    
    .filter-group.modality-filter,
    .filter-group.difficulty-filter {
        width: 100%;
        margin-bottom: 15px;
    }
}

@media (max-width: 768px) {
    .modality-checkboxes,
    .difficulty-checkboxes {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 6px;
    }
    
    .infotourist-explorer-wrap {
        height: auto;
    }
    
    .infotourist-main-content {
        height: auto;
    }
}

@media (max-width: 576px) {
    .infotourist-explorer-wrap {
        height: auto;
    }
    
    .infotourist-main-content {
        height: auto;
    }
}

.resource-taxonomies {
    margin: 0 15px 15px;
}

.taxonomy-terms {
    margin-bottom: 8px;
}

.term-tag {
    display: inline-block;
    background: #f0f0f0;
    color: #666;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin-right: 5px;
    margin-bottom: 3px;
    white-space: nowrap;
}

.category-icon-img {
    width: 16px;
    height: 16px;
    margin-right: 5px;
    vertical-align: middle;
}

.map-info-overlay.hidden {
    display: none;
}

.no-resources-found {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin: 20px;
    border: 1px solid #f5c6cb;
}

.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    color: #999;
    font-size: 24px;
}

.no-image i {
    font-size: 48px;
    color: #ddd;
}

.route-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.route-item:hover .route-image img {
    transform: scale(1.05);
}

.gm-style-iw img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

@media only screen and (-webkit-min-device-pixel-ratio: 2),
       only screen and (min-resolution: 192dpi) {
    .route-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
} 

.toggle-taxonomies-btn {
    background: #45c4a0;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 15px;
    transition: background-color 0.2s;
}

.toggle-taxonomies-btn:hover {
    background: #20b393;
}

.taxonomies-collapsed .filter-group.taxonomy-group { display:none; } 
.taxonomies-collapsed .filter-group.taxonomy-group { display:none; } 

.resource-card-popup {
    width: 350px !important;
    max-width: 350px !important;
    height: 450px !important; 
    max-height: 450px !important;
    background: #fff !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    overflow: hidden !important;
    position: relative !important;
}

.resource-card-popup .popup-content {
    height: calc(100% - 60px) !important; 
    padding: 0 !important;
    overflow-y: auto !important;
    padding-bottom: 20px !important;
    position: relative !important;
}

.resource-card-popup .route-excerpt {
    position: relative !important;
    color: #666 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    margin: 0 15px !important;
    padding-bottom: 15px !important;
    display: block !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    overflow: visible !important;
    text-overflow: unset !important;
    /* ALTURA FLEXIBLE */
    min-height: 60px !important;
    max-height: none !important;
}

.resource-card-popup .route-excerpt::after {
    content: "" !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 15px !important;
    right: 15px !important;
    height: 30px !important;
    background: linear-gradient(transparent, #fff) !important;
    pointer-events: none !important;
}

.resource-card-popup .resource-taxonomies {
    margin: 0 15px 15px !important;
    max-height: 80px !important; 
    overflow-y: auto !important;
    flex-shrink: 0 !important;
}

.resource-card-popup .route-actions {
    position: absolute !important;
    bottom: 10px !important;
    left: 10px !important;
    right: 10px !important;
    height: 50px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    border-top: 1px solid #f0f0f0 !important;
    z-index: 10 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.resource-card-popup .route-button {
    display: inline-block !important;
    padding: 10px 20px !important;
    background-color: #45c4a0 !important; 
    border-radius: 30px !important;
    text-decoration: none !important;
    transition: background-color 0.2s !important;
    border: none !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-align: center !important;
    cursor: pointer !important;
    width: 120px !important;
    color: white !important;
}

.resource-card-popup .route-button:hover {
    background-color: #20b393 !important;
    transform: translateY(-1px) !important;
    color: white !important;
} 