﻿.contenido-principal {
    /* Define un margen superior IGUAL a la altura de tu navbar. */
    margin-top: 42px; /* Ajusta este valor al número real de píxeles de la altura de tu navbar */
}


/* --- BARRA SUPERIOR --- */
.navbar {
    position: fixed; /* Esto la hace fija */
    top: 0; /* Esto la fija al borde superior */
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #000;
    color: white;
    padding: 1px 5px; /* ¡Importante! El padding afecta la altura total */
    width: 100%;
    z-index: 1000;
}

/* --- LOGO --- */
.logo {
    font-size: 20px;
    font-weight: bold;
    width: 82px;
}
.texto_titulo_tpn{
    padding: 10px;
    font-size: 24px;
    text-align:center;
    vertical-align: middle;
}
/* --- MENÚ PRINCIPAL --- */
.menu {
    display: flex;
    gap: 20px;
    transition: max-height 0.3s ease;
}

.menu-item {
    position: relative;
}

.menu a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 17px;
}

.menu-item > a {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    display: block;
}

    .menu-item > a:hover {
        background: #222;
        border-radius: 5px;
    }

.menu a:hover {
    color: #b40000;
}

/* --- BOTÓN TOGGLE (solo móvil) --- */
.toggle-btn {
    display: none;
    background-color: #b40000;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-size: 24px;
    cursor: pointer;
    z-index: 1001;
}

/* --- MODO MÓVIL --- */
@media (max-width: 900px) {
    .menu {
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: #111;
        flex-direction: column;
        align-items: center;
        overflow: hidden;
        max-height: 0;
    }

        .menu.activo {
            max-height: 600px; /* Despliega */
        }

        .menu a {
            padding: 12px;
            width: 100%;
            text-align: center;
            border-top: 1px solid rgba(255,255,255,0.1);
        }

    .toggle-btn {
        display: block;
    }
}
