/* ===================================
   RESET Y VARIABLES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --text: #1f2937;
    --text-light: #6b7280;
    --text-lighter: #9ca3af;
    --border: #e5e7eb;
    --bg: #ffffff;
    --bg-light: #f9fafb;
    --bg-lighter: #f3f4f6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ===================================
   HEADER
   =================================== */
.header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 1.25rem;
    transition: var(--transition);
}

.logo:hover {
    color: var(--primary);
    transform: translateY(-1px);
}

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

.logo-text {
    font-size: 1.25rem;
}

/* ===================================
   MAIN CONTENT
   =================================== */
.main {
    flex: 1;
    padding: 40px 0;
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
    text-align: center;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 16px;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.hero-badges {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

/* ===================================
   TASA ACTUAL CARD
   =================================== */
.tasa-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    margin-bottom: 32px;
    box-shadow: var(--shadow-lg);
    color: white;
}

.tasa-label {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 16px;
    font-weight: 500;
}

.tasa-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.tasa-left,
.tasa-right {
    font-size: 1.25rem;
    font-weight: 600;
    opacity: 0.95;
}

.tasa-numero {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.tasa-fuente {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* ===================================
   CONVERSOR CARD
   =================================== */
.conversor-card {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.conversor-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: end;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-light);
}

.input-box {
    position: relative;
    display: flex;
    align-items: center;
}

.currency {
    position: absolute;
    left: 16px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-light);
    pointer-events: none;
}

.input-box input {
    width: 100%;
    padding: 16px 16px 16px 60px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    transition: var(--transition);
    background: var(--bg-lighter);
}

.input-box input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-box input::placeholder {
    color: var(--text-lighter);
    font-weight: 400;
}

.btn-swap {
    background: var(--primary);
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-swap:hover {
    background: var(--primary-dark);
    transform: rotate(180deg) scale(1.1);
}

.btn-swap:active {
    transform: rotate(180deg) scale(0.95);
}

/* ===================================
   TABLA CARD
   =================================== */
.tabla-card {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.tabla-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text);
}

.tabla-grid {
    display: grid;
    gap: 1px;
    background: var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.tabla-header,
.tabla-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--bg);
}

.tabla-header {
    background: var(--bg-lighter);
    font-weight: 700;
    color: var(--text);
}

.tabla-header > div,
.tabla-row > div {
    padding: 12px 16px;
    text-align: center;
}

.tabla-body {
    display: grid;
    gap: 1px;
}

.tabla-row {
    transition: var(--transition);
}

.tabla-row:hover {
    background: var(--bg-lighter);
}

/* ===================================
   INFO SECTION
   =================================== */
.info-section {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.info-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
}

.info-section h3 {
    font-size: 1.375rem;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 12px;
    color: var(--text);
}

.info-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 8px;
    color: var(--text);
}

.info-section p {
    margin-bottom: 16px;
    color: var(--text-light);
    line-height: 1.7;
}

.info-section ul,
.info-section ol {
    margin-left: 24px;
    margin-bottom: 16px;
    color: var(--text-light);
}

.info-section li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.info-section strong {
    color: var(--text);
    font-weight: 600;
}

/* ===================================
   FOOTER
   =================================== */
.footer {
    background: var(--text);
    color: white;
    padding: 48px 0 24px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: white;
}

.footer-col p {
    font-size: 0.875rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 8px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-col a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-col a:hover {
    color: white;
}

.footer-keywords {
    font-size: 0.75rem;
    line-height: 1.6;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.footer-disclaimer {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    max-width: 800px;
    margin: 0 auto;
}

/* ===================================
   RESPONSIVE - TABLET
   =================================== */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .container {
        padding: 0 16px;
    }

    .main {
        padding: 24px 0;
    }

    /* Hero */
    .hero h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .hero-badges {
        gap: 8px;
    }

    .badge {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    /* Tasa Card */
    .tasa-card {
        padding: 24px;
    }

    .tasa-numero {
        font-size: 2.5rem;
    }

    .tasa-left,
    .tasa-right {
        font-size: 1rem;
    }

    /* Conversor */
    .conversor-card {
        padding: 24px;
    }

    .conversor-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .btn-swap {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
        margin: 0 auto;
    }

    .input-box input {
        font-size: 1.125rem;
        padding: 14px 14px 14px 56px;
    }

    /* Tabla */
    .tabla-card {
        padding: 24px;
    }

    .tabla-card h2 {
        font-size: 1.25rem;
    }

    .tabla-header > div,
    .tabla-row > div {
        padding: 10px 12px;
        font-size: 0.875rem;
    }

    /* Info Section */
    .info-section {
        padding: 24px;
    }

    .info-section h2 {
        font-size: 1.375rem;
    }

    .info-section h3 {
        font-size: 1.125rem;
        margin-top: 24px;
    }

    .info-section h4 {
        font-size: 1rem;
        margin-top: 20px;
    }

    /* Footer */
    .footer {
        padding: 32px 0 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* ===================================
   RESPONSIVE - MOBILE
   =================================== */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 12px;
    }

    .main {
        padding: 20px 0;
    }

    /* Header */
    .header {
        padding: 12px 0;
    }

    .logo {
        font-size: 1.125rem;
        gap: 8px;
    }

    .logo-icon {
        font-size: 1.5rem;
    }

    .logo-text {
        font-size: 1.125rem;
    }

    /* Hero */
    .hero {
        margin-bottom: 24px;
    }

    .hero h1 {
        font-size: 1.375rem;
        margin-bottom: 12px;
    }

    .subtitle {
        font-size: 0.9375rem;
    }

    .hero-badges {
        gap: 6px;
    }

    .badge {
        font-size: 0.6875rem;
        padding: 5px 10px;
    }

    /* Tasa Card */
    .tasa-card {
        padding: 20px;
        margin-bottom: 24px;
    }

    .tasa-label {
        font-size: 0.8125rem;
        margin-bottom: 12px;
    }

    .tasa-display {
        gap: 8px;
    }

    .tasa-numero {
        font-size: 2rem;
    }

    .tasa-left,
    .tasa-right {
        font-size: 0.9375rem;
    }

    .tasa-fuente {
        font-size: 0.8125rem;
    }

    /* Conversor */
    .conversor-card {
        padding: 20px;
        margin-bottom: 24px;
    }

    .conversor-row {
        gap: 12px;
    }

    .input-group label {
        font-size: 0.8125rem;
    }

    .input-box input {
        font-size: 1rem;
        padding: 12px 12px 12px 52px;
    }

    .currency {
        left: 12px;
        font-size: 0.8125rem;
    }

    .btn-swap {
        width: 36px;
        height: 36px;
        font-size: 1.125rem;
    }

    /* Tabla */
    .tabla-card {
        padding: 20px;
        margin-bottom: 24px;
    }

    .tabla-card h2 {
        font-size: 1.125rem;
        margin-bottom: 16px;
    }

    .tabla-header > div,
    .tabla-row > div {
        padding: 8px 10px;
        font-size: 0.8125rem;
    }

    /* Info Section */
    .info-section {
        padding: 20px;
        margin-bottom: 24px;
    }

    .info-section h2 {
        font-size: 1.25rem;
        margin-bottom: 12px;
    }

    .info-section h3 {
        font-size: 1.0625rem;
        margin-top: 20px;
        margin-bottom: 10px;
    }

    .info-section h4 {
        font-size: 0.9375rem;
        margin-top: 16px;
        margin-bottom: 6px;
    }

    .info-section p,
    .info-section li {
        font-size: 0.9375rem;
        margin-bottom: 12px;
    }

    .info-section ul,
    .info-section ol {
        margin-left: 20px;
        margin-bottom: 12px;
    }

    /* Footer */
    .footer {
        padding: 24px 0 16px;
    }

    .footer-grid {
        gap: 20px;
        margin-bottom: 24px;
    }

    .footer-col h4 {
        font-size: 0.9375rem;
        margin-bottom: 12px;
    }

    .footer-col p,
    .footer-col li {
        font-size: 0.8125rem;
    }

    .footer-bottom {
        padding-top: 16px;
    }

    .footer-bottom p {
        font-size: 0.8125rem;
    }

    .footer-disclaimer {
        font-size: 0.6875rem;
    }
}

/* ===================================
   UTILIDADES
   =================================== */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

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

.tasa-card,
.conversor-card,
.tabla-card,
.info-section {
    animation: fadeIn 0.5s ease-out;
}

/* ===================================
   PRINT STYLES
   =================================== */
@media print {
    .header,
    .footer,
    .btn-swap {
        display: none;
    }

    body {
        background: white;
    }

    .tasa-card,
    .conversor-card,
    .tabla-card,
    .info-section {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
}