/* ==========================================================================
   SINGLE PROJECT PAGE - ARQUITECTURA FINAL
   ========================================================================== */

/* 1. ESTRUCTURA Y HERO (Altura Fija) */
.project-top-wrapper {
    background-color: #f7f7f7;
    padding-bottom: 2rem;
    margin-bottom: 4rem;
}

.project-single-header {
    padding: calc(var(--header-height) + 2.5rem) 0 2rem 0;
}

.project-main-title {
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 600;
    letter-spacing: -1px;
    color: var(--color-black);
    margin: 0;
}

.single-hero-img {
    width: 100%;
    height: 450px; /* Altura fija base para Desktop */
    max-height: 55vh; /* Límite para que nunca sea gigante */
    object-fit: cover;
    display: block;
}

/* 2. FRANJA GRIS (Estilo Premium) */
.project-data-strip-single {
    padding-top: 2.5rem;
}

.strip-inner-single {
    display: flex;
    justify-content: space-between; 
    gap: 2rem; 
    flex-wrap: wrap;
}

.strip-item-single {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.strip-label-single {
    font-size: 0.7rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
}

.strip-val-single {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-black);
}

/* 3. CONTENIDO Y LISTAS (Gutenberg Refinado) */
.project-single-content {
    padding: 3rem 0 6rem 0;
}

.project-single-content p {
    margin-bottom: 1.8rem;
    line-height: 1.7;
    font-size: 1.1rem;
}

/* --- DOBLE ESPACIO ENTRE IMÁGENES Y TEXTOS --- */
.project-single-content img,
.project-single-content figure,
.project-single-content .wp-block-image {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Espacio gigante cuando la imagen está alineada a la izquierda */
.project-single-content figure.alignleft,
.project-single-content img.alignleft,
.project-single-content .wp-block-image.alignleft {
    margin-right: 4rem; 
    margin-bottom: 2rem;
}

/* Espacio gigante cuando la imagen está alineada a la derecha */
.project-single-content figure.alignright,
.project-single-content img.alignright,
.project-single-content .wp-block-image.alignright {
    margin-left: 4rem; 
    margin-bottom: 2rem;
}

/* Espacio gigante si usas el bloque nativo de "Medios y Texto" */
.project-single-content .wp-block-media-text {
    gap: 4rem; 
}

/* --- BARRERA PROTECTORA DE LISTAS --- */
.project-single-content ul, 
.project-single-content ol {
    margin-left: 2rem;
    margin-bottom: 2rem;
    padding-left: 1rem;
    list-style-position: outside; 
    display: flow-root; /* BARRERA: Impide que las viñetas invadan imágenes alineadas */
}

.project-single-content ul {
    list-style-type: disc !important; 
}

.project-single-content ol {
    list-style-type: decimal !important;
}

.project-single-content li {
    margin-bottom: 0.8rem;
    padding-left: 0.5rem;
}

/* ==========================================================================
   RESPONSIVE (Móvil)
   ========================================================================== */
@media (max-width: 768px) {
    .project-single-header {
        padding: calc(var(--header-height) + 1.5rem) 0 1.5rem 0;
    }

    .single-hero-img {
        height: 250px; 
        max-height: 35vh;
    }

    .strip-inner-single {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem 1rem;
    }

    .project-top-wrapper {
        margin-bottom: 2rem;
        padding-bottom: 2.5rem;
    }

    .project-single-content {
        padding-top: 1rem;
    }
    
    .project-single-content ul, 
    .project-single-content ol {
        margin-left: 1.2rem;
    }
}

/* ==========================================================================
   VIDEO FACADE & LIGHTBOX MULTIMEDIA
   ========================================================================== */
.video-facade-wrapper {
    position: relative;
    cursor: pointer;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
}

.video-facade-wrapper img {
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.85;
}

.video-facade-wrapper:hover img {
    transform: scale(1.02);
    opacity: 1;
}

.play-button-overlay {
    position: absolute;
    background: rgba(0,0,0,0.6);
    border: 2px solid #fff;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.play-button-overlay svg {
    width: 35px;
    height: 35px;
    margin-left: 5px; /* Compensa la ilusión óptica del triángulo de Play */
}

.video-facade-wrapper:hover .play-button-overlay {
    background: var(--color-black);
    transform: scale(1.1);
}

/* Lighbox General */
.dhema-lightbox-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,11,41,0.95);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.dhema-lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.dhema-lightbox-content {
    width: 90%;
    max-width: 1200px;
    height: 85vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dhema-lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}

.dhema-lightbox-video {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}

.dhema-lightbox-close {
    position: absolute;
    top: 20px; right: 30px;
    color: #fff;
    font-size: 45px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
    z-index: 100000;
}

.dhema-lightbox-close:hover {
    color: #ccc;
}