body {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    margin: 0;
}

    /* -------------------------------------
       1. ESTILOS BASE Y TRANSICIONES
       ------------------------------------- */
    .navbar {
      padding-top: 1.5rem;
      padding-bottom: 1.5rem;
      transition: all 0.35s ease; /* Hace que el cambio de color sea suave */
    }
    .navbar-brand {
      font-size: 1.5rem;
      letter-spacing: 0.5px;
    }
    .nav-link {
      font-size: 0.95rem;
      font-weight: 500;
      margin-left: 1rem;
      transition: color 0.3s ease;
    }

    /* Contenedor principal (estilo pastilla) */
    .lang-switch {
        position: relative;
        display: inline-flex;
        align-items: center;
        width: 90px;
        height: 40px;
        border: 1px solid rgba(255, 255, 255, 0.4); /* Borde sutil */
        border-radius: 20px;
        cursor: pointer; /* Indica que todo es clicable */
        font-family: sans-serif;
        font-weight: 600;
        user-select: none; 
    }

    /* Ocultamos el checkbox nativo */
    .lang-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

    /* El fondo blanco que se desliza */
    .slider {
        position: absolute;
        top: 3px;
        left: 3px;
        width: 44px;
        height: 32px;
        background-color: #ffffff;
        border-radius: 16px;
        transition: transform 0.3s ease; 
    }
    
    .lang-switch input:checked ~ .slider {
        transform: translateX(40px);
    }

    /* Estilos de los textos */
    .lang-text {
        position: relative;
        z-index: 1; 
        flex: 1;
        text-align: center;
        color: #ffffff; 
        font-size: 14px;
        transition: color 0.3s ease;
    }

    /* Cambio de color del texto activo para que contraste con el fondo blanco */
    .lang-switch input:not(:checked) ~ .es { color: #1a3644; }
    .lang-switch input:checked ~ .en { color: #1a3644; }

    .scrolled .lang-switch {
        border: 1px solid rgba(0, 0, 0, 0.2);
    }

    .scrolled .lang-text {
        color: #0c3645; 
    }

    .scrolled .slider {
        background-color: #0c3645; 
    }

    .scrolled .lang-switch input:not(:checked) ~ .es { color: #ffffff; }
    .scrolled .lang-switch input:checked ~ .en { color: #ffffff; }

/* -------------------------------------
   2. ESTILOS AL HACER SCROLL (.scrolled)
   ------------------------------------- */
.navbar.scrolled {
    padding-top: 0.8rem; /* Se hace un poco más delgada */
    padding-bottom: 0.8rem;
    background-color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); /* Sombra suave */
}

/* Letras a negro */
.navbar.scrolled .navbar-brand,
.navbar.scrolled .nav-link {
    color: #1a1a1a !important;
}
.navbar.scrolled .nav-link:hover {
    color: #666666 !important;
}

/* Adaptar el botón de idiomas al fondo blanco */
.navbar.scrolled .lang-selector {
    border-color: rgba(0, 0, 0, 0.2);
}
.navbar.scrolled .lang-btn.active {
    background-color: #1a1a1a;
    color: #ffffff !important;
}
.navbar.scrolled .lang-btn:not(.active) {
    color: #1a1a1a;
}

/* Adaptar el menú hamburguesa (móvil) a fondo blanco */
.navbar.scrolled .navbar-toggler {
    border-color: rgba(0,0,0,0.1);
}
.navbar.scrolled .navbar-toggler-icon {
    filter: invert(1); /* Truco para volver negro el icono de Bootstrap */
}

/* -------------------------------------
   3. MENÚ DESPLEGABLE (Líneas)
   ------------------------------------- */
.custom-dropdown-menu {
    width: 320px;
    padding: 1rem 0;
    border-radius: 1rem;
    margin-top: 10px;
}
.dropdown-item {
    padding: 0.75rem 1.5rem;
    transition: background-color 0.2s ease;
}
.dropdown-item:hover {
    background-color: #f8f9fa;
}
.icon-circle {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.1rem;
    margin-right: 1rem;
    color: #333;
}
.bg-lume { background-color: #f4c542; }
.bg-hidro { background-color: #85c2e3; }
.bg-cold { background-color: #cecece; }

/* =========================================
   ESTILOS DEL BUSCADOR
   ========================================= */
.custom-search-group {
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px; 
    overflow: hidden;
    transition: all 0.3s ease;
    background-color: transparent;
}

.custom-search-group:focus-within {
    border-color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

.search-input-custom {
    border: none !important;
    background-color: transparent !important;
    color: #ffffff !important;
    font-size: 0.9rem;
    padding-left: 1.2rem;
}

.search-input-custom::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

.search-btn-custom {
    border: none !important;
    background: transparent !important;
    color: #ffffff;
    padding-right: 1.2rem;
    padding-left: 0.5rem;
    transition: opacity 0.2s ease;
}

.search-btn-custom:hover {
    color: #ffffff;
    opacity: 0.7;
}

/* =========================================
   ESTILOS DEL BUSCADOR AL HACER SCROLL 
   ========================================= */

.scrolled .custom-search-group {
    border-color: rgba(0, 0, 0, 0.2);
}

.scrolled .custom-search-group:focus-within {
    border-color: #3158a3; 
    background-color: transparent;
}

.scrolled .search-input-custom {
    color: #1a1a1a !important;
}

.scrolled .search-input-custom::placeholder {
    color: rgba(0, 0, 0, 0.4) !important;
}

.scrolled .search-btn-custom {
    color: #3158a3;
}
.scrolled .search-btn-custom:hover {
    color: #1a3873;
}

.formSea {
    margin-top:20px !important;
    width: 30%;
}

@media only screen and (max-width: 820px) {
    .formSea {
        width: 100%;
    }
}