/* Variables de Diseño (Colores Corporativos) */
:root {
    --color-navy: #0F172A; /* Azul marino profundo */
    --color-slate-dark: #334155; /* Gris pizarra oscuro */
    --color-slate-light: #F8FAFC; /* Gris fondo */
    --color-green: #10B981; /* Verde éxito */
    --color-green-hover: #059669; 
    --color-border: #E2E8F0;
    --color-white: #FFFFFF;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
}

/* Reset y Bases */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--color-slate-light);
    color: var(--color-slate-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }

/* Tipografía */
h1, h2, h3, h4 {
    color: var(--color-navy);
    font-weight: 700;
    line-height: 1.2;
}

/* Header */
.main-header {
    background-color: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-navy);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--color-green);
}

.main-nav ul {
    display: flex;
    gap: 24px;
    list-style: none;
}

.main-nav a {
    color: var(--color-slate-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--color-green);
}

/* AdSense Slots */
.adsense-slot {
    background-color: #E2E8F0;
    border: 2px dashed #CBD5E1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748B;
    font-size: 0.875rem;
    font-weight: 500;
    margin: 24px 0;
    border-radius: var(--radius);
}

.ad-hero {
    width: 100%;
    height: 90px; /* Leaderboard size */
}

.ad-tool {
    width: 100%;
    height: 250px; /* Square/Rectangle size */
}

/* Main Content */
.main-content {
    padding-top: 32px;
    padding-bottom: 64px;
}

.page-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 8px;
}

.page-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: #64748B;
    margin-bottom: 40px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 32px;
    align-items: start;
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Cards */
.card {
    background: var(--color-white);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}

/* Formulario */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-navy);
}

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

.currency-symbol, .percent-symbol {
    position: absolute;
    color: #94A3B8;
    font-weight: 500;
}

.currency-symbol { left: 16px; }
.percent-symbol { right: 16px; }

input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
}

.input-wrapper:has(.currency-symbol) input { padding-left: 36px; }
.input-wrapper:has(.percent-symbol) input { padding-right: 36px; }

input[type="number"]:focus {
    border-color: var(--color-green);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.btn-primary, .btn-success {
    display: inline-block;
    width: 100%;
    padding: 14px 24px;
    background-color: var(--color-green);
    color: var(--color-white);
    border: none;
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    text-align: center;
}

.btn-primary:hover, .btn-success:hover {
    background-color: var(--color-green-hover);
}
.btn-primary:active {
    transform: translateY(1px);
}

/* Resultados */
.results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.result-box {
    background-color: var(--color-slate-light);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s;
}

.result-box:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.primary-result {
    background-color: var(--color-navy);
    color: var(--color-white);
    border-color: var(--color-navy);
}

.primary-result h3 { color: #CBD5E1; }
.primary-result .result-value { color: var(--color-green); }

.result-box h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748B;
    margin-bottom: 8px;
}

.result-value {
    font-size: 2rem;
    font-weight: 800;
}

.unit-text {
    font-size: 1rem;
    font-weight: 500;
    color: #94A3B8;
    margin-left: 4px;
}

/* Visual Placeholder */
.chart-placeholder {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--color-border);
}

.chart-visual {
    height: 24px;
    background: #E2E8F0;
    border-radius: 12px;
    display: flex;
    overflow: hidden;
    margin-bottom: 8px;
}

.chart-bar { height: 100%; transition: width 0.5s ease-in-out; }
.cost-bar { background-color: var(--color-slate-dark); width: 60%; }
.profit-bar { background-color: var(--color-green); width: 40%; }
.chart-caption { text-align: center; font-size: 0.875rem; color: #64748B; }

/* SEO Content */
.seo-content h2 { font-size: 1.75rem; margin-bottom: 16px; }
.seo-content h3 { font-size: 1.25rem; margin-top: 24px; margin-bottom: 12px; }
.seo-content p { margin-bottom: 16px; }

.formula-box {
    background-color: #F1F5F9;
    padding: 16px;
    border-left: 4px solid var(--color-navy);
    border-radius: 0 8px 8px 0;
    margin-bottom: 16px;
}
.formula-box code { font-family: monospace; font-size: 1rem; color: var(--color-navy); font-weight: 600; }

/* Footer */
.main-footer {
    background-color: var(--color-navy);
    color: #94A3B8;
    padding: 64px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand a {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-white);
    text-decoration: none;
}
.footer-brand span { color: var(--color-green); }
.footer-brand p { margin-top: 12px; max-width: 300px; }

.footer-links h4 { color: var(--color-white); margin-bottom: 16px; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #94A3B8; text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--color-green); }

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #1E293B;
    font-size: 0.875rem;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 24px;
    right: 24px;
    max-width: 600px;
    background-color: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    padding: 24px;
    z-index: 9999;
    transform: translateY(0);
    transition: transform 0.3s ease-in-out, opacity 0.3s;
}

.cookie-banner.hidden {
    transform: translateY(150%);
    opacity: 0;
    pointer-events: none;
}

.cookie-content { display: flex; flex-direction: column; gap: 16px; }
.cookie-content p { font-size: 0.875rem; margin: 0; }
.cookie-content a { color: var(--color-green); text-decoration: underline; }

@media (min-width: 640px) {
    .cookie-content { flex-direction: row; align-items: center; justify-content: space-between; }
    .cookie-content .btn-success { width: auto; white-space: nowrap; }
}


/* Dropdown Header */
.dropdown {
    position: relative;
    display: flex;
    align-items: center;
}
.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--color-white);
    min-width: 260px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    z-index: 101;
    padding: 8px 0;
    top: 100%;
    left: 0;
}
.dropdown-content a {
    color: var(--color-slate-dark) !important;
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
}
.dropdown-content a:hover {
    background-color: var(--color-slate-light);
    color: var(--color-green) !important;
}
.dropdown:hover .dropdown-content {
    display: block;
}

/* Hover effect para enlaces de artículos en silos */
.silo-column ul li a,
.related-posts ul li a {
    color: var(--color-slate-dark) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: all 0.2s ease;
    display: inline-block;
}
.silo-column ul li a:hover,
.related-posts ul li a:hover {
    color: var(--color-green) !important;
    transform: translateX(5px);
}
