/* --- 1. VARIABLES Y CONFIGURACIÓN --- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #007953;
    --primary-light: #00a370;
    --primary-dark: #005238;
    --accent: #FFC107;
    
    /* Modo Claro: Legibilidad Máxima */
    --bg-body: #F8FAFC;
    --bg-card: #ffffff;
    --text-main: #111827;
    --text-sec: #374151;
    --border: #E5E7EB;
    --shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.dark-theme {
    /* Modo Oscuro: Contraste Suave */
    --bg-body: #0F172A;
    --bg-card: #1E293B;
    --text-main: #F8FAFC;
    --text-sec: #94A3B8;
    --border: #334155;
    --shadow: 0 20px 25px -5px rgba(0,0,0,0.3);
}

/* --- 2. RESET TOTAL (Sin subrayados) --- */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Plus Jakarta Sans', sans-serif;
    text-decoration: none !important; /* ELIMINA TODOS LOS SUBRAYADOS */
}

body { 
    background-color: var(--bg-body); 
    color: var(--text-main); 
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
}

/* Bloqueo de cambio de color en hover del navegador */
h1, h2, h3, h4, p, span, a {
    transition: color 0.2s ease-in-out;
}
.feature-card:hover h3, .feature-card:hover p,
.faq-question:hover, .faq-answer p, .sidebar-links a {
    color: inherit !important;
}

/* --- 3. HEADER Y NAVEGACIÓN --- */
header { 
    background: var(--bg-card); 
    border-bottom: 1px solid var(--border);
    position: sticky; 
    top: 0; 
    z-index: 1000; 
}

.nav-container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 1rem 1.5rem; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.logo { 
    font-weight: 800; 
    font-size: 1.5rem; 
    color: var(--primary); 
    display: flex; 
    align-items: center; 
    gap: 8px;
}

.logo span { color: var(--text-main); }
.logo i { background: var(--accent); width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--primary-dark); font-style: normal; }

.header-actions { display: flex; align-items: center; gap: 15px; }

.theme-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
}

.menu-toggle { display: none; font-size: 1.8rem; cursor: pointer; color: var(--text-main); }

.nav-links { display: flex; gap: 25px; align-items: center; }

.nav-links a { 
    font-weight: 600; 
    color: var(--text-sec); 
    font-size: 0.95rem;
    position: relative;
    padding-bottom: 5px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    bottom: 0;
    left: 0;
    transition: width 0.3s ease-out;
}

.nav-links a:hover::after { width: 100%; }
.nav-links a:hover { color: var(--primary); }

.btn-cta { 
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); 
    color: white !important; 
    padding: 0.7rem 1.5rem; 
    border-radius: 50px; 
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0, 121, 83, 0.2);
    transition: transform 0.3s ease;
}

/* --- 4. HERO SECTION --- */
.hero { 
    background: radial-gradient(circle at top left, var(--primary-light), var(--primary-dark));
    color: white; 
    padding: 6rem 1.5rem 8rem; 
    text-align: center;
    clip-path: ellipse(150% 100% at 50% 0%);
}

.hero h1 { font-size: 3rem; font-weight: 800; margin-bottom: 1rem; color: white !important; }
.hero p { font-size: 1.2rem; opacity: 0.9; color: white !important; }

.hero-search { 
    background: white; max-width: 550px; margin: 2.5rem auto 0; 
    display: flex; padding: 6px; border-radius: 60px; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.hero-search input { 
    flex: 1; border: none; padding: 0 20px; outline: none; 
    border-radius: 50px; font-size: 1rem; color: #333; 
}

.hero-search button { 
    background: var(--accent); color: var(--primary-dark); 
    border: none; padding: 12px 30px; border-radius: 50px; 
    font-weight: bold; cursor: pointer; 
}

/* --- 5. TARJETAS Y CONTENIDO --- */
.container { 
    max-width: 1200px; 
    margin: -4rem auto 4rem; 
    padding: 0 1.5rem; 
    display: grid; 
    grid-template-columns: 2.5fr 1fr; 
    gap: 3rem; 
}

.features-grid { 
    grid-column: 1 / -1; 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 2rem; 
}

.feature-card { 
    background: var(--bg-card); 
    padding: 2.5rem; 
    border-radius: 20px; 
    box-shadow: var(--shadow); 
    border: 1px solid var(--border); 
    text-align: center; 
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.feature-card:hover { transform: translateY(-10px); border-color: var(--primary-light); }
.feature-card:hover::before { transform: scaleX(1); }

.feature-icon { 
    font-size: 3rem; 
    margin-bottom: 1rem; 
    display: block; 
    color: var(--primary-light);
    background: rgba(0, 121, 83, 0.05);
    width: 80px; height: 80px; line-height: 80px;
    border-radius: 50%; margin: 0 auto 1.5rem;
}

/* --- Artículos --- */
.article-card { 
    background: var(--bg-card); padding: 2.5rem; border-radius: 20px; 
    box-shadow: var(--shadow); border: 1px solid var(--border); 
}
h2 { font-size: 2rem; font-weight: 800; margin-bottom: 1.5rem; position: relative; padding-bottom: 10px; color: var(--text-main); }
h2::after { content: ''; position: absolute; bottom: 0; left: 0; width: 60px; height: 4px; background: var(--accent); border-radius: 2px; }

.step { display: flex; gap: 15px; margin-bottom: 1.5rem; align-items: flex-start; }
.step-number { min-width: 35px; height: 35px; background: var(--primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; }

/* --- Calculadora Premium --- */
.calculator-box { 
    background: var(--bg-card); 
    border: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05), var(--shadow);
    padding: 2.5rem; 
    border-radius: 20px; 
    margin: 3rem 0; 
}

.calc-input-group input { 
    flex: 1; padding: 15px; border: 2px solid var(--border); border-radius: 12px; 
    background-color: var(--bg-body); color: var(--text-main); font-size: 1.1rem;
}

.calc-btn { background: var(--primary); color: white; padding: 12px 25px; border-radius: 12px; cursor: pointer; font-weight: bold; }

.calc-result { 
    padding: 15px; background: rgba(255, 193, 7, 0.1); 
    border-radius: 10px; border-left: 5px solid var(--accent); margin-top: 15px;
}

/* --- FAQ --- */
.faq-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 1rem; overflow: hidden; }
.faq-question { padding: 1.2rem; font-weight: 700; color: var(--text-main) !important; width: 100%; display: flex; justify-content: space-between; cursor: pointer; background: none; border: none;}

/* --- Sidebar Mejorada --- */
aside { grid-area: 1 / 2 / auto / 3; }
.sidebar-card { background: var(--bg-card); padding: 1.8rem; border-radius: 20px; box-shadow: var(--shadow); border: 1px solid var(--border); margin-bottom: 2rem; }
.widget-header { font-weight: 800; font-size: 1.1rem; color: var(--text-main); margin-bottom: 1.5rem; display: flex; align-items: center; gap: 8px; }
.widget-header::before { content: ''; width: 4px; height: 18px; background: var(--accent); border-radius: 10px; }

.sidebar-links a { 
    color: var(--text-sec); display: flex; flex-direction: column; 
    font-size: 0.95rem; font-weight: 600; transition: all 0.3s ease; 
    border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 10px;
}
.sidebar-links a span { color: var(--primary); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; margin-top: 5px; }
.sidebar-links a:hover { transform: translateX(5px); color: var(--primary); }

.ad-sidebar { 
    height: 350px; width: 100%; background: linear-gradient(145deg, var(--border), var(--bg-body));
    border: 1.5px dashed var(--text-sec); border-radius: 15px; display: flex; align-items: center; justify-content: center;
}

/* --- 7. FOOTER PROFUNDO --- */
footer { background: #0a0e17; color: #94A3B8; padding: 4rem 1.5rem 2rem; text-align: center; margin-top: 5rem; border-top: 4px solid var(--primary); }
.footer-grid { max-width: 1200px; margin: 0 auto 3rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2rem; text-align: left; }
.footer-col h4 { color: var(--accent); margin-bottom: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-size: 0.8rem; }
.footer-col a { display: block; color: #94A3B8; margin-bottom: 0.5rem; font-size: 0.9rem; }
.footer-col a:hover { color: white; }

/* --- 8. BOTÓN VOLVER ARRIBA --- */
#backToTop { position: fixed; bottom: 30px; right: 30px; display: none; background: var(--primary); color: white; border-radius: 50%; width: 50px; height: 50px; cursor: pointer; border: none; box-shadow: 0 4px 10px rgba(0, 121, 83, 0.3); z-index: 999; }

/* --- 9. RESPONSIVE --- */
@media (max-width: 992px) {
    .nav-links { display: none; }
    .menu-toggle { display: block; }
    .nav-links.active { display: flex; flex-direction: column; position: absolute; top: 70px; left: 0; width: 100%; background: var(--bg-card); padding: 1rem 0; box-shadow: var(--shadow); }
    .container { grid-template-columns: 1fr; margin-top: -2rem; }
    aside { order: 1; }
    main { order: 2; }
}