/* Video Slider - Inspirado no traveldesigner.com */

.video-hero-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    background: #000;
}

/* Fallback backgrounds para caso os vídeos não carreguem */
.video-slide[data-fallback="acores"] {
    background-color: #1e3347;
    background-size: cover;
    background-position: center;
}

.video-slide[data-fallback="madeira"] {
    background-image: url('../imagens/ilhamadeira.jpg');
    background-size: cover;
    background-position: center;
}

.video-slide[data-fallback="algarve"] {
    background-image: url('../imagens/algarve.jpg');
    background-size: cover;
    background-position: center;
}

.video-slide[data-fallback="lisboa"] {
    background-image: url('../imagens/lisboa.jpg');
    background-size: cover;
    background-position: center;
}

.video-slide[data-fallback="alentejo"] {
    background-image: url('../imagens/sintra.jpg');
    background-size: cover;
    background-position: center;
}

.video-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 1;
}

.video-slide.active {
    opacity: 1;
    z-index: 2;
}

.video-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Overlay escuro para melhor legibilidade do texto */
.video-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 3;
}

/* Conteúdo sobre o vídeo */
.video-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 4;
    max-width: 800px;
    padding: 0 20px;
}

.video-subtitle {
    font-size: 16px;
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 20px;
    opacity: 0.9;
    font-family: 'General Sans', 'Montserrat', sans-serif;
}

.video-title {
    font-size: 80px;
    font-weight: 700;
    letter-spacing: 8px;
    text-transform: uppercase;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-family: 'General Sans', 'Montserrat', sans-serif;
    line-height: 0.9;
}

.video-cta {
    display: inline-block;
    
    color: #e1e1e1;
    padding: 15px 40px;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border: 2px solid #e1e1e1;
    cursor: pointer;
    font-size: 28px;
    font-family: 'General Sans', 'Montserrat', sans-serif;
    background: transparent;
}

.video-cta:hover {
    background: white;
    color: var(--primary-dark);
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 51, 71, 0.3);
}

/* Barra de controles do vídeo */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 20px;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-hero-slider:hover .video-controls {
    opacity: 1;
}

.video-progress-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    margin-bottom: 15px;
    cursor: pointer;
    position: relative;
}

.video-progress-bar {
    height: 100%;
    background: #76869b;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s ease;
    position: relative;
}

.video-progress-bar::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: #D71921;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-progress-container:hover .video-progress-bar::after {
    opacity: 1;
}

.video-controls-bottom {
    display: flex;
    align-items: center;
    gap: 15px;
}

.video-control-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.video-time {
    color: white;
    font-size: 14px;
    font-family: 'General Sans', 'Montserrat', sans-serif;
    margin: 0 10px;
}

.video-volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.video-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #76869b ;
    border-radius: 50%;
    cursor: pointer;
}

.video-volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #FBAA19 ;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.video-controls-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Setas de Navegação */
.video-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 24px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5;
    border-radius: 5px;
}

.video-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.video-nav-prev {
    left: 30px;
}

.video-nav-next {
    right: 30px;
}

/* Indicadores */
.video-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 5;
}

.video-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-indicator.active,
.video-indicator:hover {
    background: white;
    border-color: white;
}

/* Remover controle de som antigo - agora está na barra de controles */

/* Responsivo */
@media (max-width: 768px) {
    .video-hero-slider {
        height: 100vh;
        min-height: 500px;
    }
    
    .video-title {
        font-size: 50px;
        letter-spacing: 4px;
        margin-bottom: 30px;
    }
    
    .video-subtitle {
        font-size: 14px;
        letter-spacing: 2px;
        margin-bottom: 15px;
    }
    
    .video-cta {
        padding: 12px 30px;
        font-size: 12px;
        letter-spacing: 1px;
    }
    
    .video-nav {
        width: 50px;
        height: 50px;
        font-size: 16px;
    }
    
    .video-controls {
        padding: 15px;
    }
    
    .video-controls-bottom {
        gap: 10px;
    }
    
    .video-control-btn {
        font-size: 16px;
        padding: 6px;
    }
    
    .video-time {
        font-size: 12px;
        margin: 0 5px;
    }
    
    .video-volume-slider {
        width: 60px;
    }
    
    .video-nav {
        font-size: 18px;
        padding: 10px 15px;
    }
    
    .video-nav-prev {
        left: 15px;
    }
    
    .video-nav-next {
        right: 15px;
    }
    
    .video-indicators {
        bottom: 20px;
        gap: 8px;
    }
    
    .video-indicator {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .video-title {
        font-size: 36px;
        letter-spacing: 2px;
    }
    
    .video-subtitle {
        font-size: 12px;
        letter-spacing: 1px;
    }
    
    .video-content {
        padding: 0 15px;
    }
}

/* Animações de entrada */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translate(-50%, -30%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.video-slide.active .video-content {
    animation: slideInUp 1s ease-out 0.5s both;
}

/* Loading state */
.video-slide video {
    transition: opacity 0.5s ease;
    position: relative;
    z-index: 2;
    opacity: 1;
}

.video-slide video:not([data-loaded="true"]) {
    opacity: 1;
}

.video-slide video[data-loaded="true"] {
    opacity: 1;
}

/* Esconder background quando vídeo está carregado */
.video-slide video[data-loaded="true"] + .video-content {
    position: relative;
    z-index: 3;
}

.video-slide.active video[data-loaded="true"] {
    opacity: 1;
}

/* Garantir que o vídeo fica por cima do background quando carregado */
.video-slide.active video[data-loaded="true"] {
    z-index: 2;
}

/* Mostrar background quando vídeo não carrega ou está escondido */
.video-slide video[style*="display: none"] + .video-content,
.video-slide video:not([data-loaded="true"]) + .video-content {
    z-index: 3;
}
