/* Основные переменные */
:root {
    --primary: #003366;
    --accent: #FF6B35;
    --accent2: #FF914D;
    --text: #2D2D2D;
    --bg: #F8F9FA;
    --h2-bg: #eaf1f8; /* более заметный фон для h2 */
}

/* Базовые стили */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

.container, .add-company-container, .faq-accordion, .tips-list, .steps-list .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Универсальный стиль для всех h2 в контейнерах */
.container > h2,
.add-company-container > h2,
.faq-accordion > h2,
.tips-list > h2,
.steps-list > .container > h2 {
    position: relative;
    font-size: 30px;
    font-weight: 700;
    color: var(--primary);
    margin: 3.2rem 0 2.2rem 0;
    text-align: left;
    padding: 1.1rem 90px 1.1rem 1.3rem;
    line-height: 1.2;
    background: var(--h2-bg);
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,51,102,0.07);
    max-width: 100%;
    z-index: 1;
}

.container > h2::after,
.add-company-container > h2::after,
.faq-accordion > h2::after,
.tips-list > h2::after,
.steps-list > .container > h2::after {
    content: "";
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 10px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    border-radius: 6px;
    opacity: 0.8;
    z-index: 2;
}

@media (max-width: 900px) {
    .container > h2,
    .add-company-container > h2,
    .faq-accordion > h2,
    .tips-list > h2,
    .steps-list > .container > h2 {
        font-size: 24px;
        padding: 0.9rem 60px 0.9rem 1rem;
    }
    .container > h2::after,
    .add-company-container > h2::after,
    .faq-accordion > h2::after,
    .tips-list > h2::after,
    .steps-list > .container > h2::after {
        width: 36px;
        height: 7px;
        right: 14px;
    }
}
@media (max-width: 600px) {
    .container > h2,
    .add-company-container > h2,
    .faq-accordion > h2,
    .tips-list > h2,
    .steps-list > .container > h2 {
        font-size: 18px;
        padding: 0.7rem 24px 0.7rem 0.7rem;
        margin: 2rem 0 1.2rem 0;
    }
    .container > h2::after,
    .add-company-container > h2::after,
    .faq-accordion > h2::after,
    .tips-list > h2::after,
    .steps-list > .container > h2::after {
        width: 18px;
        height: 4px;
        right: 7px;
    }
}

/* ---- Шапка ---- */
.header {
    background: var(--primary);
    padding: 1rem 0;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0,51,102,0.07);
    position: relative;
    z-index: 10;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}
.logo img {
    height: 42px;
    display: block;
}
.nav {
    display: flex;
    gap: 2rem;
}
.nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.07rem;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    transition: background 0.18s, color 0.18s;
}
.nav a:hover,
.nav a:focus {
    background: var(--accent);
    color: #fff;
}
.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 1rem;
}
.burger span {
    width: 28px;
    height: 4px;
    background: #fff;
    border-radius: 2px;
    margin: 3px 0;
    transition: all 0.3s;
    display: block;
}
@media (max-width: 900px) {
    .header-inner {
        padding: 0 7px;
    }
    .nav {
        gap: 1.1rem;
    }
}
@media (max-width: 700px) {
    .nav {
        position: absolute;
        top: 100%;
        right: 0;
        background: var(--primary);
        flex-direction: column;
        width: 200px;
        box-shadow: 0 8px 24px rgba(0,51,102,0.12);
        padding: 1.2rem 0.7rem;
        gap: 1.2rem;
        border-radius: 0 0 12px 12px;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px);
        transition: opacity 0.2s, transform 0.2s;
        z-index: 100;
    }
    .nav.open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }
    .burger {
        display: flex;
    }
}
.burger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.burger.active span:nth-child(2) {
    opacity: 0;
}
.burger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---- Таблица компаний ---- */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
}
.companies-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.07);
}
.companies-table th.col-company,
.companies-table td.col-company {
    width: 240px;
    min-width: 180px;
    max-width: 340px;
    font-weight: bold;
}
.companies-table th.col-phone,
.companies-table td.col-phone {
    width: 150px;
    min-width: 120px;
    max-width: 180px;
    white-space: nowrap;
}
.companies-table th.col-site,
.companies-table td.col-site {
    width: 170px;
    min-width: 120px;
    max-width: 200px;
    white-space: nowrap;
}
.companies-table td.col-company strong {
    font-weight: bold;
}
.companies-table th {
    background: var(--primary);
    color: white;
    padding: 1rem;
    text-align: left;
}
.companies-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}
@media (max-width: 900px) {
    .companies-table th.col-company,
    .companies-table td.col-company {
        width: 150px;
        min-width: 110px;
        max-width: 180px;
    }
    .companies-table th.col-phone,
    .companies-table td.col-phone,
    .companies-table th.col-site,
    .companies-table td.col-site {
        width: 100px;
        min-width: 80px;
        max-width: 120px;
    }
    .companies-table th, .companies-table td {
        font-size: 14px;
        padding: 0.5rem;
    }
}

/* ---- Steps (Пошаговая схема) ---- */
.steps-list {
    width: 100%;
    margin: 3rem 0 2rem 0;
}
.steps-list .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}
.steps-list-inner {
    background: #f8f9fa;
    border-radius: 18px;
    box-shadow: 0 4px 32px rgba(0,51,102,0.06);
    padding: 2.5rem 2rem 2rem 2rem;
}
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem 2rem;
    margin: 0 auto;
}
.step {
    background: #fff;
    border: 1.5px solid #e6eaf0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,51,102,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.2rem 1rem 1rem 1rem;
    min-height: 120px;
    transition: box-shadow 0.2s;
}
.step:hover {
    box-shadow: 0 6px 24px rgba(255,107,53,0.10);
    border-color: var(--accent);
}
.step-num {
    background: linear-gradient(90deg, var(--accent) 60%, var(--accent2) 100%);
    color: #fff;
    font-weight: bold;
    font-size: 1.3rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.8rem;
    box-shadow: 0 2px 8px rgba(255,107,53,0.08);
}
.step-text {
    text-align: center;
    font-size: 1rem;
    color: var(--primary);
    font-weight: 500;
    line-height: 1.4;
}
@media (max-width: 900px) {
    .steps-list-inner {
        padding: 1.5rem 0.7rem 1.2rem 0.7rem;
    }
    .steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem 1.2rem;
    }
}
@media (max-width: 600px) {
    .steps-list-inner {
        padding: 1rem 0.2rem 0.7rem 0.2rem;
    }
    .steps {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    .step {
        min-height: 0;
    }
}

/* ---- FAQ ---- */
.faq-accordion {
    margin: 3rem auto 2rem auto;
    padding: 0 15px;
}
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.faq-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,51,102,0.06);
    border: 1.5px solid #e6eaf0;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.faq-item.open,
.faq-item:focus-within {
    box-shadow: 0 6px 24px rgba(255,107,53,0.10);
    border-color: var(--accent);
}
.faq-question {
    width: 100%;
    background: none;
    border: none;
    outline: none;
    text-align: left;
    padding: 1.2rem 2.5rem 1.2rem 1.2rem;
    font-size: 1.08rem;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
}
.faq-question::after {
    content: '+';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--accent);
    transition: transform 0.2s;
}
.faq-item.open .faq-question::after {
    content: '–';
    transform: translateY(-50%) rotate(180deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    background: #f8f9fa;
    color: var(--text);
    font-size: 1rem;
    padding: 0 1.2rem;
    transition: max-height 0.3s ease, padding 0.3s;
}
.faq-item.open .faq-answer {
    max-height: 300px;
    padding: 0.7rem 1.2rem 1.2rem 1.2rem;
}
@media (max-width: 600px) {
    .faq-question {
        padding: 1rem 2rem 1rem 1rem;
        font-size: 1rem;
    }
    .faq-answer {
        font-size: 0.97rem;
        padding: 0 1rem;
    }
    .faq-item.open .faq-answer {
        padding: 0.5rem 1rem 1rem 1rem;
    }
}

/* ---- Советы ---- */
.tips-list {
    margin: 3rem auto 2rem auto;
    padding: 0 15px;
}
.tips-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}
.tip-icon {
    font-size: 1.5rem;
    margin-right: 0.9rem;
    vertical-align: middle;
    color: var(--accent);
    display: inline-block;
    width: 2.2em;
    text-align: center;
}
.tip-text {
    font-size: 1.08rem;
    color: var(--primary);
    vertical-align: middle;
    display: inline-block;
    max-width: 90%;
    line-height: 1.5;
}
@media (max-width: 600px) {
    .tip-icon {
        font-size: 1.2rem;
        margin-right: 0.6rem;
        width: 1.5em;
    }
    .tip-text {
        font-size: 0.97rem;
        max-width: 100%;
    }
}

/* ---- Форма добавления компании ---- */
.add-company-form {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 6px 32px rgba(0,51,102,0.08);
    max-width: 500px;
    margin: 2rem auto;
    padding: 2rem 2rem 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    border: 1px solid #e6eaf0;
}
.form-group {
    display: flex;
    flex-direction: column;
}
.add-company-form input[type="text"],
.add-company-form input[type="tel"],
.add-company-form input[type="url"] {
    padding: 0.75rem 1rem;
    border: 1.5px solid #cfd8dc;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #f8f9fa;
}
.add-company-form input[type="text"]:focus,
.add-company-form input[type="tel"]:focus,
.add-company-form input[type="url"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px #FF6B3540;
    outline: none;
    background: #fff;
}
.add-company-form .consent {
    flex-direction: row;
    align-items: center;
    font-size: 0.97rem;
}
.add-company-form .consent input[type="checkbox"] {
    margin-right: 0.5rem;
    accent-color: var(--accent);
}
.add-company-form .consent a {
    color: var(--primary);
    text-decoration: underline;
}
.add-company-form .btn {
    background: linear-gradient(90deg, var(--accent) 60%, var(--accent2) 100%);
    color: #fff;
    padding: 0.9rem 2.2rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 0.5rem;
    box-shadow: 0 2px 10px rgba(255,107,53,0.08);
    transition: background 0.2s, transform 0.15s;
}
.add-company-form .btn:hover,
.add-company-form .btn:focus {
    background: linear-gradient(90deg, var(--accent2) 0%, var(--accent) 100%);
    transform: translateY(-2px) scale(1.03);
}
@media (max-width: 600px) {
    .add-company-form {
        padding: 1rem;
        max-width: 100%;
    }
}

/* ---- Футер ---- */
.footer {
    background: var(--primary);
    color: #f8f9fa;
    padding: 2rem 0 1rem 0;
    margin-top: 3rem;
    border-top: 4px solid var(--accent);
    font-size: 0.98rem;
}
.footer .footer-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
}
.footer-disclaimer {
    max-width: 700px;
    line-height: 1.6;
    opacity: 0.95;
}
.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.5rem;
}
.footer-nav a {
    color: var(--accent);
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s;
}
.footer-nav a:hover {
    color: #fff;
    text-decoration: underline;
}
.footer-copy {
    margin-top: 2rem;
    text-align: center;
    font-size: 1rem;
    color: #b0c4d6;
    letter-spacing: 0.5px;
    opacity: 0.8;
}
@media (max-width: 900px) {
    .footer .footer-content {
        flex-direction: column;
        gap: 1.2rem;
    }
    .footer-disclaimer {
        max-width: 100%;
    }
}
