/* Изменил шрифт на системный стек Verdana для отличия */
@font-face {
    font-family: 'CustomFont';
    src: local('Verdana'), local('Geneva'), local('sans-serif');
    font-weight: normal;
    font-style: normal;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'CustomFont', Verdana, sans-serif; /* Другой шрифт */
    background-color: #f4f6f8; /* Светлый фон вместо темного */
    color: #1f2937; /* Темно-серый текст */
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header - Теперь светлый с тенью */
header {
    background-color: #ffffff;
    padding: 0.8rem 2rem;
    border-bottom: 3px solid #059669; /* Жирная зеленая полоса */
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); /* Добавил тень */
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 38px; /* Чуть изменил размер */
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)); /* Добавил тень логотипу */
}

.desktop-nav {
    display: flex;
    gap: 1.5rem; /* Изменил отступы */
    flex-wrap: wrap;
}

nav a {
    color: #374151; /* Темный цвет ссылок */
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600; /* Жирнее */
    text-transform: uppercase; /* Капс */
    transition: all 0.2s ease;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.desktop-nav a:hover {
    color: #059669; /* Зеленый при наведении */
    border-bottom-color: #059669;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    position: relative;
    width: 32px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px; /* Тоньше линии */
    background-color: #111827; /* Черные линии на белом фоне */
    border-radius: 0; /* Убрал скругления */
    transition: opacity 0.2s ease;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.hamburger span:nth-child(1) { top: 0; transform: none; }
.hamburger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger span:nth-child(3) { top: 100%; transform: translateY(-100%); }

.hamburger.active span { opacity: 0; }

.hamburger.active::before,
.hamburger.active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #111827;
    border-radius: 0;
    transform: translateY(-50%);
}

.hamburger.active::before { transform: translateY(-50%) rotate(45deg); }
.hamburger.active::after { transform: translateY(-50%) rotate(-45deg); }

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #ffffff; /* Белый фон */
    border-bottom: 3px solid #059669;
    padding: 2rem;
    flex-direction: column;
    gap: 1rem;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    z-index: 999;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.mobile-nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-nav > a:not(.btn) {
    padding: 0.8rem 0;
    font-size: 1.1rem;
    color: #1f2937;
    border-bottom: 1px solid #e5e7eb;
    font-weight: bold;
}

.mobile-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 0;
    padding-bottom: 0;
    overflow: visible;
}

.mobile-buttons .btn {
    flex: 1;
    width: 50%;
    text-align: center;
    position: relative;
    overflow: visible;
}

.header-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Кнопки - квадратные и зеленые */
.btn {
    padding: 0.6rem 1.8rem;
    border: 2px solid transparent;
    border-radius: 0; /* Прямые углы */
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.btn-login {
    background-color: transparent;
    color: #059669;
    border: 2px solid #059669;
}

.btn-login:hover {
    background-color: #059669;
    color: #ffffff;
}

.btn-register {
    background-color: #059669;
    color: #ffffff;
}

.btn-register:hover {
    background-color: #047857; /* Темнее зеленый */
    color: #ffffff;
    transform: none; /* Убрал движение */
    box-shadow: 0 4px 0 #022c22; /* Жесткая тень вместо размытой */
}

/* Main Content */
main {
    flex: 1;
    width: 100%;
    padding: 4rem 0;
}

.main-container {
    max-width: 1000px; /* Сделал контейнер уже */
    width: 100%;
    margin: 0 auto;
}

.content-section {
    background-color: #ffffff; /* Белые карточки */
    border-radius: 0; /* Прямые углы */
    padding: 3rem;
    margin-bottom: 3rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.content-section h1 {
    color: #111827;
    margin-bottom: 2rem;
    font-size: 2.2rem;
    font-weight: 800;
    position: relative;
    padding-bottom: 0;
    border-bottom: none; /* Убрал подчеркивание */
    padding-left: 1rem;
    border-left: 6px solid #059669; /* Сделал акцент слева */
}

.content-section h1::after { display: none; } /* Скрыл старый псевдоэлемент */

.content-section h2 {
    color: #1f2937;
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    font-size: 1.6rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 0;
    border-left: 4px solid #059669;
    padding-left: 0.8rem;
}

.content-section h2::after { display: none; }

.content-section h3 {
    color: #374151;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.content-section h4 {
    color: #4b5563;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.content-section p {
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #4b5563;
}

.content-section a:not(.btn) {
    color: #059669;
    text-decoration: underline;
    transition: background 0.2s ease;
    font-weight: 600;
}

.content-section a:hover {
    color: #047857;
    background-color: #d1fae5; /* Подсветка фона при наведении */
    text-decoration: none;
}

.content-section img {
    display: block;
    margin: 2.5rem auto;
    max-width: 100%;
    height: auto;
    border-radius: 0;
    border: 4px solid #f3f4f6;
}

/* Content Toggle Button */
.content-toggle-btn {
    display: block;
    margin: 2rem auto;
    padding: 0.8rem 2rem;
    background-color: #f9fafb;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 0;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.content-toggle-btn:hover {
    color: #059669;
    border-color: #059669;
    background-color: #ffffff;
    transform: none;
    box-shadow: none;
}

.content-toggle-btn.active {
    color: #ffffff;
    background-color: #059669;
    border-color: #059669;
}

/* Table of Contents */
.table-of-contents {
    display: none;
    margin: 2rem 0;
    padding: 2rem;
    background-color: #f0fdf4; /* Очень светлый зеленый фон */
    border-radius: 0;
    border: 1px dashed #059669;
}

.table-of-contents.active { display: block; }

.table-of-contents .toc-title {
    color: #065f46;
    margin-bottom: 1.2rem;
    font-size: 1.2rem;
    font-weight: 800;
    margin-top: 0;
    text-transform: uppercase;
}

.toc-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem 2rem;
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: toc-counter;
}

.toc-list li {
    counter-increment: toc-counter;
    margin-bottom: 0.5rem;
    padding-left: 0;
    list-style: none;
    display: flex;
    align-items: flex-start;
}

.toc-list li::before {
    content: "0" counter(toc-counter);
    color: #059669;
    font-weight: 900;
    font-size: 0.8rem;
    margin-right: 0.8rem;
    flex-shrink: 0;
    line-height: 1.4;
}

.toc-list a {
    color: #1f2937;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s ease;
    display: inline;
    word-wrap: break-word;
    flex: 1;
    border-bottom: 1px dotted #9ca3af;
}

.toc-list a:hover {
    color: #059669;
    border-bottom-style: solid;
}

.content-section ul,
.content-section ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.content-section ul li,
.content-section ol li {
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #4b5563;
}

/* Reviews Container */
.reviews-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.review-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0;
    padding: 2rem;
    transition: all 0.3s ease;
    box-shadow: 4px 4px 0 #f3f4f6; /* Жесткая тень */
}

.review-card:hover {
    background-color: #ffffff;
    border-color: #059669;
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #d1fae5;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f3f4f6;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.review-author {
    color: #111827;
    font-weight: 800;
    font-size: 1.1rem;
}

.review-date {
    color: #9ca3af;
    font-size: 0.8rem;
    font-style: italic;
}

.review-text {
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
}

/* FAQ Accordion */
.faq-container { margin: 3rem 0; }

.faq-item {
    margin-bottom: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0;
    overflow: hidden;
    background-color: #ffffff;
}

.faq-question {
    width: 100%;
    padding: 1.2rem 1.5rem;
    background-color: #ffffff;
    border: none;
    text-align: left;
    color: #1f2937;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: background-color 0.2s ease;
}

.faq-question:hover { background-color: #f9fafb; }

.faq-question.active {
    background-color: #059669;
    color: #ffffff;
}

.faq-question h3 {
    flex: 1;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: inherit;
    text-align: left;
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: bold;
    color: #059669;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.faq-question.active .faq-icon {
    transform: rotate(90deg);
    color: #ffffff;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1.5rem;
    background-color: #f9fafb;
}

.faq-answer.active {
    max-height: 1000px;
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.faq-answer p {
    margin: 0;
    color: #4b5563;
    line-height: 1.7;
    font-size: 1rem;
}

.content-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0;
    flex-direction: row;
}

.content-buttons .btn {
    padding: 0.8rem 2.5rem; /* Кнопки крупнее */
}

/* Table Styles */
.table-wrapper {
    overflow-x: auto;
    margin: 2.5rem 0;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e5e7eb;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    border-radius: 0;
    overflow: visible;
    min-width: 600px;
}

table tr:first-child {
    background-color: #1f2937; /* Темная шапка таблицы */
    color: #ffffff;
    font-weight: bold;
}

table tr:not(:first-child) { background-color: #ffffff; }

table tr:not(:first-child):nth-child(even) { background-color: #f9fafb; }

table tr:hover:not(:first-child) { background-color: #ecfdf5; }

table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}

table tr:first-child td {
    padding: 1rem;
    font-size: 1rem;
    border-bottom: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* Footer */
footer {
    background-color: #111827; /* Почти черный */
    padding: 4rem 2rem;
    text-align: center;
    margin-top: auto;
    border-top: 5px solid #059669;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s ease;
    text-transform: uppercase;
    font-weight: 600;
}

.footer-links a:hover { color: #ffffff; }

footer p {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

/* Responsive Design */
@media (max-width: 1055px) {
    header { padding: 0.8rem 1rem; }

    .header-container {
        flex-wrap: nowrap;
        justify-content: space-between;
    }

    .logo { margin-bottom: 0; }
    .logo-img { height: 32px; }

    .hamburger { display: flex; }

    .desktop-nav, .desktop-buttons { display: none; }
    .mobile-nav { display: flex; }

    main { padding: 2rem 0; }

    .main-container { padding: 0 1rem; }

    .content-section { padding: 1.5rem; border: none; background: transparent; box-shadow: none; }
    .content-section h1 { font-size: 1.8rem; }
    
    .toc-list {
        grid-template-columns: repeat(1, 1fr); /* Одна колонка на планшете */
    }

    .reviews-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .content-section { padding: 0; } /* Убрал отступы на мобилке совсем */
    
    .mobile-buttons { gap: 1rem; }
    .mobile-buttons .btn { padding: 0.8rem; font-size: 0.9rem; }

    .footer-links { flex-direction: column; gap: 1.2rem; }
    
    .content-section h1 { font-size: 1.6rem; }
    .content-section h2 { font-size: 1.4rem; }

    .content-buttons { flex-direction: column; width: 100%; gap: 1rem; }
    .content-buttons .btn { width: 100%; }
}

