/* Popup principal */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

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

.popup-content {
    background: #1a1a1a;
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 5px;
    position: relative;
    border: 2px solid var(--primary);
    box-shadow: 0 20px 40px rgba(255,193,7,0.2);
    padding: 0; /* El padding se traslada al header y body */
}

.popup-header {
    position: sticky;
    top: 0;
    background: #1a1a1a;
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    z-index: 10;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.popup-close {
    background: none;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    color: #ccc;
    transition: color 0.3s;
    line-height: 1;
}

.popup-close:hover {
    color: var(--primary);
}

.popup-body {
    padding: 2rem;
    color: var(--light);
}

/* El resto de estilos (galería, tiers, etc.) permanecen igual */
.popup-body h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.popup-body p {
    color: #ccc;
    margin-bottom: 1.5rem;
}

/* Galería dentro del popup */
.popup-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.popup-gallery img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid transparent;
}

.popup-gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(255,193,7,0.3);
    border-color: var(--primary);
}

/* Tres columnas de niveles */
.popup-tiers {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.popup-tier {
    flex: 1 1 250px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(5px);
    border-radius: 5px;
    padding: 1.5rem;
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.3s;
}

.popup-tier:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.popup-tier h3 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.popup-tier ul {
    list-style: none;
    padding: 0;
}

.popup-tier li {
    color: #ccc;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.popup-tier li::before {
    content: '✓';
    color: var(--primary);
    font-weight: bold;
}

/* Botón de contacto mejorado */
.popup-contact-link {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.8rem 2rem;
    background: var(--primary);
    color: var(--secondary) !important;
    text-decoration: none;
    font-weight: 700;
    border-radius: 5px;
    transition: all 0.3s;
    border: 2px solid var(--primary);
    text-align: center;
}

.popup-contact-link:hover {
    background: transparent;
    color: var(--primary) !important;
    transform: scale(1.05);
}

/* Lightbox para expandir imagen */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: var(--primary);
}

/* Ajustes responsive para móvil */
@media (max-width: 768px) {
    .popup-content {
        width: 95%;
        max-height: 95vh;
    }

    .popup-header {
        padding: 0.8rem 1.5rem;
    }

    .popup-close {
        font-size: 2rem;
    }

    .popup-body {
        padding: 1.5rem;
    }

    .popup-body h2 {
        font-size: 1.8rem;
    }

    .popup-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .popup-gallery img {
        height: 120px;
    }

    .popup-tiers {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .popup-tier {
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
    }

    .popup-contact-link {
        display: block;
        width: 100%;
        max-width: 300px;
        margin: 1.5rem auto 0;
    }
}