/*
 * article-newsletter.css
 * Aplica el estilo "newsletter" (Substack/Medium) a TODOS los articulos
 * de /nutricion/*.html sin tocar su estructura.
 *
 * Se carga DESPUES del <style> inline del articulo, por lo que las reglas
 * de aqui ganan al estar empatadas en especificidad (cascade).
 */

:root {
    --nl-bg: #fafafa;
    --nl-card-bg: #ffffff;
    --nl-text: #1d1d1f;
    --nl-text-secondary: #515156;
    --nl-text-tertiary: #86868b;
    --nl-border: #ececef;
    --nl-yellow: #FFCC00;
    --nl-yellow-soft: rgba(255, 204, 0, 0.12);
    --nl-yellow-strong: #f5b800;
    --nl-serif: 'Georgia', 'Charter', 'Iowan Old Style', 'Palatino', serif;
}

/* ===== Base ===== */
body {
    background: var(--nl-bg);
    color: var(--nl-text);
    line-height: 1.65;
}

/* ===== Layout (unificado en TODAS las resoluciones) ===== */
.main-container {
    max-width: 760px !important;
    margin: 0 auto !important;
    padding: 36px 22px 32px !important;
}

@media (max-width: 768px) {
    .main-container {
        padding: 24px 18px 28px !important;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 20px 16px 24px !important;
    }
}

@media (min-width: 1024px) {
    .main-container {
        max-width: 760px !important;
        padding: 44px 24px 36px !important;
    }
}

@media (min-width: 1280px) {
    .main-container {
        max-width: 760px !important;
        padding: 48px 24px 40px !important;
    }
}

/* ===== Article header ===== */
.article-header {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0 4px 26px;
    margin-bottom: 28px;
    text-align: left;
    border-bottom: 1px solid var(--nl-border);
}

.article-header .header-icon {
    font-size: 2.4em;
    margin-bottom: 10px;
    line-height: 1;
}

.article-header .category-badge {
    display: inline-block;
    background: transparent;
    color: var(--nl-text-tertiary);
    padding: 0;
    margin-bottom: 14px;
    border-radius: 0;
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.article-header .article-title {
    font-size: 36px;
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--nl-text);
    margin-bottom: 14px;
}

.article-header .article-subtitle {
    font-size: 18px;
    line-height: 1.5;
    color: var(--nl-text-secondary);
    font-style: italic;
    font-weight: 400;
    max-width: 640px;
}

/* ===== Content sections (padding unificado) ===== */
.content-section {
    background: var(--nl-card-bg);
    box-shadow: none !important;
    border: 1px solid var(--nl-border) !important;
    border-radius: 16px !important;
    padding: 28px 30px 26px !important;
    margin: 0 0 18px !important;
}

@media (max-width: 768px) {
    .content-section {
        padding: 22px 20px 20px !important;
        border-radius: 14px !important;
    }
}

@media (max-width: 480px) {
    .content-section {
        padding: 20px 18px 18px !important;
    }
}

@media (min-width: 1024px) {
    .content-section {
        padding: 32px 34px 28px !important;
    }
}

/* Hero/article-header sin margen-bottom raro */
.article-header {
    margin: 0 0 28px !important;
}

.content-section .section-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--nl-text);
    letter-spacing: -0.015em;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--nl-border);
    line-height: 1.25;
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-section h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--nl-text);
    letter-spacing: -0.01em;
    margin: 28px 0 12px;
    line-height: 1.3;
}

.content-section p {
    font-family: var(--nl-serif);
    font-size: 17.5px;
    line-height: 1.7;
    color: var(--nl-text);
    margin-bottom: 18px;
}

.content-section p strong,
.content-section strong {
    color: var(--nl-text);
    font-weight: 700;
    font-family: var(--nl-serif);
}

.content-section ul,
.content-section ol {
    font-family: var(--nl-serif);
    font-size: 17px;
    color: var(--nl-text);
    margin: 14px 0 22px 22px;
    line-height: 1.65;
}

.content-section li {
    font-size: 17px;
    line-height: 1.65;
    margin-bottom: 10px;
}

.content-section li strong { font-weight: 700; }
.content-section em, .content-section i { font-style: italic; }

/* ===== Highlight boxes (todas unificadas a estilo newsletter) ===== */
.highlight-box {
    background: var(--nl-yellow-soft);
    border-left: 4px solid var(--nl-yellow);
    padding: 18px 22px;
    border-radius: 0 12px 12px 0;
    margin: 22px 0;
    box-shadow: none;
}

.highlight-box p {
    font-family: var(--nl-serif);
    font-size: 17px;
    line-height: 1.65;
    margin-bottom: 12px;
}
.highlight-box p:last-child { margin-bottom: 0; }
.highlight-box strong { color: var(--nl-text); font-weight: 700; }

.highlight-box ul, .highlight-box ol {
    margin: 10px 0 0 20px;
    font-size: 16.5px;
}
.highlight-box li { font-size: 16.5px; }

.highlight-box.important,
.highlight-box.success,
.highlight-box.danger {
    background: var(--nl-yellow-soft);
    border-left-color: var(--nl-yellow);
}
.highlight-box.danger {
    background: rgba(220, 38, 38, 0.06);
    border-left-color: #DC2626;
}
.highlight-box.success {
    background: rgba(5, 150, 105, 0.07);
    border-left-color: #059669;
}

/* ===== Experiment box ===== */
.experiment-box {
    background: var(--nl-card-bg);
    border: 1px solid var(--nl-border);
    border-radius: 14px;
    padding: 22px;
    margin: 22px 0;
    box-shadow: none;
}

.experiment-box .experiment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--nl-border);
}

.experiment-box .experiment-icon {
    font-size: 1.6em;
}

.experiment-box .experiment-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
    font-weight: 800;
    color: var(--nl-text);
    font-size: 14px;
    letter-spacing: -0.01em;
}

.experiment-box p {
    font-family: var(--nl-serif);
    font-size: 16.5px;
    line-height: 1.6;
}

.experiment-box .experiment-groups {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 16px;
}

.experiment-box .experiment-group {
    background: #fafafa;
    border: 1px solid var(--nl-border);
    padding: 16px 14px;
    border-radius: 12px;
    text-align: center;
}

.experiment-box .group-label {
    font-family: -apple-system, 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--nl-text-tertiary);
    margin-bottom: 6px;
}

.experiment-box .group-visual {
    font-size: 2em;
    margin: 8px 0;
}

.experiment-box .group-result {
    font-family: -apple-system, 'Inter', sans-serif;
    background: #fff;
    border-radius: 10px;
    padding: 8px;
    font-weight: 800;
    font-size: 14px;
    margin-top: 10px;
}

.experiment-box .experiment-group:first-child .group-result {
    background: rgba(220, 38, 38, 0.08);
    color: #DC2626;
}
.experiment-box .experiment-group:last-child .group-result {
    background: rgba(5, 150, 105, 0.10);
    color: #059669;
}

.experiment-box .experiment-difference {
    background: var(--nl-yellow-soft);
    border: 1px solid rgba(255, 204, 0, 0.5);
    border-radius: 12px;
    margin-top: 14px;
    padding: 12px;
    text-align: center;
}
.experiment-box .experiment-difference strong {
    color: var(--nl-text);
    font-family: -apple-system, 'Inter', sans-serif;
    font-size: 15px;
}

/* ===== Comparison grids ===== */
.comparison-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 22px 0;
}

.comparison-card {
    padding: 18px 18px 16px;
    border-radius: 14px;
    border: 1px solid var(--nl-border);
    box-shadow: none;
}

.comparison-card.bad {
    background: rgba(220, 38, 38, 0.05);
    border-color: rgba(220, 38, 38, 0.25);
}
.comparison-card.good {
    background: rgba(5, 150, 105, 0.06);
    border-color: rgba(5, 150, 105, 0.30);
}

.comparison-card .comparison-header {
    font-family: -apple-system, 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
}

.comparison-card.bad .comparison-header { color: #DC2626; }
.comparison-card.good .comparison-header { color: #059669; }

.comparison-card p {
    font-family: var(--nl-serif);
    font-size: 15.5px;
    line-height: 1.55;
    margin-bottom: 8px;
}

/* ===== Strategy cards (consejos numerados) ===== */
.strategy-card {
    background: var(--nl-card-bg);
    border: 1px solid var(--nl-border);
    border-radius: 14px;
    padding: 22px;
    margin: 18px 0;
    box-shadow: none;
    transition: border-color 0.2s ease;
}

.strategy-card:hover {
    border-color: rgba(255, 204, 0, 0.6);
    transform: none;
    box-shadow: none;
}

.strategy-card .strategy-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
    padding-bottom: 0;
    border-bottom: none;
}

.strategy-card .strategy-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--nl-yellow);
    border: none;
    color: var(--nl-text);
    font-size: 15px;
    font-weight: 800;
    font-family: -apple-system, 'Inter', sans-serif;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(255, 204, 0, 0.4);
}

.strategy-card .strategy-title {
    font-family: -apple-system, 'Inter', sans-serif;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--nl-text);
}

/* ===== Case study ===== */
.case-study {
    background: #fafafa;
    border: 1px solid var(--nl-border);
    border-radius: 14px;
    padding: 22px;
    margin: 22px 0;
}

.case-study .case-study-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--nl-border);
}

.case-study .case-study-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--nl-yellow);
    border: none;
    font-size: 18px;
    flex-shrink: 0;
}

.case-study .case-study-name {
    font-family: -apple-system, 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: var(--nl-text);
    letter-spacing: -0.01em;
}

.case-study p {
    font-family: var(--nl-serif);
    font-size: 16.5px;
    line-height: 1.65;
}

/* ===== Quote ===== */
.quote {
    background: var(--nl-yellow-soft);
    border-left: 4px solid var(--nl-yellow);
    border-radius: 0 14px 14px 0;
    padding: 26px 28px 24px 42px;
    text-align: left;
    font-style: italic;
    margin: 28px 0;
    position: relative;
}

.quote::before {
    content: '“';
    font-size: 3em;
    color: var(--nl-yellow-strong);
    position: absolute;
    top: 4px;
    left: 14px;
    line-height: 1;
    font-style: normal;
    font-weight: 700;
}

.quote p {
    font-family: var(--nl-serif);
    font-size: 18px;
    line-height: 1.55;
    color: var(--nl-text);
    margin: 0;
    font-style: italic;
}

/* ===== Navbar (igual de minimal pero alineado) ===== */
header[style*="sticky"] {
    background: rgba(255, 255, 255, 0.92) !important;
    border-bottom: 1px solid var(--nl-border) !important;
}

/* ===== Bottom nav fine-tune ===== */
.bottom-nav {
    background: #1d1d1f !important;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .main-container {
        padding: 24px 16px 28px;
    }
    .article-header {
        padding: 0 0 22px;
        margin-bottom: 22px;
    }
    .article-header .article-title {
        font-size: 28px;
        line-height: 1.15;
    }
    .article-header .article-subtitle {
        font-size: 16px;
    }
    .content-section {
        padding: 22px 20px 20px;
        border-radius: 14px;
    }
    .content-section .section-title {
        font-size: 19px;
    }
    .content-section h3 {
        font-size: 16.5px;
    }
    .content-section p,
    .content-section li,
    .content-section ul,
    .content-section ol {
        font-size: 16.5px;
    }
    .highlight-box p { font-size: 15.5px; }
    .quote p { font-size: 16.5px; }
    .strategy-card { padding: 18px; }
    .strategy-card .strategy-title { font-size: 15.5px; }
}

@media (max-width: 480px) {
    .article-header .article-title { font-size: 25px; }
    .article-header .article-subtitle { font-size: 15px; }
    .content-section { padding: 20px 18px 18px; }
    .content-section .section-title { font-size: 18px; }
    .experiment-box,
    .case-study { padding: 18px 16px; }
    .quote { padding: 22px 18px 20px 36px; }
}
