/* Variables for Minimalism */
:root {
    --color-bg: #FFFFFF;
    --color-bg-light: #F9FAF9;
    --color-text-main: #2C2C2C;
    --color-text-muted: #6B6B6B;
    --color-accent: #3A5A4A; /* Soft elegant green */
    --color-accent-hover: #2b4538;
    --font-main: 'Montserrat', sans-serif;
    --spacing-section: 120px;
    --color-rosehip: rgba(255, 192, 203, 0.2);
    --color-buckthorn: rgba(255, 204, 0, 0.15);
    --color-viburnum: rgba(220, 20, 60, 0.1);
    --color-serene-blob: rgba(106, 90, 205, 0.15);
    --color-forest-blob: rgba(34, 139, 34, 0.15);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); /* ДОДАНО: Глобальна змінна анімації */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--color-text-main);
    background-color: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
html, body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
}

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

/* Typography */
h1, h2, h3, h4 {
    font-weight: 300;
    line-height: 1.2;
}

h2.section-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-align: center;
}

p.section-subtitle {
    text-align: center;
    color: var(--color-text-muted);
    margin-bottom: 60px;
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 16px 35px;
    font-size: 0.95rem;
    font-family: var(--font-main);
    cursor: pointer;
    transition: var(--transition); /* ВИПРАВЛЕНО: Використовуємо глобальну змінну */
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    border: none;
    text-decoration: none;
    outline: none;
}

.btn-solid {
    background-color: var(--color-accent);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(58, 90, 74, 0.2);
}

.btn-solid:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(58, 90, 74, 0.3);
}

.btn-accent-light {
    background-color: #ffffff;
    color: var(--color-accent);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-accent-light:hover {
    background-color: #f0f0f0;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

.header .btn-outline {
    background-color: var(--color-accent);
    color: #fff;
    border: none;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 25px 0;
    z-index: 1000;
    background: transparent;
    border-bottom: 1px solid transparent;
    backdrop-filter: blur(0px);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Стан при скролі */
.header.scrolled {
    padding: 15px 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

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

/* --- LOGO LOGIC --- */
.logo {
    position: relative;
    height: 40px;
    width: 150px; /* Налаштуй під ширину свого лого */
}

.logo img {
    height: 40px;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.4s ease;
}

.logo-black {
    opacity: 0;
}

.logo-white {
    opacity: 1;
}

.header.scrolled .logo-white {
    opacity: 0;
}

.header.scrolled .logo-black {
    opacity: 1;
}

/* --- ACTIONS & LINKS --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 30px;
}

.phone-link {
    text-decoration: none;
    font-weight: 500;
    color: #ffffff; /* Білий на старті */
    transition: all 0.3s ease;
}

.header.scrolled .phone-link {
    color: var(--color-text-main); /* Чорний при скролі */
}

/* --- LANGUAGE SWITCHER --- */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1px;
}

.lang-link {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6); /* Напівпрозорий білий */
    transition: all 0.3s ease;
}

.lang-link.active {
    color: #ffffff;
    font-weight: 700;
}

/* Кольори мов при скролі */
.header.scrolled .lang-link {
    color: var(--color-text-muted);
}

.header.scrolled .lang-link.active {
    color: var(--color-accent);
}

.lang-divider {
    color: rgba(255, 255, 255, 0.3);
}

.header.scrolled .lang-divider {
    color: #ddd;
}

/* --- BUTTON IN HEADER --- */
.header .btn-outline {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    font-size: 0.8rem;
}

.header.scrolled .btn-outline {
    background: var(--color-accent);
    color: #fff;
    border: 1px solid var(--color-accent);
}

.phone-link:hover { 
    opacity: 0.7; 
}

/* Mobile Adaptation */
@media (max-width: 600px) {
    .header-container {
        padding: 0 15px;
    }

    .logo img {
        height: 32px; /* Трохи зменшуємо лого на мобілці */
    }

    .header-actions {
        gap: 10px;
    }

    /* Ховаємо номер телефону на мобілці, щоб не було каші (його можна лишити у футері) */
    .phone-link {
        display: none;
    }

    /* Збільшуємо відступи для перемикача мов, щоб по ньому було легше попасти пальцем */
    .lang-switch {
        font-size: 0.8rem;
        order: -1; /* Ставимо перемикач мов ПЕРЕД кнопкою */
    }

    .header .btn-outline {
        padding: 6px 10px; /* Мінімальні відступи */
        font-size: 0.65rem; /* Дуже маленький шрифт */
        letter-spacing: 0.5px; /* Прибираємо розтягнутість тексту */
        white-space: nowrap; /* Забороняємо тексту розриватися на два рядки */
    }
}
/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-image: url('images_web/BG_4325.png');
    background-size: cover;
    background-position: center;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(20, 30, 25, 0.4);
}

.hero-content {
    position: relative;
    z-index: 2; /* ПІДНЯТО: Щоб текст був над ::before затемненням */
    color: #fff;
    max-width: 800px;
    padding: 0 20px;
}

.pre-title {
    display: block;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 0.8rem;
    margin-bottom: 15px;
    font-weight: 500;
    opacity: 0.8;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    font-weight: 300;
    opacity: 0.9;
}

/* Common Section Styles */
.section { padding: var(--spacing-section) 0; }
.bg-light { background-color: var(--color-bg-light); }

/* Grids */
.grid {
    display: grid;
    gap: 40px;
}

.grid-3 {
    display: flex;       
    flex-wrap: wrap;     
    justify-content: center; 
    gap: 30px;           
}
.grid-3 .card:nth-child(4) {
    grid-column: 2;
    justify-self: end;
}

.grid-3 .card:nth-child(5) {
    grid-column: 3;
    justify-self: start;
}


.grid-2 {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap; /* Додано, щоб колагени теж переносились на телефоні */
}

/* Cards */
.card {
    flex: 0 1 calc(33.333% - 30px); /* 3 в ряд */
    min-width: 300px; /* Не даємо їм стати занадто вузькими */
    background: #fff;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.large-card {
    flex: 0 1 calc(50% - 30px); /* 2 в ряд */
    max-width: 500px;
}
.card, .large-card {
    border: 1px solid rgba(138, 163, 150, 0.2); /* Дуже тонка і напівпрозора обводка */
    transition: all 0.4s ease; /* Плавний перехід для ефектів */
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.04);
}

/* ДОДАНО: Піднімаємо текст над плямою */
.card > * {
    position: relative;
    z-index: 1;
}

.card h3 {
    margin-bottom: 5px;
    text-align: center; /* ДОДАНО: Щоб виглядало рівно */
}

.card p {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    text-align: center;
}

/* ДОДАНО: Штовхаємо останній абзац, щоб картки були однакової висоти */
.card p:last-of-type {
    flex-grow: 1;
}

.tea-essence {
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-accent);
    margin-bottom: 12px;
}

/* Watercolor Blobs */
.watercolor-blob {
    position: absolute;
    top: 0; /* ВИПРАВЛЕНО: Щоб пляма не вилазила за межі overflow:hidden */
    right: 0;
    width: 200px; /* Збільшено для кращого ефекту */
    height: 200px;
    filter: blur(50px);
    z-index: 0; /* ВИПРАВЛЕНО: Фон під текстом, але над білою заливкою картки */
    border-radius: 50%;
    opacity: 0.4;
    pointer-events: none; /* ДОДАНО: Щоб не заважали клікати */
    transition: var(--transition);
}

.tea-rosehip .watercolor-blob { background: #FFC0CB; }
.tea-buckthorn .watercolor-blob { background: #FFCC00; }
.tea-viburnum .watercolor-blob { background: #DC143C; }
.tea-serene .watercolor-blob { background: #228B22; }
.tea-forest .watercolor-blob { background: #6A5ACD; }

.dosage {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Стиль для зображень у картках чаїв */
.card-img {
    width: 400px;        /* Збільшено з 90px */
    height: auto;        /* Дозволяємо висоті підлаштовуватися під пропорції пачки */
    margin-bottom: 25px;
    z-index: 2;
    position: relative;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1)); /* Додаємо легку тінь, щоб пачка "стояла" */
    transition: transform 0.4s ease;
}

.large-card .card-img {
    width: 100%;
    height: 200px;
    border-radius: 4px;
    margin-bottom: 25px;
}

.card:hover .card-img {
    transform: scale(1.05) translateY(-5px); /* Легке підняття та збільшення */
}

/* Banner */
.lead-banner {
    background-color: var(--color-accent);
    color: #fff;
    padding: 80px 0;
}

.lead-banner h2 { margin-bottom: 10px; font-size: 2.5rem; }
.lead-banner p { margin-bottom: 30px; opacity: 0.9; }
.text-center { text-align: center; }

/* Робимо кнопку в зеленому банері контрастною */
.lead-banner .btn-solid {
    background-color: #ffffff; /* Білий фон */
    color: var(--color-accent); /* Зелений текст */
    border: 2px solid #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    font-weight: 700;
}

/* Ефект при наведенні */
.lead-banner .btn-solid:hover {
    background-color: transparent; /* Стає прозорою */
    color: #ffffff; /* Текст стає білим */
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* Додамо легку пульсацію, щоб кнопку було неможливо не помітити */
.lead-banner .btn-solid {
    animation: pulse-white 3s infinite;
}

@keyframes pulse-white {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}
/* Solutions */
/* --- Секція "Чому HarmonyIQ" --- */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 колонки в ряд */
    gap: 30px;
    margin-top: 60px;
}

.solution-item {
    background: #ffffff;
    padding: 50px 40px;
    border-radius: 15px;
    text-align: center; /* Центруємо все для балансу */
    transition: all 0.4s ease;
    border: 1px solid rgba(58, 90, 74, 0.05); /* Ледь помітна рамка */
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Додаємо ефект при наведенні */
.solution-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    border-color: var(--color-accent);
}

/* Декоративний номер або іконка (опціонально) */
.solution-item::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: var(--color-accent);
    opacity: 0.03;
    border-radius: 50%;
}

.pain {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    font-weight: 500;
}

.solution {
    font-size: 1.4rem;
    color: var(--color-accent);
    margin-bottom: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.solution-item p {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* Адаптація для планшетів та телефонів */
@media (max-width: 992px) {
    .solutions-grid {
        grid-template-columns: 1fr; /* На мобілці в один стовпчик */
    }
    
    .solution-item {
        padding: 40px 30px;
    }
}

/* Footer */
.footer {
    background-color: #1A1A1A;
    color: #fff;
    padding: 80px 0 30px 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer h2 { font-size: 1.5rem; margin-bottom: 10px; }
.footer h4 { margin-bottom: 20px; color: rgba(255,255,255,0.5); text-transform: uppercase; font-size: 0.9rem; letter-spacing: 1px; }
.footer p { color: rgba(255,255,255,0.7); }

.footer-contacts a {
    display: block;
    color: #fff;
    text-decoration: none;
    margin-bottom: 15px;
    font-size: 1.1rem;
    transition: opacity 0.3s;
}

.footer-contacts a:hover { opacity: 0.7; }

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
}

/* Modal */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0; top: 0;
    width: 100%; height: 100%; 
    background-color: rgba(0,0,0,0.6); 
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    padding: 50px;
    width: 90%;
    max-width: 500px;
    position: relative;
    border-radius: 4px;
}

.close-modal {
    position: absolute;
    top: 20px; right: 30px;
    font-size: 30px;
    font-weight: 300;
    cursor: pointer;
    color: var(--color-text-muted);
}

.modal-content h2 { margin-bottom: 10px; }
.modal-content p { margin-bottom: 30px; color: var(--color-text-muted); }

.form-group { margin-bottom: 20px; }
.form-group input {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    font-family: var(--font-main);
    font-size: 1rem;
    border-radius: 4px;
}
.form-group input:focus {
    outline: none;
    border-color: var(--color-accent);
}

/* Responsive */
@media (max-width: 900px) {
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .hero-content h1 { font-size: 3rem; }
}

@media (max-width: 600px) {
    .header-actions .phone-link { display: none; }
    .hero-content h1 { font-size: 2.5rem; }
    .grid { gap: 20px; }
}
/* ========================================= */
/* АДАПТИВНІСТЬ ДЛЯ ПЛАНШЕТІВ ТА ТЕЛЕФОНІВ   */
/* ========================================= */

/* Планшети (екран менше 900px) */
@media (max-width: 900px) {
    .card {
        flex: 0 1 calc(50% - 30px); /* Робимо по 2 картки в ряд */
    }
    .large-card {
        flex: 0 1 100%; /* Колагени стають по 1 в ряд */
        max-width: 100%;
    }
}

/* Телефони (екран менше 600px) */
@media (max-width: 600px) {
    .grid-3 {
        gap: 20px; /* Зменшуємо відступи між картками */
    }

    .card {
        flex: 0 1 100%; /* Картка займає всю ширину екрану! (1 в ряд) */
        min-width: 100%;
        padding: 30px 20px; /* Трохи менші відступи всередині картки */
    }

    .card-img {
        width: 300px; /* Трохи зменшуємо картинку чаю, щоб економити місце на екрані */
        margin-bottom: 15px;
    }

    h2.section-title {
        font-size: 2rem; /* Менший заголовок секції */
    }
}