/* --- VARIABLES GLOBALES & PALETA GREENPEACE --- */
:root {
    --verde-principal: #4cae4f; /* Verde brillante de acción */
    --verde-oscuro: #103939;    /* Verde pino institucional */
    --fondo-sitio: #f4f7f6;     /* Gris claro verdoso para lectura descanso */
    --texto-principal: #333333; /* Gris oscuro para evitar fatiga */
    --blanco: #ffffff;
    --amarillo-meli: #fff159;   /* Amarillo estratégico Mercado Libre */

    /* Colores del ticker superior */
    --ticker-bg: #1b4332;       
    --ticker-text: #ffffff;     
    --ticker-accent: #2d6a4f;   
    --gold-color: #ffdd00;      
}

/* --- RESETEO BÁSICO --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: var(--fondo-sitio);
    color: var(--texto-principal);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- BARRA DE NOVEDADES SUPERIOR (TICKER) --- */
.ticker-wrapper {
    display: flex;
    align-items: center;
    background-color: var(--ticker-bg);
    color: var(--ticker-text);
    font-size: 14px;
    height: 40px;
    overflow: hidden;
    position: relative;
    width: 100%;
    z-index: 9999;
}

.ticker-title {
    background-color: var(--ticker-accent);
    color: var(--gold-color);
    font-weight: bold;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.2);
}

.ticker-content {
    overflow: hidden;
    width: 100%;
    display: flex;
    align-items: center;
}

.ticker-track {
    display: flex;
    width: max-content;
    animation: rotarNovedades 35s linear infinite;
}

.ticker-mover {
    display: flex;
    flex-shrink: 0;
    padding-left: 20px;
}

.ticker-item {
    padding-right: 60px;
    white-space: nowrap;
    display: inline-block;
}

.ticker-track:hover {
    animation-play-state: paused;
    cursor: pointer;
}

@keyframes rotarNovedades {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

/* --- ENCABEZADO / MENÚ STICKY --- */
header {
    background-color: var(--verde-oscuro);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    color: var(--blanco);
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 1px;
}

.logo span {
    color: var(--verde-principal);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-menu a {
    color: var(--blanco);
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--amarillo-meli);
}

/* --- SECCIÓN HERO --- */
.hero {
    background: linear-gradient(rgba(16, 57, 57, 0.85), rgba(16, 57, 57, 0.95));
    background-color: var(--verde-oscuro);
    color: var(--blanco);
    padding: 80px 20px;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.btn-campania {
    background-color: var(--verde-principal);
    display: inline-block;
    margin-bottom: 20px;
    font-weight: bold;
}

.hero h1 {
    font-size: 38px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.btn-actua {
    background-color: var(--amarillo-meli);
    color: #333;
    padding: 12px 30px;
    font-weight: bold;
    border-radius: 4px;
    font-size: 16px;
    transition: background 0.3s ease;
    display: inline-block;
}

.btn-actua:hover {
    background-color: #ffe500;
}

/* --- NUEVA: ESTILOS ¿CÓMO FUNCIONA? (3 COLUMNAS) --- */
.how-it-works {
    background-color: var(--blanco);
    padding: 50px 20px;
    border-bottom: 1px solid #eef2f1;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title-center {
    font-size: 26px;
    color: var(--verde-oscuro);
    text-align: center;
    margin-bottom: 35px;
    font-weight: bold;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.step-card {
    text-align: center;
    padding: 20px;
    background-color: var(--fondo-sitio);
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.step-card:hover {
    transform: translateY(-3px);
}

.step-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.step-card h3 {
    font-size: 18px;
    color: var(--verde-oscuro);
    margin-bottom: 10px;
}

.step-card p {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

/* --- ESTRUCTURA PRINCIPAL --- */
.main-layout {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.section-title {
    font-size: 24px;
    color: var(--verde-oscuro);
    margin-bottom: 20px;
    border-left: 5px solid var(--verde-principal);
    padding-left: 15px;
}

/* Contenedor de lista de publicaciones */
.reports-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 30px;
}

/* Tarjeta en fila horizontal (Imagen izquierda, texto derecha) */
.report-card {
    background-color: var(--blanco);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: row;
    transition: transform 0.3s ease;
    width: 100%;
}

.report-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.report-img {
    width: 240px;
    min-width: 240px;
    height: auto;
    min-height: 180px;
    background-color: #ddd;
    background-size: cover;
    background-position: center;
}

/* Colores de las imágenes */
.img-kit-solar { background-image: linear-gradient(135deg, #bbb, #999); }
.img-ley-energia { background-image: linear-gradient(135deg, #a7c957, #6a994e); }
.img-mitos-solares { background-image: linear-gradient(135deg, #f4a261, #e76f51); }
.img-baterias { background-image: linear-gradient(135deg, #edae49, #d1495b); }
.img-corrientes { background-image: linear-gradient(135deg, #0077b6, #0096c7); }

.report-info {
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
}

.report-badge {
    background-color: #e8f5e9;
    color: var(--verde-principal);
    font-size: 11px;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 4px;
    align-self: flex-start;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.report-info h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--verde-oscuro);
    line-height: 1.3;
}

.report-info h3 a:hover {
    color: var(--verde-principal);
}

.report-info p {
    font-size: 14px;
    color: #666;
}

/* --- ESPACIOS DE GOOGLE ADSENSE --- */
.adsense-block {
    background-color: #eaeaea;
    border: 2px dashed #bbb;
    padding: 15px;
    text-align: center;
    color: #777;
    font-size: 12px;
    font-weight: bold;
    border-radius: 6px;
    margin: 20px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- ASIDE & WIDGETS --- */
aside {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background-color: var(--blanco);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.sidebar-widget h3 {
    font-size: 18px;
    color: var(--verde-oscuro);
    margin-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

/* Tarjetas de Mercado Libre */
.product-card {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.product-card:last-child {
    margin-bottom: 0;
}

.product-card:hover {
    border-color: var(--verde-principal);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.product-thumb {
    height: 120px;
    background-color: #f9f9f9;
    margin-bottom: 10px;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
}

.product-thumb-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    margin-bottom: 10px;
    border-radius: 4px;
}

.product-desc {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.4;
}

.img-prod-eco { background-image: linear-gradient(135deg, #ffe500, #ffb703); }
.img-prod-medio { background-image: linear-gradient(135deg, #2196f3, #0288d1); }
.img-prod-premium { background-image: linear-gradient(135deg, #4caf50, #1b5e20); }

.product-card h4 {
    font-size: 14px;
    margin-bottom: 8px;
    color: #333;
    line-height: 1.4;
}

.price {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 12px;
}

.btn-meli {
    display: block;
    background-color: var(--amarillo-meli);
    color: #333;
    padding: 8px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.btn-meli:hover {
    background-color: #ffe500;
}

/* Contador de Visitas */
.counter-text {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.counter-box {
    background-color: #222;
    color: #00ff00;
    font-family: 'Courier New', Courier, monospace;
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    border-radius: 4px;
    letter-spacing: 4px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}

/* Paginación */
.pagination-container {
    text-align: center;
    margin-top: 20px;
}

.btn-page {
    background-color: var(--verde-oscuro);
    color: var(--blanco);
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
}

.btn-page:hover {
    background-color: var(--verde-principal);
}

#page-info {
    margin: 0 15px;
    font-size: 14px;
}

/* --- FOOTER --- */
footer {
    background-color: var(--verde-oscuro);
    color: var(--blanco);
    margin-top: 60px;
    padding-top: 40px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    padding-bottom: 40px;
    text-align: center;
    justify-items: center;
}

.footer-brand p {
    font-size: 14px;
    opacity: 0.8;
    margin-top: 15px;
    max-width: 400px;
}

.footer-links h4 {
    font-size: 16px;
    color: var(--verde-principal);
    margin-bottom: 15px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    font-size: 14px;
    opacity: 0.8;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--amarillo-meli);
}

.footer-bottom {
    background-color: #0b2525;
    text-align: center;
    padding: 20px;
    font-size: 13px;
    opacity: 0.7;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* --- DISEÑO RESPONSIVO --- */
@media (max-width: 992px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    .steps-grid {
        grid-template-columns: 1fr; /* Apila las 3 columnas informativas en tablets/móviles */
        gap: 20px;
    }
}

@media (max-width: 650px) {
    .nav-menu {
        display: none;
    }
    .hero h1 {
        font-size: 28px;
    }
    .report-card {
        flex-direction: column;
    }
    .report-img {
        width: 100%;
        height: 180px;
        min-width: 100%;
    }
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .ticker-title {
        font-size: 11px;
        padding: 0 10px;
    }
    .ticker-wrapper {
        font-size: 12px;
        height: 35px;
    }
}
