/* === Barra de navegación superior === */
.topnav {
    background-color: #333;
    overflow: visible; /* 🔹 permitir que se vea el dropdown */
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    position: fixed;   /* 🔹 fijar la barra */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;     /* 🔹 asegurar que quede encima del contenido */
}

/* === Enlaces generales === */
.topnav a {
    float: left;
    display: block;
    color: #f2f2f2;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    font-size: 17px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* === Hover y activo === */
.topnav a:hover,
.dropdown:hover .dropbtn {
    background-color: #ddd;
    color: black;
}

.topnav a.active {
    background-color: #f4f6f9;
    color: #333;
}

/* === Logo === */
.topnav a.active img {
    filter: drop-shadow(0 0 1px white);
    vertical-align: middle;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.topnav a.active:hover img {
    transform: scale(1.1);
    filter: brightness(1.2);
}





.topnav a.split {
    float: right;
    background-color: #555; /* verde esmeralda */
    color: white;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.topnav a.split:hover {
    background-color: #04AA6D; /* tono más oscuro al pasar el mouse */
    color: #fff;
}



/* === Dropdown === */
.dropdown {
    float: left;
    overflow: visible;
}

.dropdown .dropbtn {
    font-size: 17px;
    border: none;
    outline: none;
    color: white;
    padding: 14px 16px;
    background-color: inherit;
    font-family: inherit;
    margin: 0;
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 2000; /* 🔹 más alto que la barra */
}

.dropdown-content a {
    float: none;
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
}

.dropdown-content a:hover {
    background-color: #ddd;
}

/* === Mostrar dropdown al pasar el mouse === */
.dropdown:hover .dropdown-content {
    display: block;
}

/* === Ícono hamburguesa === */
.topnav .icon {
    display: none;
}



/* === Responsive === */
@media screen and (max-width: 600px) {
    .topnav a:not(:first-child),
    .dropdown .dropbtn {
        display: none;
    }

    .topnav a.icon {
        float: right;
        display: block;
    }

    .topnav.responsive {
        position: relative;
    }

    .topnav.responsive .icon {
        position: absolute;
        right: 0;
        top: 0;
    }

    .topnav.responsive a {
        float: none;
        display: block;
        text-align: left;
    }

    .topnav.responsive .dropdown {
        float: none;
    }

    .topnav.responsive .dropdown-content {
        position: relative;
    }

    .topnav.responsive .dropdown .dropbtn {
        display: block;
        width: 100%;
        text-align: left;
    }
}

/* === Ajuste del contenido para no quedar tapado === */
body {
    padding-top: 50px; /* ajusta según la altura real de tu barra */
}
