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

:root {
    --primary-blue: #0066CC;
    --light-blue: #0080FF;
    --accent-blue: #0099FF;
    --sky-blue: #00BFFF;
    --pale-blue: #E6F3FF;
    --white: #FFFFFF;
    --light-gray: #F8FCFF;
    --text-dark: #1a1a1a;
    --text-medium: #333333;
    --text-gray: #666666;
    --border-color: rgba(0, 102, 204, 0.15);
    --gradient-1: linear-gradient(135deg, #0066CC 0%, #0080FF 100%);
    --gradient-2: linear-gradient(135deg, #0080FF 0%, #00BFFF 100%);
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(0, 102, 204, 0.2);
    --shadow-glass: 0 8px 32px 0 rgba(0, 102, 204, 0.1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --white: #d4d5d7;
        --light-gray: #1e293b;
        --text-dark: #000000;
        --text-gray: #000000;
        --border-color: #334155;
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.8;
    color: var(--text-dark);
    background: #FFFFFF;
    font-size: 17px;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

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

/* Header */
header {
    background: var(--white);
    border-bottom: 2px solid var(--pale-blue);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.08);
}

header.scrolled {
    box-shadow: var(--shadow-md);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-blue);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

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



.logo h1 {
    font-size: 1.3rem;
    font-weight: 700;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 0.3rem;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
    align-items: center;
}

.main-nav a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    font-size: 0.9rem;
    display: block;
    white-space: nowrap;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient-2);
    transition: width 0.3s ease;
}

.main-nav a:hover {
    background: var(--light-gray);
    color: var(--light-blue);
}

.main-nav a:hover::after {
    width: 80%;
}

.main-nav a.active {
    background: var(--light-gray);
    color: var(--light-blue);
}

.main-nav a.btn-login {
    background: var(--gradient-2);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-weight: 700;
    margin-left: 0.5rem;
}

.main-nav a.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.main-nav a.btn-login::after {
    display: none;
}

/* Hero Section */
#hero {
    background: transparent;
    color: var(--text-dark);
    padding: 8rem 0 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;
}



#hero .container {
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    padding: 0.7rem 1.8rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2.5rem;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-glass);
    color: var(--primary-blue);
}

#hero h2 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 2rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.01em;
    color: var(--primary-blue);
}

#hero p {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    margin-bottom: 3rem;
    opacity: 0.85;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-medium);
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 5rem;
}

.btn-secondary-outline {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--primary-blue);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-glass);
}

.btn-secondary-outline:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.2);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-glass);
}

.stat-number {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-blue);
}

.stat-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-medium);
    opacity: 0.8;
}



/* Buttons */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--light-blue) 100%);
    color: var(--white);
    box-shadow: var(--shadow-glass);
    font-weight: 600;
    font-size: 1.05rem;
}

.btn-primary:hover {
    box-shadow: 0 12px 40px rgba(0, 71, 171, 0.3);
}

.btn-secondary {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--primary-blue);
    margin-top: 1rem;
    box-shadow: var(--shadow-glass);
    font-weight: 600;
    font-size: 1.05rem;
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.2);
}

/* Sections */
section {
    padding: 6rem 0;
}

section:nth-child(even) {
    background: transparent;
}

section h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 3rem;
    text-align: center;
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
    width: 100%;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-2);
    border-radius: 2px;
}

.content-box {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    padding: 3.5rem;
    border-radius: 24px;
    box-shadow: var(--shadow-glass);
    border: 1px solid var(--glass-border);
}

.content-box p {
    color: var(--text-medium);
    font-weight: 400;
    font-size: 1.05rem;
    line-height: 1.9;
}

.content-box h3 {
    color: var(--primary-blue);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.6rem;
    font-weight: 800;
}

.content-box ul, .content-box ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.content-box li {
    margin-bottom: 0.8rem;
    color: var(--text-medium);
    line-height: 1.8;
    font-weight: 500;
}

.content-box li::marker {
    color: var(--light-blue);
}

/* Form */
#join-form {
    margin-top: 2.5rem;
}

.form-group {
    margin-bottom: 1.8rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 500;
    color: var(--text-dark);
    transition: all 0.3s ease;
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--light-blue);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--accent-blue);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.form-group.checkbox input {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--light-blue);
}

.form-group.checkbox label {
    margin-bottom: 0;
    cursor: pointer;
}

/* Section Subtitle */
.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-medium);
    font-weight: 500;
    margin-bottom: 2rem;
}

/* Regions Search */
.regions-search {
    max-width: 800px;
    margin: 0 auto 3rem;
}

.search-input {
    width: 100%;
    padding: 1.2rem 1.8rem;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    font-size: 1.05rem;
    font-weight: 400;
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-glass);
}

.search-input:focus {
    outline: none;
    border-color: rgba(30, 144, 255, 0.4);
    box-shadow: 0 0 0 4px rgba(30, 144, 255, 0.1);
}

.region-filters {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-tag {
    padding: 0.7rem 1.4rem;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text-medium);
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: var(--shadow-glass);
}

.filter-tag:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-blue);
}

.filter-tag.active {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--light-blue) 100%);
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 8px 24px rgba(0, 71, 171, 0.3);
}

.no-regions {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-gray);
    font-size: 1.2rem;
    font-weight: 600;
    grid-column: 1 / -1;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    padding: 3rem;
    border-radius: 24px;
    max-width: 600px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2rem;
    font-weight: 300;
    color: var(--text-gray);
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--primary-blue);
}

.modal-body h3 {
    color: var(--primary-blue);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.modal-body .region-type-badge {
    display: inline-block;
    margin-bottom: 2rem;
}

.modal-info {
    margin-top: 2rem;
}

.modal-info p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text-medium);
}

.modal-info strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* Map Container */
.map-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin: 3rem 0;
}

.map-wrapper {
    background: var(--white);
    border-radius: 24px;
    box-shadow: var(--shadow-glass);
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

#russia-map {
    width: 100%;
    height: 600px;
    min-height: 500px;
}

.leaflet-container {
    font-family: 'Inter', sans-serif;
}

.leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 102, 204, 0.2);
}

.leaflet-popup-content {
    margin: 1rem;
    font-size: 0.95rem;
}

.leaflet-popup-content h3 {
    color: var(--primary-blue);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.custom-marker {
    background: transparent;
    border: none;
}

.leaflet-tooltip {
    background: rgba(0, 102, 204, 0.95);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.leaflet-tooltip-top:before {
    border-top-color: rgba(0, 102, 204, 0.95);
}

.leaflet-popup-close-button {
    color: var(--text-gray) !important;
    font-size: 1.5rem !important;
}

.leaflet-popup-close-button:hover {
    color: var(--primary-blue) !important;
}

/* Скрыть флаг Украины в атрибуции Leaflet */
.leaflet-control-attribution img {
    display: none !important;
}

.leaflet-control-attribution svg {
    display: none !important;
}

/* Упростить атрибуцию */
.leaflet-control-attribution {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.8) !important;
    padding: 0.3rem 0.5rem !important;
}

.regions-list {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    padding: 2rem;
    border-radius: 24px;
    box-shadow: var(--shadow-glass);
    border: 1px solid var(--glass-border);
    max-height: 600px;
    overflow-y: auto;
}

.regions-list h3 {
    color: var(--primary-blue);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.region-list-item {
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: var(--white);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.region-list-item:hover {
    background: var(--pale-blue);
    border-color: var(--primary-blue);
    transform: translateX(4px);
}

.region-list-item h4 {
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.region-list-item .region-type {
    color: var(--text-gray);
    font-size: 0.85rem;
}

.region-card {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    padding: 2.5rem;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-glass);
}

.region-type-badge {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    padding: 0.5rem 1rem;
    background: rgba(30, 144, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--primary-blue);
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border: 1px solid rgba(30, 144, 255, 0.2);
}

.region-card:hover {
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.2);
}

.region-card h3 {
    color: var(--primary-blue);
    margin-bottom: 1.2rem;
    font-size: 1.5rem;
    font-weight: 800;
}

.region-card p {
    margin-bottom: 0.7rem;
    color: var(--text-medium);
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 500;
}

.region-card p strong {
    color: var(--text-dark);
    font-weight: 600;
}

.telegram-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 1.2rem;
    padding: 12px 20px;
    background: var(--gradient-2);
    color: var(--white);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.telegram-link:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.telegram-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.telegram-link img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.regions-note {
    margin-top: 3rem;
    text-align: center;
    color: var(--text-medium);
    font-size: 1.1rem;
    font-weight: 500;
}

.regions-note a {
    color: var(--light-blue);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.regions-note a:hover {
    color: var(--primary-blue);
    text-decoration: underline;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: var(--white);
    padding: 4rem 0 1.5rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    margin-bottom: 1.2rem;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--white);
}

.footer-section p,
.footer-section a {
    color: rgba(255,255,255,0.95);
    text-decoration: none;
    display: block;
    margin-bottom: 0.7rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.footer-section a:hover {
    color: var(--white);
    transform: translateX(4px);
}

.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-links a {
    padding: 0.6rem 1.2rem;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.9);
    font-size: 1rem;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 1200px) {
    .main-nav a {
        font-size: 0.85rem;
        padding: 0.5rem 0.6rem;
    }

    .main-nav a.btn-login {
        padding: 0.5rem 0.8rem;
    }
}

@media (max-width: 1024px) {
    .container {
        padding: 0 24px;
    }
    
    #hero h2 {
        font-size: 3rem;
    }
    
    section h2 {
        font-size: 2.5rem;
    }

    .main-nav a {
        font-size: 0.8rem;
        padding: 0.4rem 0.5rem;
    }

    .logo h1 {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    header {
        padding: 1rem 0;
    }

    header .container {
        flex-wrap: nowrap;
    }

    .logo h1 {
        font-size: 1.1rem;
    }

    /* Показываем кнопку мобильного меню */
    .mobile-menu-toggle {
        display: flex;
    }

    /* Скрываем навигацию по умолчанию */
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--white);
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }

    .main-nav.active {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 5rem 1.5rem 2rem;
    }

    .main-nav li {
        border-bottom: 1px solid var(--border-color);
    }

    .main-nav a {
        padding: 1rem 0;
        font-size: 1rem;
        border-radius: 0;
    }

    .main-nav a.btn-login {
        margin-top: 1rem;
        text-align: center;
        border-radius: 10px;
    }

    /* Overlay для закрытия меню */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }

    .mobile-menu-overlay.active {
        display: block;
    }

    #hero {
        padding: 4rem 0 3rem;
        min-height: auto;
    }

    #hero h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    #hero p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-item {
        padding: 1.2rem 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 3rem;
    }

    .hero-buttons a {
        width: 100%;
        text-align: center;
        padding: 1rem 2rem;
    }

    section {
        padding: 3rem 0;
    }

    section h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .content-box {
        padding: 2rem 1.5rem;
    }

    .regions-search {
        padding: 0 1rem;
    }

    .map-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .map-wrapper {
        order: 2;
    }

    .regions-list {
        order: 1;
        max-height: 400px;
    }

    .modal-content {
        padding: 2rem;
        width: 95%;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    #hero {
        padding: 5rem 0 3rem;
    }

    .hero-badge {
        font-size: 0.85rem;
        padding: 0.5rem 1.2rem;
    }

    .btn-primary, .btn-secondary, .btn-secondary-outline {
        padding: 12px 24px;
        font-size: 0.95rem;
    }

    section {
        padding: 2.5rem 0;
    }

    .content-box {
        padding: 1.5rem;
    }

    .region-card {
        padding: 1.5rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 14px;
    }

    .map-wrapper {
        padding: 1rem;
    }

    #russia-map {
        min-height: 300px;
    }

    .modal-body h3 {
        font-size: 1.5rem;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
*:focus-visible {
    outline: 3px solid var(--light-blue);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Print styles */
@media print {
    header {
        position: static;
    }
    
    nav, .telegram-link {
        display: none;
    }
}


/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Увеличиваем размеры кликабельных элементов для touch */
    .main-nav a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .btn-primary,
    .btn-secondary,
    .btn-secondary-outline {
        min-height: 48px;
        padding: 1rem 2rem;
    }

    .region-list-item {
        min-height: 60px;
        padding: 1rem;
    }

    .filter-tag {
        min-height: 44px;
        padding: 0.8rem 1.5rem;
    }
}

/* Дополнительные улучшения для очень маленьких экранов */
@media (max-width: 360px) {
    .container {
        padding: 0 12px;
    }

    .logo h1 {
        font-size: 1rem;
    }

    #hero h2 {
        font-size: 1.6rem;
    }

    .hero-stats {
        gap: 0.8rem;
    }

    .stat-item {
        padding: 1rem 0.8rem;
    }

    .content-box {
        padding: 1.2rem;
    }

    .modal-content {
        padding: 1.2rem;
    }
}


/* Join Section - Вступление в партию */
#join {
    background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
    padding: 4rem 0;
}

#join h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 2rem;
}

.join-intro {
    max-width: 900px;
    margin: 0 auto 3rem;
    text-align: center;
}

.join-intro > p {
    font-size: 1.1rem;
    color: var(--text-medium);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

/* Steps */
.join-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.step-item {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-align: center;
    transition: all 0.3s ease;
}

.step-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,102,204,0.15);
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--gradient-2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 auto 1rem;
}

.step-text {
    font-size: 0.95rem;
    color: var(--text-medium);
    font-weight: 500;
    line-height: 1.5;
}

/* Form Container */
.join-form-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,102,204,0.1);
}

.join-form {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* Form Sections */
.form-section {
    padding: 2rem;
    background: linear-gradient(180deg, #f8fcff 0%, #ffffff 100%);
    border-radius: 15px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.form-section:hover {
    border-color: var(--light-blue);
    box-shadow: 0 2px 12px rgba(0,102,204,0.08);
}

.form-section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
    color: var(--text-dark);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--light-blue);
    box-shadow: 0 0 0 3px rgba(0,128,255,0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-gray);
    font-style: italic;
}

/* Checkbox Groups */
.checkbox-group {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.checkbox-group:hover {
    border-color: var(--light-blue);
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-group label {
    margin: 0;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    line-height: 1.6;
}

.checkbox-group label a {
    color: var(--light-blue);
    text-decoration: none;
    font-weight: 600;
}

.checkbox-group label a:hover {
    text-decoration: underline;
}

/* Button */
.btn-large {
    padding: 1.25rem 3rem;
    font-size: 1.1rem;
    font-weight: 700;
    width: 100%;
    margin-top: 1rem;
}

/* Mobile Styles */
@media (max-width: 768px) {
    #join {
        background: white;
        padding: 2rem 0;
    }
    
    #join h2 {
        font-size: 2rem;
    }
    
    .join-steps {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .step-item {
        padding: 1.25rem;
    }
    
    .join-form-container {
        padding: 1.5rem;
        box-shadow: none;
        border-radius: 0;
    }
    
    .form-section {
        padding: 1.5rem;
        background: #f8fcff;
        border-radius: 12px;
    }
    
    .form-section-title {
        font-size: 1.1rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .btn-large {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .join-intro > p {
        font-size: 1rem;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .step-text {
        font-size: 0.875rem;
    }
}
