:root {
    /* Brand Colors (Official Palette) */
    --clr-primary: #3EBD83;    /* Merece Saúde Green */
    --clr-primary-light: #EBF8F2;
    --clr-primary-dark: #329668;
    --clr-accent: #25D366;     /* WhatsApp Green */
    
    /* Neutral Variables */
    --clr-bg: #F8F9FA;
    --clr-surface: #FFFFFF;
    --clr-text-main: #18727d;  /* Dark Teal from official palette */
    --clr-text-muted: #288C9C; /* Lighter Teal from official palette */
    --clr-border: #E5E7EB;

    /* Typographic/Spacing Settings */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Questrial', sans-serif;
    background-color: var(--clr-bg);
    color: var(--clr-text-main);
    line-height: 1.5;
    padding-bottom: 80px; /* Space for the smart banner */
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

/* Typography Constraints */
h1, h2, h3, h4 { 
    font-family: 'Manrope', sans-serif;
    font-weight: 600; 
}
p { font-size: 1rem; color: var(--clr-text-muted); }

/* --- HEADER & GREETING --- */
.top-nav {
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--clr-surface);
    display: flex;
    justify-content: center;
    border-bottom: 1px solid var(--clr-border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.logo-text {
    font-size: 1.25rem;
    color: var(--clr-text-main);
    display: flex;
    align-items: center;
}

.logo-text span {
    color: var(--clr-primary);
}

.heartbeat-logo {
    vertical-align: middle;
    margin-right: 6px;
    animation: heartbeat 1.5s ease-in-out infinite;
    transform-origin: center;
}

@keyframes heartbeat {
    0% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.15);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.15);
    }
    70% {
        transform: scale(1);
    }
}

main.content {
    max-width: 600px; /* Limits width on desktop */
    margin: 0 auto;
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.greeting-section {
    text-align: left;
}

.greeting-section h2 {
    font-size: 1.5rem;
    line-height: 1.3;
    color: var(--clr-text-main);
}

.greeting-section .subtitle {
    margin-top: var(--spacing-xs);
    font-size: 0.95rem;
}

/* --- ACTION CARDS (GRID) SOFISTICAÇÃO --- */
.actions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

@media (min-width: 480px) {
    .actions-grid { grid-template-columns: 1fr 1fr; }
}

.action-card {
    display: flex;
    align-items: center;
    padding: var(--spacing-lg);
    background: var(--clr-surface);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04), 0 2px 5px rgba(0, 0, 0, 0.02);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    min-height: 100px;
    position: relative;
    overflow: hidden;
    text-align: left;
}

/* Glassmorphism gradient overlays */
.primary-card {
    background: linear-gradient(135deg, rgba(62, 189, 131, 0.08) 0%, var(--clr-surface) 60%);
    border: 1px solid rgba(62, 189, 131, 0.2);
}

.secondary-card {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.08) 0%, var(--clr-surface) 60%);
    border: 1px solid rgba(37, 211, 102, 0.2);
}

.action-card:active {
    transform: scale(0.95);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.card-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: var(--spacing-md);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.action-card:hover .card-icon, 
.action-card:active .card-icon {
    transform: scale(1.1);
}

.primary-card .card-icon {
    background: linear-gradient(135deg, rgba(62, 189, 131, 0.15), rgba(40, 140, 156, 0.05));
    color: var(--clr-primary);
    box-shadow: inset 0 0 0 1px rgba(62, 189, 131, 0.2), 0 4px 10px rgba(62, 189, 131, 0.1);
}

.secondary-card .card-icon {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.15), rgba(37, 211, 102, 0.05));
    color: var(--clr-accent);
    box-shadow: inset 0 0 0 1px rgba(37, 211, 102, 0.2), 0 4px 10px rgba(37, 211, 102, 0.15);
}

.action-card h3 {
    font-size: 1.05rem;
    color: var(--clr-text-main);
    line-height: 1.3;
    font-weight: 700;
}


/* --- EDUCATION HUB (CSS SNAP CAROUSEL) --- */
.education-hub .section-header {
    margin-bottom: var(--spacing-md);
}

.education-hub h2 {
    font-size: 1.25rem;
}

.carousel-container {
    margin: 0 calc(var(--spacing-lg) * -1); /* Full bleed mobile */
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -ms-overflow-style: none; /* Hide scrollbar */
    scrollbar-width: none;
}

.carousel-container::-webkit-scrollbar { display: none; }

.carousel-track {
    display: flex;
    padding: 0 var(--spacing-lg) var(--spacing-md) var(--spacing-lg);
    gap: var(--spacing-md);
}

.video-card {
    min-width: 260px;
    max-width: 80%;
    scroll-snap-align: start;
    flex-shrink: 0;
}

.video-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: var(--clr-border);
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
}

.coming-soon-badge {
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.video-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--clr-text-main);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Q&A ACCORDION --- */
.qa-section h2 { font-size: 1.25rem; margin-bottom: var(--spacing-md); }

.accordion-item {
    border-bottom: 1px solid var(--clr-border);
}

.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) 0;
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
    color: var(--clr-text-main);
    transition: color 0.2s;
}

.accordion-header[aria-expanded="true"] {
    color: var(--clr-primary);
}

.accordion-icon {
    font-size: 1.2rem;
    color: var(--clr-primary);
    transition: transform 0.2s;
}

.accordion-header[aria-expanded="true"] .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-content p {
    padding-bottom: var(--spacing-md);
}

/* --- BOTTOM SHEET (AGENDAMENTO) --- */
.bottom-sheet-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.bottom-sheet-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.bottom-sheet {
    position: fixed;
    bottom: -100%;
    left: 0; right: 0;
    background: var(--clr-surface);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: var(--spacing-lg);
    z-index: 100;
    transition: bottom 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.1);
}

.bottom-sheet.active {
    bottom: 0;
}

.sheet-handle {
    width: 40px;
    height: 4px;
    background-color: var(--clr-border);
    border-radius: 2px;
    margin: 0 auto var(--spacing-md) auto;
}

.sheet-title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.sheet-info-block {
    display: flex;
    align-items: flex-start;
    padding: var(--spacing-md);
    background-color: var(--clr-bg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
}

.sheet-info-block.med-block { border-left: 4px solid #F59E0B; }
.sheet-info-block.nut-block { border-left: 4px solid var(--clr-primary); }

.info-icon {
    font-size: 1.5rem;
    margin-right: var(--spacing-sm);
}

.info-text h4 { font-size: 0.95rem; margin-bottom: 2px; }
.info-text p { font-size: 0.85rem; }

.btn-whatsapp-continue {
    display: block;
    width: 100%;
    padding: var(--spacing-md);
    background-color: var(--clr-accent);
    color: white;
    text-align: center;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    margin-top: var(--spacing-lg);
    transition: opacity 0.2s;
}

.btn-whatsapp-continue:active { opacity: 0.8; }

/* --- SMART BANNER --- */
.smart-banner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--clr-surface);
    padding: var(--spacing-md) var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
    z-index: 50;
    transition: transform 0.3s ease;
    border-top: 1px solid var(--clr-border);
}

.smart-banner.hidden {
    transform: translateY(100%);
}

.banner-content {
    display: flex;
    align-items: center;
}

.app-icon-mini {
    width: 40px; height: 40px;
    background-color: var(--clr-primary);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin-right: var(--spacing-sm);
}

.banner-text p { color: var(--clr-text-main); font-size: 0.9rem; margin-bottom: 2px;}
.banner-text span { font-size: 0.75rem; }

.btn-install {
    background: var(--clr-primary);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* FOOTER */
.main-footer {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-lg) calc(var(--spacing-xl) + 80px) var(--spacing-lg); /* Account for bottom banner space */
    color: var(--clr-text-muted);
}
.footer-logo { font-weight: bold; color: var(--clr-primary); margin-bottom: var(--spacing-xs); }
.footer-links { font-size: 0.85rem; margin-bottom: var(--spacing-sm); }
.footer-copy { font-size: 0.75rem; }
