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

/* Body */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s ease;
}

/* Header */
header {
    background-color: #002868;
    padding: 1rem 0;
    color: white;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.logo img {
    height: 80px;
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.nav-menu a.active {
    background-color: #BF0A30;
}

.nav-menu a:hover {
    background-color: #BF0A30;
}

/* Botón Modo Oscuro */
.btn-toggle {
    position: absolute;
    right: 20px;
    top: 20px;
    background-color: #BF0A30;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-toggle:hover {
    background-color: #002868;
}

/* Main Section */
main {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Welcome Section Mejorada */
.welcome-section {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(to right, #002868, #BF0A30);
    color: white;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.welcome-section h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    letter-spacing: 2px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
}

.welcome-section p {
    font-size: 1.4rem;
    margin-bottom: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.btn-primary {
    background-color: #BF0A30;
    color: white;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn-primary:hover {
    background-color: #002868;
    transform: scale(1.05);
}

/* Calculator Links */
.calculator-links {
    text-align: center;
    margin-top: 50px;
    padding: 30px 0;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.calculator-links h2 {
    font-size: 2.5rem;
    color: #002868;
    margin-bottom: 20px;
}

.calculator-links ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.calculator-links ul li {
    flex-basis: calc(33.33% - 20px);  /* Asegura que todos los elementos ocupen el mismo espacio en 3 columnas */
    text-align: center;
}

.calculator-links ul li a {
    background-color: #BF0A30;
    color: white;
    padding: 15px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    display: block;  /* Asegura que el enlace ocupe todo el espacio disponible */
    transition: background-color 0.3s ease, transform 0.3s ease;
    min-height: 60px;  /* Establece una altura mínima para alinearlos */
}

.calculator-links ul li a:hover {
    background-color: #002868;
    transform: translateY(-5px);
}

/* Footer */
footer {
    padding: 30px;
    background-color: #002868;
    color: white;
    text-align: center;
    border-top: 5px solid #BF0A30;
}

footer a {
    color: #BF0A30;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Modo oscuro */
body.dark-mode {
    background-color: #121212;
    color: #f1f1f1;
}

body.dark-mode header {
    background-color: #1a1a1a;
}

body.dark-mode .btn-primary {
    background-color: #1a1a1a;
    color: #f1f1f1;
}

body.dark-mode footer {
    background-color: #1a1a1a;
}

/* Media Queries */
@media (max-width: 768px) {
    .welcome-section h1 {
        font-size: 2.5rem;
    }

    .welcome-section p {
        font-size: 1.2rem;
    }

    .calculator-links ul {
        flex-direction: column;
    }

    .calculator-links ul li {
        width: 100%;
    }
}
