/* Бургер меню для мобильной версии */
.burger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    width: 30px;
    height: 24px;
    justify-content: space-between;
    position: relative;
    z-index: 1001;
}

.burger-line {
    width: 100%;
    height: 3px;
    background: #2d3748;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Анимация бургер кнопки */
.burger-menu.active .burger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu.active .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-menu.active .burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Мобильное меню */
.mobile-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
    z-index: 1000;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    padding-top: 110px;
    overflow-y: auto;
}

.mobile-nav.active {
    left: 0;
}

.mobile-nav-header {
    padding: 2rem 1.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.mobile-nav-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.mobile-nav-logo img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.mobile-nav-title {
    color: white;
    margin: 0;
}

.mobile-nav-title h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.mobile-nav-title p {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0.25rem 0 0;
}

.mobile-nav-links {
    flex: 1;
    padding: 1rem 0;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    padding-left: 2rem;
}

.mobile-nav-link i {
    width: 24px;
    margin-right: 1rem;
    text-align: center;
    font-size: 1.2rem;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-right: 2px solid white;
    border-bottom: 2px solid white;
    transform: translateY(-50%) rotate(-45deg);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-link:hover::after {
    opacity: 1;
}

.mobile-nav-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.mobile-contact-info {
    color: white;
    margin-bottom: 1rem;
}

.mobile-contact-info p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.mobile-social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.mobile-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.mobile-social-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Overlay для блокировки прокрутки */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Мобильные стили для header */
@media (max-width: 768px) {
    .header {
        padding: 1rem 0;
        position: relative;
        z-index: 1001;
    }

    .container-header {
        flex-direction: row;
        justify-content: space-between !important;
        align-items: center;
        gap: 1rem;
    }

    .logo-section {
        gap: 0.75rem;
    }

    .logo {
        width: 50px !important;
        height: 50px !important;
    }

    .site-title-main {
        font-size: 1.2rem;
    }

    .site-title-sub {
        font-size: 0.8rem;
    }

    /* Скрываем обычную навигацию на мобильных */
    .nav {
        display: none;
    }

    /* Показываем бургер меню */
    .burger-menu {
        display: flex;
    }

    /* Блокируем прокрутку когда меню открыто */
    body.mobile-nav-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0.75rem 0;
    }

    .container-header {
        padding: 0 1rem;
    }

    .logo {
        width: 45px;
        height: 45px;
    }

    .site-title-main {
        font-size: 1.1rem;
    }

    .site-title-sub {
        font-size: 0.75rem;
    }

    .burger-menu {
        width: 28px;
        height: 22px;
    }

    .mobile-nav-links {
        padding-top: 0.5rem;
    }

    .mobile-nav-link {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }

    .mobile-nav-footer {
        padding: 1rem;
    }
}

/* Улучшения для hero секции на мобильных */
@media (max-width: 768px) {
    .hero-section {
        height: 60vh;
        min-height: 400px;
        padding-top: 2rem;
    }

    .hero-content {
        padding: 0 1.5rem;
    }

    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .hero-stats {
        gap: 1.5rem;
        margin-top: 1rem;
    }

    .hero-stat-number {
        font-size: 2rem;
    }

    .hero-stat-label {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .hero-section {
        height: 50vh;
        min-height: 350px;
    }

    .hero-content {
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-stat {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1rem;
    }

    .hero-stat-number {
        font-size: 1.75rem;
        margin-bottom: 0;
    }

    .hero-stat-label {
        font-size: 0.75rem;
        margin: 0;
    }
}

/* Анимации для плавности */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.mobile-nav-link {
    animation: slideInLeft 0.3s ease forwards;
}

.mobile-nav-link:nth-child(1) { animation-delay: 0.1s; }
.mobile-nav-link:nth-child(2) { animation-delay: 0.15s; }
.mobile-nav-link:nth-child(3) { animation-delay: 0.2s; }
.mobile-nav-link:nth-child(4) { animation-delay: 0.25s; }
.mobile-nav-link:nth-child(5) { animation-delay: 0.3s; }
.mobile-nav-link:nth-child(6) { animation-delay: 0.35s; }
.mobile-nav-link:nth-child(7) { animation-delay: 0.4s; }

/* Дополнительные улучшения для мобильных карточек */
@media (max-width: 768px) {
    .modern-card {
        margin-bottom: 1.5rem;
        padding: 1.5rem;
    }

    .card-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .card-title {
        font-size: 1.5rem;
    }

    .section-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .modern-news-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .modern-news-card {
        height: auto;
        min-height: 350px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .activity-highlights {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .highlight-item {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .modern-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .card-title {
        font-size: 1.25rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .modern-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}