/*
Theme Name: Marcom News
Description: Тема новостного сайта отдела маркетинга (Россия и ЦА). Повторяет дизайн исходного сайта на Google Sites.
Version: 1.0
Author: Marcom
Text Domain: marcom
*/

:root {
    --c-dark: #3b4b4b;      /* тёмно-зелёный: шапка, футер, кнопки */
    --c-smear: #2e3937;     /* мазок баннера */
    --c-text: #1c1c1c;      /* основной текст */
    --c-light: #f9f9f9;     /* текст на тёмном */
    --c-beige: #d1cdb9;     /* фон Contact persons */
    --c-red: #c8102e;       /* акцент, ссылки в тексте */
    --c-grey-banner: #8f8f8d;
    --content: 1160px;      /* ширина контейнера */
    --article: 940px;       /* колонка статьи */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--c-text);
    background: #fff;
}
img { max-width: 100%; height: auto; }
a { color: var(--c-dark); }

.container { max-width: var(--content); margin: 0 auto; padding: 0 24px; }
.container--article { max-width: var(--article); }

/* ============ Шапка ============ */
.site-header {
    /* Сверху прозрачная поверх баннера, при прокрутке наливается тёмным */
    background: transparent;
    color: var(--c-light);
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    transition: background-color .35s ease;
}
.site-header.is-scrolled { background: #1c1c1c; }
.site-header__in {
    /* Враспор: лого влево, меню вправо — как в оригинале */
    padding: 10px 40px;
    display: flex;
    align-items: center;
    gap: 18px;
}
.site-header__logo img { display: block; height: 34px; width: auto; }
.site-header__title {
    color: var(--c-light);
    text-decoration: none;
    font-size: 19px;
    font-weight: 500;
    letter-spacing: .2px;
    white-space: nowrap;
}
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.site-nav a {
    color: var(--c-light);
    text-decoration: none;
    font-size: 15.5px;
    font-weight: 500;
}
.site-nav a:hover { text-decoration: underline; }
.site-nav .is-active > a { font-weight: 700; }

/* Выпадающее меню разделов */
.nav-drop { position: relative; }
.nav-drop > a::after {
    content: "";
    display: inline-block;
    margin-left: 7px;
    width: 7px; height: 7px;
    border-right: 2px solid var(--c-light);
    border-bottom: 2px solid var(--c-light);
    transform: rotate(45deg) translateY(-3px);
}
.nav-drop__menu {
    display: none;
    position: absolute;
    top: 100%; left: 50%;
    transform: translateX(-50%);
    background: #fff;
    min-width: 260px;
    padding: 8px 0;
    margin: 0;
    list-style: none;
    box-shadow: 0 6px 24px rgba(0,0,0,.18);
    border-radius: 4px;
}
.nav-drop:hover .nav-drop__menu,
.nav-drop:focus-within .nav-drop__menu { display: block; }
.nav-drop__menu a {
    display: block;
    padding: 9px 20px;
    color: var(--c-text);
    font-weight: 500;
}
.nav-drop__menu a:hover { background: #f1f1ee; text-decoration: none; }

/* Поиск в шапке */
.header-search { display: flex; align-items: center; }
.header-search form { display: none; }
.header-search.is-open form { display: flex; gap: 6px; }
.header-search.is-open .header-search__toggle { display: none; }
.header-search input[type="search"] {
    font: inherit; font-size: 14px;
    padding: 6px 10px;
    border: none; border-radius: 4px;
    width: 190px;
}
.header-search button[type="submit"] {
    font: inherit; font-size: 14px; font-weight: 600;
    background: #fff2; color: var(--c-light);
    border: 1px solid var(--c-light);
    border-radius: 4px;
    padding: 5px 12px;
    cursor: pointer;
}
.header-search__toggle {
    background: none; border: none; cursor: pointer; padding: 4px;
    color: var(--c-light);
    display: flex;
}

/* ============ Баннеры ============ */
.banner {
    position: relative;
    background: var(--c-grey-banner);
    overflow: hidden;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 54px; /* шапка фиксированная и прозрачная — баннер уходит под неё */
}
.banner--photo { min-height: 340px; }
.banner__img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.banner--photo::after {
    content: "";
    position: absolute; inset: 0;
    background: rgba(0,0,0,.45);
}
.banner__smear {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
}
.banner__title {
    position: relative;
    z-index: 2;
    margin: 0;
    padding: 40px 24px;
    color: #fff;
    font-size: 44px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    max-width: 900px;
}

/* ============ Кнопки ============ */
.btn {
    display: inline-block;
    background: var(--c-dark);
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 11px 28px;
    border-radius: 4px;
    border: 1px solid var(--c-dark);
}
.btn:hover { background: #2e3b3b; }
.btn--outline {
    background: transparent;
    border-color: #fff;
}
.btn--outline:hover { background: rgba(255,255,255,.12); }

/* ============ Раздел: интро ============ */
.section-intro {
    display: flex;
    gap: 40px;
    align-items: center;
    padding: 30px 0 40px;
}
.section-intro__text { flex: 1 1 60%; }
.section-intro__text h2 { font-size: 32px; font-weight: 800; margin: 0 0 18px; }
.section-intro__img { flex: 0 1 34%; text-align: center; }
.section-intro__img img { max-height: 320px; width: auto; }
.backlink-row { padding: 28px 0 0; }

/* ============ «Все новости» + аккордеон годов ============ */
.allnews-band { background: var(--c-dark); }
.allnews-band h2 {
    max-width: var(--content);
    margin: 0 auto;
    padding: 26px 24px;
    color: var(--c-light);
    font-size: 28px;
    font-weight: 700;
}
.years { padding: 10px 0 50px; }
.year { border-bottom: 1px solid #6b6b6b; }
.year summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 26px 4px 14px;
    font-size: 34px;
    font-weight: 800;
    color: var(--c-text);
}
.year summary::-webkit-details-marker { display: none; }
.year summary::after {
    content: "";
    width: 11px; height: 11px;
    margin-right: 8px;
    border-right: 2.5px solid var(--c-text);
    border-bottom: 2.5px solid var(--c-text);
    transform: rotate(45deg);
    transition: transform .2s;
    flex: none;
}
.year[open] summary::after { transform: rotate(225deg); }
.year ul { list-style: none; margin: 4px 0 26px; padding: 0; }
.year li { padding: 7px 4px; font-size: 16px; }
.year li .d { white-space: nowrap; }
.year li .sep { margin: 0 6px; }
.year li a { color: var(--c-text); text-decoration: underline; font-weight: 600; }
.year li a:hover { color: var(--c-red); }

/* ============ Статья ============ */
.post-meta-date {
    text-align: right;
    padding: 26px 0 6px;
    font-size: 15px;
}
.entry-content { padding-bottom: 30px; }
.entry-content > * { margin-block: 1.35em; }
.entry-content p { text-align: justify; }
.entry-content a { color: var(--c-red); }
.entry-content h2, .entry-content h3 {
    text-align: center;
    font-weight: 700;
    margin-top: 2em;
}
.entry-content h2 { font-size: 24px; }
.entry-content h3 { font-size: 20px; }
.entry-content .is-lead {
    font-weight: 700;
    font-style: italic;
}
.entry-content figure { margin-inline: 0; }
.entry-content .wp-block-image img { display: block; margin: 0 auto; }

/* Цитата спикера (фото + текст) */
.entry-content .marcom-quote .wp-block-column p:first-child { margin-top: 0; }
.entry-content .marcom-quote em { font-style: italic; }

/* Contact persons — вырывается на всю ширину */
.contact-band {
    background: var(--c-beige);
    padding: 34px 0 26px;
    margin: 40px 0 10px;
}
.alignfull-band {
    width: 100vw;
    position: relative;
    left: 50%;
    margin-left: -50vw;
}
.contact-band h2 {
    max-width: var(--article);
    margin: 0 auto 10px;
    padding: 0 24px;
    font-size: 26px;
    font-weight: 700;
    color: var(--c-dark);
    text-align: left;
}
.contact-band .contact-cols {
    max-width: var(--article);
    margin: 0 auto;
    padding: 0 24px;
}
.editor-line { padding: 18px 0 8px; font-size: 15px; }

/* ============ Разделы белыми плитками на тёмном (главная и обзорная) ============ */
.home-sections { background: var(--c-dark); padding: 26px 0 56px; }
.home-sections__in { max-width: var(--content); margin: 0 auto; padding: 0 24px; }
.home-sections h2 {
    color: var(--c-light);
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 30px;
}
.tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
    justify-content: center;
}
.tile {
    background: #fff;
    width: 196px;
    height: 204px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 2px;
}
.tile img { max-height: 176px; max-width: 100%; width: auto; }
.tile:hover { outline: 3px solid var(--c-beige); }

/* ============ Главная: интро с иллюстрацией ============ */
.home-intro {
    display: flex;
    gap: 40px;
    align-items: center;
    padding: 26px 0 40px;
}
.home-intro__text { flex: 1 1 62%; }
.home-intro__img { flex: 0 1 30%; text-align: center; }
.home-intro__img img { max-height: 300px; width: auto; }

/* ============ Главная: контакты на бежевом ============ */
.contacts-home { background: var(--c-beige); padding: 30px 0 36px; }
.contacts-home__in { max-width: var(--content); margin: 0 auto; padding: 0 24px; }
.contacts-home h2 { font-size: 26px; font-weight: 800; margin: 0 0 14px; }
.contacts-home ul { margin: 0; padding-left: 22px; }
.contacts-home li { padding: 4px 0; }

/* ============ Списки результатов (поиск) ============ */
.results-list { list-style: none; margin: 26px 0 60px; padding: 0; }
.results-list li { padding: 8px 0; }
.results-list a { color: var(--c-text); text-decoration: underline; }
.results-list a:hover { color: var(--c-red); }

/* ============ Футер ============ */
.site-footer { background: var(--c-dark); margin-top: 50px; }
.site-footer__in {
    /* Враспор к краям, кнопки компактнее — как в оригинале */
    padding: 22px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.site-footer .btn { font-size: 14px; padding: 8px 18px; }
.site-footer__in--end { justify-content: flex-end; }

/* ============ Мобильная адаптация ============ */
/* Бежевый блок «Контакты» примыкает к футеру без белой щели */
body.home .site-footer,
body.page-template-page-razdely-novostej .site-footer { margin-top: 0; }

@media (max-width: 860px) {
    .site-header__in { flex-wrap: wrap; }
    .home-intro { flex-direction: column; }
    .site-header__title { font-size: 16px; white-space: normal; }
    .site-nav { gap: 16px; margin-left: 0; }
    .banner__title { font-size: 30px; }
    .section-intro { flex-direction: column; }
    .sections-grid { grid-template-columns: 1fr 1fr; }
    .year summary { font-size: 26px; }
    .entry-content p { text-align: left; }
}
@media (max-width: 560px) {
    .sections-grid { grid-template-columns: 1fr; }
    .site-header__logo img { height: 26px; }
}
