/* ============================================================
   VALMAR — header.css
   ============================================================ */

/* ── BASE ──────────────────────────────────────────────────── */
header {
    position: fixed;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 400;
    background-color: rgba(0, 105, 204, 1);
    transition: all 0.2s linear;
}
header.cabecera-reducida {
    padding: 1rem 0;
    box-shadow: 0 1px 15px black;
}

/* ── CONTENEDOR ────────────────────────────────────────────── */
#cabecera {
    margin: 0 auto;
    width: 95%;
    height: 3.4rem;
    position: relative;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#cabecera a { color: white; text-decoration: none; }

/* ── LOGO ──────────────────────────────────────────────────── */
header #cabecera .logo {
    height: 100%;
    width: auto;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transform: scale(1.1);
    margin-left: .5rem;
    transition: all 0.2s linear;
    float: none;
}
header #cabecera .logo img { height: 100%; width: auto; display: block; }
header.cabecera-reducida #cabecera .logo { transform: scale(1); margin-left: 0; }

/* ── NAV DESKTOP ───────────────────────────────────────────── */
header nav {
    display: flex;
    align-items: center;
    float: none;
}
header nav ul {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: .25rem;
}
header nav li {
    position: relative;
    float: none;
    display: flex;
    align-items: center;
}

/* Ocultar los separadores <span> del HTML original */
header span { display: none !important; }

/* Links normales */
header nav a {
    display: inline-flex;
    align-items: center;
    height: auto;
    padding: .5rem 1rem;
    font-size: .9rem;
    font-weight: 500;
    color: rgba(255,255,255,.9);
    border-radius: 8px;
    transition: background .2s, color .2s;
    white-space: nowrap;
    float: none;
}
header nav a:hover { background: rgba(255,255,255,.12); color: white; }
nav a { float: none !important; } /* cancela el "nav a{float:left}" */

/* Último enlace = botón Contacto dorado */
header nav li:last-child a {
    background: #C9A84C;
    color: #0A1628 !important;
    font-weight: 700;
    border-radius: 50px;
    padding: .5rem 1.3rem;
}
header nav li:last-child a:hover {
    background: #E8C96D;
    color: #0A1628 !important;
}

/* ── HAMBURGER (nuevo, solo móvil) ─────────────────────────── */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    float: none;
    transition: background .2s;
}
.hamburger:hover { background: rgba(255,255,255,.25); }
.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: transform .3s, opacity .3s;
    float: none;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── PANEL MENÚ MÓVIL (<div>, no <nav>) ────────────────────── */
.nav-mobile {
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(0, 60, 130, .98);
    z-index: 399;
    padding: 5.5rem 1.5rem 2rem;
    gap: .3rem;
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
    float: none;
}
.nav-mobile a {
    display: block !important;
    float: none !important;
    color: rgba(255,255,255,.9) !important;
    font-size: 1.05rem;
    font-weight: 500;
    padding: .85rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
    border-radius: 6px;
    text-decoration: none;
    transition: background .2s;
}
.nav-mobile a:last-child  { border-bottom: none; }
.nav-mobile a:hover        { background: rgba(255,255,255,.1); }
.nav-mobile .nav-cta-mobile {
    margin-top: .5rem;
    background: #C9A84C;
    color: #0A1628 !important;
    text-align: center;
    font-weight: 700;
    border-radius: 50px;
    border-bottom: none !important;
}
.nav-mobile .nav-cta-mobile:hover { background: #E8C96D; }

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 992px) {
    #cabecera nav { display: none; }
    .hamburger    { display: flex; }
}
@media (max-width: 768px) {
    header { padding: 1rem 0; }
    header.cabecera-reducida { padding: .7rem 0; }
    #cabecera { height: 2.8rem; }
    header #cabecera .logo { transform: scale(1); margin-left: 0; }
    .nav-mobile { overflow-y: auto; max-height: 100vh; }
}

@media (max-width: 480px) {
    header { padding: .85rem 0; }
    #cabecera { padding: 0 .85rem; }
    .nav-mobile { padding: 5rem 1rem 1.5rem; gap: .2rem; }
    .nav-mobile a { padding: .75rem .85rem; font-size: .95rem; }
    .hamburger { width: 36px; height: 36px; }
}
