/* recursos.css - Styles for the recursos útiles page */

/* Import base styles */
@import url('./base.css');
@import url('./components.css');
@import url('./themes.css');

/* =================================================================================
   --- CSS VARIABLES (CONSISTENT WITH CONSULTING.HTML)
   ================================================================================= */

:root {
    --primary-color: #0ea5e9; /* sky-500 */
    --background-dark: #111827; /* gray-900 */
    --background-light: #f3f4f6; /* gray-100 */
    --card-dark: rgba(31, 41, 55, 0.5); /* gray-800 with transparency */
    --card-light: rgba(255, 255, 255, 0.7);
    --text-dark-primary: #f9fafb; /* gray-50 */
    --text-dark-secondary: #9ca3af; /* gray-400 */
    --text-light-primary: #1f2937; /* gray-800 */
    --text-light-secondary: #4b5563; /* gray-600 */
    --border-dark: rgba(55, 65, 81, 0.6);
    --border-light: rgba(209, 213, 219, 0.8);
    
    /* Widget specific variables */
    --widget-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --result-bg: rgba(34, 197, 94, 0.1);
    --result-border: rgba(34, 197, 94, 0.3);
    --loading-color: #38bdf8;
}

html.dark {
    --bg-color: var(--background-dark);
    --card-bg: var(--card-dark);
    --text-primary: var(--text-dark-primary);
    --text-secondary: var(--text-dark-secondary);
    --border-color: var(--border-dark);
    --widget-bg: var(--card-dark);
    --widget-border: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(17, 24, 39, 0.8);
    --input-border: rgba(255, 255, 255, 0.2);
    --button-primary: linear-gradient(135deg, #3b82f6, #1e40af);
    --button-secondary: rgba(75, 85, 99, 0.8);
}

html.light {
    --bg-color: var(--background-light);
    --card-bg: var(--card-light);
    --text-primary: #111827; /* Darker black for better contrast */
    --text-secondary: #374151; /* Dark gray instead of light gray */
    --border-color: var(--border-light);
    --widget-bg: var(--card-light);
    --widget-border: rgba(0, 0, 0, 0.1);
    --widget-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --input-bg: rgba(255, 255, 255, 0.9);
    --input-border: rgba(0, 0, 0, 0.3);
    --button-primary: linear-gradient(135deg, #3b82f6, #1d4ed8);
    --button-secondary: rgba(107, 114, 128, 0.9);
}

/* =================================================================================
   --- HEADER AND NAVIGATION
   ================================================================================= */

/* Base Body Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    transition: background-color 0.3s, color 0.3s;
    scroll-behavior: smooth;
}

/* Light mode specific improvements */
html.light body {
    color: #111827; /* Force black text in light mode */
}

html.light h1,
html.light h2,
html.light h3,
html.light h4,
html.light h5,
html.light h6 {
    color: #111827 !important;
}

html.light p {
    color: #374151 !important;
}

html.light .text-gray-400 {
    color: #6b7280 !important;
}

html.light .text-gray-300 {
    color: #4b5563 !important;
}

/* Light mode widget and input improvements */
html.light .widget-content {
    background: rgba(255, 255, 255, 0.95);
    color: #111827;
}

html.light .widget-content input,
html.light .widget-content select,
html.light .widget-content label {
    color: #111827 !important;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.3);
}

html.light .widget-content input::placeholder {
    color: #6b7280 !important;
}

html.light .gradient-text {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background-color: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    transition: background-color 0.3s, border-color 0.3s;
}

header nav {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* NAVIGATION LINKS CONTAINER */
.nav-links-container {
    display: none; /* Hidden on mobile */
    align-items: center;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .nav-links-container {
        display: flex !important; /* Visible on desktop */
    }
}

/* NAVIGATION LINKS */
.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 400;
    transition: color 0.3s ease;
    display: inline-block;
}

.nav-link:hover {
    color: #0ea5e9;
}

/* Ensure proper colors in both themes */
html.dark .nav-link {
    color: #f9fafb;
}

html.light .nav-link {
    color: #111827 !important;
}

/* MOBILE NAVIGATION LINKS */
.mobile-nav-link {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease;
}

.mobile-nav-link:hover {
    background-color: rgba(75, 85, 99, 0.3);
}

html.dark .mobile-nav-link {
    color: #f9fafb;
}

html.light .mobile-nav-link {
    color: #111827;
}

html.light .mobile-nav-link:hover {
    background-color: rgba(229, 231, 235, 0.5);
}

.logo-container {
    display: flex;
    align-items: center;
    transition: opacity 0.3s ease;
    position: relative;
}

.logo-container:hover {
    opacity: 0.8;
}

.logo-img {
    height: 4.5rem; /* Logo grande - 72px */
    width: auto;
    object-fit: contain; /* Logos ya vienen recortados */
    object-position: left center; /* Alinear contenido a la izquierda */
    transition: all 0.3s ease;
}

/* Logo visibility based on theme */
.logo-dark {
    display: block;
}

.logo-light {
    display: none;
}

/* Show appropriate logo in light mode */
html.light .logo-dark {
    display: none;
}

html.light .logo-light {
    display: block;
}

/* ======== HEADER COMPACTNESS ======== */

/* Make header more compact by reducing nav padding */
header nav {
    padding-top: 0.5rem; /* Compacto pero que acomode el logo grande - 8px */
    padding-bottom: 0.5rem;
}

/* ======== MOBILE RESPONSIVE ADJUSTMENTS ======== */

/* Mobile header spacing adjustments */
@media (max-width: 768px) {
    /* Logo container styling and spacing for mobile */
    header nav > a.logo-container {
        margin-right: 1rem; /* Force minimum 16px space */
        flex-shrink: 1; /* Allow logo to shrink if needed */
    }
    
    /* Logo image responsive sizing */
    .logo-img {
        height: clamp(3rem, 8vw, 4rem) !important; /* Logo grande en móviles - 48px-64px */
        width: auto !important;
        object-fit: contain !important; /* Logos recortados */
    }
    
    /* Reduce controls container spacing */
    header nav > div.flex.items-center.space-x-3 {
        gap: 0.5rem; /* 8px instead of 12px (space-x-3) */
        margin-left: auto; /* Ensure it stays on the right */
    }
    
    /* Tighter nav container on mobile */
    header nav {
        padding: 0.375rem 0.75rem; /* Compacto pero que acomode logo grande en móviles */
        gap: 0.5rem; /* Add gap between main elements */
    }
    
    /* Smaller control buttons for more space */
    .control-btn {
        padding: 0.375rem 0.5rem; /* Reduce from default padding */
        font-size: 0.75rem; /* Make text smaller */
    }
    
    /* Language controls container - make it more compact */
    header nav .flex.bg-gray-700\/50 {
        padding: 0.125rem; /* Tighter internal padding */
    }
}

/* Extra small mobile devices - even more aggressive */
@media (max-width: 375px) {
    header nav > a.logo-container {
        margin-right: 0.75rem; /* Still maintain some space */
    }
    
    .logo-img {
        height: clamp(2.5rem, 7vw, 3rem) !important; /* Logo grande incluso en móviles pequeños - 40px-48px */
        width: auto !important;
        object-fit: contain !important; /* Logos recortados */
    }
    
    .control-btn {
        padding: 0.25rem 0.375rem; /* Very compact */
        font-size: 0.6875rem; /* 11px */
    }
}

/* Control Buttons */
.control-btn {
    background-color: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.control-btn:hover {
    background-color: rgba(14, 165, 233, 0.1);
    border-color: var(--primary-color);
}

.control-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: transparent;
}

/* =================================================================================
   --- HERO SECTION
   ================================================================================= */

.hero-section {
    background: linear-gradient(135deg, var(--bg-color) 0%, rgba(59, 130, 246, 0.1) 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Light mode hero section - darker background */
html.light .hero-section {
    background: linear-gradient(135deg, #e5e7eb 0%, rgba(59, 130, 246, 0.15) 100%);
}

html.light .hero-section::before {
    background: radial-gradient(circle at 30% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.gradient-text {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.hero-stats {
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--widget-bg);
    border: 1px solid var(--widget-border);
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

/* =================================================================================
   --- NAVIGATION CARDS
   ================================================================================= */

.navigation-card {
    background: var(--widget-bg);
    border: 1px solid var(--widget-border);
    border-radius: 1rem;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: var(--widget-shadow);
}

.navigation-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.nav-button {
    display: inline-flex;
    align-items: center;
    background: var(--button-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.nav-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

/* =================================================================================
   --- RESOURCE WIDGETS
   ================================================================================= */

.resource-widget {
    background: var(--widget-bg);
    border: 1px solid var(--widget-border);
    border-radius: 1rem;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: var(--widget-shadow);
    transition: all 0.3s ease;
}

.resource-widget:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

/* Economic indicator widgets - clickable */
.economic-widget {
    cursor: pointer;
    position: relative;
}

.economic-widget:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.economic-widget::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(139, 92, 246, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 1rem;
}

.economic-widget:hover::after {
    opacity: 1;
}

.resource-widget.coming-soon {
    opacity: 0.7;
    border-style: dashed;
}

.widget-header {
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid var(--widget-border);
}

.widget-content {
    padding: 2rem 1.5rem;
}

/* === SEPARACIÓN EXTRA PARA BOTÓN ACTUALIZAR EN WIDGETS === */
.widget-content .refresh-btn,
.indicator-card .refresh-btn,
.resource-widget .refresh-btn {
    margin-top: 1.25rem !important;
    margin-bottom: 1.25rem !important;
}

/* =================================================================================
   --- FORM INPUTS
   ================================================================================= */

.input-group {
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
}

.input-group label {
    margin-bottom: 0;
    font-size: 1rem;
    font-weight: 500;
    color: #e5e7eb;
    min-width: 180px;
    flex: 1 0 180px;
}

.input-group input[type="number"],
.input-group input[type="text"] {
    flex: 2 1 0%;
    min-width: 0;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 0.75rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 0.5rem;
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-group input::placeholder {
    color: var(--secondary-text-color);
}

/* =================================================================================
   --- MODERN WIDGET SYSTEM (UNIFIED HEADERS)
   ================================================================================= */

.modern-widget {
    background: linear-gradient(135deg, var(--card-background) 0%, rgba(var(--primary-color-rgb), 0.05) 100%);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.modern-widget:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.modern-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color, var(--primary-color)));
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modern-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.modern-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.title-content h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.25rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.title-content p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

/* =================================================================================
   --- MODERN CURRENCY CONVERTER (SPECIFIC STYLES)
   ================================================================================= */

.modern-converter {
    background: linear-gradient(135deg, var(--card-background) 0%, rgba(var(--primary-color-rgb), 0.05) 100%);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.modern-converter:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.converter-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color, var(--primary-color)));
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.converter-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.converter-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.title-content h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.25rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.title-content p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.converter-body {
    padding: 2rem;
}

.conversion-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.currency-section {
    width: 100%;
    max-width: 400px;
}

.currency-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.currency-card {
    background: var(--input-bg, var(--card-background));
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.currency-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color, var(--primary-color)));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.currency-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.currency-card:hover::before {
    opacity: 1;
}

.result-card {
    background: linear-gradient(135deg, var(--success-color, #10b981) 0%, var(--success-color, #10b981) 100%);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.result-card {
    background: rgba(var(--primary-color-rgb), 0.1);
    border-color: var(--primary-color);
}

.amount-input-wrapper {
    flex: 1;
    position: relative;
}

.amount-input {
    width: 100%;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    padding: 0.5rem 0;
    outline: none;
    transition: all 0.3s ease;
}

.amount-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.amount-input:focus {
    color: var(--primary-color);
    transform: scale(1.05);
}

.result-input {
    color: var(--primary-color);
    font-weight: 800;
}

.input-decoration {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--border-color);
    width: 100%;
    transition: all 0.3s ease;
}

.amount-input:focus + .input-decoration {
    background: var(--primary-color);
    height: 3px;
    box-shadow: 0 0 10px rgba(var(--primary-color-rgb), 0.5);
}

.result-decoration {
    background: var(--primary-color);
    height: 3px;
}

.currency-selector-wrapper {
    position: relative;
    min-width: 120px;
}

.currency-selector {
    appearance: none;
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    padding-right: 2.5rem;
}

.currency-selector:hover,
.currency-selector:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

.selector-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    transition: all 0.3s ease;
}

.currency-selector:focus + .selector-arrow {
    color: var(--primary-color);
    transform: translateY(-50%) rotate(180deg);
}

.conversion-arrow {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem 0;
}

.arrow-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.arrow-circle {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color, var(--primary-color)));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 16px rgba(var(--primary-color-rgb), 0.3);
    transition: all 0.3s ease;
    z-index: 2;
}

.arrow-circle:hover {
    transform: scale(1.1) rotate(180deg);
    box-shadow: 0 6px 24px rgba(var(--primary-color-rgb), 0.4);
}

.arrow-line {
    position: absolute;
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, var(--primary-color), transparent);
    top: 24px;
    z-index: 1;
}

.exchange-rate-info {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(var(--primary-color-rgb), 0.05);
    border: 1px solid rgba(var(--primary-color-rgb), 0.1);
    border-radius: 12px;
}

.rate-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.rate-display i {
    color: var(--primary-color);
}

/* =================================================================================
   --- BUTTONS
   ================================================================================= */

.calculate-btn,
.refresh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--button-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.calculate-btn:hover,
.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.refresh-btn {
    background: var(--button-secondary);
    width: auto;
    margin: 0 0.5rem;
}

/* Light mode refresh button improvements */
html.light .refresh-btn {
    color: #ffffff;
    background: rgba(75, 85, 99, 0.9);
}

html.light .refresh-btn:hover {
    background: rgba(55, 65, 81, 0.95);
    color: #ffffff;
}

/* =================================================================================
   --- RESULT DISPLAYS
   ================================================================================= */

.result-display {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--result-bg);
    border: 1px solid var(--result-border);
    border-radius: 0.5rem;
    animation: fadeIn 0.5s ease;
}

.result-item {
    display: flex;
    justify-content: between;
    margin-bottom: 0.5rem;
}

.result-item:last-child {
    margin-bottom: 0;
}

.result-item .label {
    font-weight: 500;
    color: var(--text-color);
}

.result-item .value {
    font-weight: bold;
    color: #22c55e;
    margin-left: auto;
}

/* =================================================================================
   --- CURRENCY RATES DISPLAY
   ================================================================================= */

.currency-rate-item {
    background: var(--card-background);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.currency-rate-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.currency-header {
    margin-bottom: 1.5rem;
    text-align: center;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
}

.currency-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.currency-symbol {
    font-size: 1.75rem;
    color: var(--primary-color);
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.currency-name {
    color: var(--text-primary);
}

.currency-rates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    width: 100%;
    text-align: center;
}

/* Desktop: Mejor organización con columnas más grandes */
@media (min-width: 1024px) {
    .currency-rates-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
        max-width: 1400px;
        margin: 0 auto;
    }
}

/* Extra large screens: Limitar a máximo 4 columnas */
@media (min-width: 1400px) {
    .currency-rates-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

/* EUR/BRL Container - Group for better space utilization */
.eur-brl-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

/* Desktop: EUR and BRL side by side */
@media (min-width: 1024px) {
    .eur-brl-container {
        display: flex;
        flex-direction: row;
        gap: 2rem;
        width: 100%;
    }
    
    .eur-brl-container .currency-rate-item {
        flex: 1;
        max-width: 50%;
    }
}

/* Mobile: EUR and BRL stacked (default behavior) */
@media (max-width: 1023px) {
    .eur-brl-container {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .eur-brl-container .currency-rate-item {
        width: 100%;
        max-width: none;
    }
}

.rate-type {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem;
    background: var(--input-bg, var(--card-background));
    border-radius: 16px;
    border: 1px solid var(--border-color);
    min-width: 200px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Desktop: Mejorar spacing y tamaño */
@media (min-width: 1024px) {
    .rate-type {
        padding: 1.5rem;
        min-width: 280px;
        border-radius: 20px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }
}

.rate-type::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color, var(--primary-color)));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rate-type:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

/* Desktop: Hover más elegante */
@media (min-width: 1024px) {
    .rate-type:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    }
}

.rate-type:hover::before {
    opacity: 1;
}

/* Clickable rate types for historical charts */
.rate-type.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.rate-type.clickable:hover {
    background: rgba(var(--primary-color-rgb), 0.1);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--primary-color-rgb), 0.2);
}

.rate-type.clickable::after {
    content: '📊';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rate-type.clickable:hover::after {
    opacity: 1;
}

.rate-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    text-align: center;
    line-height: 1.2;
}

/* Desktop: Tipografía mejorada */
@media (min-width: 1024px) {
    .rate-label {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
}

.rate-values {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.rate-buy, .rate-sell {
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    width: 100%;
    transition: all 0.2s ease;
}

/* Desktop: Valores más prominentes */
@media (min-width: 1024px) {
    .rate-values {
        gap: 0.75rem;
    }
    
    .rate-buy, .rate-sell {
        font-size: 1.1rem;
        padding: 0.75rem 1rem;
        border-radius: 12px;
    }
}

.rate-buy {
    color: var(--success-color, #10b981);
    background: rgba(16, 185, 129, 0.1);
}

.rate-sell {
    color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.1);
    font-weight: 700;
}

.rate-spread {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    opacity: 0.8;
}

.rate-change {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.rate-change.positive {
    color: #22c55e;
}

.rate-change.negative {
    color: #ef4444;
}

/* Enhanced responsive design for currency rates */
@media (max-width: 1023px) {
    .currency-rates-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 1rem;
    }
    
    .rate-type {
        padding: 1rem;
        min-width: 160px;
        border-radius: 12px;
    }
}

@media (max-width: 768px) {
    .currency-rates-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 0.75rem;
    }
    
    .currency-title {
        font-size: 1.25rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .currency-symbol {
        font-size: 1.5rem;
    }
    
    .currency-rate-item {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .currency-header {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }
    
    .rate-type {
        min-width: 130px;
        padding: 0.6rem;
    }
    
    .rate-buy, .rate-sell {
        font-size: 0.85rem;
        padding: 0.2rem 0.4rem;
    }
}

@media (max-width: 640px) {
    .currency-rates-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .currency-rates-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .rate-type {
        min-width: unset;
        width: 100%;
        padding: 0.75rem;
    }
    
    .currency-title {
        font-size: 1.125rem;
    }
    
    .currency-symbol {
        font-size: 1.25rem;
    }
}

/* =================================================================================
   --- HOLIDAYS FULL WIDTH WIDGET
   ================================================================================= */

.holidays-full-width-widget {
    width: 100%;
}

.holidays-cards-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

/* Desktop: Holidays cards horizontal like currency rates */
@media (min-width: 1024px) {
    .holidays-cards-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
        max-width: 1200px;
        margin: 0 auto;
    }
}

.holiday-card {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: var(--input-bg, var(--card-background));
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Desktop: Enhanced holiday cards */
@media (min-width: 1024px) {
    .holiday-card {
        padding: 2rem;
        border-radius: 20px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }
    
    .holiday-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        border-color: var(--primary-color);
    }
}

.holiday-card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    margin-right: 1.5rem;
    text-align: center;
}

/* Desktop: Larger date display */
@media (min-width: 1024px) {
    .holiday-card-header {
        min-width: 100px;
        margin-right: 2rem;
    }
}

.holiday-date-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

/* Desktop: Larger numbers */
@media (min-width: 1024px) {
    .holiday-date-number {
        font-size: 3rem;
    }
}

.holiday-date-month {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

/* Desktop: Larger month text */
@media (min-width: 1024px) {
    .holiday-date-month {
        font-size: 1rem;
    }
}

.holiday-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.holiday-card-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

/* Desktop: Larger holiday names */
@media (min-width: 1024px) {
    .holiday-card-name {
        font-size: 1.25rem;
    }
}

.holiday-card-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* Desktop: Better spacing */
@media (min-width: 1024px) {
    .holiday-card-date {
        font-size: 0.95rem;
    }
}

.holiday-card-countdown {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--success-color, #10b981);
    background: rgba(16, 185, 129, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    display: inline-block;
    width: fit-content;
}

/* Desktop: Enhanced countdown badge */
@media (min-width: 1024px) {
    .holiday-card-countdown {
        font-size: 0.95rem;
        padding: 0.5rem 1rem;
    }
}

/* Mobile: Stack holidays vertically */
@media (max-width: 1023px) {
    .holidays-cards-container {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .holiday-card {
        padding: 1.25rem;
    }
    
    .holiday-card-header {
        min-width: 70px;
        margin-right: 1rem;
    }
    
    .holiday-date-number {
        font-size: 2rem;
    }
    
    .holiday-card-name {
        font-size: 1rem;
    }
}

/* =================================================================================
   --- LOADING STATES
   ================================================================================= */

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--loading-color);
}

.loading-spinner i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* =================================================================================
   --- CTA SECTION
   ================================================================================= */

.cta-section {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    position: relative;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cta-button.primary {
    background: var(--button-primary);
    color: white;
}

.cta-button.secondary {
    background: var(--button-secondary);
    color: var(--text-color);
    border: 1px solid var(--widget-border);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

/* =================================================================================
   --- FOOTER
   ================================================================================= */

.footer-section {
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
}

/* =================================================================================
   --- UTILITY CLASSES
   ================================================================================= */

.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

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

/* =================================================================================
   --- RESPONSIVE DESIGN
   ================================================================================= */

@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 1rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .navigation-card {
        padding: 1.5rem;
    }
    
    .resource-widget {
        margin-bottom: 2rem;
    }
    
    .conversion-container {
        gap: 1rem;
    }
    
    .currency-card {
        flex-direction: column;
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .amount-input-wrapper,
    .currency-selector-wrapper {
        width: 100%;
    }
    
    .currency-selector-wrapper {
        min-width: auto;
    }
    
    .modern-header,
    .converter-header {
        padding: 1rem;
    }
    
    .modern-title,
    .converter-title {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .modern-icon,
    .converter-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .title-content h4 {
        font-size: 1.25rem;
    }
    
    .converter-body {
        padding: 1.5rem;
    }
    
    .arrow-circle {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .cta-button {
        padding: 0.875rem 1.5rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .widget-header,
    .widget-content {
        padding: 1rem;
    }
    
    .result-item {
        flex-direction: column;
        text-align: center;
    }
    
    .result-item .value {
        margin-left: 0;
        margin-top: 0.25rem;
    }
    
    .currency-rates-grid {
        grid-template-columns: 1fr;
    }
}

/* =================================================================================
   --- HISTORICAL CHART MODAL
   ================================================================================= */

.modal-container {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    max-width: 90vw;
    max-height: 90vh;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color, var(--primary-color)));
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.modal-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-icon i {
    font-size: 1.25rem;
    color: white;
}

.title-content h4 {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.title-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    margin: 0.25rem 0 0 0;
}

.modal-close {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-body {
    padding: 2rem;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

.time-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.time-filter {
    padding: 0.5rem 1rem;
    background: var(--input-background);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    color: var(--text-color);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.time-filter:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.time-filter.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.3);
}

.chart-container {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    min-height: 400px;
    position: relative;
}

.chart-info {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.info-item i {
    color: var(--primary-color);
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-container {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-title {
        gap: 0.75rem;
    }
    
    .modal-icon {
        width: 40px;
        height: 40px;
    }
    
    .title-content h4 {
        font-size: 1.25rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .time-filters {
        gap: 0.25rem;
    }
    
    .time-filter {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .chart-container {
        min-height: 300px;
        padding: 1rem;
    }
    
    .chart-info {
        gap: 1rem;
        flex-direction: column;
        align-items: center;
    }
}

/* =================================================================================
   --- DARK/LIGHT MODE TRANSITIONS
   ================================================================================= */

* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* =================================================================================
   --- HISTORICAL CHART MODAL STYLES
   ================================================================================= */

/* Modal Overlay - More opaque background */
.historical-chart-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(15px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.historical-chart-modal.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container - Better contrast and opacity */
.historical-chart-modal .modal-container {
    background: rgba(255, 255, 255, 0.99);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    max-width: 90vw;
    max-height: 90vh;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    animation: modalSlideIn 0.3s ease-out;
}

/* Dark mode modal adjustments */
html.dark .historical-chart-modal .modal-container {
    background: rgba(31, 41, 55, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Modal Header - Better contrast */
.historical-chart-modal .modal-header {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Modal Title - Better text contrast */
.historical-chart-modal .modal-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.historical-chart-modal .modal-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.historical-chart-modal .modal-icon i {
    font-size: 1.25rem;
    color: white;
}

.historical-chart-modal .title-content h4 {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.historical-chart-modal .title-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    margin: 0.25rem 0 0 0;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

/* Modal Close Button - Better visibility */
.historical-chart-modal .modal-close {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-weight: bold;
    font-size: 1.2rem;
}

.historical-chart-modal .modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Modal Body - Better text contrast */
.historical-chart-modal .modal-body {
    padding: 2rem;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.99);
}

html.dark .historical-chart-modal .modal-body {
    background: rgba(31, 41, 55, 0.98);
}

/* Time Filters - Better contrast */
.historical-chart-modal .time-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.historical-chart-modal .time-filter {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 25px;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

html.dark .historical-chart-modal .time-filter {
    background: rgba(55, 65, 81, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f9fafb;
}

.historical-chart-modal .time-filter:hover {
    background: #0ea5e9;
    color: white;
    border-color: #0ea5e9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.historical-chart-modal .time-filter.active {
    background: #0ea5e9;
    color: white;
    border-color: #0ea5e9;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

/* Chart Container - Better contrast */
.historical-chart-modal .chart-container {
    background: rgba(255, 255, 255, 0.99);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    min-height: 400px;
    position: relative;
}

html.dark .historical-chart-modal .chart-container {
    background: rgba(55, 65, 81, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Chart Info - Better text contrast */
.historical-chart-modal .chart-info {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.historical-chart-modal .info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 600;
}

html.dark .historical-chart-modal .info-item {
    color: #f9fafb;
}

.historical-chart-modal .info-item i {
    color: #0ea5e9;
}

/* Responsive adjustments for modal */
@media (max-width: 768px) {
    .historical-chart-modal .modal-container {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .historical-chart-modal .modal-header {
        padding: 1rem;
    }
    
    .historical-chart-modal .modal-title {
        gap: 0.75rem;
    }
    
    .historical-chart-modal .modal-icon {
        width: 40px;
        height: 40px;
    }
    
    .historical-chart-modal .title-content h4 {
        font-size: 1.25rem;
    }
    
    .historical-chart-modal .modal-body {
        padding: 1rem;
    }
    
    .historical-chart-modal .time-filters {
        gap: 0.25rem;
    }
    
    .historical-chart-modal .time-filter {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .historical-chart-modal .chart-container {
        min-height: 300px;
        padding: 1rem;
    }
    
    .historical-chart-modal .chart-info {
        gap: 1rem;
        flex-direction: column;
        align-items: center;
    }
}

/* =================================================================================
   --- ECONOMIC INDICATORS STYLES
   ================================================================================= */

/* Widget Structure */
.widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--widget-border);
}

.widget-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 1.25rem;
    margin-right: 1rem;
}

.widget-title h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.widget-title p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0.25rem 0 0 0;
}

.widget-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.history-btn,
.refresh-btn {
    background: var(--widget-bg);
    border: 1px solid var(--widget-border);
    border-radius: 8px;
    padding: 0.5rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.history-btn:hover {
    background: var(--secondary-color);
    color: white;
    transform: scale(1.05);
}

.refresh-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

/* Widget States */
.widget-loading,
.widget-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.widget-loading i,
.widget-error i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.widget-error i {
    color: #ef4444;
}

.widget-content {
    padding: 1rem 0;
}

/* Indicator Values */
.indicator-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-align: center;
}

.indicator-label {
    font-size: 1rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 0.5rem;
}

.indicator-change {
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.5rem;
}

.indicator-change.positive {
    color: #10b981;
}

.indicator-change.negative {
    color: #ef4444;
}

.indicator-date {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-align: center;
}

.indicator-level {
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.5rem;
}

.indicator-range {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 0.5rem;
}

.indicator-banks,
.indicator-funds {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-align: center;
}

/* Risk Levels */
.risk-low {
    color: #10b981;
}

.risk-medium {
    color: #f59e0b;
}

.risk-high {
    color: #ef4444;
}

.risk-very-high {
    color: #dc2626;
}

/* Indicator Cards */
.indicator-card {
    background: var(--widget-bg);
    border: 1px solid var(--widget-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: var(--widget-shadow);
}

.indicator-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.indicator-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.indicator-header i {
    font-size: 1.25rem;
    width: 1.5rem;
    text-align: center;
}

.indicator-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.indicator-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.indicator-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.indicator-subtitle {
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

/* Rate Items (for Fixed Term) */
.rate-item {
    background: var(--widget-bg);
    border: 1px solid var(--widget-border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.rate-item:hover {
    transform: translateX(4px);
    border-color: var(--primary-color);
}

.rate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.rate-bank {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.rate-value {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.125rem;
}

.rate-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.rate-period {
    font-weight: 500;
}

.rate-date {
    opacity: 0.8;
}

/* FCI Categories */
.fci-category {
    margin-bottom: 1.5rem;
}

.fci-category-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--widget-border);
    padding-bottom: 0.5rem;
}

.fci-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--widget-border);
    transition: all 0.3s ease;
}

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

.fci-item:hover {
    background: rgba(14, 165, 233, 0.05);
    border-radius: 6px;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    margin-left: -0.75rem;
    margin-right: -0.75rem;
}

.fci-name {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
    flex: 1;
}

.fci-return {
    font-weight: 700;
    font-size: 0.875rem;
}

/* Holiday Items */
.holiday-item {
    background: var(--widget-bg);
    border: 1px solid var(--widget-border);
    border-radius: 8px;
    padding: 0.875rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.holiday-item:last-child {
    margin-bottom: 0;
}

.holiday-item:hover {
    transform: translateX(4px);
    border-color: var(--primary-color);
}

.holiday-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.holiday-date i {
    color: var(--primary-color);
    font-size: 0.875rem;
}

.holiday-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.3;
}

/* Holiday widget content spacing */
#holidays-data {
    padding: 0 0.5rem;
}

.holidays-summary {
    margin-bottom: 1rem;
    text-align: center;
}

.holidays-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Error Messages */
.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.error-message i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Loading States */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    color: var(--text-secondary);
}

.loading-spinner i {
    font-size: 2rem;
    color: var(--primary-color);
}

/* Responsive Design for Economic Indicators */
@media (max-width: 768px) {
    .indicator-card {
        padding: 1rem;
    }
    
    .indicator-value {
        font-size: 1.5rem;
    }
    
    .rate-item,
    .holiday-item {
        padding: 0.75rem;
    }
    
    .fci-item {
        padding: 0.5rem 0;
    }
    
    .fci-item:hover {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
}

@media (max-width: 480px) {
    .indicator-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .rate-header,
    .rate-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .fci-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .fci-return {
        align-self: flex-end;
    }
}

/* =================================================================================
   --- FIXED TERM AND FCI MODAL STYLES
   ================================================================================= */

/* Fixed Term Modal Styles */
.fixed-term-content {
    padding: 0;
}

.banks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    max-height: 500px;
    overflow-y: auto;
}

.bank-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
}

.bank-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.bank-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.bank-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
    background: white;
    padding: 4px;
}

.bank-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

.bank-rate {
    text-align: center;
    margin-bottom: 12px;
}

.bank-rate .rate-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.bank-rate .rate-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bank-link {
    display: block;
    text-align: center;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.bank-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* FCI Modal Styles */
.fci-content {
    padding: 0;
}

.fci-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    max-height: 500px;
    overflow-y: auto;
}

.fci-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
}

.fci-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--secondary-color);
}

.fci-header {
    margin-bottom: 12px;
}

.fci-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

.fci-data {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fci-rate {
    text-align: center;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.fci-rate .rate-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 4px;
}

.fci-rate .rate-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fci-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-item {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
}

.detail-item:first-child {
    font-weight: 500;
    color: var(--text-primary);
}

/* Responsive adjustments for Fixed Term and FCI modals */
@media (max-width: 768px) {
    .banks-grid,
    .fci-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .bank-card,
    .fci-card {
        padding: 12px;
    }
    
    .bank-name,
    .fci-name {
        font-size: 13px;
    }
    
    .bank-rate .rate-value,
    .fci-rate .rate-value {
        font-size: 20px;
    }
}

/* =================================================================================
   --- HOLIDAY MODAL STYLES
   ================================================================================= */

.holidays-modal-content {
    max-height: 70vh;
    overflow-y: auto;
    padding: 0;
}

/* Holiday status styling - works in both light and dark modes */
.holiday-past {
    opacity: 0.65;
    background: var(--widget-bg);
    border-left: 3px solid var(--text-tertiary);
}

.holiday-upcoming {
    background: var(--widget-bg);
    border-left: 3px solid var(--primary-color);
}

.holiday-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--widget-border);
}

.holiday-icon {
    font-size: 1rem;
    line-height: 1;
}

.holiday-status-text {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

/* Theme-specific enhancements */
html.dark .holiday-past {
    background: rgba(31, 41, 55, 0.3);
    border-left-color: rgba(156, 163, 175, 0.5);
}

html.dark .holiday-upcoming {
    background: rgba(31, 41, 55, 0.5);
    border-left-color: #3b82f6;
}

html.light .holiday-past {
    background: rgba(243, 244, 246, 0.5);
    border-left-color: rgba(107, 114, 128, 0.5);
}

html.light .holiday-upcoming {
    background: rgba(239, 246, 255, 0.8);
    border-left-color: #3b82f6;
}

/* Tax Calculator Enhanced Styles */
.input-section {
    margin-bottom: 2rem;
    padding: 1.5rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #374151;
    border-radius: 0.375rem;
    background: #1f2937;
    color: #f3f4f6;
    font-size: 0.875rem;
}

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

.form-checkbox {
    width: 1.1rem;
    height: 1.1rem;
    border: 1px solid #374151;
    border-radius: 0.25rem;
    background: #1f2937;
    accent-color: #3b82f6;
    margin: 0 0.5rem 0 0;
    vertical-align: middle;
}

.input-group.flex.items-center label {
    margin-bottom: 0;
    display: inline-block;
    vertical-align: middle;
    min-width: unset;
    flex: unset;
}

.input-group.flex.items-center {
    gap: 0.5rem;
}

.result-card {
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid;
    text-align: center;
}

.result-card.primary {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.result-card.success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
}

.result-card.secondary {
    background: rgba(107, 114, 128, 0.1);
    border-color: rgba(107, 114, 128, 0.3);
}

.result-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: #9ca3af;
    margin-bottom: 0.25rem;
}

.result-value {
    display: block;
    font-size: 1.25rem;
    font-weight: bold;
    color: #f3f4f6;
}

.result-card.primary .result-value {
    color: #60a5fa;
}

.result-card.success .result-value {
    color: #4ade80;
}

/* Light mode overrides */
.light .input-section {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.1);
}

.light .form-input {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #111827;
}

.light .form-input:focus {
    border-color: #3b82f6;
}

.light .form-checkbox {
    background: #f9fafb;
    border-color: #d1d5db;
}

.light .result-value {
    color: #111827;
}

.light .result-card.primary .result-value {
    color: #2563eb;
}

.light .result-card.success .result-value {
    color: #16a34a;
}

/* === FIX: Eliminar borde y fondo gris de labels y descripciones en el form de Ganancias (modo claro) === */
html.light .input-group label,
html.light .input-group,
html.light .input-section label,
html.light .input-section legend,
html.light .input-section small {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: #1f2937 !important;
} 