:root {
    --header-color: #D1B89C;
    --nav-color: #E5D5C5;
    --dark-brown: #6B4F3F;
    --text-brown: #4A3A2F;
    --card-bg: #FAF3EB;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Montserrat', sans-serif; 
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    background-color: #F8F1E9;
    color: var(--text-brown);
}

header {
    position: sticky;
    top: 0;
    z-index: 1000;
}


.logo-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Опціонально: ефект при наведенні курсору */
.logo-link:hover {
    opacity: 0.8;
    transition: 0.3s;
}

/* Переконайся, що у .logo немає зайвих відступів, які заважатимуть кліку */
.logo, .title, h1, h2, h3 {
    font-weight: 700; /* Робимо заголовки жирнішими */
    letter-spacing: -0.5px; /* Для Montserrat в заголовках це виглядає стильно */
}

.header-main {
    background-color: var(--header-color);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1002;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.logo { font-size: 32px; font-weight: normal; margin: 0; }
.header-right { display: flex; align-items: center; gap: 15px; }

.btn-top {
    background-color: var(--dark-brown);
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
}

.menu-icon {
    display: flex; flex-direction: column; justify-content: space-between;
    width: 28px; height: 18px; cursor: pointer;
}
.menu-icon span { display: block; width: 100%; height: 3px; background-color: var(--text-brown); transition: 0.3s; }

.nav-menu {
    display: flex;
    background-color: var(--nav-color);
    padding: 10px 0;
    position: absolute;
    width: 100%;
    left: 0;
    top: 0;
    transform: translateY(-100%);
    transition: transform 0.4s ease-in-out;
    z-index: 1001;
}

.nav-menu.is-open { 
    transform: translateY(62px); 
}

.nav-column { flex: 1; display: flex; flex-direction: column; align-items: center; }
.nav-link {
    text-decoration: none; color: var(--text-brown);
    padding: 10px 0; width: 80%; text-align: center;
    border-bottom: 1px solid var(--dark-brown);
}
.nav-link.no-border { border-bottom: none; }

/* --- ПРОМО-БАНЕР (СЕРТИФІКАТ) --- */
.promo-banner {
    background: white; 
    margin: 20px 15px; 
    padding: 15px;
    border: 1px solid var(--header-color);
    border-radius: 12px;
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.promo-left { display: flex; align-items: center; gap: 15px; }
.promo-text { margin: 0; font-size: 18px; line-height: 1.2; }
.btn-promo { 
    background: var(--dark-brown); 
    color: white; 
    border: none; 
    padding: 8px 15px; 
    border-radius: 20px; 
    cursor: pointer;
}

/* --- СІТКА ПОСЛУГ (ДИНАМІЧНА) --- */
.title { text-align: center; font-weight: normal; margin: 25px 0 15px; font-size: 24px; }

.grid { 
    display: grid; 
    /* Адаптивна сітка: мінімум 160px, максимум 1 частина вільного місця */
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); 
    gap: 15px; 
    padding: 0 15px; 
    justify-content: center;
}

.card { 
    background: white; 
    border: 1px solid #E0D5C5; 
    border-radius: 12px; 
    text-align: center; 
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.2s;
}

.card:hover { transform: translateY(-5px); }

.card-img { width: 100%; height: 110px; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }

.card-content { 
    padding: 12px; 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
    /* Вирівнюємо весь контент по центру горизонталі */
    align-items: center; 
    /* Рівномірно розподіляємо місце між заголовком та кнопкою */
    justify-content: space-between; 
}

.card-content h3 { 
    font-size: 15px; 
    margin: 5px 0 12px; 
    font-weight: normal; 
    /* Центруємо текст самої назви */
    text-align: center; 
    /* Допомагає тримати текст по центру, якщо він в один або два рядки */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px; 
    width: 100%;
}

.btn-detail { 
    display: inline-block;
    background: var(--dark-brown); 
    color: white; 
    /* Оптимальний розмір: 8px зверху/знизу, 20px зліва/справа */
    padding: 8px 20px; 
    border-radius: 20px; 
    text-decoration: none;
    /* Шрифт 14px — це золота середина */
    font-size: 14px; 
    align-self: center;
    /* Залишаємо відступ знизу, щоб підняти кнопку */
    margin-bottom: 12px; 
    font-weight: 500;
    transition: 0.3s;
}

/* --- СТОРІНКА ДЕТАЛЕЙ (SERVICE.PHP) --- */
.detail-container {
    padding: 20px 15px;
    max-width: 600px;
    margin: 0 auto;
}

.detail-img {
    width: 100%;
    border-radius: 15px;
    margin-bottom: 20px;
}

.detail-text { line-height: 1.6; font-size: 16px; }
.detail-text h3 { color: var(--dark-brown); border-bottom: 1px solid var(--header-color); padding-bottom: 5px; }
.detail-text ul { padding-left: 20px; margin-bottom: 20px; }
.detail-text li { margin-bottom: 8px; }

.warning-box {
    background: #eedfd2;
    padding: 15px;
    border-radius: 10px;
    font-size: 14px;
    margin-top: 20px;
}

.services, .extra-bg {
    background-color: #F1E6DA;
    /* Тут ми зменшуємо відступ зверху тільки для масажів */
    padding-top: 15px !important; 
    padding-bottom: 25px !important;
    margin-top: 10px !important;
}

/* --- СЕКЦІЯ КОНТАКТІВ (Залишаємо великий відступ, якщо потрібно) --- */
.mobile-footer-section {
    background-color: #F1E6DA;
    /* Тут можна залишити 80px або інше значення для "Контактів" */
    padding: 80px 15px; 
    width: 100%;
    margin-top: 10px;
    box-sizing: border-box;
}

/* Коригування заголовків */
.services .title, .extra-bg .title {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 26px;
}

.extra-bg .title {
    margin-top: 10px;
    margin-bottom: 30px;
    font-size: 26px;
}
/* --- ФОН СЕКЦІЇ (БЕЖЕВИЙ) --- */
.mobile-footer-section {
    background-color: #F1E6DA;
    padding: 10px 15px;
    width: 100%;
    margin-top: 10px;
    box-sizing: border-box;
}

.mobile-footer-section .title {
    text-align: center;
    color: #4A3A2F;
    margin-top: 0;
    margin-bottom: 20px;
}

/* --- КОНТЕЙНЕР (ВІДСТУПИ МІЖ БЛОКАМИ) --- */
.mobile-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 100%; /* Дозволить розтягуватися на всю доступну ширину */
    padding: 0 15px;
    margin: 0 auto;
}

/* --- БІЛІ БЛОКИ З РАМКОЮ --- */
.info-card {
    background: white;
    border: 1px solid #E0D5C5; /* Такий самий колір, як у карток послуг */
    border-radius: 8px;
    padding: 15px;
    width: 100%;
    
    /* Вирівнювання вмісту */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;             /* Відстань між іконкою і текстом */
    
    text-decoration: none;
    color: #4A3A2F;
    font-size: 16px;
    box-sizing: border-box;
}

/* Налаштування SVG іконок */
.info-card svg {
    color: #000000;        /* Синій колір іконок */
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

/* --- СТИЛІ ДЛЯ БЛОКУ КАРТИ --- */
.map-card-container {
    padding: 0 !important; /* Важливо: прибираємо всі внутрішні відступи */
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.address-row {
    padding: 15px;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid #E0D5C5; /* Світліша лінія, як ми обговорювали */
    margin-bottom: 0; /* Прибираємо зовнішній відступ знизу */
}

/* Блок, де лежить сама карта */
.map-viewport {
    width: 100%;
    height: 300px; /* Можеш збільшити висоту за бажанням */
    margin-top: -12px; /* Трюк, щоб прибрати мікро-щілину між лінією та картою */
}

.map-viewport iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block; /* Прибирає дефолтні відступи inline-елементів */
}

/* --- НИЖНЯ СМУЖКА --- */
.bottom-strip {
    background-color: #594236; /* Темно-коричневий */
    color: white;
    text-align: center;
    padding: 20px 0;
    width: 100%;
}
.bottom-strip p { margin: 5px 0; }

/* --- МОДАЛЬНЕ ВІКНО ЗАПИСУ --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: #F8F1E9;
    padding: 40px 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    position: relative;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #6B4F3F;
}

.modal-title {
    margin-bottom: 25px;
    color: #4A3A2F;
}

.modal-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.m-btn {
    text-decoration: none;
    color: white;
    padding: 14px;
    border-radius: 12px;
    font-weight: 600;
    transition: 0.3s;
}

.m-tg {
    background: #0088cc;
}
.m-viber {
    background: #7360f2;
}
.m-call {
    background: #4CAF50;
}
.m-mail {
    background: #6B4F3F;
}

.m-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}
