/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #000000;
    --secondary-color: #ffffff;
    --accent-color: #6366f1;
    --text-color: #1a1a1a;
    --text-light: #666666;
    --bg-light: #f5f5f5;
    --border-color: #e5e5e5;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--secondary-color);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Header Styles */
.site-header {
    background-color: var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    position: relative;
}

.nav-logo {
    flex-shrink: 0;
}

.logo-img {
    height: 40px;
    width: auto;
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
    flex: 1;
    justify-content: center;
}

.nav-menu li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu li a:hover {
    color: var(--accent-color);
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-menu li a:hover::after {
    width: 100%;
}

.nav-actions {
    flex-shrink: 0;
}

.btn-register {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-block;
    border: 2px solid var(--primary-color);
}

.btn-register:hover {
    background-color: transparent;
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--secondary-color);
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><path d="M0,300 Q300,100 600,300 T1200,300 L1200,600 L0,600 Z" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: cover;
    opacity: 0.3;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    z-index: 1;
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.2rem;
}

/* Content Section */
.content-section {
    padding: 3rem 0;
}

.main-article {
    max-width: 900px;
    margin: 0 auto;
}

.main-article h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-weight: 700;
}

.main-article h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-weight: 600;
}

.main-article h4 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    font-weight: 600;
}

.main-article p {
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-color);
}

.main-article ul,
.main-article ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.main-article li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.steps-list {
    list-style: none;
    padding-left: 0;
}

.steps-list li {
    margin-bottom: 2rem;
    padding-left: 2.5rem;
    position: relative;
}

.steps-list li::before {
    content: counter(step-counter);
    counter-increment: step-counter;
    position: absolute;
    left: 0;
    top: 0;
    background-color: var(--accent-color);
    color: var(--secondary-color);
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.steps-list {
    counter-reset: step-counter;
}

.steps-list li strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.feature-card {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.feature-card h4 {
    margin-top: 0;
    color: var(--accent-color);
}

/* Tables */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background-color: var(--secondary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.info-table thead {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

.info-table th,
.info-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.info-table th {
    font-weight: 600;
}

.info-table tbody tr:hover {
    background-color: var(--bg-light);
}

.info-table tbody tr:last-child td {
    border-bottom: none;
}

/* Highlight Box */
.highlight-box {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-left: 4px solid var(--accent-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.highlight-box h4 {
    margin-top: 0;
    color: var(--accent-color);
}

/* CTA Section */
.cta-section {
    background-color: var(--bg-light);
    padding: 3rem;
    border-radius: 12px;
    text-align: center;
    margin: 3rem 0;
}

.cta-section h3 {
    margin-top: 0;
    font-size: 2rem;
    color: var(--text-color);
}

.cta-section p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: var(--text-light);
}

/* Кнопка в CTA секции - темная для контраста */
.cta-section .btn-primary {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: 2px solid var(--primary-color);
}

.cta-section .btn-primary:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--secondary-color);
}

/* Footer */
.site-footer {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 1.5rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.footer-section h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.25rem;
}

.footer-section a {
    color: var(--secondary-color);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-section a:hover {
    opacity: 1;
}

.footer-section p {
    opacity: 0.8;
    line-height: 1.6;
}

.footer-legal {
    margin: 1rem 0;
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-legal h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.footer-legal p {
    font-size: 0.85rem;
    line-height: 1.5;
    opacity: 0.85;
    color: var(--secondary-color);
    margin-bottom: 0;
}

.footer-legal a {
    color: var(--secondary-color);
    text-decoration: underline;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.footer-legal a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin: 0.25rem 0;
    opacity: 0.7;
    font-size: 0.85rem;
}

/* News List */
.news-list {
    display: grid;
    gap: 2rem;
    margin: 2rem 0;
}

.news-item {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.news-item h3 {
    margin-top: 0;
}

.news-item h3 a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-item h3 a:hover {
    color: var(--accent-color);
}

.news-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.news-excerpt {
    margin-bottom: 1rem;
}

.news-read-more {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.news-read-more:hover {
    color: var(--primary-color);
}

/* Images */
.main-article img {
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: block;
    object-fit: cover;
}

.article-image-wrapper {
    display: block;
    margin: 2rem auto;
    width: 100%;
    max-width: 100%;
    position: relative;
    overflow: hidden;
    background-color: #f5f5f5;
    border-radius: 8px;
}

.article-image {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    background-color: #f5f5f5;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 16 / 9;
}

.article-image:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Адаптивные размеры изображений для десктопа */
@media (min-width: 1200px) {
    .article-image-wrapper {
        max-width: 900px;
        margin: 2rem auto;
        border-radius: 12px;
    }
    
    .article-image {
        border-radius: 12px;
        max-width: 100%;
    }
}

/* Планшеты */
@media (max-width: 1024px) and (min-width: 769px) {
    .article-image-wrapper {
        max-width: 100%;
        margin: 1.75rem 0;
        border-radius: 10px;
    }
    
    .article-image {
        border-radius: 10px;
        max-width: 100%;
    }
}

/* Мобильные устройства */
@media (max-width: 768px) {
    .article-image-wrapper {
        max-width: 100%;
        margin: 1.5rem 0;
        border-radius: 8px;
    }
    
    .article-image {
        border-radius: 8px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
        max-width: 100%;
    }
    
    .article-image:hover {
        transform: none;
    }
}

/* Маленькие мобильные */
@media (max-width: 480px) {
    .article-image-wrapper {
        max-width: 100%;
        margin: 1rem 0;
        border-radius: 6px;
    }
    
    .article-image {
        border-radius: 6px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        max-width: 100%;
    }
}

/* Оптимизация загрузки */
.article-image[loading="lazy"] {
    content-visibility: auto;
    contain-intrinsic-size: 1200px 675px;
}

/* Плавное появление изображений */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.article-image {
    animation: fadeIn 0.5s ease-in;
}

/* Предотвращение растягивания изображений */
.article-image-wrapper picture {
    display: block;
    width: 100%;
    height: auto;
}

.article-image-wrapper picture img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background-color: var(--secondary-color);
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
        z-index: 999;
        gap: 1rem;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li a {
        display: block;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-menu li:last-child a {
        border-bottom: none;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .main-article h2 {
        font-size: 1.75rem;
    }
    
    .main-article h3 {
        font-size: 1.35rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .info-table {
        font-size: 0.9rem;
    }
    
    .info-table th,
    .info-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .btn-register {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .btn-primary {
        padding: 0.9rem 1.5rem;
        font-size: 1rem;
    }
    
    .main-article {
        font-size: 0.95rem;
    }
    
    .main-article h2 {
        font-size: 1.5rem;
    }
    
    .main-article h3 {
        font-size: 1.25rem;
    }
    
    .cta-section {
        padding: 2rem 1.5rem;
    }
    
    .info-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Performance Optimizations */
img {
    loading: lazy;
    max-width: 100%;
    height: auto;
}

/* Оптимизация изображений */
img[loading="lazy"] {
    content-visibility: auto;
}

/* Accessibility */
a:focus,
button:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .btn-primary,
    .btn-register {
        display: none;
    }
}
