/* ==========================================================================
   1. BARRA SUPERIOR Y LOGO
========================================================================== */
.top-header {
    background-color: #fff;
    border-bottom: none;
}

.custom-logo-link {
    display: inline-block;
    margin: 0;
    padding: 0;
    text-decoration: none;
}

.logo-img {
    max-height: 60px;
    width: auto;
    max-width: 100%;
    transition: transform 0.3s ease;
}

.custom-logo-link:hover .logo-img {
    transform: scale(1.05); 
}

/* ==========================================================================
   2. BUSCADOR MINIMALISTA
========================================================================== */
.search-bar .custom-search-input {
    background-color: transparent !important;
    border: none;
    border-bottom: 1.7px solid #555;
    border-radius: 0;
    padding-left: 0;
    box-shadow: none;
    transition: border-color 0.3s ease;
    font-size: 0.95rem;
    color: #333333;
}

.search-bar .custom-search-input:focus {
    background-color: transparent !important;
    border-bottom: 1.7px solid #555;
    box-shadow: none;
    outline: none;
}

.search-bar .search-btn {
    background: transparent;
    transition: transform 0.3s ease;
}

.search-bar .search-btn:hover i {
    color: #0F9D8A;
    transform: scale(1.15);
    transition: all 0.2s ease;
}

/* ==========================================================================
   3. BARRA DE NAVEGACIÓN PRINCIPAL
========================================================================== */
.bg-nav-custom {
    background-color: #222222 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.custom-nav-link {
    position: relative;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    padding: 12px 18px !important; 
    color: #fff !important; 
    background-color: transparent !important;
    border: none !important;
}

/* Animación de raya blanca inferior */
.custom-nav-link::after {
    content: "";
    position: absolute;
    bottom: 6px;
    left: 18px;
    width: 0;
    height: 2px;
    background-color: #ffffff;
    transition: width 0.3s ease-out;
}

.custom-nav-link:hover::after {
    width: calc(100% - 36px);
}

/* ==========================================================================
   4. REDES SOCIALES (ICONOS Y EFECTOS)
========================================================================== */
.social-links {
    margin-left: 10px;
}

.social-icon,
.mobile-social-icon {
    display: inline-block;
    color: #555555;
    text-decoration: none;
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-icon {
    font-size: 1.5rem;
}

.mobile-social-icon {
    font-size: 1.6rem;
}

/* Efectos Hover compartidos */
.social-icon:hover, 
.mobile-social-icon:hover, 
.mobile-social-icon:active {
    transform: translateY(-3px);
}

.social-icon:hover .fa-facebook-f, .mobile-social-icon:hover .fa-facebook-f { color: #1877F2; }
.social-icon:hover .fa-instagram, .mobile-social-icon:hover .fa-instagram { color: #E1306C; }
.social-icon:hover .fa-whatsapp, .mobile-social-icon:hover .fa-whatsapp { color: #25D366; }

/* TikTok Hover Effect */
.social-icon:hover .fa-tiktok {
    color: #000000; 
    text-shadow: 1.5px 1.5px 0px #00f2ea, -1.5px -1.5px 0px #ff0050;
}
.mobile-social-icon:hover .fa-tiktok {
    color: #ffffff; 
    text-shadow: 1.5px 1.5px 0px #00f2ea, -1.5px -1.5px 0px #ff0050;
}

/* ==========================================================================
   5. MENÚ MÓVIL (BOTÓN HAMBURGUESA Y COMPONENTES)
========================================================================== */

.navbar-toggler {
    background-color: transparent !important;
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0.25rem 0.5rem;
}

.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='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") !important;
    filter: none !important;
}

.navbar-toggler:focus, .navbar-toggler:active {
    outline: none !important;
    box-shadow: none !important;
    opacity: 0.7;
}

/* Efecto Glassmorphism (Fondo oscuro difuminado) */
.offcanvas-backdrop.show {
    opacity: 1 !important; 
    background-color: rgba(0, 0, 0, 0.75) !important; 
    backdrop-filter: blur(5px) !important; 
    -webkit-backdrop-filter: blur(5px) !important; 
}

/* Botón flotante para cerrar menú móvil */
.custom-close-btn {
    position: absolute !important; 
    top: 50%;
    right: -21px;
    transform: translateY(-50%);
    width: 50px; 
    height: 50px; 
    background-color: #ffffff !important;
    color: #333333 !important;
    border-radius: 50%; 
    display: flex; 
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.80);
    border: 1px solid #eaeaea;
    transition: all 0.3s ease !important; 
    z-index: 1060; 
    padding: 0;
}

.offcanvas.hiding .custom-close-btn,
.offcanvas:not(.show) .custom-close-btn {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-50%) scale(0.5) !important; 
    transition: opacity 0.15s ease-out, transform 0.15s ease-out !important; 
}

/* ==========================================================================
   6. MEDIA QUERIES (COMPORTAMIENTO RESPONSIVO)
========================================================================== */

/* ---> MODO ESCRITORIO (PC) <--- */
@media (min-width: 992px) {
    .offcanvas {
        position: static !important;
        visibility: visible !important;
        transform: none !important;
        display: flex !important;
        flex-direction: row !important;
        width: 100% !important;
        height: auto !important;
        background-color: transparent !important;
        border: none !important;
    }
    
    .offcanvas-header,
    .offcanvas-social,
    .custom-close-btn {
        display: none !important;
    }

    .offcanvas-body {
        padding: 0 !important;
        overflow: visible !important;
        width: 100% !important;
    }
}

/* ---> MODO MÓVIL Y TABLET <--- */
@media (max-width: 991px) {
    .offcanvas {
        background-color: #fff;
        max-width: 310px;
    }

    .offcanvas-header {
        padding-top: 30px !important;
        padding-bottom: 30px !important;
    }

    /* Modificadores de la lista en móvil */
    .custom-nav-link {
        text-align: left;
        padding: 16px 25px !important;
        font-size: 1.05rem;
        display: block;
        color: #333333 !important; 
        border-top: 1.5px solid #efefef !important;
        border-bottom: none !important;
    }

    .nav-item:last-child .custom-nav-link {
        border-bottom: 1.5px solid #efefef !important;
    }

    .custom-nav-link::after {
        display: none !important;
    }

    /* Caja de Redes Sociales al fondo */
    .offcanvas-social {
        border-top: 1.5px solid #efefef;
        background-color: #ffffff;
        margin-top: auto !important;
        padding-top: 25px !important;
        padding-bottom: 30px !important;
    }
}

/* ---> PANTALLAS MUY PEQUEÑAS <--- */
@media (max-width: 768px) {
    .social-icon {
        width: 42px;
        height: 42px;
        font-size: 1.3rem;
    }
}