@charset "UTF-8";

/* Color Variables */
:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --heading-color: #000000;
    --link-color: #0000ee;         /* Standard Blue for light mode */
    --link-hover-color: #0055ff;
    --heading-link-color: #000000; /* Headings match text in light mode */
    --active-link-color: #003d99;
    --border-color: #e0e0e0;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #ffffff;
    --heading-color: #e0e0e0;
    --link-color: #4db5ff;         /* Bright Cyan for high contrast on black */
    --link-hover-color: #99d6ff;   /* Lighter blue on hover */
    --heading-link-color: #4db5ff; /* Headings also need high contrast */
    --active-link-color: #b3e0ff;
    --border-color: #333333;
}

/* Base */
body {
    font-family: Verdana, Geneva, sans-serif;
    font-size: 17px;
    color: var(--text-color);
    line-height: 150%;
    background-color: var(--bg-color);
    transition: background-color 0.3s, color 0.3s;
    width: 91%;
    margin: 0 auto;
}

/* Global Link Styles (Internal Navigation inside Paragraphs) */
a {
    color: var(--link-color);
    text-decoration: underline;
    transition: color 0.2s, border-color 0.2s;
}

a:hover {
    color: var(--link-hover-color);
    text-decoration: none;
}

/* Specific rule for links inside paragraphs to ensure they pop */
p a {
    font-weight: 500;
}

/* Typography */
h1, h2, h3 {
    font-family: Verdana, sans-serif;
    color: var(--heading-color);
}

h1 { font-size: 21px; font-weight: normal; margin-top: 15px; }
h2 { font-size: 19px; font-weight: bold; margin-top: 20px; }
h3 { font-size: 17px; font-weight: normal; }

/* Links inside Headings (H1, H2, H3) */
h1 a, h2 a, h3 a {
    color: var(--heading-link-color);
    text-decoration: none;
}

h1 a:hover, h2 a:hover, h3 a:hover {
    text-decoration: underline;
}

/* Botón Ir Arriba */
.ir-arriba-cont {
    margin: 30px 0;
}

.btn-arriba {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background-color: transparent;
    color: var(--text-color); /* Usa el color de texto del tema (blanco o negro) */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-arriba span {
    font-size: 18px;
}

.btn-arriba:hover {
    background-color: var(--border-color);
    color: var(--active-link-color);
    transform: translateY(-3px); /* Pequeño salto al pasar el mouse */
}

/* En modo oscuro, el borde y el fondo del hover se ajustan solos 
   gracias a las variables que ya definimos antes */


/* Glossary List View Styles (The main dictionary list) */
#glosario h3 {
    font-size: 18px;
    margin-bottom: 1px;
}

#glosario h3 a {
    color: var(--link-color);
    text-decoration: none;
    border-bottom: 1px dotted var(--link-color);
}

#glosario h3 a:hover {
    color: var(--link-hover-color);
    border-bottom: 1px dashed var(--link-hover-color);
}

#glosario p {
    margin-top: 1px;
    margin-bottom: 28px;
    font-size: 17px;
}

/* Layout & Containers */
#maincont { 
    margin-top: 10px; 
    width: 100%; 
}

.footer { 
    margin-top: 65px; 
    padding-bottom: 60px; /* Increased to avoid button overlapping text */
}

.footer_links {
    margin: 20px 0;
}

.center { text-align: center; margin-bottom: 15px; }

.buscador {
    margin: 0 auto;
    width: 87%;
    padding: 3px;
    display: flex;
    justify-content: center;
}

/* Letter Navigation (A B C...) */
.letras_top {
    margin: 0 auto;
    width: 90%;
    text-align: center;
    display: flex;
    gap: 2px;
    justify-content: center;
    flex-wrap: wrap;
}

.letras_top a {
    font-size: 17px;
    font-weight: bold;
    min-width: 28px;
    color: var(--text-color);
    text-decoration: none;
    transition: font-size 0.2s ease, color 0.2s;
}

.letras_top a.active {
    font-size: 22px;
    font-weight: 900;
    color: var(--active-link-color);
}

/* Responsive Letter Navigation */
@media (max-width: 768px) {
    .letras_top { width: 95%; gap: 1px; }
    .letras_top a { font-size: 15px; min-width: 24px; }
    .letras_top a.active { font-size: 20px; }
}

@media (max-width: 480px) {
    .letras_top a { font-size: 13px; min-width: 20px; }
    .letras_top a.active { font-size: 18px; }
}

/* Responsive Content Text */
.responsive_text { line-height: 1.6; }

@media (max-width: 768px) { .responsive_text { font-size: 16px; } }
@media (max-width: 480px) { .responsive_text { font-size: 14px; } }

/* Theme Toggle Button - POSITIONED AT BOTTOM RIGHT */
.theme-toggle {
    padding: 12px;
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 50%; /* Circle shape */
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 20px; /* Moved from Top to Bottom */
    right: 20px;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: opacity 0.3s, background-color 0.3s, transform 0.2s;
}

.theme-toggle:hover { 
    opacity: 0.9; 
    transform: scale(1.1);
}

.theme-toggle:active {
    transform: scale(0.9);
}

/* Adjust footer margin for mobile to clear the fixed button */
@media (max-width: 480px) {
    .footer { padding-bottom: 80px; }
}

