/**
 * Single Proyecto Styles - Propaganda v2
 *
 * Carrusel centrado (fade + click) + Flip Créditos
 * Basado en Renell Medrano layout-3
 *
 * @package Propaganda_v2
 * @version 3.2.0
 */

/* ============================================
   LAYOUT — 100dvh, centrado
   ============================================ */
   .single-proyecto .site {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.proyecto-section {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   FLIP CONTAINER — centrado fixed
   ============================================ */
.proyecto-flip-container {
    position: fixed;
    left: 50%;
    top: 50vh;
    top: 50dvh;
    transform: translate(-50%, -50%);
    width: 100%;
    z-index: 9999999999;
    perspective: 1200px;
}

.proyecto-flip-card {
    position: relative;
    width: 100%;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.proyecto-flip-card.flipped {
    transform: rotateX(180deg);
}

.proyecto-flip-front,
.proyecto-flip-back {
    width: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.proyecto-flip-front {
    transform: rotateX(0deg);
}

/* Back — Créditos */
.proyecto-flip-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotateX(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fdfdfd;
    transition: background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.proyecto-flip-back p {
    font-family: 'TWK Lausanne', sans-serif;
    font-size: 16px;
    letter-spacing: 0;
    line-height: normal;
    text-align: center;
    padding: 16px;
    width: 50vw;
    white-space: pre-line;
}

/* ============================================
   SLIDES — dentro del flip-front
   ============================================ */
.proyecto-slides {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.proyecto-slide {
    position: absolute;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.proyecto-slide.active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
    z-index: 30;
}

.proyecto-slide img {
    width: 100%;
    height: auto;
    max-height: calc(80vh - 20px);
    display: block;
    margin: 0 auto;
    object-fit: contain;
    object-position: center;
}

.video-container video {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(80vh - 20px);
    display: block;
    object-fit: contain;
    object-position: center;
}

/* ============================================
   CLICK NAVIGATION — cursor en slides
   ============================================ */

/* ============================================
   VIDEO CONTAINER
   ============================================ */
.video-container {
    position: relative;
    width: fit-content;
    max-width: 100%;
    z-index: 60;
}

/* ============================================
   VIDEO CONTROLS — mix-blend-mode: difference
   ============================================ */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    mix-blend-mode: difference;
    color: #fff;
    font-family: 'TWK Lausanne 1000', sans-serif;
    font-size: 16px;
    line-height: 1;
    z-index: 100;
    transition: opacity 0.3s ease;
}

.video-controls-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.video-controls-right {
    display: flex;
    align-items: center;
}

.video-control-btn {
    cursor: pointer;
    padding: 0;
    transition: opacity 0.3s ease;
    pointer-events: all;
    user-select: none;
}

.video-control-btn:hover {
    opacity: 0.5;
}

.video-time {
    display: flex;
    gap: 2px;
    font-variant-numeric: tabular-nums;
}

/* Progress bar */
.video-progress-wrapper {
    position: relative;
    height: 4px;
    cursor: pointer;
    padding: 12px 4px;
    width: 33vw;
}

.video-progress-bar-bg {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%);
}

.video-progress-bar {
    position: absolute;
    top: 50%;
    left: 0;
    height: 4px;
    background: #fff;
    width: 0%;
    transform: translateY(-50%);
    transition: width 0.1s linear;
}

/* ============================================
   CURSOR — cambio dinámico por slide
   ============================================ */
.proyecto-slide.active.cursor-left {
    cursor: w-resize;
}

.proyecto-slide.active.cursor-right {
    cursor: e-resize;
}

.proyecto-slide img {
    cursor: e-resize;
}

.proyecto-slide img.cursor-left {
    cursor: w-resize;
}

.proyecto-slide img.cursor-right {
    cursor: e-resize;
}

/* ============================================
   FOOTER — Navegación + Credits
   ============================================ */
.proyecto-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 10px 12px;
    z-index: 9999;
    pointer-events: none;
}

.proyecto-footer > * {
    pointer-events: auto;
}

.proyecto-nav {
    display: flex;
    gap: 4px;
    font-family: 'TWK Lausanne 350', sans-serif;
    font-size: 16px;
    line-height: 1;
}

.proyecto-nav button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    color: #000;
    padding: 0;
    transition: opacity 0.3s ease, color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.4;
}

.proyecto-nav button:hover {
    opacity: 1;
}

.proyecto-nav button.active {
    opacity: 1;
}

.proyecto-credits-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'TWK Lausanne 350', sans-serif;
    font-size: 16px;
    font-weight: inherit;
    color: #000;
    padding: 0;
    transition: opacity 0.3s ease, color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
}

.proyecto-credits-btn:hover {
    opacity: 0.4;
}

/* ============================================
   RESPONSIVE — Tablet
   ============================================ */
@media (min-width: 769px) {
    .proyecto-nav {
        font-size: 38px;
    }

    .proyecto-credits-btn {
        font-size: 14px;
    }
}

@media (max-width: 999px) {
    .proyecto-flip-container {
        width: calc(80vw - 20px);
    }

    .proyecto-slide img,
    .video-container video {
        width: 100%;
        max-height: calc(80vh - 20px);
    }
}

/* ============================================
   RESPONSIVE — Mobile
   ============================================ */
@media (max-width: 768px) {
    .proyecto-flip-container {
        width: calc(100vw - 20px);
    }

    .proyecto-slide img,
    .video-container video {
        width: 100%;
        max-height: none;
        height: auto;
    }

    .proyecto-footer {
        padding: 10px;
    }

    .video-controls-left {
        gap: 8px;
    }

    .video-progress-wrapper {
        width: 100px;
        padding: 4px;
    }

    .video-controls {
               padding: 6px ;
		
        font-size: 10px;
        line-height: 1;
    }

    .proyecto-flip-back p {
        font-size: var(--font-size-sm, 12px);
        letter-spacing: 0.01em;
        padding: 1rem;
        text-align: center;
        width: 75vw;
    }

    .proyecto-credits-btn {
        font-size: 14px;
        line-height: 1;
    }

    .proyecto-nav {
        font-size: 14px;
        line-height: 1;
    }
}

/* ============================================
   NIGHT MODE
   ============================================ */
body.night-mode .proyecto-flip-back {
    background: #000;
}

body.night-mode .proyecto-nav button {
    color: #fdfdfd;
}

body.night-mode .proyecto-credits-btn {
    color: #fdfdfd;
}
