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

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* ==================== НАВИГАЦИЯ ==================== */
nav {
    background: #000;
    color: white;
    padding: 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    border-bottom: 5px solid white;
}

.nav-header {
    width: 100%;
    margin: 0;
    padding: 0;
}

.logo-section {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #000;
    width: 100%;
}

.logo-content {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    gap: 15px;
}

.site-logo {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    object-fit: contain;
}

.banner-image {
    flex-grow: 1;
    height: 100px;
    object-fit: contain;
    max-width: calc(100% - 120px);
}

.nav-container {    
    background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%);
    width: 100%;
    padding: 0;            
}

.nav-content {             
    max-width: 1250px;    
    width: 100%;                           
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    justify-content: center;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    padding: 0.5rem 0.8rem;
    border-radius: 5px;
    display: block;
    white-space: nowrap;
}

nav a:hover {
    opacity: 0.9;
    background: rgba(255,255,255,0.15);
}

/* Переключатель языков */
.language-switcher {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.lang-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85rem;
    font-weight: 500;
}

.lang-btn:hover {
    background: rgba(255,255,255,0.3);
}

.lang-btn.active {
    background: white;
    color: #8B0000;
    font-weight: bold;
}

/* ==================== СЕКЦИИ ==================== */
section {
    min-height: 100vh;
    padding: 80px 20px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    scroll-margin-top: 220px;
    scroll-snap-align: start;
}

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

h1 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    margin-bottom: 1rem;
    color: #FFD700;
    text-align: center;
}

h2 {
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    margin-bottom: 2rem;
    color: #8B0000;
    text-align: center;
}

/* ==================== ГЛАВНАЯ СТРАНИЦА ==================== */
#home {
    background: #000;
    text-align: center;
    position: relative;
}

.hero-banner {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    margin-bottom: 2rem;
    border-radius: 0 0 20px 20px;
}

.hero-content {
    padding: 0 15px;
}

.hero-content p {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: #fff;
    margin-bottom: 1.5rem;
}

.motto {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    font-weight: bold;
    color: #FFD700;
    margin: 1rem 0;
}

.cta-button {
    background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%);
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    display: inline-block;
    margin: 0.5rem;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(139, 0, 0, 0.4);
}

/* ==================== О НАС ==================== */
#about {
    background: white;
    padding-top: 40px;
    padding-bottom: 40px;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1rem;
    color: #666;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
}

.values {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.value-tag {
    background: #8B0000;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
}

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

.logo-container img {
    max-width: 300px;
    width: 100%;
    height: auto;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(139, 0, 0, 0.3);
}

.logo-container svg {
    max-width: 300px;
    width: 100%;
    height: auto;
}

/* ==================== ПРОГРАММЫ ==================== */
#programs {
    background: #f8f9fa;
    padding-top: 40px;
    padding-bottom: 40px;
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.program-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    border-top: 4px solid #8B0000;
}

.program-card:hover {
    transform: translateY(-5px);
}

.program-card h3 {
    color: #8B0000;
    margin-bottom: 0.8rem;
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
}

.program-card p {
    color: #666;
    font-size: clamp(0.9rem, 1.8vw, 1rem);
}

/* ==================== ПРИСОЕДИНИТЬСЯ ==================== */
#join {
    background: white;
    touch-action: pan-y;
}

.join-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 15px;
    touch-action: pan-y;
}

.join-content > p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: #666;
    margin-bottom: 2rem;
}

.benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
    text-align: left;
}

.benefit-item {
    background: #f8f9fa;
    padding: 1.2rem;
    border-radius: 10px;
    border-left: 4px solid #8B0000;
}

.benefit-item h4 {
    color: #8B0000;
    margin-bottom: 0.5rem;
    font-size: clamp(1rem, 2vw, 1.1rem);
}

.benefit-item p {
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
    color: #666;
}

/* ==================== ФОРМА ЗАЯВКИ ==================== */
.application-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    max-width: 600px;
    width: 100%;
    margin: 2rem auto;
    text-align: left;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
    font-size: clamp(0.9rem, 1.8vw, 1rem);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.9rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8B0000;
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
}

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

.submit-button {
    background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    cursor: pointer;
    width: 100%;
    transition: transform 0.3s, box-shadow 0.3s;
    font-weight: 600;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 0, 0, 0.4);
}

.submit-button:active {
    transform: translateY(0);
}

.success-msg {
    background: #4caf50;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    display: none;
    text-align: center;
}

/* ==================== КОНТАКТЫ ==================== */
#contact {
    background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%);
    color: white;
    padding-top: 40px;
    padding-bottom: 40px;
}

#contact h2 {
    color: white;
}

.contact-info {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-width: 600px;
    width: 100%;
    margin: 0 auto 2rem;
    color: #333;
}

.contact-info h3 {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
}

.contact-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.contact-item strong {
    flex-shrink: 0;
}

.contact-item a {
    color: #8B0000;
    text-decoration: none;
    word-break: break-all;
}

.contact-item a:hover {
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0 15px;
}

.social-btn {
    background: white;
    color: #8B0000;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;
    display: inline-block;
    font-size: clamp(0.9rem, 1.8vw, 1rem);
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* ==================== ФУТЕР ==================== */
footer {
    background: #1a1a1a;
    color: white;
    text-align: center;
    padding: 2rem 1rem;
}

footer p {
    font-size: clamp(0.85rem, 1.8vw, 1rem);
}

/* ==================== АДАПТИВНОСТЬ ==================== */

/* Планшеты (768px - 1024px) */
@media (max-width: 1024px) {
    section {
        padding: 130px 20px 50px;
    }
    
    .about-content {
        gap: 2rem;
    }
    
    .programs-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Мобильные устройства (до 768px) */
@media (max-width: 768px) {
    /* Навигация */
    nav {
        border-bottom: 3px solid white;
    }
    
    .logo-section {
        padding: 8px 10px;
    }
    
    .logo-content {
        gap: 10px;
    }
    
    .site-logo {
        width: 65px;
        height: 65px;
    }
    
    .banner-image {
        height: 65px;
        max-width: calc(100% - 80px);
    }
    
    .nav-content {
        padding: 12px 15px;
        flex-direction: column;
        gap: 12px;
    }
    
    nav ul {
        gap: 0.4rem;
        justify-content: center;
    }
    
    nav a {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }
    
    .language-switcher {
        gap: 0.4rem;
    }
    
    .lang-btn {
        padding: 0.35rem 0.7rem;
        font-size: 0.8rem;
    }
    
    html {
        scroll-padding-top: 180px;
    }
    
    /* Секции */
    section {
        min-height: 100vh;
        height: 100vh;
        padding: 70px 15px 30px;
        overflow-y: auto;
        box-sizing: border-box;
        scroll-margin-top: 180px;
        scroll-snap-align: start;
    }
    
    #home {
        padding-top: 70px;
    }
    
    #about,
    #programs,
    #join,
    #contact {
        justify-content: flex-start;
        padding-top: 70px;
    }
    
    /* Разрешаем прокрутку для раздела с формой */
    #join {
        height: auto !important;
        min-height: 100vh;
    }
    
    /* О нас - одна колонка */
    .about-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .about-text p {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }
    
    .logo-container {
        order: -1;
    }
    
    .logo-container img,
    .logo-container svg {
        max-width: 120px;
    }
    
    .values {
        margin-top: 0.8rem;
        gap: 0.5rem;
    }
    
    .value-tag {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
    
    /* Программы */
    .programs-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }
    
    .program-card {
        padding: 0.8rem;
    }
    
    .program-card h3 {
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
    }
    
    .program-card p {
        font-size: 0.75rem;
        line-height: 1.3;
    }
    
    /* Преимущества */
    .benefits {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }
    
    .benefit-item {
        padding: 0.8rem;
    }
    
    .benefit-item h4 {
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
    }
    
    .benefit-item p {
        font-size: 0.75rem;
    }
    
    /* Форма */
    .application-form {
        padding: 1rem;
        margin: 1rem auto;
    }
    
    .form-group {
        margin-bottom: 0.8rem;
    }
    
    .form-group label {
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.6rem;
        font-size: 14px;
    }
    
    .form-group textarea {
        min-height: 60px;
    }
    
    .submit-button {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }
    
    /* Контакты */
    .contact-info {
        padding: 1rem;
    }
    
    .contact-info h3 {
        font-size: 1rem;
        margin-bottom: 0.8rem !important;
    }
    
    .contact-item {
        padding: 0.5rem;
        font-size: 0.8rem;
        margin: 0.5rem 0;
    }
    
    .social-links {
        gap: 0.5rem;
        margin-top: 1rem;
    }
    
    .social-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    /* Заголовки */
    h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    h2 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    
    h3 {
        font-size: 1rem;
    }
    
    .motto {
        font-size: 1rem;
        margin: 0.5rem 0;
    }
    
    .hero-content p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .cta-button {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        margin: 0.3rem;
    }
    
    .join-content > p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    #join h3 {
        margin-top: 1rem !important;
    }
    
    #contact h3[style] {
        margin: 1rem 0 !important;
    }
}

/* Маленькие мобильные (до 480px) */
@media (max-width: 480px) {
    .site-logo {
        width: 50px;
        height: 50px;
    }
    
    .banner-image {
        height: 50px;
        max-width: calc(100% - 65px);
    }
    
    .logo-section {
        padding: 5px 10px;
    }
    
    nav ul {
        gap: 0.2rem;
    }
    
    nav a {
        padding: 0.3rem 0.4rem;
        font-size: 0.7rem;
    }
    
    .nav-content {
        padding: 8px 10px;
        gap: 8px;
    }
    
    .lang-btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
    }
    
    html {
        scroll-padding-top: 120px;
    }
    
    section {
        min-height: 100vh;
        height: 100vh;
        padding: 60px 10px 20px;
        scroll-margin-top: 120px;
        scroll-snap-align: start;
    }
    
    #home {
        padding-top: 60px;
    }
    
    #about,
    #programs,
    #join,
    #contact {
        padding-top: 60px;
    }
    
    /* Разрешаем прокрутку для раздела с формой */
    #join {
        height: auto !important;
        min-height: 100vh;
    }
    
    h1 {
        font-size: 1.3rem;
    }
    
    h2 {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }
    
    .motto {
        font-size: 0.85rem;
    }
    
    .hero-content p {
        font-size: 0.8rem;
        margin-bottom: 0.8rem;
    }
    
    .cta-button {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        margin: 0.2rem;
        display: inline-block;
        width: auto;
    }
    
    .about-text p {
        font-size: 0.75rem;
        margin-bottom: 0.4rem;
    }
    
    .logo-container img,
    .logo-container svg {
        max-width: 80px;
    }
    
    .values {
        gap: 0.3rem;
    }
    
    .value-tag {
        padding: 0.2rem 0.5rem;
        font-size: 0.65rem;
    }
    
    .programs-grid {
        gap: 0.5rem;
    }
    
    .program-card {
        padding: 0.6rem;
    }
    
    .program-card h3 {
        font-size: 0.75rem;
    }
    
    .program-card p {
        font-size: 0.65rem;
    }
    
    .benefits {
        gap: 0.5rem;
    }
    
    .benefit-item {
        padding: 0.5rem;
    }
    
    .benefit-item h4 {
        font-size: 0.75rem;
    }
    
    .benefit-item p {
        font-size: 0.65rem;
    }
    
    .application-form {
        padding: 0.8rem;
        margin: 0.5rem auto;
    }
    
    .form-group {
        margin-bottom: 0.6rem;
    }
    
    .form-group label {
        font-size: 0.75rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.5rem;
        font-size: 14px;
    }
    
    .form-group textarea {
        min-height: 50px;
    }
    
    .submit-button {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .contact-info {
        padding: 0.8rem;
    }
    
    .contact-item {
        padding: 0.4rem;
        font-size: 0.7rem;
        margin: 0.3rem 0;
    }
    
    .social-links {
        gap: 0.4rem;
    }
    
    .social-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
    
    #join h3 {
        margin-top: 0.5rem !important;
        font-size: 0.9rem;
    }
    
    #contact h3[style] {
        margin: 0.5rem 0 !important;
    }
}

/* Очень маленькие экраны (до 360px) */
@media (max-width: 360px) {
    nav a {
        padding: 0.25rem 0.3rem;
        font-size: 0.65rem;
    }
    
    .lang-btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.65rem;
    }
    
    html {
        scroll-padding-top: 100px;
    }
    
    section {
        padding: 55px 8px 15px;
        min-height: 100vh;
        height: 100vh;
        scroll-margin-top: 100px;
        scroll-snap-align: start;
    }
    
    #home {
        padding-top: 55px;
    }
    
    #about,
    #programs,
    #join,
    #contact {
        padding-top: 55px;
    }
    
    /* Разрешаем прокрутку для раздела с формой */
    #join {
        height: auto !important;
        min-height: 100vh;
    }
    
    h1 {
        font-size: 1.1rem;
    }
    
    h2 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .programs-grid,
    .benefits {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }
    
    .program-card,
    .benefit-item {
        padding: 0.5rem;
    }
    
    .application-form {
        padding: 0.6rem;
    }
}

/* Ландшафтная ориентация на мобильных */
@media (max-width: 768px) and (orientation: landscape) {
    section {
        min-height: 100vh;
        height: auto;
        padding-top: 60px;
        overflow-y: auto;
    }
    
    #home {
        padding-top: 60px;
    }
}

/* Улучшения для touch-устройств */
@media (hover: none) and (pointer: coarse) {
    .cta-button:hover,
    .submit-button:hover,
    .social-btn:hover,
    .program-card:hover {
        transform: none;
    }
    
    .cta-button:active,
    .submit-button:active,
    .social-btn:active {
        transform: scale(0.98);
    }
}

/* Десктопные экраны - дополнительное уменьшение отступов для конкретных разделов */
@media (min-width: 769px) {
    html {
        scroll-padding-top: 220px;
    }
    
    /* Общее уменьшение padding для всех секций */
    section {
        padding-top: 50px !important;
        scroll-margin-top: 220px !important;
    }
    
    #about,
    #programs,
    #contact {
        padding-top: 120px !important;
        padding-bottom: 30px !important;
        justify-content: flex-start !important;
        scroll-margin-top: 220px !important;
    }
    
    /* Уменьшение отступов заголовков в этих разделах */
    #about h2,
    #programs h2,
    #contact h2 {
        margin-bottom: 1rem !important;
        margin-top: 0 !important;
    }
}

/* Поддержка темной темы системы */
@media (prefers-color-scheme: dark) {
    /* Можно добавить стили для темной темы если нужно */
}

/* Уменьшение анимаций для пользователей, которые это предпочитают */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}
