/* static/css/style.css */

/* 1. Импорт шрифтов */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Open+Sans:wght@400;600&display=swap');

/* :root с финальными цветами и шрифтами */
:root {
    --primary-color: #f5824e;   /* Теплый оранжевый */
    --secondary-color: #fdf7f2; /* Светло-бежевый */
    --accent-color: #35817a;    /* Бирюзовый (заданный вами) */
    --text-color: #424242;      /* Темно-серый */
    --text-on-primary: #ffffff; /* Белый текст для оранжевого фона */
    --text-on-accent: #ffffff;  /* Белый текст для бирюзового фона */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --base-font-size: 16px;
    --base-line-height: 1.7;
}
body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: #ffffff;
    line-height: var(--base-line-height);
    font-size: var(--base-font-size);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* --- СТИЛИ ДЛЯ "ПРИЛИПАЮЩЕГО" ФУТЕРА --- */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
/* Новый стиль для контейнера контента */
.content-container {
    flex: 1 0 auto;
}

/* --- Улучшение иерархии типографики --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-color);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}
h1, .main-title, .page-header h1 { font-size: 2.8rem; font-weight: 700; margin-bottom: 1.2rem; }
h2 { font-size: 2.1rem; font-weight: 700; }
h3 { font-size: 1.6rem; font-weight: 600; }
h4, .card h4, .program-card h4, .values-card h4, .timeline-content h4 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.8rem; }
h5, .card h5, .testimonial-card h5, .faq-card h5, .stats-card h5, .team-info h5, footer h5 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.6rem; }
h6 { font-size: 1rem; font-weight: 600; }

.section-title {
    color: var(--text-color);
    opacity: 0.8;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.8rem;
    margin-top: 0;
}

p.lead {
    font-size: 1.15rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: #555;
}

/* --- Навигационная панель (Navbar) --- */
.navbar {
    background-color: var(--accent-color); /* Бирюзовый фон */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 0.8rem 0;
}
.navbar-brand span:first-child { color: var(--text-on-accent); /* Белая лапа */ }
.navbar-brand span:last-child { font-weight: 700; font-size: 24px; color: var(--text-on-accent); /* Белый текст */ }
.nav-link { color: rgba(255, 255, 255, 0.85); font-weight: 500; margin: 0 10px; font-family: var(--font-heading); text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.8px; transition: color 0.3s ease; }
.nav-link:hover, .navbar-nav .nav-link.active { color: var(--text-on-accent); /* Белый при наведении/активности */ }
.navbar-toggler { border-color: rgba(255, 255, 255, 0.5); }
.navbar-toggler-icon { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); }
.navbar .btn-primary { background-color: var(--primary-color); border-color: var(--primary-color); color: var(--text-on-primary); padding: 8px 25px; font-size: 0.85rem; box-shadow: none; }
.navbar .btn-primary:hover { background-color: #e0703b; border-color: #e0703b; color: var(--text-on-primary); }

.navbar-logo-img {
    height: 45px; /* Основной размер логотипа. Измените по необходимости */
    width: auto;  /* Сохраняем пропорции */
    margin-right: 8px; /* Отступ справа от лого */
    vertical-align: middle; /* Помогает выравниванию с текстом, если flex не сработал */
}

.navbar-logo-text {
    font-family: var(--font-heading); /* Используем шрифт заголовков */
    font-weight: 700;
    font-size: 24px; /* Размер текста лого */
    color: var(--text-on-accent); /* Белый текст на бирюзовом фоне */
    vertical-align: middle;
}

.footer-logo-img {
    height: 45px; /* Такой же размер, как в шапке, или измените */
    width: auto;
    margin-right: 8px;
    vertical-align: middle;
}

.footer-logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 24px;
    color: var(--text-color); /* Используем основной темный цвет текста */
    vertical-align: middle;
}

.footer-tagline { /* Стили для текста под логотипом */
    font-size: 0.9rem;
    color: #666; /* Слегка светлее основного */
}

.footer-copyright {
    border-top-color: rgba(0, 0, 0, 0.08) !important; /* Убедимся, что цвет линии виден */
    margin-top: 2rem !important;
    padding-top: 2rem !important;
    font-size: 0.85rem;
    color: #777;
}

/* --- Стили для выпадающего меню --- */
.navbar .dropdown-menu {
    background-color: white; /* Белый фон для меню */
    border-radius: 8px;      /* Скругление как у кнопок */
    border: none;            /* Убираем стандартную рамку */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); /* Тень */
    margin-top: 0.5rem;      /* Небольшой отступ от кнопки */
    padding: 0.5rem 0;       /* Внутренние отступы */
}

.navbar .dropdown-item {
    color: var(--text-color); /* Темно-серый текст */
    font-family: var(--font-body); /* Основной шрифт */
    font-size: 0.9rem;
    padding: 0.5rem 1.2rem; /* Отступы для пунктов */
    transition: background-color 0.2s ease, color 0.2s ease;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
    background-color: var(--secondary-color); /* Бежевый фон при наведении */
    color: var(--text-color);
}

.navbar .dropdown-item.active,
.navbar .dropdown-item:active {
    background-color: var(--accent-color); /* Бирюзовый фон для активного пункта */
    color: var(--text-on-accent); /* Белый текст */
}

.navbar .dropdown-divider {
    border-top-color: rgba(0, 0, 0, 0.08); /* Цвет разделителя */
}

/* Адаптация для мобильных - меню будет светлым на темном фоне */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: var(--accent-color); /* Фон при раскрытии на мобильных */
        padding: 1rem;
        margin-top: 0.5rem;
        border-radius: 8px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
    .navbar .dropdown-menu {
        background-color: transparent; /* Убираем фон у вложенного меню */
        box-shadow: none;
        border: none;
        padding: 0;
        margin-top: 0.5rem;
    }
    .navbar .dropdown-item {
        color: rgba(255, 255, 255, 0.85); /* Светлый текст для пунктов */
        padding-left: 1rem; /* Добавляем отступ для вложенности */
    }
     .navbar .dropdown-item:hover,
     .navbar .dropdown-item:focus,
     .navbar .dropdown-item.active,
     .navbar .dropdown-item:active {
         background-color: transparent;
         color: white; /* Полностью белый активный/при наведении */
     }
     .navbar .dropdown-divider {
        border-top-color: rgba(255, 255, 255, 0.2); /* Светлый разделитель */
    }
}


/* --- Кнопки (Основные стили) --- */
.btn-primary,
.btn-outline-primary {
    font-family: var(--font-heading);
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-on-primary);
    border-radius: 8px;
    padding: 12px 35px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 4px 10px rgba(245, 130, 78, 0.2);
}
.btn-primary:hover { background-color: #e0703b; border-color: #e0703b; color: var(--text-on-primary); opacity: 0.95; }
.btn-outline-primary { color: var(--primary-color); background-color: transparent; border: 2px solid var(--primary-color); box-shadow: none; }
.btn-outline-primary:hover { background-color: var(--primary-color); color: var(--text-on-primary); border-color: var(--primary-color); }

/* --- Стили для Hero Section --- */
.hero-section {
    position: relative;
    overflow: hidden;
    padding: 100px 40px;
    margin-top: 0;
    margin-bottom: 0;
    color: var(--text-on-primary);
    background-color: var(--primary-color); /* Fallback */
    min-height: 60vh;
    display: flex;
    align-items: center;
}
.hero-video-bottom .video-background-container video {
    top: auto; /* Сбрасываем выравнивание по верху */
    bottom: 0; /* Устанавливаем выравнивание по низу */
}

.video-background-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; overflow: hidden; }
.video-background-container video {
    position: absolute;
    top: 0; /* <-- Устанавливаем привязку к верху */
    left: 50%;
    transform: translateX(-50%); /* <-- Убираем translateY, оставляем только центрирование по горизонтали */
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
}
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(40, 40, 40, 0.4); z-index: 1; }
.hero-content-overlay { position: relative; z-index: 2; width: 100%; }
.hero-section .section-title { color: var(--text-on-primary); opacity: 0.8; }
.hero-section .main-title, .hero-section h1, .hero-section h2, .hero-section h3, .hero-section h4, .hero-section h5, .hero-section p { color: var(--text-on-primary); }
.hero-section .btn-primary { background-color: var(--text-on-primary); border-color: var(--text-on-primary); color: var(--primary-color); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); }
.hero-section .btn-primary:hover { background-color: var(--text-on-primary); opacity: 0.9; }
.hero-section .btn-outline-primary { color: var(--text-on-primary); background-color: transparent; border-color: var(--text-on-primary); box-shadow: none; }
.hero-section .btn-outline-primary:hover { background-color: var(--text-on-primary); color: var(--primary-color); border-color: var(--text-on-primary); }

/* --- Секции --- */
.mission-section { background-color: var(--secondary-color); border-radius: 0; padding: 80px 40px; margin-bottom: 0; }
.mission-section h2, .mission-section h5 { color: var(--text-color); }
.mission-section .section-title { color: var(--text-color); opacity: 0.7; }
.page-header { background-color: var(--secondary-color); padding: 80px 0; margin-bottom: 60px; }
.page-header h1, .page-header p { color: var(--text-color); }
.container.mt-5 { margin-top: 4rem !important; } /* Отступ для первой секции после hero */

/* --- Карточки и общие элементы --- */
.values-card, .program-card, .testimonial-card, .faq-card, .stats-card, .team-card, .card {
    background-color: var(--secondary-color);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
}
.values-card, .program-card, .testimonial-card, .faq-card, .stats-card, .team-card {
    height: 100%;
}
.values-card:hover, .program-card:hover, .testimonial-card:hover, .faq-card:hover, .stats-card:hover, .team-card:hover, .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.07);
}
/* Иконки */
.values-icon, .card-icon { background-color: rgba(53, 129, 122, 0.1); /* Фон под цвет accent */ color: var(--accent-color); width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 20px; margin-left: auto; margin-right: auto; }
.program-card .values-icon, .values-card .values-icon { margin-left: auto; margin-right: auto; }

/* Отзывы */
.testimonial-image { width: 60px; height: 60px; border-radius: 50%; overflow: hidden; margin-right: 15px; flex-shrink: 0; }
.testimonial-image img { width: 100%; height: 100%; object-fit: cover; }
.testimonial-card blockquote, .testimonial-card .P { font-style: italic; color: #555; margin-top: 1rem; margin-bottom: 1rem; padding-left: 1.5rem; border-left: 3px solid var(--accent-color); }

/* --- Футер --- */
footer {
    background-color: var(--secondary-color);
    padding: 60px 0;
    margin-top: 0; /* `margin-top: auto;` здесь не нужен, так как .content-container растягивается */
    font-size: 0.95rem;
    color: var(--text-color);
    flex-shrink: 0; /* Гарантирует, что футер не будет сжиматься */
}
footer h5 { color: var(--text-color); font-family: var(--font-heading); margin-bottom: 15px; font-weight: 600; }
footer address { line-height: 1.8; }
.social-icons a { color: var(--primary-color); font-size: 24px; margin-right: 18px; transition: color 0.3s ease; }
.social-icons a:hover { color: #e0703b; }
footer .nav-link { color: var(--text-color); padding: 5px 0 !important; font-family: var(--font-body); text-transform: none; font-size: 0.95rem; font-weight: 400; letter-spacing: normal; }
footer .nav-link:hover { color: var(--primary-color); }
footer .navbar-brand span:first-child { color: var(--primary-color); } /* Лапа в футере */
footer .navbar-brand span:last-child { color: var(--text-color); } /* Текст лого в футере */

/* --- Статистика --- */
.stat-card { background-color: white; text-align: center; padding: 30px 20px; }
.stat-number { font-size: 2.8rem; font-weight: 700; font-family: var(--font-heading); color: var(--primary-color); margin-bottom: 5px; }
.stats-card { text-align: center; padding: 30px 20px; background-color: white; }
.stats-number { font-size: 2.8rem; font-weight: 700; font-family: var(--font-heading); color: var(--primary-color); margin-bottom: 10px; }
.stats-card h5, .stat-card h5 { margin-bottom: 5px; font-size: 1rem; font-weight: 600; }
.stats-card p { font-size: 0.9rem; color: #666; }

/* --- Timeline --- */
.timeline { position: relative; padding: 30px 0; list-style: none; }
.timeline:before { content: ''; position: absolute; height: 100%; width: 3px; background: rgba(0,0,0,0.1); left: 50%; transform: translateX(-50%); top: 0; bottom: 0; }
.timeline-item { margin-bottom: 50px; position: relative; }
.timeline-item:after { content: ""; display: table; clear: both; }
.timeline-content { background: white; border-radius: 10px; padding: 30px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); width: 45%; position: relative; border: 1px solid #eee; }
.timeline-content-left { float: left; margin-right: 5%; }
.timeline-content-left:after { content: ''; position: absolute; top: 30px; right: -10px; width: 0; height: 0; border-top: 10px solid transparent; border-bottom: 10px solid transparent; border-left: 10px solid white; filter: drop-shadow(-1px 1px 1px rgba(0,0,0,0.05)); }
.timeline-content-right { float: right; margin-left: 5%; }
.timeline-content-right:after { content: ''; position: absolute; top: 30px; left: -10px; width: 0; height: 0; border-top: 10px solid transparent; border-bottom: 10px solid transparent; border-right: 10px solid white; filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.05)); }
.timeline-marker { width: 50px; height: 50px; line-height: 50px; border-radius: 50%; background: var(--accent-color); color: white; font-family: var(--font-heading); font-size: 1.2rem; font-weight: 600; text-align: center; position: absolute; top: 15px; left: 50%; transform: translateX(-50%); z-index: 1; box-shadow: 0 0 0 6px white; border: 2px solid var(--accent-color); }
.clearfix:after { content: ""; display: table; clear: both; }

/* --- Команда --- */
.team-img { width: 100%; height: 250px; object-fit: cover; background-color: #eee; border-bottom: 1px solid #eee; }
.team-info { padding: 25px; }

/* --- Медиа-запросы --- */
@media (max-width: 992px) {
    h1, .main-title, .page-header h1 { font-size: 2.4rem; }
    h2 { font-size: 1.9rem; }
    h3 { font-size: 1.5rem; }
    .stat-number, .stats-number { font-size: 2.5rem; }
}
@media (max-width: 768px) {
    body { font-size: 15px; }
    h1, .main-title, .page-header h1 { font-size: 2rem; }
    h2 { font-size: 1.7rem; }
    h3 { font-size: 1.4rem; }
    h4 { font-size: 1.15rem; }
    .hero-section { padding: 50px 20px; text-align: center; }
    /* hero-content и hero-image удалены из CSS, т.к. структура изменилась */
    .mission-section, .page-header { padding: 50px 20px; }
    .timeline:before { left: 25px; }
    .timeline-content { width: calc(100% - 55px); float: right; margin-left: 0; margin-right: 0; padding: 20px; }
    .timeline-content-left, .timeline-content-right { float: right; }
    .timeline-content-left:after, .timeline-content-right:after { left: -9px; border-left-width: 0; border-right-width: 10px; }
    .timeline-marker { left: 25px; }
    footer .col-lg-2, footer .col-lg-3, footer .col-lg-4 { text-align: center; margin-bottom: 30px; }
    footer .social-icons { justify-content: center; display: flex; }
    footer address p { text-align: center; }
    footer .nav-link { text-align: center; }
}
@media (max-width: 576px) {
    h1, .main-title, .page-header h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.3rem; }
    h4 { font-size: 1.1rem; }
    .stat-number, .stats-number { font-size: 2.2rem; }
    .navbar-nav { text-align: center; }
    .navbar .btn-primary { margin-top: 15px; width: 90%; margin-left: auto; margin-right: auto; display: block; }
    .values-icon, .card-icon { width: 50px; height: 50px; font-size: 20px; }
    .btn-primary, .btn-outline-primary { padding: 10px 25px; font-size: 0.85rem; }
    .timeline-marker { width: 40px; height: 40px; line-height: 40px; font-size: 1rem; box-shadow: 0 0 0 4px white; }
    .testimonial-card { flex-direction: column; align-items: center !important; text-align: center; }
    .testimonial-image { margin-right: 0; margin-bottom: 10px; }
}
/* =================================================================
   Form Widget Styles (v7 - Force Override Version)
   ================================================================= */

/* 1. КОНТЕЙНЕР ФОРМЫ */
/* ИСПРАВЛЕНИЕ #2: Форма сдвинута левее за счет 100% ширины */
.widget-form-container {
    width: 100%; /* Занимаем всю ширину родителя для выравнивания влево */
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-top: 20px;
    box-sizing: border-box; /* Учитываем padding в расчете ширины */
}

/* 2. ЗАГОЛОВКИ ВНУТРИ ФОРМЫ */
.widget-form-container h2,
.widget-form-container h3 {
    color: #2c3e50;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    margin-bottom: 25px;
}

/* 3. ГРУППИРОВКА ПОЛЯ ВВОДА */
.widget-form-container .form-group {
    margin-bottom: 20px;
    position: relative;
}

/* 4. ТЕКСТОВЫЕ МЕТКИ (LABELS) */
.widget-form-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
}

.widget-form-container .form-group label.required::after {
    content: " *";
    color: #e74c3c;
    font-weight: bold;
    margin-left: 4px;
}

/* 5. ПОЛЯ ВВОДА (INPUT, TEXTAREA) */
.widget-form-container input[type="text"],
.widget-form-container input[type="email"],
.widget-form-container input[type="password"],
.widget-form-container input[type="tel"],
.widget-form-container textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #2c3e50;
    background-color: #ffffff;
    box-sizing: border-box;
    transition: all 0.2s ease-in-out;
}

.widget-form-container input:focus,
.widget-form-container textarea:focus {
    border-color: #007bff; /* Синяя подсветка в цвет кнопок */
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

/* 6. CHECKBOX И RADIO BUTTONS */
.widget-form-container .form-check {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    cursor: pointer;
}

.widget-form-container .form-check input[type="checkbox"],
.widget-form-container .form-check input[type="radio"] {
    height: 1.3em;
    width: 1.3em;
    margin-right: 12px;
    flex-shrink: 0;
}

.widget-form-container .form-check label {
    margin-bottom: 0;
    font-weight: normal;
}

/* 7. КНОПКИ (ИЗОЛИРОВАНЫ И СТИЛИЗОВАНЫ ПОД САЙТ С !IMPORTANT) */
.widget-form-container .form-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
}

/* ИСПРАВЛЕНИЕ #3: Кнопки стилизованы под стиль сайта с !important */
.widget-form-container .form-buttons button,
.widget-form-container .form-buttons input[type="submit"] {
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    font-size: 16px !important;
    color: #ffffff !important;
    background: linear-gradient(45deg, #007bff, #0056b3) !important;
    padding: 12px 28px !important;
    border: none !important;
    border-radius: 50px !important; /* Овальная форма как у "Donate" */
    cursor: pointer !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

.widget-form-container .form-buttons button:hover:not(:disabled),
.widget-form-container .form-buttons input[type="submit"]:hover:not(:disabled) {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15) !important;
}

.widget-form-container .form-buttons button:disabled,
.widget-form-container .form-buttons input[type="submit"]:disabled {
    background: #E5E7EB !important;
    color: #9CA3AF !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* 8. СООБЩЕНИЯ ОБ ОШИБКАХ */
/* ИСПРАВЛЕНИЕ #1: "This field is required." будет красным */
.widget-form-container .error-message,
.widget-form-container [class*="validation-message"],
.widget-form-container [class*="errorlist"] {
    color: #DC2626 !important; /* Красный с !important для надежности */
    font-size: 14px;
    font-weight: 600;
    display: block;
    margin-top: 6px;
}

/* 9. УТИЛИТАРНЫЙ КЛАСС ДЛЯ СКРЫТИЯ ЭЛЕМЕНТОВ */
.widget-form-container .hidden {
    display: none !important;
}
