        * {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.main-container {
    max-width: 80%;
    margin: 0 auto;
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.main-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: #374151;
    text-decoration: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    transform: translateY(-1px);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.dropdown-item:hover {
    background: #f8fafc;
    color: #3b82f6;
    padding-left: 2rem;
}

.content-wrapper {
    display: flex;
    min-height: 600px;
}

.sidebar {
    background: linear-gradient(180deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    padding: 2rem 1.5rem;
    width: 300px;
    flex-shrink: 0;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.9;
}

.sidebar-item {
    display: block;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(4px);
}

.sidebar-item.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 600;
}

.main-content {
    flex: 1;
    padding: 2rem;
}

.calculator-section {
    display: none;
}

.calculator-section.active {
    display: block;
}

.calculator-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.calculator-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.results-container {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
    display: none;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-weight: 500;
    opacity: 0.9;
}

.result-value {
    font-weight: 700;
    font-size: 1.2rem;
}

.sidebar-right {
    width: 300px;
    padding: 2rem 1.5rem;
    background: #f8fafc;
    border-left: 1px solid #e5e7eb;
}

.widget-container {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.widget-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    border-radius: 2px;
    margin-right: 0.75rem;
}

.euribor-display {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.euribor-value {
    font-size: 2rem;
    font-weight: 700;
    color: #92400e;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.comparison-table th,
.comparison-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.comparison-table th {
    background: rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

.mejor-opcion {
    background: rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

.seo-content-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 4rem 2rem;
    margin: 3rem 0;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.seo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.seo-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #3b82f6;
    transition: transform 0.3s ease;
}

.seo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.seo-card h3 {
    color: #1e40af;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-section {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.25rem;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .main-container {
        max-width: 95%;
        margin: 0.5rem auto;
    }
    
    .content-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .sidebar-right {
        width: 100%;
    }
    
    .calculator-card {
        padding: 1.5rem;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-link {
        padding: 0.5rem 1rem;
    }

    .hero-section h1 {
        font-size: 2rem;
    }
}

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

.error-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    z-index: 1000;
    font-weight: 600;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

/* ========================================== */
/* FOOTER STYLES                            */
/* ========================================== */

.site-footer {
    background-color: #2d3748; /* Un gris oscuro, similar a otros elementos */
    color: #e2e8f0; /* Texto gris claro */
    padding: 2.5rem 0;
    font-size: 0.9rem;
    border-top: 3px solid #4a5568;
}

.site-footer .footer-content {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.site-footer .footer-links {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-basis: 50%;
    justify-content: center;
}

.site-footer .footer-links a {
    color: #a0aec0;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.site-footer .footer-social {
    margin-bottom: 1.5rem;
    text-align: center;
    flex-basis: 40%;
}

.site-footer .footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #4a5568;
    margin-top: 1.5rem;
    width: 100%;
}

.site-footer .footer-bottom p {
    margin: 0;
    color: #a0aec0;
}

/* Ajustes responsivos para el footer */
@media (max-width: 768px) {
    .site-footer .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .site-footer .footer-links {
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 1rem;
        flex-basis: auto;
    }
    .site-footer .footer-social {
        margin-top: 1rem;
        flex-basis: auto;
    }
}

/* ========================================== */
/* LEGAL PAGES STYLES                       */
/* ========================================== */

.legal-page-body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.7;
    background-color: #f0f4f8; /* Fondo gris azulado muy claro */
    color: #333;
}

.legal-container {
    max-width: 850px;
    margin: 30px auto;
    padding: 25px 40px; /* Más padding horizontal */
    background-color: #ffffff;
    border: 1px solid #d1d9e6; /* Borde sutil */
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.legal-container h1 {
    color: #1e3a8a; /* Azul oscuro principal */
    border-bottom: 2px solid #3b82f6; /* Azul más claro */
    padding-bottom: 15px;
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 2.2rem; /* Ligeramente más grande */
}

.legal-container h2 {
    color: #1e40af; /* Azul un poco más claro que h1 */
    margin-top: 35px;
    margin-bottom: 15px;
    font-size: 1.6rem;
}

.legal-container p,
.legal-container li {
    margin-bottom: 12px;
    text-align: justify;
    color: #454545; /* Gris oscuro para el texto */
}

.legal-container ul {
    padding-left: 25px;
    list-style-type: disc; /* Estilo de viñeta estándar */
}

.legal-container a {
    color: #2563eb; /* Azul estándar para enlaces */
    text-decoration: none;
}

.legal-container a:hover {
    text-decoration: underline;
    color: #1d4ed8; /* Azul más oscuro al pasar el ratón */
}

.legal-container .footer-link-back {
    display: inline-block;
    margin-top: 35px;
    padding: 12px 20px;
    background-color: #1e3a8a;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.legal-container .footer-link-back:hover {
    background-color: #1e40af;
}

.legal-container em {
    font-style: italic;
    color: #5a677d; /* Gris azulado para énfasis */
}

.legal-container table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.legal-container th,
.legal-container td {
    border: 1px solid #dde4ed;
    padding: 10px 12px;
    text-align: left;
}

.legal-container th {
    background-color: #eef2f7; /* Fondo muy claro para cabeceras de tabla */
    font-weight: 600;
    color: #2c3e50; /* Color de texto para cabeceras */
}