/* Fondo overlay que aparece SOLO durante la transición */
.transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #204893;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

/* Cuando se activa la transición */
.transition-overlay.active {
    opacity: 1;
}

/* Animación del body (blur + fade) */
body.page-transition {
    opacity: 1;
    filter: blur(0);
    transition:
        opacity 0.4s ease,
        filter 0.5s ease;
}

body.fade-out {
    opacity: 0;
    filter: blur(6px);
}

.carousel-item img {
    aspect-ratio: 16 / 5;
    width: 100%;
    height: auto;
    display: block;
}

/* === TARJETAS (CARDS) === */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

/* Efecto dinámico al pasar el mouse */
.card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

/* Imágenes dentro de tarjetas */
.card img {
    display: block;
    margin: 0 auto;
    object-fit: contain;
    max-height: 8rem;
    width: auto;
}

/* Altura mínima de imagen en pantallas medianas en adelante */
@media (min-width: 768px) {
    .card img {
        min-height: 11em;
    }
}

/* Pie de tarjeta más equilibrado */
.card .card-footer {
    padding: 0.75rem 1rem;
}

/* Corrección de subrayado y color negro en textos/enlaces dentro de tarjetas */
.card a,
.card a:hover,
.card-footer a,
.card-footer a:hover {
    text-decoration: none;
    color: inherit;
}

/* Asegura que los enlaces tipo tarjeta no tengan subrayado */
a.card {
    text-decoration: none;
}

/* === BOTONES PERSONALIZADOS === */
.btn-circle {
    width: 40px;
    height: 40px;
    padding: 6px 0px;
    border-radius: 20px;
    text-align: center;
}

/* === ENLACES SIN ESTILO DE BOTÓN === */
a.no-btn:link {
    color: #3e5f8a;
    text-decoration: none;
}

a.no-btn:visited {
    color: #0000ff;
    text-decoration: none;
}

a.no-btn:hover {
    color: #3e5f8a;
    text-decoration: underline;
}

/* === DIVISOR PERSONALIZADO === */
.divider {
    border-right: 3px solid white;
}

/* === NAVBAR MEJORADO (ajustes estéticos nuevos) === */

.navbar {
    background-color: #204893;
    /* color base */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
    transition: background-color 0.3s ease;
}

.navbar .nav-link {
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    color: #ffffff;
    transition: background-color 0.3s ease, color 0.3s ease, border-radius 0.2s ease;
    border-radius: 6px;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

/* Dropdown general */
.navbar .dropdown-menu {
    border: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-top: 10px;
    animation: fadeDropdown 0.2s ease-in-out;
}

/* Fade animation */
@keyframes fadeDropdown {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar .dropdown-item {
    padding: 0.6rem 1.2rem;
    font-family: 'Montserrat', sans-serif;
    transition: background-color 0.2s ease;
}

.navbar .dropdown-item:hover {
    background-color: #17a2b8;
    color: #fff;
}

/* Input buscador */
#txt_buscador_lg,
#txt_buscador_md {
    margin-top:5px;
    border-radius: 6px 0 0 6px;
    padding: 0.5rem 0.75rem;
    font-family: 'Montserrat', sans-serif;
    border: none;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Botón buscador */
#btn_buscador_lg,
#btn_buscador_md {
    margin-top:5px;
    border-radius: 0 6px 6px 0;
    color: #17a2b8;
    font-family: 'Montserrat', sans-serif;
    border: none;
    transition: background-color 0.3s ease;
}

#btn_buscador_lg:hover,
#btn_buscador_md:hover {
    background-color: #138496;
}

/* Efecto de opacidad suave para input de buscador desktop */
#txt_buscador_lg {
    background-color: white;
    opacity: 0.15;
    transition: opacity 0.3s ease;
}

#txt_buscador_lg:hover,
#txt_buscador_lg:focus {
    opacity: 1;
}

/* Responsive: espacio en buscador móvil */
@media (max-width: 767.98px) {
    form.d-lg-none {
        margin-top: 1rem;
    }

    .navbar .nav-link {
        padding: 0.75rem 1rem;
    }

    .navbar .dropdown-menu {
        box-shadow: none;
        border-radius: 0;
    }
}

/* Logo: mejora visual */
.navbar-brand img {
    margin-left: 15px;
    max-height: 56px;
    transition: transform 0.3s ease;
}

.navbar-brand img:hover {
    transform: scale(1.03);
}


.animated-icon {
    width: 25px;
    height: 20px;
    position: relative;
    cursor: pointer;
    transition: 0.3s ease-in-out;
}

.animated-icon span {
    background-color: white;
    position: absolute;
    height: 3px;
    width: 100%;
    left: 0;
    transition: 0.3s ease-in-out;
    border-radius: 2px;
}

.animated-icon span:nth-child(1) {
    top: 0;
}

.animated-icon span:nth-child(2) {
    top: 8px;
}

.animated-icon span:nth-child(3) {
    top: 16px;
}

.navbar-toggler.collapsed .animated-icon span:nth-child(1) {
    transform: rotate(0) translate(0, 0);
}

.navbar-toggler.collapsed .animated-icon span:nth-child(2) {
    opacity: 1;
}

.navbar-toggler.collapsed .animated-icon span:nth-child(3) {
    transform: rotate(0) translate(0, 0);
}

.navbar-toggler:not(.collapsed) .animated-icon span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.navbar-toggler:not(.collapsed) .animated-icon span:nth-child(2) {
    opacity: 0;
}

.navbar-toggler:not(.collapsed) .animated-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}


/* Ajuste general de los íconos de Material Icons en el navbar */
.navbar-nav .nav-link .material-icons {
    font-size: 1.4rem;
    /* Tamaño ligeramente más grande para mejor visibilidad */
    margin-right: 8px;
    /* Espacio entre icono y texto */
    vertical-align: middle;
    /* Alineación vertical para que quede centrado con el texto */
    color: #ffffff;
    /* Color blanco para que contraste bien en navbar bg-primary */
    transition: color 0.3s ease;
}

/* Cambio de color del icono al hacer hover o focus en el link */
.navbar-nav .nav-link:hover .material-icons,
.navbar-nav .nav-link:focus .material-icons {
    color: #d1ecf1;
    /* un celeste claro similar a btn-info hover */
}

/* Botón de búsqueda: ícono más grande y centrado */
.navbar .btn .material-icons {
    font-size: 1.6rem;
    vertical-align: middle;
}

/* Si quieres que el cursor cambie a pointer al pasar por el icono */
.navbar .material-icons {
    cursor: pointer;
}


/* Íconos Material Icons en navbar: tamaño, color y espacio */
.navbar-nav .nav-link .material-icons {
    font-size: 1.4rem;
    margin-right: 8px;
    vertical-align: middle;
    color: #ffffff;
    /* Azul blanco para buen contraste */
    transition: color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

/* Hover y focus: color celeste claro y pequeño movimiento */
.navbar-nav .nav-link:hover .material-icons,
.navbar-nav .nav-link:focus .material-icons {
    color: #17a2b8;
    /* btn-info azul */
    transform: translateY(-2px);
}

/* Botón de búsqueda: icono más grande, alineado y animado */
.btn .material-icons {
    font-size: 1.6rem;
    vertical-align: middle;
    transition: color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

/* Footer general */
footer {
    font-family: 'Montserrat', sans-serif;
    background-color: #204893    ;
    /* bg-primary */
    color: #fff;
    padding: 3rem 1.5rem 2rem;
}

/* Contenedor principal */
footer .container {
    max-width: 1140px;
}

/* Título principal */
footer .main-title {
    font-weight: 700;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

/* Texto introductorio */
footer .intro-text {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Logo sección */
footer .footer-logo img {
    max-height: 80px;
    margin-bottom: 1rem;
}

/* Sección de direcciones */
footer .locations h3 {
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}

footer .locations a {
    display: inline-block;
    color: #fff;
    text-decoration: none;
    margin-bottom: 0.3rem;
    transition: color 0.3s ease;
}

footer .locations a:hover,
footer .locations a:focus {
    color: #17a2b8;
    /* btn-info */
    text-decoration: underline;
}

/* Íconos en línea con links */
footer .locations i {
    margin-right: 6px;
    color: #fff;
    font-size: 1.1rem;
    vertical-align: middle;
}

/* Divisor vertical */
footer .divider {
    border-right: 2px solid rgba(255, 255, 255, 0.3);
    height: auto;
    margin: 0 2rem;
}

/* Social buttons container */
footer .social-buttons {
    text-align: right;
    margin-top: 1.5rem;
}

footer .social-buttons .btn-circle {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    margin-left: 0.5rem;
    font-size: 1.3rem;
    line-height: 40px;
    transition: background-color 0.3s ease;
}

footer .social-buttons .btn-circle:hover,
footer .social-buttons .btn-circle:focus {
    background-color: #138496;
    /* btn-info dark */
    color: #fff;
}

.btn-whatsapp {
    background-color: #25D366;
    border-color: #25D366;
    color: white;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    font-size: 1.1rem;
    border-radius: 30px;
    transition: background-color 0.3s ease;
    animation: pulse 2s infinite;
}

.btn-whatsapp:hover,
.btn-whatsapp:focus {
    background-color: #1ebe5b;
    border-color: #1ebe5b;
    color: #fff;
    text-decoration: none;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}

/* Responsive tweaks */
@media (max-width: 991.98px) {
    footer .locations {
        margin-top: 2rem;
        text-align: center;
    }

    footer .divider {
        display: none;
    }

    footer .social-buttons {
        text-align: center;
        margin-top: 2rem;
    }
}