/*
Theme Name: Salud con Ganoderma - Definitivo
Theme URI: https://saludconganoderma.com
Author: Ángel Grimaldo
Author URI: https://angelgrimaldo.com/
Description: Tema definitivo para Salud con Ganoderma - DXN. Desarrollado con CSS nativo y diseño limpio sin dependencias de Tailwind CSS.
Version: 1.0.0
Text Domain: salud-dxn
*/

/* -------------------------------------------------------------
   1. VARIABLES DE DISEÑO (DESIGN SYSTEM VARIABLES)
   ------------------------------------------------------------- */
:root {
    /* Colores */
    --color-primary: #ba0013;
    --color-on-primary: #ffffff;
    --color-primary-container: #e31e24;
    --color-on-primary-container: #fffafa;
    --color-primary-fixed: #ffdad6;
    --color-primary-fixed-dim: #ffb4ab;
    --color-on-primary-fixed: #410002;
    --color-on-primary-fixed-variant: #93000d;

    --color-secondary: #0b6d3b;
    --color-on-secondary: #ffffff;
    --color-secondary-container: #9ef6b6;
    --color-on-secondary-container: #177341;
    --color-secondary-fixed: #9ef6b6;
    --color-secondary-fixed-dim: #83d99c;
    --color-on-secondary-fixed: #00210e;
    --color-on-secondary-fixed-variant: #00522a;

    --color-tertiary: #125bad;
    --color-on-tertiary: #ffffff;
    --color-tertiary-container: #3874c7;
    --color-on-tertiary-container: #fdfbff;
    --color-tertiary-fixed: #d6e3ff;
    --color-tertiary-fixed-dim: #a9c7ff;
    --color-on-tertiary-fixed: #001b3d;
    --color-on-tertiary-fixed-variant: #00468c;

    --color-background: #f8f9fa;
    --color-on-background: #191c1d;

    --color-surface: #ffffff;
    --color-on-surface: #191c1d;
    --color-on-surface-variant: #5d3f3c;
    --color-surface-container-lowest: #ffffff;
    --color-surface-container-low: #f3f4f5;
    --color-surface-container: #edeeef;
    --color-surface-container-high: #e7e8e9;
    --color-surface-container-highest: #e1e3e4;
    --color-surface-variant: #e1e3e4;
    --color-surface-dark: #333333;
    --color-surface-bright: #f8f9fa;
    --color-surface-dim: #d9dadb;
    --color-surface-tint: #c00014;

    --color-outline: #926f6b;
    --color-outline-variant: #e7bdb8;

    --color-success: #006837;
    --color-error: #e31e24;
    --color-on-error: #ffffff;
    --color-error-container: #ffdad6;
    --color-on-error-container: #93000a;

    --color-dxn-red-deep: #990000;
    --color-dxn-green-deep: #006633;

    /* Esquinas Redondeadas */
    --rounded-sm: 0.25rem;
    --rounded-default: 0.5rem;
    --rounded-md: 0.75rem;
    --rounded-lg: 1rem;
    --rounded-xl: 1.5rem;
    --rounded-full: 9999px;

    /* Sombras "Soft Lifts" */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-default: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 30px -4px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 12px 40px -6px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 50px -12px rgba(0, 0, 0, 0.05);

    /* Espaciados */
    --base-unit: 8px;
    --gutter: 24px;
    --container-max: 1200px;
    --margin-mobile: 16px;
    --margin-desktop: 48px;
}

/* -------------------------------------------------------------
   2. RESET & BASE STYLES
   ------------------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-background);
    color: var(--color-on-surface);
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* -------------------------------------------------------------
   3. TYPOGRAPHY
   ------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6,
.font-headline {
    font-family: 'Montserrat', sans-serif;
    color: var(--color-on-surface);
}

.headline-xl {
    font-size: 48px;
    font-weight: 700;
    line-height: 56px;
    letter-spacing: -0.02em;
}

.headline-lg {
    font-size: 32px;
    font-weight: 700;
    line-height: 40px;
}

.headline-md {
    font-size: 24px;
    font-weight: 600;
    line-height: 32px;
}

.body-lg {
    font-size: 18px;
    font-weight: 400;
    line-height: 28px;
}

.body-md {
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
}

.body-sm {
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

.label-bold {
    font-size: 12px;
    font-weight: 700;
    line-height: 16px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.font-button {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* -------------------------------------------------------------
   4. LAYOUT & CONTAINERS
   ------------------------------------------------------------- */
.container-site {
    max-width: var(--container-max);
    margin: 0 auto;
    padding-left: var(--margin-desktop);
    padding-right: var(--margin-desktop);
    width: 100%;
}

.section-padding {
    padding-top: 80px;
    padding-bottom: 80px;
}

.bg-white {
    background-color: var(--color-surface-container-lowest);
}

.bg-surface-gray {
    background-color: var(--color-surface-container-low);
}

.bg-container-gray {
    background-color: var(--color-surface-container);
}

.border-y-divider {
    border-top: 1px solid var(--color-outline-variant);
    border-bottom: 1px solid var(--color-outline-variant);
}

/* Rejilla (Grid System) */
.grid-2-cols {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gutter);
    align-items: center;
}

.grid-3-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gutter);
}

.flex-center-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* -------------------------------------------------------------
   5. COMPONENTES (BUTTONS, CARDS, ICONS)
   ------------------------------------------------------------- */
/* Botones */
.btn {
    display: inline-block;
    text-decoration: none;
    text-align: center;
    padding: 14px 28px;
    border-radius: var(--rounded-default);
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-on-primary);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--color-primary-container);
    box-shadow: var(--shadow-default);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-secondary);
    border: 1px solid var(--color-secondary);
}

.btn-secondary:hover {
    background-color: var(--color-surface-container-low);
    transform: translateY(-1px);
}

.btn-white {
    background-color: var(--color-surface-container-lowest);
    color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.btn-white:hover {
    background-color: var(--color-surface-container-low);
    box-shadow: var(--shadow-default);
    transform: translateY(-1px);
}

/* Tarjetas (Cards) */
.card-benefit {
    background-color: var(--color-surface);
    border: 1px solid var(--color-outline-variant);
    border-radius: var(--rounded-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-benefit:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--rounded-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.card-icon.green {
    background-color: var(--color-secondary-container);
    color: var(--color-on-secondary-container);
}

.card-icon.red {
    background-color: var(--color-primary-fixed);
    color: var(--color-on-primary-fixed);
}

.card-icon.blue {
    background-color: var(--color-tertiary-fixed);
    color: var(--color-on-tertiary-fixed);
}

.card-benefit h3 {
    margin-bottom: 12px;
}

/* Lista con checks */
.list-check {
    list-style: none;
    padding: 0;
}

.list-check li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 16px;
}

.list-check li .material-symbols-outlined {
    color: var(--color-success);
    font-size: 24px;
}

/* -------------------------------------------------------------
   6. HEADER & NAVIGATION
   ------------------------------------------------------------- */
.site-header {
    background-color: var(--color-surface);
    border-b: 1px solid var(--color-outline-variant);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    height: 80px;
    display: flex;
    align-items: center;
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-brand a {
    display: block;
}

.logo-brand img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: var(--gutter);
}

.nav-link {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--color-on-surface-variant);
    padding: 8px 12px;
    border-radius: var(--rounded-default);
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--color-primary);
    background-color: var(--color-surface-container-low);
}

.nav-link.active {
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-primary);
    border-radius: var(--rounded-default) var(--rounded-default) 0 0;
    padding-bottom: 6px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-actions .btn {
    padding: 10px 20px;
}

/* -------------------------------------------------------------
   7. SECCIONES ESPECÍFICAS
   ------------------------------------------------------------- */
/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    padding-top: 16px;
}

.hero-img-container {
    position: relative;
    width: 100%;
    height: 500px;
    border-radius: var(--rounded-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.hero-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Stats Section */
.stats-section {
    background-color: var(--color-surface);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
}

.stat-item .material-symbols-outlined {
    font-size: 40px;
    margin-bottom: 16px;
}

.stat-item.border-x {
    border-left: 1px solid var(--color-outline-variant);
    border-right: 1px solid var(--color-outline-variant);
}

.stat-item h3 {
    margin-bottom: 8px;
}

/* Benefits Section */
.benefits-header {
    text-align: center;
    margin-bottom: 64px;
}

.benefits-header h2 {
    margin-bottom: 16px;
}

.benefits-header p {
    max-width: 670px;
    margin: 0 auto;
}

/* About Section */
.about-section {
    background-color: var(--color-surface-container);
}

.about-img-container {
    position: relative;
    border-radius: var(--rounded-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    height: 400px;
}

.about-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* CTA Section (Pre-Footer) */
.cta-section {
    background-color: var(--color-primary-container);
    color: var(--color-on-primary-container);
    text-align: center;
}

.cta-section h2 {
    color: var(--color-on-primary-container);
    margin-bottom: 24px;
}

.cta-section p {
    max-width: 768px;
    margin: 0 auto 32px;
    opacity: 0.9;
}

.cta-section .btn {
    box-shadow: var(--shadow-sm);
}

/* -------------------------------------------------------------
   8. FOOTER
   ------------------------------------------------------------- */
.site-footer {
    background-color: #121415;
    color: #ffffff;
    border-top: 1px solid var(--color-outline-variant);
    padding-top: 64px;
    padding-bottom: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gutter);
    padding-bottom: 48px;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-column img {
    width: 128px;
    height: auto;
    object-fit: contain;
    background-color: var(--color-surface);
    padding: 8px;
    border-radius: var(--rounded-default);
    box-shadow: var(--shadow-sm);
    margin-bottom: 8px;
}

.footer-column h4 {
    color: #ffffff;
    margin-bottom: 8px;
}

.footer-column p {
    color: #a0a5ab;
}

.footer-column a {
    color: #a0a5ab;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-column a:hover {
    color: #ffffff;
}

/* Social icons SVG */
.social-icons {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.social-icons a {
    display: inline-block;
    transition: transform 0.2s ease;
}

.social-icons a:hover {
    transform: scale(1.15);
}

.social-icons svg {
    width: 24px;
    height: 24px;
    fill: #a0a5ab;
    transition: fill 0.2s ease;
}

.social-icons a:hover svg {
    fill: #ffffff;
}

/* Sub-footer Bottom Bar */
.site-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 32px;
    padding-bottom: 32px;
    margin-top: 16px;
}

.medical-disclaimer {
    color: #a0a5ab;
    font-size: 12px;
    line-height: 1.5;
    text-align: justify;
    opacity: 0.8;
    margin-bottom: 24px;
    border-left: 3px solid var(--color-primary);
    padding-left: 12px;
}

.copyright {
    color: #a0a5ab;
}

.footer-bottom-links {
    color: #a0a5ab;
}

.footer-bottom-links a {
    color: #a0a5ab;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-bottom-links a:hover {
    color: #ffffff;
}

/* -------------------------------------------------------------
   9. INTERACTIVE PAGES (INDEX / DEFAULT PAGES)
   ------------------------------------------------------------- */
.prose {
    max-width: none;
}

.prose > * + * {
    margin-top: 24px;
}

.prose h1, .prose h2, .prose h3 {
    margin-top: 40px;
    margin-bottom: 16px;
}

.prose p {
    margin-bottom: 24px;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gutter);
}

.article-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-outline-variant);
    border-radius: var(--rounded-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.article-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.article-card h2 {
    margin-bottom: 12px;
}

.article-card a {
    color: var(--color-primary);
    text-decoration: none;
}

.article-card a:hover {
    text-decoration: underline;
}

.article-card .btn-text {
    display: inline-block;
    margin-top: 16px;
    font-weight: 600;
}

.pagination-container {
    margin-top: 48px;
    display: flex;
    justify-content: center;
    gap: 16px;
}

.pagination-container .page-numbers {
    padding: 8px 16px;
    border: 1px solid var(--color-outline-variant);
    border-radius: var(--rounded-default);
    text-decoration: none;
    color: var(--color-on-surface);
    transition: all 0.2s ease;
}

.pagination-container .page-numbers:hover,
.pagination-container .page-numbers.current {
    background-color: var(--color-primary);
    color: var(--color-on-primary);
    border-color: var(--color-primary);
}

/* -------------------------------------------------------------
   10. RESPONSIVE DESIGN (MEDIA QUERIES)
   ------------------------------------------------------------- */
@media (max-width: 1024px) {
    .container-site {
        padding-left: var(--margin-mobile);
        padding-right: var(--margin-mobile);
    }
}

@media (max-width: 768px) {
    /* Layout stacking */
    .grid-2-cols {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .grid-3-cols {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

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

    /* Typographic scaling */
    .headline-xl {
        font-size: 28px;
        line-height: 36px;
    }

    .headline-lg {
        font-size: 24px;
        line-height: 32px;
    }

    .section-padding {
        padding-top: 48px;
        padding-bottom: 48px;
    }

    /* Hero responsiveness */
    .hero-img-container {
        height: 350px;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
    }

    /* Stats divider removal */
    .stat-item.border-x {
        border-left: none;
        border-right: none;
        border-top: 1px solid var(--color-outline-variant);
        border-bottom: 1px solid var(--color-outline-variant);
    }

    /* Header adjustments for mobile view */
    .main-nav {
        display: none; /* In a real WP theme we can add a mobile menu toggler */
    }

    .header-actions {
        width: 100%;
        justify-content: flex-end;
    }

    /* Sub-footer responsive stacking */
    .footer-bottom-bar {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .footer-bottom-links {
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .header-actions .btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}
