:root {
  --breakpoint-mobile: 768px;
}


header a {
	text-transform: uppercase;
	text-decoration: none;
    color: #0f69ef;
    transition: color 0.3s;
	font-family:Tahoma, "Arial Narrow", Arial, Helvetica, sans-serif;
    font-size: 90%;
	font-weight: bold;
}

nav a:hover {
    color: #007bff;
}

.menu-toggle {
    position: relative;
    z-index: 1001; /* más alto que el nav */
}

body.mobile .menu-toggle {
  display: block;
}

body.desktop .menu-toggle {
  display: none;
}

header {
/*     box-shadow: 0 2px 5px rgba(0,0,0,0.1); */
    position: relative;
    z-index: 1000;
}

header .container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 1rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo visible en el header móvil */
header .container > a {
    display: block;
}

header .container > a img {
    max-width: 120px;
    height: auto;
    display: block;
}

/* Botón hamburguesa - VISIBLE en móviles */
.menu-toggle {
    display: block;
    background-color: transparent;
    border: none;
    color: black;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

.menu-toggle:hover {
    transform: scale(1.1);
}

.menu-toggle:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Navegación - OFF-CANVAS en móviles */
header nav {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    padding: 2rem 1rem;
    padding-top: 5rem;
    transition: left 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 999;
}

/* Clase para mostrar el menú */
header nav.active {
    left: 0;
}

/* Overlay para cerrar el menú */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.menu-overlay.active {
    display: block;
}

/* Enlaces de navegación */
header nav a {
    color: #ecf0f1;
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    display: block;
}

header nav a:hover {
    background-color: #2c3e50;
}

/* Logo en navegación móvil - OCULTAR el primero */
header nav a:first-child {
    display: none;
}

/* Botón principal */
header nav a.btn-principal {
    background-color: #34db7a;
    color: #fff;
    font-weight: bold;
    text-align: center;
    margin-top: 0.5rem;
}

nav a.btn-principal:hover {
    background-color: #2980b9;
}

/* MEDIA QUERY para dispositivos anchos (tablets y desktop) */
@media (min-width: 768px) {
    /* Ocultar logo del container en desktop */
    .container > a {
        display: none;
    }

    /* Botón hamburguesa - OCULTO en escritorio */
    .menu-toggle {
        display: none;
    }

    /* Navegación - VISIBLE y en flex horizontal */
    header nav {
        position: static;
        width: auto;
        height: auto;
        padding: 0;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1rem; /* separación horizontal entre enlaces en desktop */
        overflow-y: visible;
    }

    /* Hacer que el nav ocupe todo el espacio disponible dentro de header .container */
    header .container > nav {
        flex: 1 1 auto;
        width: 100%;
    }

    /* Mostrar logo en navegación desktop */
    header nav a:first-child {
        display: block;
    }

    header nav a {
        padding: 0.5rem 1rem;
        color: #27b4d4;
        font-family: 'Arial Narrow', sans-serif;
    }

    header nav a:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

    /* Logo en navegación desktop */
    header nav a img {
        max-width: 120px;
        height: auto;
        display: block;
        margin-right: 1rem;
    }

    /* Botón principal en desktop */
    header nav a.btn-principal {
        background-color: #3498db;
        margin-top: 0;
        margin-left: 0;
    }

    /* Overlay no necesario en desktop */
    header .menu-overlay {
        display: none !important;
    }
}

/* Ajustes adicionales para pantallas muy anchas */
@media (min-width: 1024px) {
    header nav a {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    header nav a img {
        max-width: 140px;
    }
}

