/*
Theme Name: Main Theme
Theme URI:
Author:
Author URI:
Description: Корпоративный сайт «Управление пожарной безопасностью». Тема построена по стандартам WordPress: весь контент редактируется через админку (Кастомайзер + кастомные типы записей).
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: main_theme
*/

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

:root {
    --color-primary: #1a3a4a;
    --color-accent: #f15a29;
    --color-text: #2a2a2a;
    --color-text-light: #666;
    --color-border: #e0e0e0;
    --color-bg: #ffffff;
    --color-bg-marquee: #f8f8f8;
    --color-link: #2a5d8f;
    --color-footer: #1a5a6e;
    --max-width: 1200px;
    --font-family-base: 'Manrope', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

body {
    font-family: var(--font-family-base);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.5;
}

a {
    color: var(--color-link);
    text-decoration: underline;
}

a:hover {
    opacity: 0.8;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

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

/* ======= HEADER ======= */
.header {
    border-bottom: 1px solid var(--color-border);
    background: #fff;
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    max-width: var(--max-width);
    margin: 0 auto;
    gap: 30px;
}

.logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--color-text);
}

.logo__svg {
    display: block;
    height: 70px;
    width: auto;
}

.logo__svg--mobile {
    display: none;
}

.nav {
    flex: 1;
}

.nav__list {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.nav__link {
    color: #000;
    text-decoration: none;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav__link:hover {
    color: var(--color-accent);
}

.btn {
    display: inline-block;
    padding: 14px 28px;
    background: var(--color-primary);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn:hover {
    background: #245366;
    opacity: 1;
}

.btn--accent {
    background: var(--color-accent);
}

.btn--accent:hover {
    background: #d94a1f;
}

/* ======= MARQUEE ======= */
.marquee {
    border-bottom: 1px solid var(--color-border);
    overflow: hidden;
    padding: 12px 0;
}

.marquee__track {
    display: flex;
    white-space: nowrap;
    animation: marquee 40s linear infinite;
    gap: 80px;
}

.marquee__item {
    font-size: 13px;
    color: #FF0033;
    position: relative;
    padding-right: 80px;
}

@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ======= CONTROL BLOCK (главная) ======= */
.control-block {
    position: relative;
    color: #fff;
    padding: 56px 0 48px;
    overflow: hidden;
}

.control-block .container {
    position: relative;
    z-index: 1;
}

.control-block__title {
    font-size: 30px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    line-height: 1.2;
    margin: 0 0 28px;
    color: var(--color-text);
    max-width: 880px;
}

.control-block__items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.control-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    background: #3366FF;
}

li.control-item {
    position: relative;
    padding: 25px 200px 25px 20px;
}

.control-item--clickable {
    cursor: pointer;
    transition: filter 0.2s ease;
}

.control-item--clickable:hover {
    filter: brightness(1.15);
}

.control-item__link {
    position: absolute;
    inset: 0;
    z-index: 2;
    text-indent: -9999px;
    overflow: hidden;
}

.control-item__link:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -4px;
}

.control-item__text {
    flex: 1;
    min-width: 0;
}

.control-item__title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 6px;
    color: #fff;
}

.control-item__desc {
    font-size: 14px;
    line-height: 1.55;
    color: rgba(255, 255, 255);
    margin: 0;
}

.control-item__icon {
    width: 15%;
    height: fit-content;
    position: absolute;
    top: 0;
    left: auto;
    right: 0;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 15px;
}

.control-item__icon svg {
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .control-block {
        padding: 32px 0 28px;
    }

    .control-block__title {
        font-size: 18px;
        margin-bottom: 18px;
    }

    .control-item {
        gap: 16px;
        padding: 16px 0;
    }

    .control-item__title {
        font-size: 16px;
    }

    .control-item__desc {
        font-size: 13px;
    }

    .control-item__icon {
        width: 48px;
        height: 48px;
    }
}

/* ======= MAIN LAYOUT ======= */
.main {
    padding: 40px 0 60px;
}

.layout {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 40px;
    align-items: start;
}

.layout::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc((100% - 40px) / 2.4 + 20px);
    width: 1px;
    background: #B2ACAC;
}

/* ======= NEWS GRID ======= */
.news {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.news__card--wide {
    grid-column: 1 / -1;
}

.news-card {
    position: relative;
    display: block;
    border-radius: 4px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    aspect-ratio: 1 / 1;
    background: #888;
}

.news-card--wide {
    aspect-ratio: 16 / 10;
}

.news-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-card:hover .news-card__img {
    transform: scale(1.04);
}

.news-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.75) 100%);
    z-index: 1;
}

.news-card__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    z-index: 2;
}

.news-card__date {
    font-size: 12px;
    margin-bottom: 6px;
    opacity: 0.9;
}

.news-card__title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
}

/* ======= CONTENT ======= */
.content {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.section-title {
    font-size: 38px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 24px;
    line-height: 1.2;
    color: var(--color-text);
}

.section-text,
.content section p {
    font-size: 14px;
    line-height: 1.65;
    color: var(--color-text-light);
    margin-bottom: 16px;
}

.section-text:last-of-type,
.content section p:last-of-type {
    margin-bottom: 24px;
}

.subsection-title {
    font-size: 20px;
    font-weight: 600;
    margin: 24px 0 14px;
    color: #222222;
}

.doc-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.doc-list a {
    font-size: 14px;
    color: #0C4459;
    text-decoration: underline;
    line-height: 1.5;
}

.bullet-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bullet-list li {
    position: relative;
    padding-left: 18px;
    font-size: 14px;
    color: var(--color-text-light);
    line-height: 1.55;
}

.bullet-list li::before {
    content: "•";
    position: absolute;
    left: 4px;
    top: 0;
    color: var(--color-text);
    font-weight: 700;
}

.duties-imgs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 20px 0;
}

.duties-imgs img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 4px;
}

.subsection-heading {
    font-size: 22px;
    font-weight: 800;
    margin: 28px 0 14px;
    color: #222222;
}

/* ======= FOOTER ======= */
.footer {
    background: var(--color-footer);
    color: #fff;
    padding: 60px 0 0;
    margin-top: 40px;
}

.footer__title {
    font-size: 35px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 31px;
    letter-spacing: 0.5px;
}

.footer__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.footer__col-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    opacity: 1;
    color: #fff;
}

.footer__col-text {
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255,255,255,0.95);
}

.footer__col-text a {
    color: #fff;
    text-decoration: none;
}

.footer__socials {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

.social-icon {
    display: inline-flex;
    line-height: 0;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
}

.social-icon svg {
    display: block;
    width: 30.86px;
    height: 30.86px;
}

.social-icon:hover {
    opacity: 0.75;
}

.footer__bottom {
    background: #fff;
    color: var(--color-text);
    padding: 25px 0;
}

.footer__bottom-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}

.footer__nav {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.footer__nav a {
    color: #000;
    text-decoration: none;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.footer__copyright {
    text-align: center;
    font-size: 14px;
    color: #fff;
    padding: 10px 0;
    font-weight: 400;
}

/* ======= BURGER (hidden on desktop) ======= */
.burger {
    display: none;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 0;
}

.burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}

body.menu-open .burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
body.menu-open .burger span:nth-child(2) { opacity: 0; }
body.menu-open .burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ======= RESPONSIVE ======= */
@media (max-width: 960px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .layout::before {
        display: none;
    }

    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header__inner {
        padding: 14px 16px;
        gap: 10px;
    }

    .logo__svg {
        height: 40px;
    }

    .logo__svg--desktop {
        display: none;
    }

    .logo__svg--mobile {
        display: block;
    }

    .burger {
        display: flex;
    }

    .header__btn {
        display: none;
    }

    .nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: #fff;
        z-index: 100;
        padding: 80px 20px 20px;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s;
    }

    body.menu-open .nav {
        opacity: 1;
        pointer-events: auto;
    }

    .nav__list {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }

    .nav__link {
        font-size: 16px;
    }

    .layout {
        gap: 30px;
    }

    .news {
        order: 2;
        gap: 12px;
    }

    .news__card--wide {
        grid-column: auto;
    }

    .news-card--wide {
        aspect-ratio: 1 / 1;
    }

    .content {
        order: 1;
        gap: 36px;
    }

    .section-title {
        font-size: 20px;
    }

    .btn--accent {
        background: var(--color-accent);
        width: 100%;
        text-align: center;
    }

    .container {
        padding: 0 16px;
    }

    .main {
        padding: 24px 0 30px;
    }

    .footer {
        text-align: center;
        padding: 36px 0 0;
    }

    .footer__title {
        text-align: center;
        font-size: 20px;
        margin-bottom: 24px;
    }

    .footer__grid {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-bottom: 30px;
    }

    .footer__col-title {
        font-size: 14px;
        margin-bottom: 4px;
    }

    .footer__socials {
        justify-content: center;
        margin-top: 8px;
    }

    .footer__bottom {
        padding: 18px 0;
    }

    .footer__bottom-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
        text-align: center;
    }

    .footer__bottom-inner .logo {
        justify-content: center;
        order: 1;
    }

    .footer__nav {
        flex-direction: column;
        gap: 18px;
        align-items: center;
        order: 2;
    }

    .footer__bottom-inner .btn {
        order: 3;
        width: 100%;
        text-align: center;
        padding: 16px;
    }

    .footer__copyright {
        padding: 14px 0 18px;
        font-size: 12px;
    }
}

@media (max-width: 380px) {
    .nav__list { gap: 16px; }
    .news-card__title { font-size: 13px; }
    .news-card__date { font-size: 11px; }
}
