/*
Theme Name: Astra Child
Theme URI: https://tuweb.com
Description: Child theme de Astra
Author: Tu Nombre
Template: astra
Version: 1.0
*/

/*topbar*/
.custom-topbar {
    background: #1f3c88;
    color: #fff;
    font-size: 14px;
    padding: 8px 0;
}

.topbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar-left span {
    margin-right: 15px;
}

.topbar-right a {
    color: #fff;
    margin-left: 15px;
    text-decoration: none;
}

.topbar-right a:hover {
    opacity: 0.8;
}

@media (max-width: 768px) {
    .topbar-container {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
}

.topbar-right a {
    color: #fff;
    margin-left: 15px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.topbar-right a:hover {
    color: #ddd;
    transform: scale(1.1);
    transition: 0.2s;
}

/*Linea Roja bajo el menú activo*/

/* Asegurar posicionamiento */
.main-header-menu .menu-link {
    position: relative;
}

/* Línea roja SOLO en el activo */
.main-header-menu .current-menu-item > .menu-link::after,
.main-header-menu .current_page_item > .menu-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 5px;
    width: 100%;
    height: 3px;
    background-color: red;
}

/* Base */
.main-header-menu .menu-link {
    position: relative;
}

/* Línea base */
.main-header-menu .menu-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 5px; /* 👈 mejor que 20px */
    width: 0;
    height: 3px;
    background-color: red;
    transition: width 0.3s ease;
}

/* Hover */
.main-header-menu li:hover > .menu-link::after {
    width: 100%;
}

/* Activo */
.main-header-menu .current-menu-item > .menu-link::after,
.main-header-menu .current_page_item > .menu-link::after {
    width: 100%;
}