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

:root {
    --dark-bg: #1d1d1f;
    --accent-blue: #0071e3;
    --accent-hover: #0077ed;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --border-color: #d2d2d7;
    --card-bg: #ffffff;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    background: #f5f5f7;
    line-height: 1.6;
}

/* Header */
header {
    background: var(--dark-bg);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    color: #f5f5f7;
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
    font-weight: 400;
}

.nav-links a:hover {
    color: var(--accent-blue);
}

.burger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.burger span {
    width: 25px;
    height: 2px;
    background: #f5f5f7;
    transition: var(--transition);
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.hero {
    text-align: center;
    margin-bottom: 60px;
    padding: 40px 0;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Breadcrumbs */
.breadcrumbs {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    font-size: 14px;
}

.breadcrumbs a {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--accent-blue);
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.article-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.article-image {
    width: 100%;
    max-width: 1000px;
    aspect-ratio: 3/2;
    object-fit: cover;
    display: block;
    border-radius: 12px;
    margin-left: auto;
    margin-right: auto;
}

.article-content {
    padding: 1px 12px 12px 12px;
}

.article-meta {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.article-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.article-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.article-title a:hover {
    color: var(--accent-blue);
}

.article-excerpt {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.read-more {
    display: inline-block;
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

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

/* Article Page */
article {
    max-width: 1200px;
    margin: 0 auto 1px;
    padding: 0 20px;
}

.article-header {
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.article-intro {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 32px;
}

/* Table of Contents */
.toc {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 40px;
    border: 1px solid var(--border-color);
}

.toc h2 {
    font-size: 20px;
    margin-bottom: 16px;
}

.toc ul {
    list-style: none;
}

.toc li {
    margin-bottom: 8px;
}

.toc a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: var(--transition);
}

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

/* Content */
.article-content h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 12px 0 24px;
    line-height: 1.3;
}

.article-content p {
    font-size: 17px;
    margin-bottom: 20px;
    line-height: 1.7;
}

.article-content strong {
    font-weight: 700;
}

.article-content ul {
    margin: 20px 0;
    padding-left: 24px;
}

.article-content li {
    font-size: 17px;
    margin-bottom: 12px;
    line-height: 1.7;
}

.content-image {
    width: 100%;
    max-width: 1000px;
    aspect-ratio: 3/2;
    margin: 0 auto 16px auto;
    border-radius: 12px;
    display: block;
}

/* FAQ Section */
.faq-section {
    margin-top: 60px;
}

.faq-section h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 24px;
}

.faq-item {
    background: var(--card-bg);
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 20px;
    background: none;
    border: none;
    text-align: left;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    font-family: inherit;
    color: var(--text-primary);
}

.faq-question:hover {
    color: var(--accent-blue);
}

.faq-icon {
    font-size: 24px;
    transition: var(--transition);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer-content {
    padding: 0 20px 20px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 60px 0;
}

.pagination a,
.pagination span {
    padding: 10px 16px;
    background: var(--card-bg);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.pagination a:hover {
    background: var(--accent-blue);
    color: #ffffff;
    border-color: var(--accent-blue);
}

.pagination .active {
    background: var(--accent-blue);
    color: #ffffff;
    border-color: var(--accent-blue);
}

.pagination .disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* Footer */
footer {
    background: var(--dark-bg);
    color: #f5f5f7;
    padding: 30px 20px;
    margin-top: 10px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    font-size: 14px;
}

.footer-content a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: var(--transition);
}

.footer-content a:hover {
    color: var(--accent-hover);
}

/* Mobile Menu */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background: var(--dark-bg);
        width: 100%;
        padding: 20px;
        gap: 20px;
        transition: var(--transition);
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .burger {
        display: flex;
    }
    
    .burger.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }
    
    .burger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .burger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    .hero {
        padding: 20px 0;
        margin-bottom: 40px;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    h1 {
        font-size: 28px;
    }
    
    .article-content h2 {
        font-size: 24px;
    }
    
    .article-intro,
    .article-content p,
    .article-content li {
        font-size: 16px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}

/* ============================================
   КАРТКИ СТАТЕЙ НА ПАГІНАЦІЇ
   ============================================ */

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.article-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

.article-card-image {
    width: calc(100% - 24px);
    height: 200px;
    object-fit: cover;
    display: block;
    margin: 12px 12px 0 12px;
    border-radius: 8px;
}

.article-card-content {
    padding: 20px;
}

.article-card-content h2 {
    font-size: 1.25rem;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.article-card-content h2 a {
    color: #1d1d1f;
    text-decoration: none;
    transition: color 0.2s;
}

.article-card-content h2 a:hover {
    color: #0071e3;
}

.article-card-content p {
    color: #6e6e73;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 16px 0;
}

.read-more {
    color: #0071e3;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.read-more:hover {
    color: #0077ed;
}

/* ПАГІНАЦІЯ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 40px 0 30px 0;
}

.pagination a,
.pagination span {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    color: #1d1d1f;
    transition: background 0.2s;
}

.pagination a:hover {
    background: #f5f5f7;
}

.page-current {
    background: #0071e3;
    color: #fff;
    font-weight: 600;
}

.page-link {
    color: #0071e3;
}

.page-prev,
.page-next {
    font-weight: 500;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .article-card-image {
        height: auto;
    }
}

/* HERO СЕКЦІЯ */
.hero {
    background: #f5f5f7;
    padding: 30px 20px;
    text-align: center;
    color: #1d1d1f;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 3rem;
    margin: 0 0 16px 0;
    font-weight: 700;
}

.hero p {
    font-size: 1.25rem;
    color: #6e6e73;
    max-width: 600px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .hero {
        padding: 20px 20px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
}

/* КОНТЕЙНЕР */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   СТОРІНКА СТАТТІ
   ============================================ */

/* Відступ між картинкою та H1 */
.article-header img.article-image {
    margin-bottom: 24px;
}

/* Зменшення відступу під змістом */
.toc {
    margin-bottom: 10px;
}

/* Зменшення відступу між статтею та FAQ */
.faq-section {
    margin-top: 10px;
    margin-bottom: 32px;
}


/* ============================================
   ТЕХНІЧНІ СТОРІНКИ (Про нас, Контакти, Privacy)
   ============================================ */

.page-container {
    max-width: 800px;
    padding: 60px 20px;
    margin: 0 auto;
}

.page-container-wide {
    max-width: 900px;
    padding: 60px 20px;
    margin: 0 auto;
}

.page-container h1,
.page-container-wide h1 {
    margin-bottom: 30px;
}

.page-intro {
    color: #6e6e73;
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.info-card {
    background: #f5f5f7;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.info-card h2 {
    margin-top: 0;
}

.info-card h3 {
    margin-top: 24px;
    margin-bottom: 12px;
}

.info-card p {
    margin-bottom: 16px;
}

.info-card ul {
    margin: 16px 0;
    padding-left: 20px;
}

.info-card ul li {
    margin-bottom: 8px;
    line-height: 1.8;
}

.white-card {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.white-card h3 {
    margin-top: 0;
}

.white-card p {
    margin-bottom: 16px;
}

.contact-grid {
    display: grid;
    gap: 24px;
}

.contact-card {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.contact-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.contact-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.contact-icon.email {
    background: #0071e3;
}

.contact-icon.telegram {
    background: #0088cc;
}

.contact-info h3 {
    margin: 0;
    font-size: 1.1rem;
}

.contact-info p {
    margin: 4px 0 0 0;
    color: #6e6e73;
    font-size: 0.9rem;
}

.contact-link {
    color: #0071e3;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    transition: color 0.2s;
}

.contact-link:hover {
    color: #0077ed;
}

.contact-link.telegram {
    color: #0088cc;
}

.contact-link.telegram:hover {
    color: #0099dd;
}

.privacy-content {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    line-height: 1.8;
}

.privacy-content h2 {
    font-size: 1.5rem;
    margin-top: 32px;
    margin-bottom: 16px;
}

.privacy-content h2:first-of-type {
    margin-top: 0;
}

.privacy-content p {
    margin-bottom: 16px;
}

.privacy-content ul {
    margin: 16px 0;
    padding-left: 24px;
}

.privacy-content ul li {
    margin-bottom: 8px;
}

.privacy-content strong {
    font-weight: 600;
}

.privacy-content hr {
    margin: 40px 0;
    border: none;
    border-top: 1px solid #d2d2d7;
}

.privacy-content a {
    color: #0071e3;
    text-decoration: none;
}

.privacy-content a:hover {
    color: #0077ed;
}

.last-updated {
    color: #6e6e73;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .page-container,
    .page-container-wide {
        padding: 40px 20px;
    }
    
    .info-card,
    .white-card,
    .contact-card {
        padding: 24px;
    }
    
    .privacy-content {
        padding: 24px;
    }
}
