/* General Body & Layout */
body {
background-image: linear-gradient(
    rgba(240, 255, 255, 0.90), 
    rgba(220, 248, 248, 0.93)
), url('./imgindex/back.PNG');
    color: #212529;

}

.map-page {
    overflow: hidden;
    height: 100vh;
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Hero Section */
.hero {
background-image: linear-gradient(
    rgba(240, 255, 255, 0.60), 
    rgba(220, 248, 248, 0.50)
),
url('./imgindex/fondo.png');
    background-size: cover;
    background-position: center;

}
.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    font-size: 0.9rem;
    color: #f8fafc;
    margin-bottom: 1rem;
    backdrop-filter: blur(8px);
}
.hero-map-card {
    border-radius: 1rem;
}
.hero-map {
    height: 300px;
    border-radius: 0.75rem;
}

/* Cards */
.section-card, .featured-card, .cta-card {
    border-radius: 1.25rem;
}
.featured-card img {
    height: 200px;
    object-fit: cover;
}
.cta-card {
    background: linear-gradient(45deg, #0ea5e9, #2563eb);
    color: #ffffff;
}
.cta-card .text-muted {
    color: rgba(255,255,255,0.8) !important;
}
.featured-carousel .carousel-control-prev,
.featured-carousel .carousel-control-next {
    width: 5%;
}
.featured-carousel .carousel-control-prev-icon,
.featured-carousel .carousel-control-next-icon {
    background-color: rgba(15,23,42,.5);
    border-radius: 50%;
}
.featured-card .card-body {
    position: relative; /* Asegura que los enlaces dentro de la tarjeta sean clickeables */
    z-index: 2; /* Coloca el contenido de la tarjeta por encima de los controles del carrusel */
}

/* Map Page */
.map-shell {
    display: flex;
    height: 100vh;
}
.map-sidebar {
    width: 380px;
    flex-shrink: 0;
    background-color: #212529;
    color: #fff;
    display: flex;
    flex-direction: column;
}
.map-panel {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.map-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}
.map-results-header {
    margin-top: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #495057;
}
.map-results {
    overflow-y: auto;
    flex-grow: 1;
}
.map-result-item {
    padding: 1rem 0.5rem;
    border-bottom: 1px solid #495057;
    cursor: pointer;
    transition: background-color 0.2s;
}
.map-result-item:hover {
    background-color: #343a40;
}
.map-content {
    flex-grow: 1;
}
.map-fullscreen {
    width: 100%;
    height: 100%;
}

/* Custom Compact Map Popup Styles */
.map-popup-compact {
    width: 220px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    padding: 12px;
}
.map-popup-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    flex-shrink: 0;
    background-color: #f0f0f0;
}
.map-popup-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.map-popup-icon {
    font-size: 1.5rem;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.map-popup-text {
    display: flex;
    flex-direction: column;
}
.map-popup-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
    color: #333;
}
.map-popup-category {
    font-size: 0.8rem;
    color: #6c757d;
}
.map-popup-link {
    display: inline-block;
    font-size: 0.875rem;
    text-decoration: none;
    color: #0d6efd;
    font-weight: 500;
}
.map-popup-link:hover {
    text-decoration: underline;
}
.map-popup-actions {
    margin-top: 12px;
    display: flex;
    gap: 16px;
    text-decoration: underline;
}

/* Leaflet overrides to remove default padding */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
}
.leaflet-popup-content {
    margin: 0 !important;
    padding: 0 !important;
}

/* Custom marker icon style */
.map-logo-marker {
    border-radius: 50%;
    background-clip: padding-box;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}

/* Styles for the list on the left */
.map-result-item strong {
    display: block;
    color: #f8f9fa;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 2px;
}
.map-result-item small {
    color: #adb5bd;
    display: block;
    font-size: 0.85rem;
}
.map-result-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background-color: #495057;
}
.map-result-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    flex-shrink: 0;
    background-color: #343a40;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #f8f9fa;
}

/* Admin map */
.admin-map {
    height: 350px;
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
}

/* Flash messages */
.toast-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1056;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.toast-item {
    padding: 0.75rem 1.25rem;
    border-radius: 0.375rem;
    color: white;
    box-shadow: 0 0.25rem 0.75rem rgba(0,0,0,0.1);
    opacity: 1;
    transition: opacity 0.2s, transform 0.2s;
}
.toast-item.success { background-color: #198754; }
.toast-item.error { background-color: #dc3545; }
.toast-item.hide {
    opacity: 0;
    transform: translateX(100%);
}

/* Detail page */
.detail-hero-copy {
    font-size: 1.1rem;
}
.detail-hero-copy-muted {
    font-size: 0.95rem;
    color: #6c757d;
}
.detail-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #e9ecef;
    border-radius: 99px;
    font-weight: 500;
}
.detail-map {
    height: 300px;
    border-radius: 0.5rem;
}
.detail-review-card {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
}
.img-thumbnail-cover {
    width: 100px;
    height: 75px;
    object-fit: cover;
}
.img-cover {
    width: 100%;
    height: 280px; /* Altura moderada para las fotos de la galería */
    object-fit: cover;
}
.detail-hero {
    border-radius: 1.25rem;
    overflow: hidden;
}
.detail-hero img {
    object-fit: cover;
    height: 100%;
    min-height: 320px; /* Tamaño mínimo para la imagen principal */
    max-height: 500px; /* Tamaño máximo para la imagen principal */
}
.detail-photo-card {
    border-radius: 1rem;
}

.category-filter.active {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
}
.category-filter:not(.active) {
    background-color: #fff;
    color: #495057;
}

/* Info Cards Section */
.info-card {
    border: none;
    box-shadow: 0 8px 24px rgba(15,23,42,.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(15,23,42,.1);
}
.info-card ul li {
    margin-bottom: 0.5rem;
}

/* Animations */
.animated-section {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Curiosities Carousel */
.curiosity-card {
    background-color: #ffffff;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 24px rgba(15,23,42,.05);
    overflow: hidden;
}
.curiosity-card h5 {
    font-weight: 600;
    color: #1e3a8a;
}
.curiosity-card p {
    color: #475569;
    font-size: 0.95rem;
}
#curiosidadesCarousel .carousel-control-prev-icon,
#curiosidadesCarousel .carousel-control-next-icon {
    display: none;
}
#curiosidadesCarousel .carousel-control-prev,
#curiosidadesCarousel .carousel-control-next {
    display: none;
}
.curiosity-image {
    height: 200px;
    object-fit: cover;
    width: 100%;
}
.curiosity-card-body {
    padding: 1.5rem;
}
.carousel-controls-bottom {
    text-align: center;
    margin-top: 1.5rem;
}
.carousel-controls-bottom .btn {
    border-radius: 99px;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    border-color: #e2e8f0;
}

/* Guide Section */
.guide-card {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.guide-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(15,23,42,.08) !important;
}
.guide-step-number {
    display: inline-flex;
    width: 52px;
    height: 52px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    color: #ffffff;
    font-weight: 700;
    font-size: 1.3rem;
    border: 4px solid #fff;
    box-shadow: 0 0 0 1px #93c5fd, 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* History Section */
.history-section img {
    border-radius: 1.25rem;
    box-shadow: 0 12px 32px rgba(15,23,42,.1);
}

/* Overwrite curiosity card for more color */
.curiosity-card {
    background: #f0f9ff;
    border: 1px solid #e0f2fe;
}
@keyframes gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.creator-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-left: auto;
    margin-right: auto;
}

/* --- Responsive Map --- */

#sidebar-toggle {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1001; /* Above map, below sidebar */
}

@media (max-width: 991.98px) {
    .map-sidebar {
        position: fixed; /* Use fixed to stay in place when map is panned */
        top: 0;
        left: 0;
        height: 100%;
        width: 320px;
        z-index: 1002;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    }
    .map-sidebar.active {
        transform: translateX(0);
    }
}