/* RESET BÁSICO */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ESPACIO APARTE - FONDO BLANCO */
.seccion-video-promocional {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    background-color: white;
    background-image: url('../img/videos/pattern-bg.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    position: relative;
}

.seccion-video-promocional::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/videos/overlay-pattern.png');
    background-repeat: repeat;
    background-size: 200px;
    opacity: 0.05;
    pointer-events: none;
}

.contenedor-video-promocional {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* TÍTULO CON RAYITA VERDE - CENTRADO HORIZONTAL */
.titulo-contenedor {
    width: 100%;
    max-width: 900px;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.titulo-con-rayita {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    position: relative;
}

.titulo-con-rayita::before,
.titulo-con-rayita::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40px;
    height: 40px;
    background-image: url('../icons/video-camera.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.2;
    transform: translateY(-50%);
}

.titulo-con-rayita::before {
    left: -60px;
}

.titulo-con-rayita::after {
    right: -60px;
}

.rayita-verde {
    height: 3px;
    background-color: #28a745;
    flex: 1;
    max-width: 200px;
    background-image: linear-gradient(90deg, transparent, #28a745, transparent);
    position: relative;
}

.rayita-verde::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background-color: #28a745;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
}

.titulo-principal {
    color: #1a3a1a;
    font-size: 32px;
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap;
    padding: 0 20px;
    background: linear-gradient(45deg, #1a3a1a, #28a745);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.titulo-principal::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #28a745, transparent);
}

.subtitulo-video {
    color: #495057;
    font-size: 18px;
    margin-top: 10px;
    background-image: url('../icons/info-circle.svg');
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 18px;
    padding-left: 25px;
    display: inline-block;
}

.subtitulo-video i {
    color: #28a745;
    margin-right: 8px;
    background-image: url('../icons/play-circle.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px;
    width: 18px;
    height: 18px;
    display: inline-block;
    font-style: normal;
}

/* VIDEO CENTRADO */
.video-contenedor {
    width: 100%;
    max-width: 800px;
    background: #ffffff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin: 0 auto;
    border: 1px solid rgba(0,0,0,0.05);
    background-image: url('../img/videos/container-bg.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    position: relative;
    overflow: hidden;
}

.video-contenedor::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/videos/container-overlay.png');
    background-repeat: repeat;
    background-size: 100px;
    opacity: 0.1;
    pointer-events: none;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    background-color: #000;
    background-image: url('../img/videos/thumbnail.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.video-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/videos/video-overlay.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    opacity: 0.1;
    z-index: 1;
    pointer-events: none;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    z-index: 2;
}

/* Botón play overlay para antes de cargar */
.play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background-image: url('../icons/play-button.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-color: rgba(40, 167, 69, 0.9);
    border-radius: 50%;
    cursor: pointer;
    z-index: 3;
    box-shadow: 0 5px 20px rgba(40, 167, 69, 0.4);
    transition: all 0.3s ease;
}

.play-button-overlay:hover {
    background-color: rgba(40, 167, 69, 1);
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.6);
}

/* Información del video */
.info-video {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    background-image: linear-gradient(90deg, transparent, #e9ecef, transparent);
    background-repeat: no-repeat;
    background-position: top;
    background-size: 100% 1px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #495057;
    font-size: 14px;
    padding: 8px 15px;
    background: #f8f9fa;
    border-radius: 20px;
    background-image: linear-gradient(45deg, #f8f9fa, #ffffff);
    box-shadow: 0 3px 8px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.info-item:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #28a745;
}

.info-item i {
    color: #28a745;
    background-image: url('../icons/calendar-video.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px;
    width: 14px;
    height: 14px;
    display: inline-block;
    font-style: normal;
}

.info-item.duration i {
    background-image: url('../icons/clock-video.svg');
}

.info-item.quality i {
    background-image: url('../icons/hd-video.svg');
}

/* Controles adicionales */
.video-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e9ecef;
}

.control-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background-image: linear-gradient(45deg, #28a745, #34ce57);
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3);
}

.control-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(40, 167, 69, 0.4);
}

.control-btn i {
    background-image: url('../icons/download-video.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px;
    width: 16px;
    height: 16px;
    display: inline-block;
    font-style: normal;
}

.control-btn.share i {
    background-image: url('../icons/share-video.svg');
}

/* Decorative elements */
.decorative-corner {
    position: absolute;
    width: 50px;
    height: 50px;
    background-image: url('../img/videos/corner-decoration.svg');
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.1;
    pointer-events: none;
}

.decorative-corner.top-left {
    top: 20px;
    left: 20px;
    background-image: url('../img/videos/corner-top-left.svg');
}

.decorative-corner.top-right {
    top: 20px;
    right: 20px;
    background-image: url('../img/videos/corner-top-right.svg');
    transform: rotate(90deg);
}

.decorative-corner.bottom-left {
    bottom: 20px;
    left: 20px;
    background-image: url('../img/videos/corner-bottom-left.svg');
    transform: rotate(-90deg);
}

.decorative-corner.bottom-right {
    bottom: 20px;
    right: 20px;
    background-image: url('../img/videos/corner-bottom-right.svg');
    transform: rotate(180deg);
}

/* Loading indicator */
.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-image: url('../icons/loading-spinner-video.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    z-index: 4;
    display: none;
}

.video-wrapper.loading .loading-indicator {
    display: block;
}

/* Video stats */
.video-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
    padding: 20px;
    background: rgba(248, 249, 250, 0.5);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #28a745;
    margin-bottom: 5px;
    background-image: linear-gradient(45deg, #28a745, #34ce57);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsive styles */
@media (max-width: 768px) {
    .seccion-video-promocional {
        padding: 40px 15px;
        min-height: auto;
        background-image: url('../img/videos/pattern-bg-mobile.jpg');
    }
    
    .titulo-con-rayita::before,
    .titulo-con-rayita::after {
        display: none;
    }
    
    .titulo-principal {
        font-size: 24px;
        white-space: normal;
    }
    
    .rayita-verde {
        max-width: 100px;
    }
    
    .video-contenedor {
        padding: 20px;
        background: white;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        background-image: url('../img/videos/container-bg-mobile.jpg');
    }
    
    .info-video {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .subtitulo-video {
        font-size: 16px;
    }
    
    .video-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .decorative-corner {
        width: 30px;
        height: 30px;
    }
    
    .play-button-overlay {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    .titulo-principal {
        font-size: 20px;
        padding: 0 10px;
    }
    
    .rayita-verde {
        max-width: 80px;
    }
    
    .video-contenedor {
        padding: 15px;
        box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    }
    
    .info-item {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .video-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .control-btn {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }
    
    .video-wrapper {
        box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.video-contenedor {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 5px 20px rgba(40, 167, 69, 0.4);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
        box-shadow: 0 8px 25px rgba(40, 167, 69, 0.6);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 5px 20px rgba(40, 167, 69, 0.4);
    }
}

.play-button-overlay.pulse {
    animation: pulse 2s infinite;
}

/* Fullscreen mode styles */
.video-wrapper.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding-bottom: 0;
    z-index: 9999;
    background: #000;
}

.video-wrapper.fullscreen .play-button-overlay {
    display: none;
}

/* Quality selector */
.quality-selector {
    position: absolute;
    bottom: 70px;
    right: 20px;
    z-index: 5;
    display: none;
}

.video-wrapper:hover .quality-selector {
    display: block;
}

.quality-btn {
    padding: 5px 15px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s;
}

.quality-btn:hover {
    background: #28a745;
}

/* Caption styling */
.video-caption {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    color: white;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    display: none;
}

.video-wrapper:hover .video-caption {
    display: block;
}

/* Volume control */
.volume-control {
    position: absolute;
    bottom: 70px;
    left: 20px;
    z-index: 5;
    display: none;
}

.video-wrapper:hover .volume-control {
    display: block;
}

.volume-slider {
    width: 100px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    background: #28a745;
    border-radius: 50%;
    cursor: pointer;
}

/* Progress bar styling */
.video-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    z-index: 5;
}

.progress-bar {
    height: 100%;
    background: #28a745;
    width: 0%;
    transition: width 0.1s;
}

/* Error state */
.video-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 5;
    display: none;
}

.video-wrapper.error .video-error {
    display: block;
}

.error-icon {
    font-size: 48px;
    color: #dc3545;
    margin-bottom: 10px;
}

.error-message {
    font-size: 16px;
    color: white;
}

/* Retina display support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .play-button-overlay {
        background-image: url('../icons/play-button@2x.svg');
    }
    
    .video-wrapper {
        background-image: url('../img/videos/thumbnail@2x.jpg');
    }
    
    .seccion-video-promocional {
        background-image: url('../img/videos/pattern-bg@2x.jpg');
    }
}

/* Print styles */
@media print {
    .seccion-video-promocional {
        background: white !important;
        min-height: auto !important;
    }
    
    .video-wrapper,
    .play-button-overlay,
    .video-controls {
        display: none !important;
    }
    
    .video-contenedor {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .titulo-principal {
        color: #000 !important;
        background: none !important;
        text-shadow: none !important;
    }
    
    .rayita-verde {
        background-color: #000 !important;
    }
    
    .info-item {
        border: 2px solid #000 !important;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}