/* =========================================================
   GRUZ 200 EXPERT — ГЛОБАЛЬНЫЙ СТИЛЬ САЙТА
   ========================================================= */

:root {
    --g200-bg: #F6F4EF;
    --g200-surface: #FFFFFF;

    --g200-ink: #1C2024;
    --g200-ink-muted: #5B6168;
    --g200-ink-faint: #8A8F94;

    --g200-primary: #24405C;
    --g200-primary-dark: #17293B;
    --g200-primary-tint: #E7EDF2;

    --g200-accent: #A8824F;
    --g200-accent-dark: #7C5F39;
    --g200-accent-tint: #F3EAD9;

    --g200-border: #E2DED2;
    --g200-radius: 10px;

    --g200-maxw: 1120px;
}


/* =========================================================
   ОСНОВА
   ========================================================= */

html {
    background: var(--g200-bg);
}

body {
    margin: 0;

    background: var(--g200-bg);

    color: var(--g200-ink);

    font-family: "PT Sans", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

body * {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}


/* =========================================================
   ТИПОГРАФИКА
   ========================================================= */

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;

    font-family: "PT Serif", Georgia, serif;
    font-weight: 700;

    color: var(--g200-primary-dark);
}

h1 {
    font-size: 36px;
    line-height: 1.2;
}

h2 {
    font-size: 28px;
    line-height: 1.25;
}

h3 {
    font-size: 20px;
    line-height: 1.3;
}

p {
    color: var(--g200-ink-muted);
}

a {
    color: var(--g200-primary);
    text-decoration: none;
}

a:hover {
    color: var(--g200-accent-dark);
}


/* =========================================================
   ОСНОВНАЯ ОБЛАСТЬ CASSIOPEIA
   ========================================================= */

.site-grid {
    background: var(--g200-bg);
}

.container-component {
    background: transparent;
}

.com-content-article {
    color: var(--g200-ink);
}

.com-content-article p {
    color: var(--g200-ink-muted);
}

.com-content-article img {
    max-width: 100%;
    height: auto;
}


/* =========================================================
   HEADER
   ========================================================= */

.g200-header {
    width: 100%;

    position: relative;
    z-index: 50;

    background: var(--g200-surface);

    border-bottom: 1px solid var(--g200-border);
}


/* ---------------------------------------------------------
   Верхняя тёмная полоса
   --------------------------------------------------------- */

.g200-header-top {
    width: 100%;

    background: var(--g200-primary-dark);

    color: #EFE7D8;

    font-family: "PT Sans", Arial, sans-serif;
    font-size: 13px;
    line-height: 1.4;
}

.g200-header-top .g200-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding-top: 6px;
    padding-bottom: 6px;
}

.g200-header-top span {
    color: inherit;
}


/* ---------------------------------------------------------
   Общий контейнер
   --------------------------------------------------------- */

.g200-wrap {
    width: 100%;
    max-width: var(--g200-maxw);

    margin-left: auto;
    margin-right: auto;

    padding-left: 24px;
    padding-right: 24px;
}


/* ---------------------------------------------------------
   Основная часть шапки
   --------------------------------------------------------- */

.g200-header-main {
    width: 100%;

    background: #FFFFFF;
}

.g200-header-main .g200-wrap {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    min-height: 74px;

    padding-top: 14px;
    padding-bottom: 14px;
}


/* ---------------------------------------------------------
   Логотип
   --------------------------------------------------------- */

.g200-logo {
    display: block;

    flex: 0 0 auto;

    white-space: nowrap;

    font-family: "PT Serif", Georgia, serif;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 700;

    color: var(--g200-primary-dark) !important;

    text-decoration: none !important;
}

.g200-logo span {
    color: var(--g200-accent-dark);
}

.g200-logo:hover {
    color: var(--g200-primary-dark) !important;
}


/* ---------------------------------------------------------
   Главное меню в новой шапке
   --------------------------------------------------------- */

.g200-main-nav {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 22px;

    flex: 1 1 auto;

    margin-left: auto;
}

.g200-main-nav a {
    display: block;

    white-space: nowrap;

    font-family: "PT Sans", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 400;

    text-align: center;

    color: var(--g200-ink-muted) !important;

    text-decoration: none !important;
}

.g200-main-nav a:hover {
    color: var(--g200-primary) !important;
}


/* ---------------------------------------------------------
   Правая часть шапки
   --------------------------------------------------------- */

.g200-header-cta {
    display: flex;

    align-items: center;

    gap: 14px;

    flex: 0 0 auto;

    white-space: nowrap;
}


/* ---------------------------------------------------------
   Телефон
   --------------------------------------------------------- */

.g200-phone-wrap {
    text-align: left;
}

.g200-phone {
    display: block;

    font-family: "PT Sans", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 700;

    color: var(--g200-primary-dark) !important;

    text-decoration: none !important;
}

.g200-phone:hover {
    color: var(--g200-accent-dark) !important;
}

.g200-phone-sub {
    margin-top: 2px;

    font-size: 11px;
    line-height: 1.3;

    color: var(--g200-ink-faint);
}


/* ---------------------------------------------------------
   Кнопка шапки
   --------------------------------------------------------- */

.g200-header-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 46px;

    padding: 11px 20px;

    background: var(--g200-accent);

    border: 1px solid var(--g200-accent);
    border-radius: 6px;

    font-family: "PT Sans", Arial, sans-serif;
    font-size: 14px;
    line-height: 1;
    font-weight: 700;

    color: #FFFFFF !important;

    text-decoration: none !important;

    transition:
        background-color .15s ease,
        border-color .15s ease;
}

.g200-header-button:hover,
.g200-header-button:focus {
    background: var(--g200-accent-dark);

    border-color: var(--g200-accent-dark);

    color: #FFFFFF !important;
}


/* =========================================================
   СТАРОЕ МЕНЮ CASSIOPEIA
   ========================================================= */

/*
   На desktop старое Joomla-меню не показываем,
   так как меню уже находится внутри новой шапки.
*/



/* =========================================================
   ЛЕВАЯ И ПРАВАЯ КОЛОНКИ
   ========================================================= */

.container-sidebar-left .card,
.container-sidebar-right .card,
.sidebar-left .card,
.sidebar-right .card {
    margin-bottom: 18px;

    overflow: hidden;

    background: var(--g200-surface);

    border: 1px solid var(--g200-border);
    border-radius: var(--g200-radius);

    box-shadow: none;
}

.container-sidebar-left .card-header,
.container-sidebar-right .card-header,
.sidebar-left .card-header,
.sidebar-right .card-header {
    padding: 14px 16px;

    background: transparent;

    border-bottom: 1px solid var(--g200-border);

    color: var(--g200-primary-dark);

    font-family: "PT Serif", Georgia, serif;
    font-weight: 700;
}

.container-sidebar-left .card-body,
.container-sidebar-right .card-body {
    padding: 14px 16px;
}

.container-sidebar-left a,
.container-sidebar-right a {
    color: var(--g200-primary);
}

.container-sidebar-left a:hover,
.container-sidebar-right a:hover {
    color: var(--g200-accent-dark);
}


/* =========================================================
   КНОПКИ
   ========================================================= */

.btn,
button,
input[type="submit"] {
    border-radius: 6px;
}

.btn-primary {
    background: var(--g200-accent);

    border-color: var(--g200-accent);

    color: #FFFFFF;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--g200-accent-dark);

    border-color: var(--g200-accent-dark);

    color: #FFFFFF;
}


/* =========================================================
   ТАБЛИЦЫ
   ========================================================= */

table {
    background: var(--g200-surface);

    border-color: var(--g200-border);
}

table th {
    color: var(--g200-primary-dark);
}

table td,
table th {
    border-color: var(--g200-border);
}


/* =========================================================
   ФОРМЫ
   ========================================================= */

input,
select,
textarea,
.form-control,
.form-select {
    background: #FFFFFF;

    border: 1px solid var(--g200-border);
    border-radius: 6px;

    color: var(--g200-ink);
}

input:focus,
select:focus,
textarea:focus,
.form-control:focus,
.form-select:focus {
    border-color: var(--g200-accent);

    box-shadow: none;
}


/* =========================================================
   FOOTER
   ========================================================= */

.container-footer {
    background: var(--g200-primary-dark);

    color: #C9CFD6;
}

.container-footer a {
    color: #FFFFFF;
}

.container-footer a:hover {
    color: var(--g200-accent);
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {

    .g200-main-nav {
        gap: 14px;
    }

    .g200-main-nav a {
        font-size: 13px;
    }

    .g200-header-button {
        padding-left: 14px;
        padding-right: 14px;
    }

}


@media (max-width: 991px) {

    h1 {
        font-size: 30px;
    }

    h2 {
        font-size: 25px;
    }

}


/* =========================================================
   MOBILE HEADER
   ========================================================= */

@media (max-width: 860px) {

    .g200-header-top .g200-wrap {
        justify-content: center;

        text-align: center;
    }

    .g200-header-legal {
        display: none;
    }

    .g200-header-main .g200-wrap {
        min-height: 64px;

        padding-top: 10px;
        padding-bottom: 10px;
    }

    /*
       Наше desktop-меню скрываем.
       Ниже остаётся существующее мобильное меню Joomla.
    */

    .g200-main-nav {
        display: none;
    }

    .g200-header-cta {
        margin-left: auto;
    }

    .g200-header-button {
        display: none;
    }

    .g200-phone {
        font-size: 15px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 575px) {

    body {
        font-size: 15px;
    }

    h1 {
        font-size: 27px;
    }

    h2 {
        font-size: 23px;
    }

    .g200-wrap {
        padding-left: 16px;
        padding-right: 16px;
    }

    .g200-header-top {
        font-size: 11px;
    }

    .g200-header-main .g200-wrap {
        gap: 12px;
    }

    .g200-logo {
        font-size: 17px;
    }

    .g200-phone {
        font-size: 14px;
    }

    .g200-phone-sub {
        font-size: 10px;
    }

}


/* =========================================================
   ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ
   ========================================================= */

@media (max-width: 390px) {

    .g200-logo {
        font-size: 16px;
    }

    .g200-phone {
        font-size: 13px;
    }

    .g200-phone-sub {
        display: none;
    }

}



/* =========================================================
   ГЛАВНАЯ СТРАНИЦА — БЕЗ SIDEBAR, НА ВСЮ ШИРИНУ
   ========================================================= */

/* Убираем боковые колонки только там, где есть .gruz200-home */
body:has(.gruz200-home) .container-sidebar-left,
body:has(.gruz200-home) .container-sidebar-right {
    display: none !important;
}


/* Компонент занимает всю сетку */
body:has(.gruz200-home) .container-component {
    grid-column: 1 / -1 !important;

    width: 100% !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 0 !important;
}


/* Убираем стандартные ограничения Cassiopeia */
body:has(.gruz200-home) main,
body:has(.gruz200-home) .com-content-article,
body:has(.gruz200-home) .item-page {
    width: 100% !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 0 !important;
}


/* Главная сама управляет своей шириной */
body:has(.gruz200-home) .gruz200-home {
    margin: 0 !important;

    width: 100% !important;
    max-width: none !important;
}


/* На главной не должно быть лишнего пространства
   между header и hero */
body:has(.gruz200-home) .site-grid {
    row-gap: 0 !important;
}


body.g200-home-page .container-sidebar-left,
body.g200-home-page .container-sidebar-right {
    display: none !important;
}

body.g200-home-page .container-component {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.g200-home-page main,
body.g200-home-page .com-content-article,
body.g200-home-page .item-page {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.g200-home-page .site-grid {
    grid-template-columns: 1fr !important;
    row-gap: 0 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

body.g200-home-page .gruz200-home {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.g200-home-page .grid-child.container-component {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}
.container-nav {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}



/* =========================================================
   ГЛАВНАЯ — расстояние между меню и HERO
   ========================================================= */

body.g200-home-page .gruz200-home .hero {
    padding-top: 32px;
}

/* Убираем возможный дополнительный верхний отступ Cassiopeia */
body.g200-home-page .container-component {
    margin-top: 0 !important;
}

body.g200-home-page main {
    margin-top: 0 !important;
}

body.g200-home-page .com-content-article,
body.g200-home-page .item-page {
    margin-top: 0 !important;
}
