:root {
    --primary: #087f5b;
    --primary-dark: #055d43;
    --primary-grad: linear-gradient(135deg, #087f5b, #0ca678);
    --green: #25a56a;
    --light-green: #eaf8f1;
    --orange: #f08c46;
    --blue: #1971c2;
    --red: #d94841;
    --dark: #182b27;
    --muted: #687872;
    --light: #f5f8f7;
    --surface: #ffffff;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--light);
    color: var(--dark);
    font-family: "Noto Sans Tamil", "Nirmala UI", Arial, sans-serif;
    line-height: 1.7;
}

/* ===== TOP NAVBAR ===== */
.site-nav {
    background: var(--primary-grad);
    box-shadow: 0 3px 14px rgba(0, 0, 0, .16);
    padding-top: 13px;
    padding-bottom: 13px;
}

.site-nav .navbar-brand {
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: .3px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 9px;
}

.site-nav .navbar-brand i {
    font-size: 1.5rem;
    color: #b9f0d8;
}

.site-nav .navbar-toggler {
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 10px;
}

.site-nav .navbar-toggler:focus {
    box-shadow: none;
}

.site-nav .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.site-nav .nav-link {
    color: #e6f5ee;
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: background .2s ease, color .2s ease;
}

.site-nav .nav-link i {
    font-size: 1.05rem;
}

.site-nav .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, .14);
}

.site-nav .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, .22);
    font-weight: 800;
}

/* ===== NAV DROPDOWNS ===== */
.site-nav .dropdown-menu {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, .18);
    padding: 8px;
    margin-top: 12px;
    min-width: 230px;
}

.site-nav .dropdown-item {
    border-radius: 11px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--dark);
}

.site-nav .dropdown-item i {
    color: var(--primary);
    font-size: 1.05rem;
}

.site-nav .dropdown-item:hover,
.site-nav .dropdown-item:active {
    background: var(--light-green);
    color: var(--primary-dark);
}

.site-nav .dropdown-item.active {
    background: var(--light-green);
    color: var(--primary-dark);
    font-weight: 800;
}

@media (max-width: 991px) {
    .site-nav .dropdown-menu {
        box-shadow: none;
        background: rgba(255, 255, 255, .06);
        margin: 4px 0 8px;
        border-left: 3px solid rgba(255, 255, 255, .25);
    }

    .site-nav .dropdown-item {
        color: #e6f5ee;
    }

    .site-nav .dropdown-item i {
        color: #b9f0d8;
    }

    .site-nav .dropdown-item:hover,
    .site-nav .dropdown-item.active {
        background: rgba(255, 255, 255, .14);
        color: #fff;
    }
}

/* ===== FOOTER ===== */
.site-footer {
    background: #10241f;
    color: #cbd8d4;
    padding: 48px 0 0;
    font-size: 15px;
}

.site-footer h6 {
    color: #fff;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: .3px;
}

.site-footer .footer-link {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer .footer-link li {
    margin-bottom: 10px;
}

.site-footer .footer-link a {
    color: #9fd4bd;
    text-decoration: none;
    transition: color .2s ease;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.site-footer .footer-link a:hover {
    color: #fff;
}

.site-footer .footer-about {
    color: #a9bdb6;
    line-height: 1.9;
}

.site-footer .footer-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #9fd4bd;
    margin-right: 10px;
    border: 1px solid rgba(255, 255, 255, .12);
}

.site-footer .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding: 18px 0;
    margin-top: 38px;
    font-size: 13px;
    color: #8fa39b;
}

/* ===== TOP BUTTON ===== */
#topBtn {
    display: none;
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 19px;
    z-index: 999;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .24);
    transition: transform .2s ease;
}

#topBtn:hover {
    transform: translateY(-3px);
}

/* ===== LINK CARDS (home) ===== */
.link-card {
    display: block;
    height: 100%;
    background: var(--surface);
    border-radius: 20px;
    padding: 26px 24px;
    border: 1px solid #e4eee9;
    box-shadow: 0 8px 26px rgba(0, 0, 0, .06);
    color: var(--dark);
    text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease;
    position: relative;
    overflow: hidden;
}

.link-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 38px rgba(0, 0, 0, .12);
    color: var(--dark);
}

.link-card .icon-box {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: var(--light-green);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 27px;
    margin-bottom: 16px;
}

.link-card h4 {
    font-weight: 800;
    margin-bottom: 8px;
}

.link-card p {
    color: var(--muted);
    margin-bottom: 16px;
}

.link-card .go {
    font-weight: 700;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.link-card .go i {
    transition: transform .2s ease;
    font-size: 1rem;
}

.link-card:hover .go {
    color: var(--primary-dark);
}

.link-card:hover .go i {
    transform: translateX(4px);
}

@media (max-width: 575px) {
    .site-nav .navbar-brand {
        font-size: 1.1rem;
    }
}

/* ===== FOOD PAGE FILTER ===== */
.food-filter {
    position: relative;
    max-width: 460px;
    margin: 0 auto 30px;
}

.food-filter .form-control {
    padding: 12px 16px 12px 46px;
    border-radius: 50px;
    border: 1px solid #d7e3de;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .05);
}

.food-filter .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 .2rem rgba(8, 127, 91, .12);
}

.food-filter .bi-search {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

/* ===== FAQ ACCORDION ===== */
.accordion .accordion-item {
    border: 1px solid #e4eee9;
    border-radius: 16px !important;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .04);
}

.accordion .accordion-button {
    font-weight: 800;
    color: var(--primary-dark);
    background: #fff;
    padding: 16px 20px;
}

.accordion .accordion-button:not(.collapsed) {
    background: var(--light-green);
    color: var(--primary-dark);
    box-shadow: none;
}

.accordion .accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
}

.accordion .accordion-button::after {
    filter: hue-rotate(120deg);
}

.accordion .accordion-body {
    color: #4d5e59;
    line-height: 1.8;
}

/* ===== PRINT ===== */
@page {
    margin: 1.2cm;
}

@media print {
    .site-nav,
    .site-footer,
    #topBtn,
    .no-print {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    .section,
    .bg-white {
        padding: 14px 0;
        background: #fff !important;
    }

    .hero {
        border-radius: 0;
    }

    .diet-card,
    .food-card,
    .fruit-card,
    .link-card,
    .calc-card,
    .benefit-card,
    .portion-box,
    .how-box,
    .use-box,
    .port-box,
    .avoid-box,
    .tip-box,
    .caution-box,
    .sugar-box,
    .good-box,
    .high-box,
    .iron-box,
    .plate-box,
    .fruit-box {
        box-shadow: none !important;
        border: 1px solid #ccc;
        border-radius: 12px;
        break-inside: avoid;
    }

    a {
        color: #000 !important;
        text-decoration: none !important;
    }

    .day-header {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
    color: #fff;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 12px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    padding: 0;
    transition: background .2s ease;
}

.theme-toggle:hover {
    background: rgba(255,255,255,.16);
    color: #fff;
}

@media (max-width: 991px) {
    .theme-toggle {
        margin-top: 12px;
        margin-left: 0 !important;
    }
}

/* ===== DARK MODE ===== */
html[data-theme="dark"] {
    color-scheme: dark;
    --primary: #34c193;
    --primary-dark: #86e0c2;
    --green: #4cdb9c;
    --light-green: #11302a;
    --blue: #74b0e8;
    --red: #f07b70;
    --dark: #e5f1ec;
    --muted: #9fb7ae;
    --light: #0f1714;
    --surface: #16211c;
}

html[data-theme="dark"] body {
    background: var(--light);
    color: var(--dark);
}

html[data-theme="dark"] .bg-white {
    background: #142019 !important;
}

html[data-theme="dark"] .section {
    background: transparent;
}

html[data-theme="dark"] .link-card,
html[data-theme="dark"] .feature-card,
html[data-theme="dark"] .why-box,
html[data-theme="dark"] .diet-card,
html[data-theme="dark"] .day-card,
html[data-theme="dark"] .info-card,
html[data-theme="dark"] .benefit-card,
html[data-theme="dark"] .fruit-card,
html[data-theme="dark"] .food-card,
html[data-theme="dark"] .recipe-card,
html[data-theme="dark"] .quote-card,
html[data-theme="dark"] .use-box,
html[data-theme="dark"] .how-box,
html[data-theme="dark"] .result-bmi-card,
html[data-theme="dark"] .result-card,
html[data-theme="dark"] .calc-card,
html[data-theme="dark"] .tracker-card,
html[data-theme="dark"] .habits-card,
html[data-theme="dark"] .fruit-box,
html[data-theme="dark"] .glass-box,
html[data-theme="dark"] .step-card {
    background: var(--surface);
    color: var(--dark);
    border-color: rgba(255,255,255,.08);
}

html[data-theme="dark"] .link-card p,
html[data-theme="dark"] .feature-card p,
html[data-theme="dark"] .benefit-card p,
html[data-theme="dark"] .info-card p,
html[data-theme="dark"] .meal-text,
html[data-theme="dark"] .how-box p,
html[data-theme="dark"] .quote-card .gloss,
html[data-theme="dark"] .meal p {
    color: var(--muted);
}

html[data-theme="dark"] .meal-title,
html[data-theme="dark"] .fruit-card p,
html[data-theme="dark"] .food-card p,
html[data-theme="dark"] .quote-card .quote,
html[data-theme="dark"] .recipe-card p {
    color: var(--dark);
}

html[data-theme="dark"] .meal,
html[data-theme="dark"] .day-card {
    border-color: rgba(255,255,255,.07);
}

html[data-theme="dark"] .accordion .accordion-button {
    background: var(--surface);
    color: var(--dark);
}

html[data-theme="dark"] .accordion .accordion-body {
    color: var(--muted);
}

html[data-theme="dark"] .accordion .accordion-item {
    border-color: rgba(255,255,255,.08);
}

html[data-theme="dark"] table.range-table {
    background: var(--surface);
}

html[data-theme="dark"] table.range-table td {
    border-bottom-color: rgba(255,255,255,.07);
    color: var(--muted);
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select {
    background-color: var(--surface);
    color: var(--dark);
    border-color: rgba(255,255,255,.15);
}

html[data-theme="dark"] .habit-check {
    background: var(--surface);
    border-color: rgba(255,255,255,.2);
}

/* ===== SHARE BAR ===== */
.share-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-top: 18px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    color: #fff;
    border: 0;
    transition: transform .2s ease, box-shadow .2s ease;
    font-size: 14px;
}

.share-btn:hover {
    transform: translateY(-2px);
    color: #fff;
}

.share-btn-wa {
    background: #25d366;
}

.share-btn-copy {
    background: #54708a;
}

/* ===== TRACKERS ===== */
.tracker-card,
.habits-card {
    background: #fff;
    border-radius: 20px;
    border: 1px solid #e4eee9;
    box-shadow: 0 8px 26px rgba(0,0,0,.06);
    padding: 24px;
    height: 100%;
}

.glass {
    width: 46px;
    height: 60px;
    border: 2px solid #d6e4dd;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #a2b7ac;
    background: transparent;
    transition: all .2s ease;
    margin: 5px;
    user-select: none;
}

.glass.filled {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.glass:hover {
    transform: translateY(-3px);
}

.ring-wrap {
    position: relative;
    width: 170px;
    height: 170px;
    margin: 0 auto 15px;
}

.ring-progress {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: conic-gradient(var(--primary) calc(var(--p) * 1%), #e8f1ec 0);
}

.ring-inner {
    width: 126px;
    height: 126px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,.07);
}

html[data-theme="dark"] .ring-inner {
    background: var(--surface);
}

.ring-inner .num {
    font-size: 30px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
}

.ring-inner .lbl {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
}

.habit-row {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 11px 6px;
    border-bottom: 1px dashed #e2eae6;
}

.habit-row:last-child {
    border-bottom: 0;
}

.habit-check {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    border: 2px solid #c4d6cd;
    flex-shrink: 0;
    background: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 14px;
    transition: all .2s ease;
    user-select: none;
}

.habit-check.done {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.habit-info {
    flex: 1;
}

.habit-info strong {
    display: block;
    color: var(--dark);
}

.habit-info small {
    color: var(--muted);
}

.streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--light-green);
    color: var(--primary-dark);
    border-radius: 50px;
    padding: 7px 16px;
    font-weight: 800;
    font-size: 14px;
}

html[data-theme="dark"] .streak-badge {
    background: rgba(52,193,147,.15);
}

/* ===== RECIPES ===== */
.recipe-card {
    height: 100%;
    background: #fff;
    border-radius: 20px;
    border: 1px solid #e4eee9;
    box-shadow: 0 8px 26px rgba(0,0,0,.06);
    padding: 26px;
    transition: transform .25s ease, box-shadow .25s ease;
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 36px rgba(0,0,0,.12);
}

.recipe-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 4px;
}

.recipe-emoji {
    font-size: 40px;
}

.recipe-meta {
    color: var(--muted);
    font-size: 13px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.recipe-meta i {
    color: var(--primary);
    margin-right: 4px;
}

.recipe-card h4 {
    font-weight: 800;
    margin-bottom: 2px;
}

.recipe-cat {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 30px;
    background: var(--light-green);
    color: var(--primary-dark);
}

/* ===== SEASONAL ===== */
.seasonal-chip {
    display: inline-block;
    font-size: 12.5px;
    font-weight: 700;
    padding: 5px 13px;
    border-radius: 30px;
    margin: 3px 3px 3px 0;
    background: var(--light-green);
    color: var(--primary-dark);
}

html[data-theme="dark"] .seasonal-chip {
    background: rgba(52,193,147,.15);
}

.season-time {
    font-size: 13px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: .3px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

/* ===== TIP OF THE DAY ===== */
.tip-card {
    background: #fff;
    border: 1px solid #e4eee9;
    border-radius: 22px;
    padding: 28px;
    box-shadow: 0 8px 26px rgba(0,0,0,.06);
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
}

.tip-card .q-mark {
    font-size: 34px;
    color: var(--primary);
    opacity: .55;
    line-height: 1;
}

.tip-card .tip-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.8;
    margin: 6px 0 12px;
}

.tip-tag {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 800;
    padding: 5px 13px;
    border-radius: 30px;
    background: var(--light-green);
    color: var(--primary-dark);
}

/* ===== CALC RESULT ===== */
.calc-result {
    display: none;
    margin-top: 16px;
    padding: 18px;
    border-radius: 16px;
    background: var(--light-green);
    color: var(--primary-dark);
    font-weight: 800;
    text-align: center;
    font-size: 17px;
    border: 1px solid #c9efcf;
}

html[data-theme="dark"] .calc-result {
    border-color: rgba(52,193,147,.3);
}