/* =========================
   Fuentes y Variables CSS
   ========================= */

/* Importación de fuentes desde Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Anton&family=Open+Sans&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Tilt+Neon&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* Variables globales para fuentes */
:root {
    --default-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --heading-font: "Tilt Neon", "Open Sans", sans-serif;
    --nav-font: "Inter", "Open Sans", sans-serif;
}

/* =========================
   Estilos Globales
   ========================= */

body {
    margin: 0;
    padding: 0;
    font-family: var(--default-font);
    /* color: #f8f9fa;  Color de texto claro */
    /* background-color: #121212;  Fondo oscuro */
}

.container {
    max-width: 90%;
    margin: 0 auto;
    padding: 0 15px;
}

/* =========================
   Navbar
   ========================= */

/* Navbar personalizada */
.custom-navbar {
    height: 64px;
    line-height: 64px;
    z-index: 1030;
}

/* Navbar general */
.navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, transform 0.6s ease;
    background-color: transparent;
    backdrop-filter: blur(0px);
    font-family: var(--nav-font);
}

/* Enlace activo en el navbar */
.nav-link.active {
    color: #f4b400 !important; /* amarillo para destacar */
    font-weight: bold;
}

/* Botón hamburguesa */
.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.7);
}

/* Icono hamburguesa (blanco por defecto) */
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba%28255,255,255,0.9%29' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* Navbar con scroll: fondo oscuro y sombra */
.navbar.scrolled {
    background-color: rgba(0, 0, 0, 0.85);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(6px);
}

/* Icono hamburguesa amarillo cuando navbar tiene scroll */
.navbar.scrolled .navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba%28255, 193, 7, 0.9%29' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* Animación de entrada para la navbar */
.navbar.animate-in {
    transform: translateY(-100%);
    opacity: 0;
}
.navbar.animate-in.loaded {
    transform: translateY(0);
    opacity: 1;
}

/* Marca/logo en la navbar */
.navbar-brand {
    font-weight: bold;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.navbar-brand img {
    max-height: 60px;
    width: auto;
}

/* Enlaces del navbar */
.nav-link {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    transition: color 0.2s;
}
.nav-link:hover {
    color: #f8f9fa;
}

/* Fondo sólido para menú colapsado en móvil */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: rgba(26, 24, 24, 0.95);
        padding: 1rem;
        border-radius: 0 0 10px 10px;
    }
}

/* Ajustes responsivos para navbar y enlaces */
@media (max-width: 768px) {
    .navbar {
        height: auto;
        line-height: normal;
    }
    /* Icono hamburguesa amarillo en scroll en móvil */
    .navbar.scrolled .navbar-toggler-icon {
        background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='%23ffc107' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
    }
    .navbar-brand {
        font-size: 1rem;
    }
    .nav-link {
        padding: 0.3rem 0.8rem;
        font-size: 0.95rem;
    }
    .carousel-caption h1 {
        font-size: 1.8rem;
        --default-font: "Open Sans", sans-serif;
    }
    .carousel-caption p {
        font-size: 1rem;
    }
}

/* =========================
   Carrusel
   ========================= */

/* Carrusel principal y cada slide ocupa toda la pantalla */
#heroCarousel,
#heroCarousel .carousel-item {
    height: 100vh;
    background-size: cover;
    background-position: top;
    background-repeat: no-repeat;
}

/* Estilo para el caption del carrusel */
.carousel-caption {
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem;
    border-radius: 10px;
    max-width: 95%;
}
.carousel-caption h1 {
    font-size: 2.5rem;
    font-family: var(--heading-font);
}
.carousel-caption p {
    font-size: 1.2rem;
}
.btn-light {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    background-color: #f4b400; /* amarillo */
    color: #000;
}

/* =========================
   Botón flotante "Scroll Top"
   ========================= */

/* Botón flotante abajo al centro */
.scroll-top-btn {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    background-color: #337ab7;
    color: #000;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

/* Hover para el botón flotante */
.scroll-top-btn:hover {
    background-color: #f4b400;
    transform: translateX(-50%) scale(1.1);
}

/* Estado inicial oculto */
.scroll-top-btn {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.3s ease;
}

/* Mostrar botón al hacer scroll */
.scroll-top-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Icono dentro del botón flotante */
.scroll-top-btn img.scroll-icon {
    width: 38px;
    height: 38px;
    display: block;
    margin: 0 auto;
    filter: brightness(1) invert(1); /* negro por defecto */
}

/* Animación tipo bounce */
@keyframes bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-10px);
  }
}

/* Aplica el rebote solo cuando es visible */
.scroll-top-btn.visible {
  animation: bounce 1.2s ease-in-out infinite;
  /*animation: bounce 0.8s ease-out 1; // Solo rebota una vez al mostrarse*/
}
