/*

Template: The Corps — Responsive Multi-purpose HTML5 Template
Author: potenzaglobalsolutions.com
Version:  1
Design and Developed by: potenzaglobalsolutions.com

Note: This is the file where you can add your custom styles to change the look of the
theme. But don't modify "style.css" file.

*/

/* Alert animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert {
    border-radius: 5px;
    padding: 12px 20px;
    margin-bottom: 15px;
    border: 1px solid transparent;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert i {
    margin-right: 8px;
}

.close {
    float: right;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: #000;
    text-shadow: 0 1px 0 #fff;
    opacity: .5;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.close:hover {
    opacity: .75;
}

/* Lazy Loading Styles */
.lazy {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.lazy.loaded {
    opacity: 1;
}

/* Placeholder para imágenes que se están cargando */
.lazy::before {
    content: '';
    display: block;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Optimización de imágenes */
img {
    max-width: 100%;
    height: auto;
}

/* Mejoras de rendimiento */
.lazy img {
    will-change: opacity;
}

/* Estilos para imágenes de fondo lazy */
.bg-loaded {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Prevent Bootstrap from auto-hiding our custom alerts */
.contact-message.alert,
.newsletter-message.alert {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Ensure our alerts stay visible */
.contact-message.alert.show,
.newsletter-message.alert.show {
    display: block !important;
    opacity: 1 !important;
}

/* Your custom css codes start from here: */

/* Fondo gris claro y texto oscuro por defecto en el dropdown */
.navbar-nav > .dropdown-menu > li > a,
.navbar-nav > .dropdown.open > .dropdown-menu > li > a,
.navbar-nav > .dropdown:hover > .dropdown-menu > li > a {
    color: #222 !important;
    background: #f5f5f5 !important;
    transition: background 0.2s, color 0.2s;
}

/* Al pasar el mouse, fondo azul y texto blanco */
.navbar-nav > .dropdown.open > .dropdown-menu > li > a:hover,
.navbar-nav > .dropdown:hover > .dropdown-menu > li > a:hover,
.navbar-nav > .dropdown-menu > li > a:hover,
.navbar-nav > .dropdown-menu > li > a:focus {
    color: #fff !important;
    background-color: #337ab7 !important;
    background: #337ab7 !important;
}

/* Controla la distancia vertical del dropdown respecto al menú SIN crear espacio muerto */
.navbar-nav > .dropdown > .dropdown-menu,
.navbar-nav > .dropdown.open > .dropdown-menu,
.navbar-nav > .dropdown:hover > .dropdown-menu {
    top: 100% !important;
    left: 0 !important;
    right: auto;
    margin-top: 15px !important; 
    position: absolute !important;
    z-index: 2000;
    min-width: 180px;
    box-shadow: 0 6px 12px rgba(0,0,0,.175);
}

/* Fondo transparente en el item padre cuando está activo/abierto */
.navbar-nav > .dropdown.open > a,
.navbar-nav > .dropdown > a:active,
.navbar-nav > .dropdown > a:focus {
    background: transparent !important;
    color: #00a9da !important;
}

/* --- Estilos esenciales para la topbar --- */
.topbar {height: 38px; padding: 0; margin-top: 12px;}
.topbar .container {height: 38px;}
.topbar-left ul, .topbar-right ul {margin: 0; padding: 0; list-style: none;}
.topbar-left ul li, .topbar-right ul li {display: inline-block; color: #fff; font-size: 14px; font-weight: normal; margin-right: 10px; line-height: 38px;}
.topbar-left ul li:last-child, .topbar-right ul li:last-child {margin-right: 0;}
.topbar-left ul li i, .topbar-right ul li i {margin-right: 5px; font-size: 15px; vertical-align: middle;}
.topbar-right ul li a {color: #fff; font-size: 14px; margin-left: 5px; transition: color 0.3s;}
.topbar-right ul li a:hover, .topbar-left ul li a:hover {color: #00a9da;}
.topbar-left {transition: all 0.5s ease-in-out;}
.topbar-right {position: relative; transition: all 0.5s ease-in-out;}
.search-main {position: relative;}

@media (max-width: 991px) {
    .topbar, .topbar .container {height: auto; min-height: 38px;}
    .topbar-left ul li, .topbar-right ul li {line-height: normal; font-size: 13px;}
}

@media (max-width: 991px) {
    .topbar {display: none !important;}
}

/* Estilos para el selector de idioma en el topbar */
.topbar-right .language-selector {position: relative; display: inline-block;}
.topbar-right .language-btn {background: transparent; border: 1px solid rgba(255, 255, 255, 0.3); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 3px; transition: all 0.3s ease; height: 28px; line-height: 1; margin-left: 5px;}
.topbar-right .language-btn:hover, .topbar-right .language-btn:focus {background-color: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.5); color: #fff; box-shadow: none;}
.topbar-right .language-btn i {margin-left: 3px; font-size: 11px;}
.topbar-right .dropdown-menu {min-width: 120px; border: none; border-radius: 4px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); margin-top: 2px;}
.topbar-right .dropdown-menu li {line-height: normal; display: block; margin: 0;}
.topbar-right .dropdown-menu li a {display: block; padding: 8px 15px; color: #333; text-decoration: none; font-size: 13px; transition: all 0.3s ease; line-height: 1.2; margin: 0;}
.topbar-right .dropdown-menu li a:hover {background-color: #f8f9fa; color: #00a9da;}
.topbar-right .dropdown-menu li a i {margin-right: 6px; font-size: 12px;}

/* Ajuste para mantener la alineación horizontal */
.topbar-right ul li.language-selector {vertical-align: middle;}

/* Responsive */
@media (max-width: 991px) {
    .topbar-right .language-btn {font-size: 11px; padding: 2px 6px; height: 26px;}
    .topbar-right .dropdown-menu {min-width: 100px;}
    .topbar-right .dropdown-menu li a {padding: 6px 10px; font-size: 12px;}
}