/* ==========================================================================
   1. VARIABLES Y ESTILOS GLOBALES
   ========================================================================== */
:root {
    --verde-bosque: #2d5a27;
    --tierra: #8d6e63;
    --fondo: #f9fbf9;
    --texto: #333;
}

body {
    font-family: 'Quicksand', sans-serif;
    background-color: var(--fondo);
    color: var(--texto);
    margin: 0;
    line-height: 1.6;
}

button {
    background: var(--verde-bosque);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

/* ==========================================================================
   2. HEADER Y NAVEGACIÓN
   ========================================================================== */
header {
    background: linear-gradient(135deg, var(--verde-bosque) 0%, #142e12 100%);
    color: #ffffff;
    text-align: center;
    padding: 4.5rem 1rem;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.2);
    border-bottom: 4px solid #141414;
    position: relative;
    overflow: hidden;
}

header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://www.transparenttextures.com/patterns/stardust.png');
    opacity: 0.3;
    pointer-events: none;
}

header h1 {
    font-family: 'Lora', serif;
    font-size: 3.8rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    letter-spacing: -1.5px;
    text-shadow: 2px 4px 10px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 1;
}

header p {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.15rem;
    margin: 0;
    opacity: 0.9;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

nav {
    background: #fff;
    padding: 1rem;
    text-align: center;
    position: sticky;
    top: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 100;
}

nav a {
    margin: 0 15px;
    text-decoration: none;
    color: var(--verde-bosque);
    font-weight: bold;
    display: inline-block; /* Ayuda al responsive */
}

/* ==========================================================================
   3. LAYOUT PRINCIPAL Y ANUNCIOS (ADSENSE)
   ========================================================================== */
.page-layout {
    display: flex;
    justify-content: center;
    max-width: 1600px;
    margin: 20px auto;
    padding: 0 15px;
    gap: 20px;
}

.content-center {
    flex: 1;
    max-width: 1040px;
    background: #fff;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    border: 1px solid var(--color-border);
}

.ad-banner {
    width: 160px;
    display: none; /* Se activa en pantallas grandes vía Media Queries */
}

.ad-sticky {
    background-color: #e5e5e5;
    height: 600px;
    border: 1px dashed #bbb;
    position: sticky;
    top: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 1px;
}

/* ==========================================================================
   4. ELEMENTOS REUTILIZABLES (Cards, Categorías, Botones extra)
   ========================================================================== */
.categoria {
    text-transform: uppercase;
    color: var(--tierra);
    font-weight: bold;
    font-size: 0.8rem;
    letter-spacing: 2px;
}

.destacado {
    background: #f0f4ef;
    padding: 2rem;
    border-radius: 10px;
    font-style: italic;
    font-size: 1.3rem;
    text-align: center;
    color: var(--verde-bosque);
    margin: 2rem 0;
}

.btn-primario {
    display: inline-block;
    background: #1a1a1a;
    color: #fff;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.3s ease;
}

.btn-primario:hover {
    background: #d90429;
}

.a-index {
    text-decoration: none;
    color: white;
}

.b-index {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.b-index:hover {
    background-color: #d90429;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(217, 4, 41, 0.3);
}

/* ==========================================================================
   5. SECCIÓN INICIO (Hero, Artículos simples)
   ========================================================================== */
.card-destacada {
    padding-left: 160px;
}

.grid-articulos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

article {
    background: white;
    padding: 20px;
    border-radius: 15px;
    border-left: 2px solid var(--tierra);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

article h3 {
    color: var(--verde-bosque);
}

/* Artículo Principal (Lectura) */
.articulo-principal {
    padding: 4rem 1rem;
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.contenedor-texto {
    padding: 2rem;
}

.articulo-principal h2 {
    font-family: 'Lora', serif;
    font-size: 2.5rem;
    color: var(--verde-bosque);
    margin-top: 0.5rem;
}

.introduccion {
    font-size: 1.2rem;
    color: #555;
    line-height: 1.8;
    border-left: 4px solid var(--verde-bosque);
    padding-left: 1.5rem;
    margin: 2rem 0;
}

.articulo-principal h3 {
    font-size: 1.8rem;
    color: var(--tierra);
    margin-top: 2.5rem;
}

.articulo-principal ul {
    list-style: none;
    padding: 0;
}

.articulo-principal li {
    background: #fff;
    margin-bottom: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.articulo-principal li strong {
    color: var(--verde-bosque);
    display: block;
    font-size: 1.1rem;
}

/* ==========================================================================
   6. SECCIÓN DICCIONARIO
   ========================================================================== */
.seccion-diccionario {
    padding: 4rem 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contenedor-diccionario h2 {
    font-family: 'Lora', serif;
    font-size: 2.2rem;
    color: var(--verde-bosque);
}

.grid-diccionario {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 3rem;
}

.termino {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: relative;
    transition: transform 0.3s ease;
    border-top: 3px solid var(--tierra);
}

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

.letra {
    position: absolute;
    top: -15px;
    right: 15px;
    background: var(--tierra);
    color: white;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.8rem;
}

.termino h4 {
    margin: 0 0 10px 0;
    color: var(--verde-bosque);
    font-size: 1.2rem;
}

.termino p {
    margin: 0;
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
}

/* ==========================================================================
   7. SECCIÓN GUÍA
   ========================================================================== */
.seccion-guia {
    padding: 4rem 1rem;
    background-color: #f0f4ef;
    margin: 4rem 0;
}

.contenedor-guia {
    max-width: 800px;
    margin: 0 auto;
}

.contenedor-guia h2 {
    font-family: 'Lora', serif;
    font-size: 2.2rem;
    color: var(--verde-bosque);
}

.pasos-container {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.paso {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.paso-numero {
    background: var(--verde-bosque);
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    min-width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.paso-info h4 {
    margin: 0 0 10px 0;
    color: var(--tierra);
    font-size: 1.3rem;
}

.paso-info p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

/* ==========================================================================
   8. SECCIÓN GEAR & MÁSCARAS
   ========================================================================== */
.seccion-gear {
    padding: 4rem 1rem;
    max-width: 1100px;
    margin: 0 auto;
}

.contenedor-gear h2 {
    font-family: 'Lora', serif;
    font-size: 2.2rem;
    color: var(--verde-bosque);
}

.grid-gear {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 3rem;
}

.gear-card {
    background: #fff;
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    border: 2px solid #f0f4ef;
    transition: all 0.3s ease;
}

.gear-card:hover {
    border-color: var(--tierra);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.gear-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
}

.gear-card h4 {
    color: var(--verde-bosque);
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.gear-card p {
    color: #777;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ==========================================================================
   9. SECCIÓN NOTICIAS (PORTAL PREMIUM Y PREVIEWS)
   ========================================================================== */
.noticias-header {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 4px solid #000;
    padding-bottom: 10px;
    margin-bottom: 25px;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: var(--color-accent);
    border-radius: 50%;
}

.noticias-header h2 {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0;
    letter-spacing: -0.5px;
}

.grid-noticias-premium {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.grid-noticias-premium article {
    display: flex;
    flex-direction: column;
}

.grid-noticias-premium img {
    width: 100%;
    object-fit: cover;
    display: block;
    margin-bottom: 12px;
}

.tag {
    color: var(--color-accent);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    display: block;
    margin-bottom: 5px;
}

/* Tamaños de las noticias */
.noti-principal {
    grid-column: span 2;
    grid-row: span 2;
    border-right: 1px solid var(--color-border);
    padding-right: 25px;
}

.noti-principal a { text-decoration: none; }
.noti-principal img { height: 350px; }

.noti-principal h3 {
    font-family: 'Lora', serif;
    font-size: 2.2rem;
    line-height: 1.15;
    margin: 5px 0 15px 0;
}

.noti-principal p {
    font-size: 1.1rem;
    color: #444;
    line-height: 1.5;
    margin: 0;
}

.noti-secundaria {
    grid-column: span 1;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 20px;
}

.noti-secundaria a { text-decoration: none; }
.noti-secundaria img { height: 140px; }

.noti-secundaria h3 {
    font-family: 'Lora', serif;
    font-size: 1.15rem;
    line-height: 1.25;
    margin: 5px 0 0 0;
}

.noti-mini {
    grid-column: span 1;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 20px;
}

.noti-mini a { text-decoration: none; }
.noti-mini img { height: 140px; }

.noti-mini h3 {
    font-family: 'Lora', serif;
    font-size: 1.05rem;
    line-height: 1.3;
    margin: 5px 0 0 0;
}

/* Hovers unificados Noticias */
.noti-principal a:hover,
.noti-secundaria a:hover,
.noti-mini a:hover {
    color: var(--color-accent);
    text-decoration: underline;
    text-decoration-color: var(--color-accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 1px;
}

/* Previews Noticias en Portada */
.preview-noticias {
    margin-bottom: 4rem;
    padding: 2rem;
    border-top: 1px solid #eee;
}

.mini-grid-noticias {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 2rem;
}

.mini-card-noticia {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    border: 1px solid #eaeaea;
}

.mini-card-noticia:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.mini-card-noticia img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.mini-card-info {
    padding: 20px;
}

.mini-tag {
    color: #d90429;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mini-card-info h4 {
    font-family: 'Lora', serif;
    font-size: 1.2rem;
    margin: 10px 0 15px 0;
    line-height: 1.3;
    color: #1a1a1a;
}

.link-leer {
    color: #1a1a1a;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.link-leer:hover {
    color: #d90429;
}

.boton-centrado {
    text-align: center;
    margin-top: 1rem;
}

/* ==========================================================================
   10. NEWSLETTER
   ========================================================================== */
.newsletter-banner {
    background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)), url('https://images.unsplash.com/photo-1441974231531-c6227db76b6e?auto=format&fit=crop&w=1200') center/cover;
    padding: 4rem 2rem;
    border-radius: 16px;
    margin-bottom: 4rem;
    text-align: center;
    color: white;
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-content h2 {
    font-family: 'Lora', serif;
    font-size: 2.2rem;
    margin: 0 0 15px 0;
}

.newsletter-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 25px;
    line-height: 1.5;
}

.formulario-email {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.formulario-email input {
    flex: 1;
    max-width: 350px;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-family: 'Quicksand', sans-serif;
    font-size: 1rem;
    outline: none;
}

.formulario-email button {
    background: #d90429;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    font-family: 'Quicksand', sans-serif;
    transition: background 0.3s ease;
}

.formulario-email button:hover {
    background: #b0001f;
}

/* ==========================================================================
   11. SECCIÓN TUTORIAL (Vídeo y Materiales)
   ========================================================================== */
.seccion-tutorial {
    padding: 4rem 1rem;
    background-color: #ffffff;
    border-top: 1px solid var(--color-border);
}

.contenedor-tutorial {
    max-width: 900px;
    margin: 0 auto;
}

.contenedor-tutorial h2 {
    font-family: 'Lora', serif;
    font-size: 2.2rem;
    color: var(--color-text);
    margin: 0.5rem 0 1rem 0;
}

.contenedor-tutorial p {
    color: #555;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.video-responsive {
    position: relative;
    padding-bottom: 56.25%; 
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 3rem;
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.materiales-box {
    background-color: var(--color-bg);
    padding: 2.5rem;
    border-radius: 12px;
    border-left: 5px solid var(--color-accent);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.materiales-box h3 {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.4rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.lista-check {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lista-check li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    line-height: 1.5;
    color: #444;
}

.lista-check li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: white;
    background-color: var(--color-accent);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* ==========================================================================
   12. PÁGINAS LEGALES (Privacidad, Cookies, Aviso)
   ========================================================================== */
.legal-content {
    padding: 40px;
}

.legal-content h2 {
    font-family: 'Lora', serif;
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--color-text);
}

.legal-content h3 {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.3rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--color-accent);
}

.legal-content p, .legal-content li {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #444;
    margin-bottom: 15px; 
}

.legal-content ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

/* ==========================================================================
   13. FOOTER
   ========================================================================== */
footer, .footer-main {
    background-color: #111; /* Unificado con tu código posterior */
    color: #fff;
    padding: 3rem 1rem;
    text-align: center;
    margin-top: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}

/* ==========================================================================
   14. MEDIA QUERIES (RESPONSIVE)
   ========================================================================== */

/* Pantallas Extra Grandes (Activar anuncios laterales) */
@media (min-width: 1400px) {
    .ad-banner { width: 300px; }
}

@media (min-width: 1100px) {
    .ad-banner { display: block; }
}

/* Pantallas Medianas (Tablets y Laptops pequeñas) */
@media (max-width: 1024px) {
    .grid-noticias-premium {
        grid-template-columns: repeat(2, 1fr);
    }
    .noti-principal {
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid var(--color-border);
        padding-bottom: 25px;
    }
}

@media (max-width: 900px) {
    .main-grid { grid-template-columns: 1fr; }
    .news-secondary-row { grid-template-columns: 1fr; }
}

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

/* Pantallas Pequeñas y Móviles */
@media (max-width: 768px) {
    .card-destacada {
        padding-left: 20px; /* Corrección crucial para móviles */
        padding-right: 20px;
    }
}

@media (max-width: 600px) {
    nav a {
        display: block;
        margin: 5px 0;
    }
    
    .grid-noticias-premium {
        grid-template-columns: 1fr;
    }
    
    .noti-principal {
        grid-column: 1;
        grid-row: auto;
    }
    
    .noti-secundaria, .noti-mini {
        grid-column: 1;
    }
    
    .nav-links {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .paso {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .formulario-email {
        flex-direction: column;
        align-items: center;
    }
    
    .formulario-email input, .formulario-email button {
        width: 100%;
        max-width: 100%;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}