* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    color: #212121;
    background-color: #f9f9f9;
    scroll-behavior: smooth;
    transition: background-color 0.3s, color 0.3s;
}

/* Шапка сайту */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s;
}

.logo {
    font-weight: 700;
    font-size: 20px;
    color: #2e7d32;
}

.menu a {
    text-decoration: none;
    color: #333;
    margin-left: 15px;
    font-size: 15px;
    font-weight: bold;
    transition: color 0.3s;
}

.menu a:hover {
    color: #2e7d32;
}

/* Кнопка зміни теми */
.theme-btn {
    background: #2e7d32;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.3s;
}

.theme-btn:hover {
    background: #1b5e20;
}

/* Hero-секція */
.hero {
    height: 450px;
    background: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.55)), url('https://images.unsplash.com/photo-1540420773420-3366772f4999?auto=format&fit=crop&w=1200&q=80') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 42px;
    margin-bottom: 15px;
    font-weight: 700;
}

.hero-content p {
    font-size: 18px;
    max-width: 750px;
    margin: 0 auto 25px auto;
    line-height: 1.5;
}

.btn {
    display: inline-block;
    background: #f57c00;
    color: #fff;
    padding: 14px 28px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: background 0.3s;
}

.btn:hover {
    background: #e65100;
}

/* Секції */
.section {
    padding: 60px 20px;
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    color: #2e7d32;
    font-size: 30px;
    margin-bottom: 15px;
}

.section-desc {
    color: #555;
    margin-bottom: 40px;
    font-size: 16px;
    line-height: 1.6;
}

/* Картки */
.cards-grid {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.info-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 25px;
    flex: 1;
    min-width: 280px;
    max-width: 350px;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: background-color 0.3s, color 0.3s;
}

.info-card h3 {
    color: #2e7d32;
    font-size: 20px;
    margin-bottom: 12px;
}

.info-card p {
    font-size: 15px;
    line-height: 1.5;
}

.energy-section {
    background-color: #f0f7f2;
    max-width: 100%;
    padding: 60px 20px;
    transition: background-color 0.3s;
}

/* Тарілка здоров'я з 3 кольорами */
.plate-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 50px;
    margin-top: 30px;
}

.plate-circle {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    position: relative;
    background: conic-gradient(
        #4caf50 0deg 180deg,    /* 50% зелений */
        #ffb74d 180deg 270deg,  /* 25% помаранчевий */
        #e57373 270deg 360deg   /* 25% червоний */
    );
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 8px solid #fff;
}

.plate-label {
    position: absolute;
    color: #fff;
    font-weight: bold;
    font-size: 13px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
    text-align: center;
}

.label-veg { top: 40%; left: 15%; }
.label-grain { top: 22%; right: 12%; }
.label-protein { bottom: 22%; right: 15%; }

.plate-list {
    text-align: left;
    max-width: 500px;
    line-height: 1.8;
}

.plate-list li {
    margin-bottom: 10px;
    font-size: 15px;
}

/* Калькулятор ІМТ */
.bmi-section {
    background-color: #f0f7f2;
    max-width: 100%;
    padding: 60px 20px;
    transition: background-color 0.3s;
}

.bmi-card {
    background: #fff;
    max-width: 500px;
    margin: 0 auto;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: left;
    transition: background-color 0.3s;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 15px;
}

.btn-bmi {
    width: 100%;
    border: none;
    cursor: pointer;
}

.bmi-result {
    margin-top: 20px;
    font-weight: bold;
    text-align: center;
    font-size: 18px;
    color: #2e7d32;
}

/* Слайдер галереї */
.gallery-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    width: 280px;
    margin: 0 auto;
    cursor: pointer;
    transition: transform 0.3s;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.gallery-item p {
    padding: 15px;
    font-weight: bold;
    font-size: 15px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-slider {
    background: #fff;
    padding: 30px 50px;
    border-radius: 16px;
    max-width: 700px;
    width: 90%;
    position: relative;
    text-align: center;
    transition: background-color 0.3s;
}

.modal-slider img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    transition: opacity 0.3s ease-in-out;
}

.modal-caption {
    margin-top: 15px;
    font-weight: bold;
    font-size: 16px;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(46, 125, 50, 0.85);
    color: white;
    border: none;
    font-size: 24px;
    padding: 10px 16px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.nav-btn:hover {
    background: #2e7d32;
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }

.close-btn {
    position: absolute;
    top: -12px;
    right: -12px;
    background: #f44336;
    color: white;
    font-size: 18px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Підвал */
.footer {
    background: #1b381e;
    color: #fff;
    text-align: center;
    padding: 30px;
    margin-top: 40px;
    font-size: 14px;
}

/* ========================================= */
/* ТЕМНА ТЕМА (DARK MODE)                    */
/* ========================================= */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-mode .header {
    background-color: #1e1e1e;
    box-shadow: 0 2px 5px rgba(255,255,255,0.05);
}

body.dark-mode .menu a {
    color: #e0e0e0;
}

body.dark-mode .energy-section,
body.dark-mode .bmi-section {
    background-color: #1a241b;
}

body.dark-mode .info-card,
body.dark-mode .bmi-card,
body.dark-mode .gallery-item,
body.dark-mode .modal-slider {
    background-color: #242424;
    color: #e0e0e0;
}

body.dark-mode .section-desc {
    color: #bbb;
}

body.dark-mode .input-group label {
    color: #e0e0e0;
}

body.dark-mode .input-group input {
    background-color: #333;
    color: #fff;
    border-color: #555;
}

/* Адаптація під мобільні */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .menu a {
        margin-left: 0;
        font-size: 14px;
    }

    .hero-content h1 {
        font-size: 28px;
    }
}/* Правильний розподіл 3 кольорів у колі */
.plate-circle {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    position: relative;
    background: conic-gradient(
        #4caf50 0deg 180deg,    /* Зелений: права половина (Овочі та фрукти - 50%) */
        #ffb74d 180deg 270deg,  /* Помаранчевий: верхня ліва чверть (Цільнозернові - 25%) */
        #e57373 270deg 360deg   /* Червоний: нижня ліва чверть (Корисні білки - 25%) */
    );
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 8px solid #fff;
}.label-veg { top: 40%; left: 53%; }       /* Овочі (на зеленій лівій половині) */
.label-grain { top: 20%; right: 53%; }    /* Цільнозернові (зверху справа) */
.label-protein { bottom: 20%; right: 53%; } /* Білки (знизу справа) */