/*
 Theme Name:   Sin Humedad
 Theme URI:    https://casasinhumedad.es
 Description:  Child theme de GeneratePress para Sin Humedad - Soluciones contra humedad, moho y condensación en viviendas.
 Author:       Sin Humedad
 Author URI:   https://casasinhumedad.es
 Template:     generatepress
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  sinhumedad
 Tags:         light, one-column, two-columns, right-sidebar, custom-menu, featured-images, translation-ready
*/

/* ===========================================
   1. VARIABLES CSS — Paleta de marca
   =========================================== */
:root {
    /* Colores principales */
    --sh-azul-primario: #1B6FA8;
    --sh-azul-oscuro: #0D4F7A;
    --sh-azul-claro: #4A9ED6;
    --sh-azul-muy-claro: #E8F4FD;

    /* Colores secundarios */
    --sh-verde: #5DAE8B;
    --sh-verde-claro: #E8F5EE;
    --sh-blanco: #FFFFFF;
    --sh-gris-claro: #F5F7FA;
    --sh-gris-medio: #6B7280;
    --sh-gris-oscuro: #374151;
    --sh-negro: #1F2937;

    /* CTA */
    --sh-naranja: #E8862A;
    --sh-naranja-hover: #D4741A;
    --sh-amarillo: #F5C518;

    /* Alertas / Información */
    --sh-rojo: #DC3545;
    --sh-rojo-claro: #FFF0F0;

    /* Tipografía */
    --sh-font-principal: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --sh-font-secundaria: 'Source Sans Pro', 'Inter', sans-serif;

    /* Tamaños */
    --sh-radius: 8px;
    --sh-radius-sm: 4px;
    --sh-shadow: 0 2px 8px rgba(27, 111, 168, 0.08);
    --sh-shadow-hover: 0 4px 16px rgba(27, 111, 168, 0.15);
    --sh-transition: all 0.3s ease;
    --sh-max-width: 1200px;
}

/* ===========================================
   2. RESET Y BASE
   =========================================== */
body {
    font-family: var(--sh-font-principal);
    color: var(--sh-gris-oscuro);
    line-height: 1.7;
    font-size: 17px;
    background-color: var(--sh-blanco);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===========================================
   3. TIPOGRAFÍA
   =========================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--sh-font-principal);
    color: var(--sh-azul-oscuro);
    font-weight: 700;
    line-height: 1.3;
}

h1 { font-size: 2.2rem; margin-bottom: 1rem; }
h2 { font-size: 1.75rem; margin-top: 2.5rem; margin-bottom: 0.8rem; }
h3 { font-size: 1.35rem; margin-top: 2rem; margin-bottom: 0.6rem; }
h4 { font-size: 1.15rem; margin-top: 1.5rem; }

p {
    margin-bottom: 1.2em;
    color: var(--sh-gris-oscuro);
}

a {
    color: var(--sh-azul-primario);
    text-decoration: none;
    transition: var(--sh-transition);
}

a:hover {
    color: var(--sh-azul-oscuro);
}

/* ===========================================
   4. HEADER
   =========================================== */
.site-header {
    background-color: var(--sh-blanco);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 999;
}

.main-title a,
.site-title a {
    color: var(--sh-azul-primario) !important;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.main-navigation .main-nav > ul > li > a,
.main-navigation .menu > li > a {
    color: var(--sh-gris-oscuro);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 20px 18px;
    text-transform: none;
    transition: var(--sh-transition);
}

.main-navigation .main-nav > ul > li > a:hover,
.main-navigation .menu > li > a:hover {
    color: var(--sh-azul-primario);
}

.main-navigation .main-nav > ul > li.current-menu-item > a {
    color: var(--sh-azul-primario);
    border-bottom: 3px solid var(--sh-azul-primario);
}

/* Submenú */
.main-navigation ul ul {
    background: var(--sh-blanco);
    border: 1px solid #eee;
    border-radius: var(--sh-radius);
    box-shadow: var(--sh-shadow-hover);
}

.main-navigation ul ul a {
    font-size: 0.9rem;
    padding: 10px 20px;
}

/* ===========================================
   5. HERO / PORTADA
   =========================================== */
.sh-hero {
    background: linear-gradient(135deg, var(--sh-azul-oscuro) 0%, var(--sh-azul-primario) 50%, var(--sh-azul-claro) 100%);
    color: var(--sh-blanco);
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.sh-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 70%, rgba(255,255,255,0.05) 0%, transparent 60%);
    pointer-events: none;
}

.sh-hero h1 {
    color: var(--sh-blanco);
    font-size: 2.8rem;
    margin-bottom: 0.8rem;
    font-weight: 800;
}

.sh-hero p {
    color: rgba(255,255,255,0.9);
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.sh-hero .sh-btn-cta {
    display: inline-block;
    background: var(--sh-naranja);
    color: var(--sh-blanco);
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: var(--sh-transition);
    text-transform: none;
    border: none;
    cursor: pointer;
}

.sh-hero .sh-btn-cta:hover {
    background: var(--sh-naranja-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 134, 42, 0.3);
    color: var(--sh-blanco);
}

/* ===========================================
   6. CONTENIDO PRINCIPAL
   =========================================== */
.site-content {
    max-width: var(--sh-max-width);
    margin: 0 auto;
    padding: 40px 20px;
}

.entry-content {
    font-size: 17px;
    line-height: 1.8;
}

.entry-content img {
    border-radius: var(--sh-radius);
    box-shadow: var(--sh-shadow);
    margin: 1.5em 0;
}

/* ===========================================
   7. CARDS DE ARTÍCULOS
   =========================================== */
.sh-card {
    background: var(--sh-blanco);
    border-radius: var(--sh-radius);
    box-shadow: var(--sh-shadow);
    overflow: hidden;
    transition: var(--sh-transition);
    margin-bottom: 30px;
}

.sh-card:hover {
    box-shadow: var(--sh-shadow-hover);
    transform: translateY(-4px);
}

.sh-card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.sh-card-body {
    padding: 25px;
}

.sh-card-body h3 {
    margin-top: 0;
    font-size: 1.2rem;
}

.sh-card-body h3 a {
    color: var(--sh-azul-oscuro);
}

.sh-card-body h3 a:hover {
    color: var(--sh-azul-primario);
}

.sh-card-meta {
    font-size: 0.85rem;
    color: var(--sh-gris-medio);
    margin-bottom: 10px;
}

.sh-card-excerpt {
    color: var(--sh-gris-oscuro);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Grid de artículos */
.sh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
}

/* ===========================================
   8. SIDEBAR
   =========================================== */
.widget-area .widget {
    background: var(--sh-gris-claro);
    border-radius: var(--sh-radius);
    padding: 25px;
    margin-bottom: 25px;
}

.widget-area .widget-title {
    font-size: 1.1rem;
    color: var(--sh-azul-oscuro);
    border-bottom: 3px solid var(--sh-azul-primario);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* ===========================================
   9. TABLA DE CONTENIDOS
   =========================================== */
.sh-toc {
    background: var(--sh-azul-muy-claro);
    border-left: 4px solid var(--sh-azul-primario);
    border-radius: var(--sh-radius);
    padding: 25px 30px;
    margin: 30px 0;
}

.sh-toc-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--sh-azul-oscuro);
    margin-bottom: 12px;
}

.sh-toc ol {
    counter-reset: toc;
    padding-left: 0;
    list-style: none;
}

.sh-toc li {
    counter-increment: toc;
    padding: 6px 0;
    border-bottom: 1px solid rgba(27, 111, 168, 0.1);
}

.sh-toc li::before {
    content: counter(toc) ".";
    color: var(--sh-azul-primario);
    font-weight: 700;
    margin-right: 8px;
}

.sh-toc a {
    color: var(--sh-gris-oscuro);
    font-size: 0.95rem;
}

.sh-toc a:hover {
    color: var(--sh-azul-primario);
}

/* ===========================================
   10. CAJAS DE PRODUCTO (Amazon Afiliados)
   =========================================== */
.sh-producto {
    background: var(--sh-blanco);
    border: 2px solid #e5e7eb;
    border-radius: var(--sh-radius);
    padding: 30px;
    margin: 30px 0;
    display: flex;
    gap: 25px;
    align-items: flex-start;
    transition: var(--sh-transition);
}

.sh-producto:hover {
    border-color: var(--sh-azul-claro);
    box-shadow: var(--sh-shadow-hover);
}

.sh-producto-img {
    width: 200px;
    min-width: 200px;
    text-align: center;
}

.sh-producto-img img {
    max-width: 100%;
    height: auto;
    border-radius: var(--sh-radius-sm);
}

.sh-producto-info {
    flex: 1;
}

.sh-producto-info h3 {
    margin-top: 0;
    font-size: 1.2rem;
    color: var(--sh-azul-oscuro);
}

.sh-producto-precio {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--sh-azul-primario);
    margin: 10px 0;
}

.sh-producto-estrellas {
    color: var(--sh-amarillo);
    font-size: 1rem;
    margin-bottom: 10px;
}

.sh-producto-specs {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.sh-producto-specs li {
    padding: 5px 0;
    font-size: 0.9rem;
    color: var(--sh-gris-oscuro);
    border-bottom: 1px solid #f3f4f6;
}

.sh-producto-specs li::before {
    content: "✓ ";
    color: var(--sh-verde);
    font-weight: 700;
}

.sh-btn-amazon {
    display: inline-block;
    background: var(--sh-naranja);
    color: var(--sh-blanco) !important;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--sh-transition);
    text-align: center;
    border: none;
    cursor: pointer;
}

.sh-btn-amazon:hover {
    background: var(--sh-naranja-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(232, 134, 42, 0.3);
    color: var(--sh-blanco) !important;
}

.sh-btn-amazon::after {
    content: " →";
}

/* Tabla comparativa de productos */
.sh-tabla-comparativa {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    font-size: 0.95rem;
    border-radius: var(--sh-radius);
    overflow: hidden;
    box-shadow: var(--sh-shadow);
}

.sh-tabla-comparativa thead {
    background: var(--sh-azul-primario);
    color: var(--sh-blanco);
}

.sh-tabla-comparativa th {
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
}

.sh-tabla-comparativa td {
    padding: 14px 18px;
    border-bottom: 1px solid #e5e7eb;
}

.sh-tabla-comparativa tbody tr:hover {
    background: var(--sh-azul-muy-claro);
}

.sh-tabla-comparativa .sh-mejor {
    background: var(--sh-verde-claro);
    font-weight: 600;
}

/* ===========================================
   11. CAJAS INFORMATIVAS
   =========================================== */
.sh-caja-info {
    border-radius: var(--sh-radius);
    padding: 20px 25px;
    margin: 25px 0;
    border-left: 4px solid;
}

.sh-caja-consejo {
    background: var(--sh-verde-claro);
    border-color: var(--sh-verde);
}

.sh-caja-alerta {
    background: var(--sh-rojo-claro);
    border-color: var(--sh-rojo);
}

.sh-caja-info-azul {
    background: var(--sh-azul-muy-claro);
    border-color: var(--sh-azul-primario);
}

.sh-caja-titulo {
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 1rem;
}

.sh-caja-consejo .sh-caja-titulo { color: #2D7A5A; }
.sh-caja-alerta .sh-caja-titulo { color: var(--sh-rojo); }
.sh-caja-info-azul .sh-caja-titulo { color: var(--sh-azul-oscuro); }

/* ===========================================
   12. BREADCRUMBS
   =========================================== */
.sh-breadcrumbs {
    padding: 15px 0;
    font-size: 0.85rem;
    color: var(--sh-gris-medio);
}

.sh-breadcrumbs a {
    color: var(--sh-azul-primario);
}

.sh-breadcrumbs span.separator {
    margin: 0 8px;
    color: #d1d5db;
}

/* ===========================================
   13. FOOTER
   =========================================== */
.site-footer {
    background: var(--sh-azul-oscuro);
    color: rgba(255,255,255,0.8);
    padding: 50px 20px 20px;
}

.sh-footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: var(--sh-max-width);
    margin: 0 auto 40px;
}

.sh-footer-widget h4 {
    color: var(--sh-blanco);
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--sh-azul-primario);
}

.sh-footer-widget a {
    color: rgba(255,255,255,0.7);
    display: block;
    padding: 5px 0;
    font-size: 0.9rem;
}

.sh-footer-widget a:hover {
    color: var(--sh-blanco);
}

.sh-footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
}

.sh-footer-bottom a {
    color: rgba(255,255,255,0.6);
}

/* Aviso de afiliado */
.sh-aviso-afiliado {
    background: var(--sh-azul-muy-claro);
    border: 1px solid #d1e7f7;
    border-radius: var(--sh-radius-sm);
    padding: 12px 18px;
    font-size: 0.82rem;
    color: var(--sh-gris-medio);
    margin: 20px 0;
    line-height: 1.5;
}

/* ===========================================
   14. NEWSLETTER
   =========================================== */
.sh-newsletter {
    background: linear-gradient(135deg, var(--sh-azul-primario), var(--sh-azul-claro));
    border-radius: var(--sh-radius);
    padding: 40px;
    text-align: center;
    margin: 40px 0;
    color: var(--sh-blanco);
}

.sh-newsletter h3 {
    color: var(--sh-blanco);
    font-size: 1.4rem;
    margin-top: 0;
}

.sh-newsletter p {
    color: rgba(255,255,255,0.9);
}

.sh-newsletter-form {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.sh-newsletter-form input[type="email"] {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
}

.sh-newsletter-form button {
    background: var(--sh-naranja);
    color: var(--sh-blanco);
    border: none;
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--sh-transition);
}

.sh-newsletter-form button:hover {
    background: var(--sh-naranja-hover);
}

/* ===========================================
   15. PAGINACIÓN
   =========================================== */
.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 40px 0;
}

.pagination .page-numbers {
    padding: 10px 16px;
    border-radius: var(--sh-radius-sm);
    background: var(--sh-gris-claro);
    color: var(--sh-gris-oscuro);
    font-weight: 600;
    transition: var(--sh-transition);
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background: var(--sh-azul-primario);
    color: var(--sh-blanco);
}

/* ===========================================
   16. RESPONSIVE
   =========================================== */
@media (max-width: 768px) {
    .sh-hero h1 {
        font-size: 1.8rem;
    }

    .sh-hero {
        padding: 50px 20px;
    }

    .sh-hero p {
        font-size: 1rem;
    }

    .sh-grid {
        grid-template-columns: 1fr;
    }

    .sh-producto {
        flex-direction: column;
    }

    .sh-producto-img {
        width: 100%;
        min-width: auto;
    }

    .sh-tabla-comparativa {
        font-size: 0.8rem;
    }

    .sh-tabla-comparativa th,
    .sh-tabla-comparativa td {
        padding: 10px;
    }

    .sh-newsletter-form {
        flex-direction: column;
    }

    .sh-footer-widgets {
        grid-template-columns: 1fr;
    }

    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.4rem; }
    h3 { font-size: 1.15rem; }
}

@media (max-width: 480px) {
    body {
        font-size: 16px;
    }

    .sh-card-body {
        padding: 18px;
    }

    .sh-producto {
        padding: 20px;
    }

    .sh-hero .sh-btn-cta {
        padding: 12px 30px;
        font-size: 1rem;
    }
}

/* ===========================================
   17. UTILIDADES
   =========================================== */
.sh-text-center { text-align: center; }
.sh-text-azul { color: var(--sh-azul-primario); }
.sh-bg-claro { background: var(--sh-gris-claro); }
.sh-mt-2 { margin-top: 2rem; }
.sh-mb-2 { margin-bottom: 2rem; }
.sh-p-2 { padding: 2rem; }

.sh-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.sh-badge-verde {
    background: var(--sh-verde-claro);
    color: #2D7A5A;
}

.sh-badge-azul {
    background: var(--sh-azul-muy-claro);
    color: var(--sh-azul-primario);
}

.sh-badge-naranja {
    background: #FFF3E0;
    color: var(--sh-naranja);
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sh-animate {
    animation: fadeInUp 0.6s ease forwards;
}

/* Schema / Rich Snippets styling */
.sh-rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sh-rating-stars {
    color: var(--sh-amarillo);
    font-size: 1.1rem;
}

.sh-rating-number {
    font-weight: 700;
    color: var(--sh-gris-oscuro);
}

.sh-rating-count {
    color: var(--sh-gris-medio);
    font-size: 0.85rem;
}
