/* ============================================================
   ОБЩИЕ СТИЛИ САЙТА «БЛАГОПОЛУЧНАЯ СОБАКА»
   Подключается на всех страницах ПЕРЕД страницным стилем:
   <link rel="stylesheet" href="../css/common.css">  (вложенные страницы)
   <link rel="stylesheet" href="./css/common.css">   (главная)
   ============================================================ */

/* ---------- Дизайн-токены ---------- */
:root {
    --bg-main: #F9F6F0;
    --bg-white: #FFFFFF;
    --bg-dark-green: #5D6855;
    --bg-light-olive: #A8B3A0;
    --bg-footer: #E8DFC9;
    --text-dark: #2C2C2C;
    --text-gray: #757575;
    --accent-badge: #E8DFC9;
    --border-soft: #CCCCCC;
    --radius-card: 24px;
    --radius-button: 40px;
}

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

body {
    font-family: "Nunito", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg-main);
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

.image-placeholder {
    width: 100%;
    background: #D9D9D9;
}

.footer-logo .footer-logo-icon {
    object-fit: contain;
    background: transparent;
    display: block;
}

/* ============================================================
   ОБЩИЙ HEADER (одинаков на всех страницах)
   ============================================================ */
/* Отступ сверху есть ВСЕГДА (24px), плюс safe-area на устройствах с вырезом.
   Порядок важен: older WebKit использует constant(), современные — env(),
   обычные браузеры — первую строку (24px). */
.container.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-top: 24px;
    padding-top: calc(24px + constant(safe-area-inset-top));
    padding-top: calc(24px + env(safe-area-inset-top));
    padding-bottom: 24px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-dark);
}

.logo-circle {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: #D9D9D9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.logo-circle img {
    height: 70%;
}

.brand-name {
    font-size: 18px;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav {
    display: flex;
    gap: 32px;
    font-size: 15px;
}

.nav a {
    text-decoration: none;
    color: var(--text-dark);
}

.nav a:hover {
    color: var(--bg-light-olive);
}

/* Кнопка «Контакты»: высота уменьшена ~в 1.5 раза (padding 13px вместо 20px) */
.header-contacts-btn {
    display: inline-block;
    background: var(--bg-light-olive);
    color: #FFFFFF;
    text-decoration: none;
    white-space: nowrap;
    border-radius: var(--radius-button);
    padding: 13px 24px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
}

/* ---------- Header: адаптив ---------- */
@media (max-width: 720px) {
    .container.header {
        flex-wrap: wrap;
        row-gap: 12px;
    }

    .header-right {
        gap: 12px;
    }

    .nav {
        width: 100%;
        order: 3;
        flex-wrap: wrap;
        row-gap: 8px;
        font-size: 14px;
    }

    .brand-name {
        font-size: 16px;
    }

    .header-contacts-btn {
        padding: 10px 18px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .brand-name {
        font-size: 15px;
    }

    .logo-circle {
        width: 34px;
        height: 34px;
    }
}

/* ============================================================
   ОБЩАЯ ПЛАШКА ЗАПИСИ К КИНОЛОГУ
   ============================================================ */
.specialist-cta {
    width: 100%;
    max-width: 1200px;
    margin: 64px auto 0;
    padding: 0 40px;
    box-sizing: border-box;
}

.specialist-cta__inner {
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;
    background: var(--bg-dark-green);
    color: #FFFFFF;
    border-radius: 24px;
    padding: 28px 32px;
}

.specialist-cta__eyebrow {
    color: #D8E0D2;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}

.specialist-cta__title {
    font-size: 26px;
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: 8px;
}

.specialist-cta__text {
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
    line-height: 1.5;
    max-width: 680px;
}

.specialist-cta__button {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: var(--radius-button);
    background: #FFFFFF;
    color: var(--bg-dark-green);
    text-decoration: none;
    font-weight: 700;
    padding: 12px 24px;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .specialist-cta {
        padding: 0 20px;
    }

    .specialist-cta__inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 26px 24px;
    }

    .specialist-cta__title {
        font-size: 23px;
    }

    .specialist-cta__button {
        width: 100%;
    }
}

/* ============================================================
   ОБЩИЕ КНОПКИ HERO (используются на нескольких страницах)
   ============================================================ */
.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.hero-btn-primary {
    background: var(--bg-light-olive);
    color: #FFFFFF;
    text-decoration: none;
    border-radius: var(--radius-button);
    padding: 14px 28px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-family: inherit;
}

.hero-btn-secondary {
    background: transparent;
    border: 1px solid var(--border-soft);
    color: var(--text-gray);
    text-decoration: none;
    border-radius: var(--radius-button);
    padding: 14px 28px;
    font-weight: 500;
    cursor: pointer;
    font-size: 15px;
    font-family: inherit;
}

/* ============================================================
   МОДАЛКА «О ПРОЕКТЕ» (общая для всех страниц)
   ============================================================ */
.about-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 2000;
}

.about-modal.is-open {
    display: flex;
}

.about-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
}

.about-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    background: #fff;
    border-radius: 18px;
    padding: 24px 24px 20px;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.16);
}

.about-modal__title {
    margin: 0 28px 14px 0;
    font-size: 20px;
}

.about-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: 0;
    background: transparent;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.about-modal__content p {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.5;
    color: #444;
}

/* ============================================================
   ФОРМА ЗАПИСИ К КИНОЛОГУ
   ============================================================ */
.contacts-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 2100;
}

.contacts-modal.is-open {
    display: flex;
}

.contacts-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
}

.contacts-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 500px;
    background: #FFFFFF;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.16);
}

.contacts-modal__title {
    margin: 0 32px 18px 0;
    font-size: 22px;
    line-height: 1.2;
}

.contacts-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: 0;
    background: transparent;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.contacts-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contacts-form__field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 14px;
    font-weight: 600;
}

.contacts-form input,
.contacts-form textarea {
    width: 100%;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 11px 12px;
    font: inherit;
    font-size: 15px;
    background: #FFFFFF;
}

.contacts-form textarea {
    min-height: 120px;
    resize: vertical;
}

.contacts-form button {
    margin-top: 6px;
    border: 0;
    border-radius: var(--radius-button);
    padding: 13px 24px;
    background: var(--bg-light-olive);
    color: #FFFFFF;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.contacts-form button:disabled {
    cursor: wait;
    opacity: 0.75;
}

.contacts-form__status {
    min-height: 20px;
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: var(--bg-dark-green);
}

.contacts-form__status.is-error {
    color: #A14B4B;
}

/* ============================================================
   ОБЩИЕ АДАПТИВНЫЕ ОТСТУПЫ КОНТЕЙНЕРА
   ============================================================ */
@media (max-width: 960px) {
    .container {
        padding: 0 24px;
    }
}

@media (max-width: 720px) {
    .container {
        padding: 0 20px;
    }
}
