﻿html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
    scroll-behavior: smooth;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin-bottom: 0;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* VARIABLES GLOBALES */
/*:root {
    --navbar-height: 73px;
}
*/
/* NAVBAR — transparente → blanca al scroll */
#main-header {
    background: transparent;
    box-shadow: none;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

    #main-header.scrolled {
        background: #ffffff !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1) !important;
    }

    /* Links blancos sobre el carousel */
    #main-header .nav-link {
        color: rgba(255, 255, 255, 0.9) !important;
        font-weight: 500;
        transition: color 0.3s;
    }

        #main-header .nav-link:hover,
        #main-header .nav-link.active {
            color: #ffffff !important;
        }

    /* Links oscuros después del scroll */
    #main-header.scrolled .nav-link {
        color: #333 !important;
    }

        #main-header.scrolled .nav-link:hover,
        #main-header.scrolled .nav-link.active {
            color: #000 !important;
        }

    /* Toggler — blanco sobre video */
    #main-header .navbar-toggler {
        border-color: rgba(255, 255, 255, 0.6);
    }

    /* Toggler — oscuro con scroll */
    #main-header.scrolled .navbar-toggler {
        border-color: rgba(0, 0, 0, 0.3);
    }

    #main-header.scrolled .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0,0,0,0.7)' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }

/* CAROUSEL — FULL SCREEN */

/* Sube el carousel detrás del navbar transparente */
#header-carousel {
    height: 100vh;
    overflow: hidden;
    margin-top: calc(-1 * var(--navbar-height));
}

    #header-carousel .carousel-inner,
    #header-carousel .carousel-item {
        height: 100%;
    }

/* Video ocupa todo el espacio */
.carousel-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none; /* Elimina controles nativos del navegador */
}

    /* Quitar controles nativos webkit */
    .carousel-video::-webkit-media-controls,
    .carousel-video::-webkit-media-controls-enclosure,
    .carousel-video::-webkit-media-controls-panel,
    .carousel-video::-webkit-media-controls-overlay-play-button,
    .carousel-video::-webkit-media-controls-start-playback-button {
        display: none !important;
        -webkit-appearance: none;
    }

/* Overlay degradado sobre el video */
.carousel-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient( to bottom, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.40) 60%, rgba(0, 0, 0, 0.65) 100% );
    pointer-events: none;
}

/* ── CAPTION ── */
.carousel-caption-custom {
    position: absolute;
    bottom: 18%;
    left: 8%;
    z-index: 10;
    max-width: 600px;
    text-align: left;
    animation: fadeUp 0.8s ease forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.carousel-tagline {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.carousel-title {
    color: #fff;
    font-size: clamp(2rem, 5vw, 3.8rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 28px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

    .carousel-title span {
        color: #4fc3f7; /* Color de acento — cámbialo al color de tu marca */
    }

.carousel-btn-cta {
    display: inline-block;
    padding: 14px 36px;
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 2px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

    .carousel-btn-cta:hover {
        background: #fff;
        color: #111;
    }

/* ── CONTROLES — solo flechas, sin círculo ── */
.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0;
    transition: opacity 0.3s;
}

#header-carousel:hover .carousel-control-prev,
#header-carousel:hover .carousel-control-next {
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 2rem;
    height: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

/* Neutraliza el div .carousel-nav-btn sin romper el ícono */
.carousel-nav-btn {
    display: contents;
}

/* ── INDICADORES — líneas ── */
.carousel-indicators-custom {
    bottom: 30px;
}

    .carousel-indicators-custom button {
        width: 28px !important;
        height: 3px !important;
        border-radius: 2px;
        border: none;
        opacity: 0.5;
        background: #fff;
        transition: all 0.3s;
    }

        .carousel-indicators-custom button.active {
            width: 52px !important;
            opacity: 1;
        }

/* ── SCROLL HINT — flecha animada ── */
.scroll-hint {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

    .scroll-hint span {
        display: block;
        width: 22px;
        height: 22px;
        border-right: 2px solid rgba(255, 255, 255, 0.7);
        border-bottom: 2px solid rgba(255, 255, 255, 0.7);
        transform: rotate(45deg);
        animation: scrollBounce 1.4s infinite;
    }

@keyframes scrollBounce {
    0%, 100% {
        transform: rotate(45deg) translateY(0);
        opacity: 1;
    }

    50% {
        transform: rotate(45deg) translateY(6px);
        opacity: 0.4;
    }
}

/* ══════════════════════════════════════
   RESPONSIVO
══════════════════════════════════════ */
@media (max-width: 768px) {
    .carousel-caption-custom {
        bottom: 12%;
        left: 5%;
        right: 5%;
    }

    .carousel-btn-cta {
        padding: 10px 24px;
        font-size: 0.75rem;
    }

    /* En móvil las flechas siempre visibles */
    .carousel-control-prev,
    .carousel-control-next {
        opacity: 1;
    }
}

/* Selector de idioma — transparente (sobre video) */
#main-header .lang-switcher .btn {
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s, border-color 0.3s, background 0.3s;
}

    #main-header .lang-switcher .btn.btn-primary {
        background: rgba(255, 255, 255, 0.25);
        border-color: rgba(255, 255, 255, 0.9);
        color: #fff;
    }

/* Selector de idioma — después del scroll (navbar blanca) */
#main-header.scrolled .lang-switcher .btn {
    color: #333;
    border-color: rgba(0, 0, 0, 0.3);
}

    #main-header.scrolled .lang-switcher .btn.btn-primary {
        background: #333;
        border-color: #333;
        color: #fff;
    }

    #main-header.scrolled .lang-switcher .btn:hover {
        background: rgba(0, 0, 0, 0.08);
        color: #000;
    }

/* Selector de idioma más compacto en móvil */
@media (max-width: 991px) {
    .lang-switcher .btn {
        padding: 3px 7px;
        font-size: 11px;
    }

    .navbar-brand {
        flex-shrink: 0; /* evita que el logo se encoja */
    }
}