* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Varela Round', sans-serif; }
body { background-color: white; color: black; line-height: 1.6; display: flex; flex-direction: column; min-height: 100vh; }
header { background-color: #02874d; padding: 10px 0; text-align: center; }
.logo-container { width: 100%; margin: 0 auto; }
.logo-container img { width: 30%; height: auto; max-width: 600px; min-width: 250px; }
nav { background-color: #5f452a; }
.nav-container {margin: 0 auto; padding: 0 5%; }
.nav-menu { display: flex; list-style: none; justify-content: flex-start; flex-wrap: wrap; }
.nav-item { position: relative; }
.nav-item > a { color: white; text-decoration: none; padding: 12px 15px; display: block; transition: background-color 0.3s; font-weight: bold;}
.nav-item > a:hover { background-color: #7a5a3a; text-decoration: none;}
.submenu, .nav-item:hover .submenu, .submenu.active { display: none !important; }
.menu-toggle { display: none; background-color: #5f452a; color: white; border: none; padding: 12px; width: 100%; text-align: center; font-size: 16px; cursor: pointer; }
.menu-toggle:hover { background-color: #7a5a3a; }
main { flex: 1; padding: 20px 5%; margin: 0 auto; width: 100%; }
h1, h2, h3 { color: #02874d; margin-bottom: 15px; }
h2 { font-size: 28px; margin-top: 20px; }
h3 { font-size: 22px; }
h3 a { color: black; font-weight: normal; text-decoration: none; font-size: 0.7em; }
h3 a:hover { text-decoration: none; font-weight: bold; }
p { margin-bottom: 15px; }
a { color: #02874d; text-decoration: none; }
a:hover { text-decoration: underline; }
.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-top: 15px; }
.tool-item { background-color: #f5f5f5; padding: 10px 15px; border-radius: 5px; transition: all 0.3s ease; display: flex; align-items: center; justify-content: space-between; border: 1px solid #dbdbdb; }
.tool-item a { order: 1; margin-right: 10px; text-align: left; flex-grow: 1; }
.tool-item:hover { background-color: #e0e0e0; transform: translateY(-2px); }

/* Estilos para herramienta NUEVA (VERDE) */
.tool-item.tool-nuevo { background-color: #d1e7dd !important; border: 1px solid #badbcc; }
.tool-item.tool-nuevo a { font-weight: bold; color: #0f5132 !important; }
.tool-item.tool-nuevo:hover { background-color: #c1d6cc !important; }
.label-nuevo { color: #0f5132; margin-left: 5px; font-weight: bold; }

/* Estilos para herramienta EN DESARROLLO (Solo Admin - AMARILLO/NARANJA) */
.tool-item.tool-en-desarrollo { 
    background-color: #fff3cd !important; 
    border: 1px solid #ffc107; 
}
.tool-item.tool-en-desarrollo a { 
    font-weight: bold; 
    color: #856404 !important; 
}
.tool-item.tool-en-desarrollo:hover { 
    background-color: #ffeeba !important; 
}
.label-desarrollo { 
    color: #856404; 
    margin-left: 5px; 
    font-weight: bold; 
}

/* Estilos para herramienta PREMIUM (ROJO) */
.premium-tool-item-logged-out { background-color: #ffdddd !important; border: 1px dashed #d9534f !important; }
.premium-tool-item-logged-out:hover { background-color: #ffcccc !important; }
.premium-tool-link-logged-out { color: #333 !important; }
.premium-tool-link-logged-in { color: #02874d !important; }

/* Introducción */
.intro-desktop { display: block; }
.intro-mobile { display: none; }

/* Favoritos */
.fav-section { display: none; }
.fav-section h3 { border-bottom: 2px solid #5f452a; padding-bottom: 5px; margin-top: 30px; }
.fav-btn { background: none; border: none; cursor: pointer; font-size: 1.4rem; color: #ccc; line-height: 1; transition: color 0.2s, transform 0.2s; padding: 0; outline: none; order: 2; margin-left: 5px; }
.fav-btn:hover { color: #ffd700; transform: scale(1.1); }
.fav-btn.active { color: #ffc107; text-shadow: 0 0 2px rgba(0,0,0,0.2); }

/* Aviso Storage */
#storage-notice { position: fixed; bottom: -150px; left: 0; width: 100%; background-color: #5f452a; color: #fff; padding: 15px 20px; text-align: center; transition: bottom 0.5s ease-in-out; z-index: 9999; box-shadow: 0 -4px 15px rgba(0,0,0,0.3); display: flex; justify-content: center; align-items: center; gap: 15px; flex-wrap: wrap; font-size: 0.9em; }
#storage-notice.show { bottom: 0; }
#storage-notice button { background-color: white; color: #5f452a; border: none; padding: 8px 20px; border-radius: 5px; cursor: pointer; font-weight: bold; transition: background 0.3s; }
#storage-notice button:hover { background-color: #f0f0f0; }

/* Footer */
footer { background-color: #5f452a; color: white; text-align: center; padding: 10px; font-weight: bold; flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; }
footer a { color: white; text-decoration: none; }
footer a:hover { text-decoration: underline; }
.footer-left { flex: 1; text-align: left; font-size: 0.8em; }
.footer-center { flex: 1; text-align: center; }
.footer-right { flex: 1; text-align: right; }

/* Colapsar y Enfocar */
.tool-category { margin-bottom: 30px; transition: all 0.3s ease; }
.category-header { display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid #5f452a; padding-bottom: 5px; margin-top: 30px; margin-bottom: 15px; }
.category-header h3 { margin: 0; padding: 0 0 0 10px; cursor: pointer; flex-grow: 1; user-select: none; text-align: left; }
.category-header h3:hover { color: #5f452a; }
.collapse-icon { cursor: pointer; font-size: 1.2rem; padding: 0 10px; color: #5f452a; transition: transform 0.3s ease; user-select: none; transform: rotate(180deg); }
.back-arrow { cursor: pointer; font-size: 1.2rem; padding-right: 15px; color: #5f452a; display: none; user-select: none; animation: fadeIn 0.3s; line-height: 1; vertical-align: middle; }
.tool-category.is-collapsed .tools-grid { display: none; }
.tool-category.is-collapsed .collapse-icon { transform: rotate(0deg); }
.tool-category.hidden-by-focus { display: none; }
.tool-category.is-focused .back-arrow { display: block; }
.tool-category.is-focused .collapse-icon { display: none; }
@keyframes fadeIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }

/* Media Queries */
@media (max-width: 768px) {
    .intro-desktop { display: none; }
    .intro-mobile { display: block; }
    header { padding: 10px; }
    .logo-container img { width: 60%; }
    .footer-left, .footer-center, .footer-right { text-align: center; width: 100%; }
    footer { flex-direction: column; gap: 5px; }
    .tools-grid { grid-template-columns: repeat(2, 1fr); }
    .menu-toggle { display: block; text-transform: uppercase; }
    .nav-menu { display: none; flex-direction: column; justify-content: center; text-align: center; }
    .nav-menu.active { display: flex; }
    .submenu { position: static; box-shadow: none; }
}
@media (max-width: 480px) {
    .tools-grid { grid-template-columns: 1fr; }
    .logo-container img { width: 70%; min-width: 200px; }
    #storage-notice { flex-direction: column; text-align: center; }
    .category-header h3 { padding-left: 5px; font-size: 18px; }
}

/* Estilo base para el contenedor de navegación */
.nav-container {
    display: flex;
    justify-content: space-between; /* Esto separa los menús a los extremos */
    align-items: center;
    width: 100%;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 15px; /* Espacio entre elementos */
}

/* --- VERSIÓN MÓVIL --- */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column; /* Pone una lista debajo de la otra */
        align-items: flex-start; /* Alinea a la izquierda */
    }
    
    .nav-menu {
        flex-direction: column; /* Elementos en vertical */
        width: 100%;
    }
    
    /* Pequeño separador visual entre el menú público y el de usuario en móvil */
    .nav-right {
        border-top: 1px solid rgba(255,255,255,0.1);
        margin-top: 10px;
        padding-top: 10px;
        width: 100%;
    }
}