/* ============================================================
   SAÚDE 360° — A Fórmula da Corrida
   CSS Compartilhado — Versão 10
   Dr. Rafael Vinicius Otsuzi | CRM-SP: 130190 | RQE 76748
   ============================================================ */

/* === FONTES === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Merriweather:ital,wght@0,400;0,700;0,900;1,400&display=swap');

/* === VARIÁVEIS === */
:root {
    --gibraltar-sea: #133951;
    --bright-white: #F4F9FF;
    --dusky-citron: #E3CC81;
    --verde-saude: #10B981;
    --chumbo: #5C6A72;
    --cinza-claro: #AAAAAA;
    --danger-red: #dc3545;
    --danger-bg: #fff5f5;
    --success-green: #10B981;
    --info-blue: #133951;
    --info-bg: #e8f0f8;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bright-white);
    color: #333;
    line-height: 1.7;
    font-size: 16px;
}

/* === HEADER / HERO === */
.chapter-header {
    background: linear-gradient(135deg, var(--gibraltar-sea) 0%, #1a5276 100%);
    color: white;
    padding: 3rem 1.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.chapter-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--dusky-citron), var(--verde-saude), var(--dusky-citron));
}
.chapter-header .badge {
    display: inline-block;
    background: var(--dusky-citron);
    color: var(--gibraltar-sea);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}
.chapter-header h1 {
    font-family: 'Merriweather', serif;
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}
.chapter-header .subtitle {
    font-size: 1.1rem;
    color: var(--dusky-citron);
    font-style: italic;
    opacity: 0.95;
}
.chapter-header .cadence {
    display: inline-block;
    margin-top: 0.8rem;
    background: rgba(255,255,255,0.15);
    padding: 0.3rem 1rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* === HERO IMAGE === */
.hero-image-wrapper {
    width: 100%;
    padding-top: 65%;
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid var(--dusky-citron);
}
.hero-image-wrapper img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

/* === ALERT BOXES === */
.alert-box {
    padding: 1.2rem 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid;
    font-size: 0.95rem;
}
.alert-box.danger {
    background: var(--danger-bg);
    border-left-color: var(--danger-red);
}
.alert-box.info {
    background: var(--info-bg);
    border-left-color: var(--info-blue);
}
.alert-box.success {
    background: #f0fdf4;
    border-left-color: var(--verde-saude);
}
.alert-box .alert-title {
    font-weight: 700;
    margin-bottom: 0.3rem;
}

/* === DISCLAIMER MEDICAL === */
.disclaimer-top {
    background: #fff8e1;
    border: 1px solid var(--dusky-citron);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin: 1.5rem auto;
    max-width: 700px;
    font-size: 0.85rem;
    color: #665500;
}
.disclaimer-top strong { color: #886600; }

/* === MAIN CONTENT === */
.chapter-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}
.chapter-content h2 {
    font-family: 'Merriweather', serif;
    font-size: 1.6rem;
    color: var(--gibraltar-sea);
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--dusky-citron);
}
.chapter-content h3 {
    font-family: 'Merriweather', serif;
    font-size: 1.2rem;
    color: var(--gibraltar-sea);
    margin: 2rem 0 0.8rem;
}
.chapter-content p {
    margin-bottom: 1.2rem;
    font-size: 1rem;
    color: #333;
}
.chapter-content strong { color: var(--gibraltar-sea); }
.chapter-content em { font-style: italic; }

/* === ZONE CARDS === */
.zone-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 2px 12px rgba(19,57,81,0.08);
    border-top: 4px solid var(--gibraltar-sea);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.zone-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(19,57,81,0.12);
}
.zone-card .zone-title {
    font-family: 'Merriweather', serif;
    font-size: 1.3rem;
    color: var(--gibraltar-sea);
    margin-bottom: 0.8rem;
}
.zone-card .zone-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.8rem;
    margin: 1rem 0;
}
.zone-card .stat {
    background: var(--bright-white);
    padding: 0.8rem;
    border-radius: 8px;
    text-align: center;
}
.zone-card .stat .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--chumbo);
    margin-bottom: 0.3rem;
}
.zone-card .stat .value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gibraltar-sea);
}

/* === QUOTE BOX === */
.quote-box {
    background: white;
    border-left: 4px solid var(--dusky-citron);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.quote-box .quote-text {
    font-family: 'Merriweather', serif;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--gibraltar-sea);
    margin-bottom: 0.5rem;
}
.quote-box .quote-author {
    font-size: 0.85rem;
    color: var(--chumbo);
}

/* === NAVIGATION === */
.chapter-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    max-width: 720px;
    margin: 2rem auto;
    gap: 1rem;
}
.chapter-nav a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--gibraltar-sea);
    font-weight: 600;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    border: 2px solid var(--gibraltar-sea);
    transition: all 0.3s ease;
    font-size: 0.9rem;
}
.chapter-nav a:hover {
    background: var(--gibraltar-sea);
    color: white;
}
.chapter-nav .nav-all {
    background: var(--dusky-citron);
    border-color: var(--dusky-citron);
    color: var(--gibraltar-sea);
}

/* === SIGNATURE === */
.signature-box {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: 0 2px 12px rgba(19,57,81,0.08);
    border: 1px solid #e0e8f0;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 1.5rem;
    align-items: center;
}
.signature-box .sig-info h4 {
    font-family: 'Merriweather', serif;
    color: var(--gibraltar-sea);
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
}
.signature-box .sig-credentials {
    font-size: 0.85rem;
    color: var(--chumbo);
    line-height: 1.5;
}
.signature-box .sig-credentials strong {
    color: var(--gibraltar-sea);
}

/* === CTA === */
.cta-section {
    background: linear-gradient(135deg, var(--gibraltar-sea), #1a5276);
    color: white;
    padding: 2.5rem 1.5rem;
    text-align: center;
    border-radius: 12px;
    margin: 2rem 0;
}
.cta-section h3 {
    font-family: 'Merriweather', serif;
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: var(--dusky-citron);
}
.cta-section p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}
.cta-section .cta-btn {
    display: inline-block;
    background: var(--dusky-citron);
    color: var(--gibraltar-sea);
    padding: 0.8rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.cta-section .cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(227,204,129,0.4);
}

/* === FOOTER DISCLAIMER === */
.footer-disclaimer {
    background: var(--gibraltar-sea);
    color: white;
    padding: 2rem 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    line-height: 1.6;
}
.footer-disclaimer strong { color: var(--dusky-citron); }
.footer-disclaimer a { color: var(--dusky-citron); text-decoration: none; }
.footer-disclaimer a:hover { text-decoration: underline; }

/* === NUMBERED STEPS === */
.step-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: 0 2px 12px rgba(19,57,81,0.08);
    position: relative;
    padding-left: 4rem;
}
.step-card .step-number {
    position: absolute;
    left: 1rem;
    top: 1.5rem;
    width: 36px;
    height: 36px;
    background: var(--gibraltar-sea);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}
.step-card .step-title {
    font-family: 'Merriweather', serif;
    font-size: 1.1rem;
    color: var(--gibraltar-sea);
    margin-bottom: 0.5rem;
}

/* === WEEKLY PLAN TABLE === */
.weekly-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(19,57,81,0.08);
}
.weekly-table thead th {
    background: var(--gibraltar-sea);
    color: white;
    padding: 0.8rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.weekly-table tbody td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #e8f0f8;
}
.weekly-table tbody tr:nth-child(even) {
    background: var(--bright-white);
}
.weekly-table tbody tr:last-child td {
    border-bottom: none;
}
.weekly-table .zone-label {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}
.zone-e { background: #e8f0f8; color: var(--gibraltar-sea); }
.zone-m { background: #f0fdf4; color: var(--verde-saude); }
.zone-l { background: #fff8e1; color: #886600; }
.zone-i { background: #fff5f5; color: var(--danger-red); }
.zone-r { background: #f5f0ff; color: #6b21a8; }

/* === LISTS === */
.chapter-content ul, .chapter-content ol {
    margin: 1rem 0 1.5rem 1.5rem;
}
.chapter-content li {
    margin-bottom: 0.5rem;
    color: #333;
}
.chapter-content li strong { color: var(--gibraltar-sea); }

/* === IMAGE IN BODY === */
.body-image-wrapper {
    width: 100%;
    padding-top: 55%;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 4px 15px rgba(19,57,81,0.1);
}
.body-image-wrapper img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.image-caption {
    text-align: center;
    font-size: 0.8rem;
    color: var(--chumbo);
    font-style: italic;
    margin-top: 0.5rem;
}

/* === ADAPTATION NOTE === */
.adaptation-note {
    background: #f8f4e8;
    border: 1px solid var(--dusky-citron);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    font-size: 0.85rem;
    color: #665500;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .chapter-header h1 { font-size: 1.5rem; }
    .chapter-header .subtitle { font-size: 0.95rem; }
    .chapter-content { padding: 1.5rem 1rem; }
    .chapter-content h2 { font-size: 1.3rem; }
    .signature-box { grid-template-columns: 1fr; }
    .chapter-nav { flex-direction: column; }
    .chapter-nav a { width: 100%; justify-content: center; }
    .zone-card .zone-stats { grid-template-columns: 1fr 1fr; }
    .weekly-table { font-size: 0.8rem; }
}
