/*
Theme Name: Root Child
Theme URI: http://wpshop.biz/themes/root
Author: WPShop.biz
Author URI: http://wpshop.biz/
Template: root
Version: 1.0.0
*/

/* =====================================
   IFO — шапка сайта
   ===================================== */

.site-header.ifo-header-ready .site-title,
.site-header.ifo-header-ready .site-description {
    display: none !important;
}

.site-header .ifo-header-row {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(170px, 1fr) minmax(190px, 1fr);
    align-items: center;
    gap: 20px;
    width: 100%;
    padding: 16px 0;
    box-sizing: border-box;
}

.site-header .ifo-header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.site-header .ifo-header-brand .site-logotype {
    display: block;
    float: none;
    margin: 0;
    flex: 0 0 auto;
}

.site-header .ifo-header-brand .site-logotype img {
    display: block;
    max-width: 70px;
    max-height: 70px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.site-header .ifo-header-name-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.site-header .ifo-header-legal {
    color: #64768b;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1.25;
}

.site-header .ifo-header-name {
    color: #172b42;
    font-size: clamp(18px, 1.75vw, 22px);
    font-weight: 700;
    line-height: 1.22;
    text-decoration: none;
}

.site-header .ifo-header-contact-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    justify-self: center;
}

.site-header .ifo-header-contact-box:last-child {
    justify-self: end;
}

.site-header .ifo-header-contact-label {
    color: #8e7548;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .05em;
    line-height: 1.3;
    text-transform: uppercase;
}

.site-header .ifo-header-contact {
    color: #172b42;
    font-size: clamp(14px, 1.3vw, 17px);
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
    white-space: nowrap;
}

.site-header .ifo-header-name:hover,
.site-header .ifo-header-contact:hover {
    color: #375b83;
    text-decoration: underline;
}

.site-header .ifo-header-name:focus-visible,
.site-header .ifo-header-contact:focus-visible {
    outline: 2px solid #375b83;
    outline-offset: 4px;
}

@media (max-width: 1050px) {
    .site-header .ifo-header-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px 24px;
    }

    .site-header .ifo-header-brand {
        grid-column: 1 / -1;
    }

    .site-header .ifo-header-contact-box {
        justify-self: start;
    }

    .site-header .ifo-header-contact-box:last-child {
        justify-self: end;
    }
}

@media (max-width: 600px) {
    .site-header .ifo-header-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        padding: 12px 0;
    }

    .site-header .ifo-header-brand {
        grid-column: auto;
        gap: 12px;
    }

    .site-header .ifo-header-brand .site-logotype img {
        max-width: 50px;
        max-height: 50px;
    }

    .site-header .ifo-header-name {
        font-size: 17px;
    }

    .site-header .ifo-header-legal {
        font-size: 12px;
    }

    .site-header .ifo-header-contact-box,
    .site-header .ifo-header-contact-box:last-child {
        justify-self: start;
    }

    .site-header .ifo-header-contact {
        font-size: 15px;
    }
}


/* =====================================
   IFO — подвал сайта
   ===================================== */

/* Общий фон */
.ifo-footer-wrap {
    width: 100%;
    max-width: 1170px;
    margin: 0 auto;
    background: #172b42;
}

/* Сетка из четырёх колонок */
.ifo-footer {
    display: grid;
    grid-template-columns: 1.25fr 1fr 1.35fr 1fr;
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 28px;
    color: #d1dbe6;
    font-size: 14px;
    line-height: 1.6;
    box-sizing: border-box;
}

.ifo-footer *,
.ifo-footer *::before,
.ifo-footer *::after {
    box-sizing: border-box;
}

/* Колонки */
.ifo-footer__column {
    min-width: 0;
}

/* Название Института */
.ifo-footer__brand {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 12px;
}

/* Надпись АНО ДПО */
.ifo-footer__subtitle {
    color: #e5c889;
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 12px;
}

/* Заголовки колонок */
.ifo-footer .ifo-footer__title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 18px;
    padding: 0;
    border: 0;
}

/* Описание и контакты */
.ifo-footer__description,
.ifo-footer__contact {
    color: #d1dbe6;
    font-size: 14px;
    line-height: 1.7;
    margin: 0 0 12px;
}

/* Списки ссылок */
.ifo-footer__links {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.ifo-footer__links li {
    list-style: none !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
}

.ifo-footer__links li::before {
    content: none !important;
}

/* Ссылки */
.ifo-footer a {
    color: #d1dbe6 !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
    overflow-wrap: anywhere;
}

.ifo-footer a:hover {
    color: #e5c889 !important;
    text-decoration: underline !important;
}

.ifo-footer a:focus-visible {
    color: #e5c889 !important;
    outline: 2px solid #e5c889;
    outline-offset: 3px;
}

/* Планшеты */
@media (max-width: 960px) {
    .ifo-footer {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px;
        padding: 36px 26px;
    }
}

/* Мобильные телефоны */
@media (max-width: 600px) {
    .ifo-footer {
        grid-template-columns: 1fr;
        gap: 26px;
        padding: 30px 22px;
    }

    .ifo-footer .ifo-footer__title {
        margin-bottom: 12px;
    }

    .ifo-footer__brand {
        font-size: 17px;
    }
}

/* Нижняя строка подвала */
.ifo-footer {
    padding-bottom: 24px;
}

.ifo-footer__bottom {
    margin: 0 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px 0 26px;
    color: #d1dbe6;
    font-size: 13px;
    line-height: 1.5;
}

/* Скрываем старый визуальный подвал Root */
.site-footer:not(.ifo-footer-wrap),
#colophon:not(.ifo-footer-wrap) {
    display: none !important;
}

/* Мобильная версия */
@media (max-width: 600px) {
    .ifo-footer__bottom {
        margin: 0 22px;
        padding: 18px 0 24px;
    }
}
