/* Responsabilidad: Base del sitio: variables, reset, tipografía y estructura. Cargar antes de las hojas específicas. Las reglas nav-links/dropdown-menu son heredadas; el menú actual está en style-navigation.css.
   Referencia de componentes y mantenimiento: DOCUMENTACION.md. */
:root {
    --bg-gradient: radial-gradient(circle at 80% 20%, #0c3a4d 0%, #0c1117 50%, #050608 100%);
    --color-text-white: #ffffff;
    --color-text-light: #f0f6f8;
    --color-text-secondary: #7fa1b5;
    --color-text-accent: #1cbcd4;
    --color-text-muted: #a0b9c7;
    --color-divider: rgba(28, 188, 212, 0.25);
    --color-panel-bg: #0d141b;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --padding-body: 40px 20px;
    --max-width-header: 1200px;
    --max-width-content: 600px;
    --transition-fade: fadeIn 1.5s ease-out;
}

@media (prefers-reduced-motion: reduce) {
    :root {
        --transition-fade: none;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--color-text-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: var(--padding-body);
    background: var(--bg-gradient);
    overflow-x: hidden;
}


/* Encabezado / Navegación */

.header {
    width: 100%;
    max-width: var(--max-width-header);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-image {
    width: 65px;
    height: 65px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links > a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.nav-links > a:hover {
    color: var(--color-text-accent);
}

/* Dropdown "Tops" en el nav */

.nav-item {
    position: relative;
}

.nav-item > .nav-trigger {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: color 0.3s ease;
    background: none;
    border: none;
    font-family: inherit;
    padding: 6px 0;
}

.nav-item > .nav-trigger .caret {
    font-size: 0.6rem;
    transition: transform 0.25s ease;
}

.nav-item:hover > .nav-trigger,
.nav-item:focus-within > .nav-trigger {
    color: var(--color-text-accent);
}

.nav-item:hover > .nav-trigger .caret,
.nav-item:focus-within > .nav-trigger .caret {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, -6px);
    min-width: 220px;
    background: var(--color-panel-bg);
    border: 1px solid var(--color-divider);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    z-index: 100;
}

.nav-item:hover .dropdown-menu,
.nav-item:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.dropdown-menu::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 0;
    right: 0;
    height: 6px;
}

.dropdown-menu a {
    display: block;
    padding: 9px 14px;
    border-radius: 5px;
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-menu a:hover {
    color: var(--color-text-accent);
    background: rgba(28, 188, 212, 0.1);
}


/* Contenido Central */

.main-content {
    text-align: center;
    max-width: var(--max-width-content);
    animation: var(--transition-fade);
    margin: auto 0;
}

.tagline {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--color-text-accent);
    margin-bottom: 20px;
    font-weight: 600;
}

.title {
    font-size: 2.5rem;
    font-weight: 400;
    letter-spacing: 1px;
    margin-bottom: 25px;
    color: var(--color-text-light);
}

.divider {
    width: 60px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--color-divider), transparent);
    margin: 0 auto 25px auto;
}

.description {
    font-size: 1rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    font-weight: 300;
}


/* Pie de página */

.footer {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    letter-spacing: 0.5px;
    margin-top: 40px;
    text-align: center;
    width: 100%;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .title {
        font-size: 1.8rem;
    }
    .description {
        font-size: 0.9rem;
    }
    .dropdown-menu {
        left: auto;
        right: 0;
        transform: translate(0, -6px);
    }
    .nav-item:hover .dropdown-menu,
    .nav-item:focus-within .dropdown-menu {
        transform: translate(0, 0);
    }
}
