/* ========================================
   YourHealth - CSS Stylesheet
   Forest Green & Gold Color Scheme
   ======================================== */

/* Color Variables */
:root {
    --primary-green: #1B4332;
    --primary-green-light: #2D6A4F;
    --primary-green-lighter: #40916C;
    --accent-gold: #D4AF37;
    --accent-gold-light: #E6C559;
    --text-dark: #1B1B1B;
    --text-light: #666666;
    --bg-light: #F8F9F7;
    --border-color: #E0E0E0;
    --white: #FFFFFF;
    --shadow: 0 2px 8px rgba(27, 67, 50, 0.1);
    --shadow-lg: 0 10px 30px rgba(27, 67, 50, 0.15);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Navigation Bar
   ======================================== */
.navbar {
    position: sticky;
    top: 0;
    background-color: var(--primary-green);
    color: var(--white);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    padding: 1rem 0;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
}

.navbar-logo svg {
    transition: transform 0.3s ease;
}

.navbar-logo:hover svg {
    transform: scale(1.05);
}

.navbar-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--accent-gold);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-light) 100%);
    color: var(--white);
    padding: 80px 20px;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    opacity: 0.95;
}

.hero-date {
    font-size: 1rem;
    margin-top: 1rem;
    color: var(--accent-gold);
    font-weight: 600;
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
}

/* ========================================
   Search Section
   ======================================== */
.search-section {
    padding: 2rem 0;
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.search-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-bar {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid var(--primary-green);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-bar:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-green);
    pointer-events: none;
}

.search-results {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
    min-height: 20px;
}

/* ========================================
   Alphabet Filter
   ======================================== */
.alphabet-filter {
    padding: 2rem 0;
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.filter-btn {
    padding: 8px 14px;
    border: 2px solid var(--primary-green);
    background-color: var(--white);
    color: var(--primary-green);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background-color: var(--primary-green-lighter);
    color: var(--white);
    border-color: var(--primary-green-lighter);
}

.filter-btn.active {
    background-color: var(--primary-green);
    color: var(--white);
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.1);
}

/* ========================================
   Category Tabs
   ======================================== */
.category-tabs {
    padding: 1.5rem 0;
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.tabs-wrapper {
    display: flex;
    flex-wrap: wrap;             /* tabs wrap to next line instead of overflowing */
    gap: 0.6rem;
    justify-content: center;
    padding: 0 20px;             /* breathing room on narrow screens */
}

.category-tab {
    padding: 9px 18px;
    border: none;
    background-color: var(--white);
    color: var(--primary-green);
    border-radius: 24px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-green);
    white-space: nowrap;         /* keep tab label on one line */
    flex-shrink: 0;              /* never compress tab text */
}

.category-tab:hover {
    background-color: var(--primary-green-lighter);
    color: var(--white);
    border-color: var(--primary-green-lighter);
}

.category-tab.active {
    background-color: var(--primary-green);
    color: var(--white);
    border-color: var(--primary-green);
    box-shadow: 0 4px 12px rgba(27, 67, 50, 0.2);
}

/* ========================================
   Conditions Section & Grid
   ======================================== */
.conditions-section {
    padding: 3rem 0;
    background-color: var(--white);
}

.conditions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.condition-letter-group {
    margin-bottom: 2rem;
}

.letter-header {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-green);
    border-left: 4px solid var(--accent-gold);
    padding-left: 12px;
    margin-bottom: 1rem;
    grid-column: 1 / -1;
    margin-top: 1rem;
}

.letter-header:first-child {
    margin-top: 0;
}

.condition-card {
    background-color: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: visible;           /* was: hidden — was clipping Learn More button */
    display: flex;
    flex-direction: column;
}

.condition-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -2px;                  /* align with card border */
    width: 4px;
    height: 100%;
    background-color: var(--accent-gold);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.3s ease;
    border-radius: 8px 0 0 8px;  /* match card border-radius */
}

.condition-card:hover::before {
    transform: scaleY(1);
}

.condition-card:hover {
    border-color: var(--primary-green);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.condition-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 0.5rem;
}

.condition-category {
    display: inline-block;
    font-size: 0.75rem;
    background-color: var(--primary-green-lighter);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.condition-description {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;                /* pushes Learn More button to the card bottom */
}

.condition-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--white);
    background-color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 6px;
    align-self: flex-start;      /* don't stretch full width */
    margin-top: auto;            /* always pushed to bottom of card */
    border: 2px solid var(--primary-green);
}

.condition-link:hover {
    background-color: var(--accent-gold);
    color: var(--primary-green);
    border-color: var(--accent-gold);
    transform: translateX(3px);
}

.condition-card.hidden {
    display: none;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background-color: var(--primary-green);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 3rem;
    border-top: 4px solid var(--accent-gold);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--accent-gold);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section p {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.brevo-placeholder {
    background-color: rgba(212, 175, 55, 0.1);
    border: 2px dashed var(--accent-gold);
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
    text-align: center;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1.5rem;
    opacity: 0.85;
    font-size: 0.9rem;
}

/* ========================================
   Hero CTA Button
   ======================================== */
.hero-cta {
    display: inline-block;
    margin-top: 2rem;
    padding: 14px 32px;
    background-color: var(--accent-gold);
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.35);
}

.hero-cta:hover {
    background-color: var(--accent-gold-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(212, 175, 55, 0.45);
}

.hero-badge {
    display: inline-block;
    background-color: rgba(212, 175, 55, 0.2);
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
}

/* ========================================
   Mobile Hamburger Menu
   ======================================== */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--white);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ========================================
   No Results State
   ======================================== */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-light);
}

.no-results svg {
    margin-bottom: 1rem;
    opacity: 0.4;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .navbar-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-green);
        flex-direction: column;
        padding: 1rem 20px;
        gap: 0.5rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }

    .navbar-links.open {
        display: flex;
    }

    .navbar {
        position: relative;
    }

    .conditions-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .tabs-wrapper {
        gap: 0.5rem;
    }

    .category-tab {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .navbar-logo {
        font-size: 1.2rem;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .filter-row {
        gap: 0.25rem;
    }

    .filter-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}