/* ============================================
   MINIMAL DESIGN - FULLSCREEN MAP
   ============================================ */
:root {
    --font-main: 'Montserrat', sans-serif;
    --font-logo: 'American Typewriter', serif;
    --color-primary: #4AC7FF;
    --color-primary-dark: #1A237E;
    --color-accent: #F7A622;
    --color-dark-blue: #3A406A;
    --color-text-dark: #2c3e50;
    --color-white: #FFFFFF;
    --status-pagado: #00BFFF;
    --status-con-datos: #929292;
    --status-sin-datos: #D5D5D5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    overflow: hidden;
    position: relative;
}

/* ============================================
   MAP - FULL SCREEN
   ============================================ */
#map {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
}

/* ============================================
   LOADING INDICATOR
   ============================================ */
.loading-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 15px 30px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.loading-indicator.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-indicator span {
    font-size: 0.75rem;
    color: var(--color-text-dark);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.loading-indicator span::before {
    content: '';
    width: 12px;
    height: 12px;
    border: 2px solid var(--color-primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   FLOATING LOGO WITH FILTERS
   ============================================ */
.floating-logo {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    text-align: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 20px 40px 25px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.floating-logo:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.floating-logo img {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.filters-container {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.filters-container select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 25px;
    padding: 12px 35px 12px 20px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-dark);
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    min-width: 220px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%233A406A' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.filters-container select:hover {
    background-color: var(--color-white);
    border-color: var(--color-accent);
    transform: translateY(-1px);
}

.filters-container select:focus {
    background-color: var(--color-white);
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(247, 166, 34, 0.2);
}

/* ============================================
   POPUPS & OVERLAYS
   ============================================ */
.popup-overlay,
.popup-container,
.video-overlay,
.carousel-overlay {
    z-index: 2000;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.popup-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.popup-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 85vh;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.popup-container.visible {
    transform: translateY(0);
}

.popup-handle-bar {
    width: 50px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 2.5px;
    margin: 12px auto 8px;
}

.popup-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-dark);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.popup-close-btn:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.popup-content {
    padding: 0 24px 24px;
    overflow-y: auto;
}

.popup-content h4 {
    font-size: 1.4rem;
    margin-bottom: 18px;
    color: #000000;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.popup-content p {
    font-size: 1rem;
    margin-bottom: 12px;
    line-height: 1.6;
    color: var(--color-text-dark);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.popup-content .data-value {
    font-weight: 700;
    color: var(--color-dark-blue);
}

.popup-content img.letrero-img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 16px;
    margin-top: 15px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.popup-buttons {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.popup-btn {
    width: 100%;
    padding: 16px;
    border-radius: 16px;
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.3px;
}

.popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.popup-btn:active {
    transform: translateY(0);
}

.primary-btn {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #000000;
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-weight: 700;
}

.secondary-btn {
    background: #00BFFF;
    color: var(--color-white);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.share-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--color-text-dark);
    margin-top: 8px;
}

/* ============================================
   VIDEO OVERLAY
   ============================================ */
.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.video-container {
    width: 100%;
    max-width: 900px;
    text-align: center;
}

#ad-video {
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
}

.video-container p {
    color: var(--color-white);
    margin-top: 20px;
    font-weight: 600;
    font-size: 1.05rem;
}

/* ============================================
   CAROUSEL OVERLAY
   ============================================ */
.carousel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
}

#carousel-image {
    max-width: 95%;
    max-height: 85%;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
}

.carousel-close-btn {
    position: absolute;
    top: 25px;
    right: 25px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--color-white);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.carousel-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--color-white);
    border: 2px solid rgba(255, 255, 255, 0.2);
    font-size: 2.5rem;
    padding: 15px 25px;
    cursor: pointer;
    border-radius: 16px;
    transition: all 0.2s ease;
}

.carousel-nav-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.05);
}

.carousel-nav-btn.prev {
    left: 15px;
}

.carousel-nav-btn.next {
    right: 15px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .floating-logo {
        top: 20px;
        padding: 15px 20px 20px;
        border-radius: 16px;
        max-width: calc(100vw - 40px);
    }

    .floating-logo img {
        width: 60px;
        height: 60px;
        margin-bottom: 12px;
    }

    .filters-container {
        flex-direction: column;
        gap: 10px;
    }

    .filters-container select {
        min-width: 0;
        width: 100%;
        font-size: 0.85rem;
        padding: 10px 30px 10px 15px;
    }

    .carousel-nav-btn {
        font-size: 2rem;
        padding: 10px 18px;
    }

    .carousel-nav-btn.prev {
        left: 10px;
    }

    .carousel-nav-btn.next {
        right: 10px;
    }
}

@media (min-width: 768px) {
    .popup-container {
        width: 450px;
        left: auto;
        right: 25px;
        bottom: 25px;
        border-radius: 20px;
        border: 1px solid rgba(255, 255, 255, 0.25);
        transform: translateX(120%);
        max-height: 90vh;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    }

    .popup-container:hover {
        transform: translateX(0) translateY(-2px);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    }

    .popup-container.visible {
        transform: translateX(0);
    }

    .popup-handle-bar {
        display: none;
    }
}

@media (min-width: 1024px) {
    .floating-logo {
        padding: 25px 50px 30px;
    }

    .floating-logo img {
        width: 90px;
        height: 90px;
        margin-bottom: 18px;
    }

    .filters-container select {
        min-width: 200px;
        font-size: 0.95rem;
    }
}

/* Password Overlay */
.password-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    /* Slight dark tint to make box pop, but map visible */
    backdrop-filter: none;
    /* No blur on the map */
    -webkit-backdrop-filter: none;
    z-index: 20000;
    /* Highest priority, above loading indicator */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.password-container {
    text-align: center;
    max-width: 500px;
    padding: 50px;
    font-family: 'Montserrat', sans-serif;
    background-color: white;
    /* Solid white box */
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    /* Nice shadow */
}

.password-logo {
    max-width: 150px;
    margin-bottom: 30px;
}

.password-text {
    font-size: 16px;
    color: #333;
    line-height: 1.6;
    margin-bottom: 40px;
}

.password-input-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.password-input-group input {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    width: 200px;
    outline: none;
    transition: border-color 0.3s;
}

.password-input-group input:focus {
    border-color: #333;
}

.password-input-group button {
    padding: 12px 25px;
    background-color: #000;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.password-input-group button:hover {
    background-color: #333;
}

.password-error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 10px;
    display: none;
}