/* =========================================================
   ГОСУДАРСТВЕННЫЙ ПОРТАЛ "ШКОЛЬНЫЙ ЛЕС НН"
   Лесная тема + гос-стиль (АДАПТИВ + ОПТИМИЗАЦИЯ)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Merriweather:wght@700&display=swap');

:root {
    --primary: #1a472a;
    --primary-light: #2e7d32;
    --primary-dark: #0d2b17;
    --gold: #c8a951;
    --gold-light: #e8d5a3;
    --bg: #f4f7fb;
    --card-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    --radius: 16px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: var(--bg);
    color: #1e2a41;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}
a:hover {
    color: var(--gold);
}

.container {
    padding-left: 24px;
    padding-right: 24px;
}
section {
    margin-bottom: 48px;
}
section:last-child {
    margin-bottom: 0;
}

/* =========================================================
   ШАПКА
   ========================================================= */
.navbar-custom {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    padding: 14px 0;
    border-bottom: 3px solid var(--gold);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.navbar-custom .navbar-brand {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #fff !important;
}
.navbar-custom .navbar-brand i {
    color: var(--gold);
    margin-right: 10px;
}

.navbar-custom .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    margin: 0 4px;
    padding: 6px 12px;
    border-radius: 30px;
    transition: var(--transition);
    white-space: nowrap;
    display: inline-block;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff !important;
}

.navbar-custom .dropdown-menu {
    background: #1a472a;
    border: none;
    border-radius: 12px;
    padding: 8px 0;
    min-width: 180px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.navbar-custom .dropdown-item {
    color: rgba(255, 255, 255, 0.85);
    padding: 10px 20px;
    transition: background 0.2s ease;
    font-weight: 500;
    background: transparent;
}

.navbar-custom .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.navbar-custom .dropdown-item i {
    margin-right: 8px;
    color: #c8a951;
}

/* =========================================================
   ГЕРОЙ-БАННЕР
   ========================================================= */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 80px 0 70px;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.hero-section::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 80px;
    background: var(--bg);
    clip-path: ellipse(70% 100% at 50% 100%);
}
.hero-section h1 {
    font-family: 'Merriweather', serif;
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}
.hero-section h1 span {
    color: var(--gold);
}
.hero-section p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 620px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.hero-search {
    max-width: 560px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}
.hero-search .input-group {
    background: #fff;
    border-radius: 50px;
    padding: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.3s ease;
}
.hero-search .input-group:focus-within {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
}
.hero-search input {
    border: none;
    padding: 16px 24px;
    border-radius: 50px 0 0 50px;
    font-size: 1rem;
    background: transparent;
    outline: none;
    width: 100%;
}
.hero-search input:focus {
    box-shadow: none;
    border-color: transparent;
}
.hero-search button {
    border: none;
    background: var(--gold);
    color: #fff;
    border-radius: 50px;
    padding: 12px 32px;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}
.hero-search button:hover {
    background: var(--primary);
    transform: scale(1.02);
}

/* =========================================================
   СТАТИСТИКА
   ========================================================= */
.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 28px 16px;
    text-align: center;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: var(--transition);
}
.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
}
.stat-card .number {
    font-family: 'Merriweather', serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--primary);
}
.stat-card .label {
    font-size: 0.95rem;
    color: #5a6a7a;
    margin-top: 4px;
}
.stat-card i {
    font-size: 2.2rem;
    color: var(--gold);
    margin-bottom: 8px;
    display: block;
}

/* =========================================================
   КАРТОЧКИ (ЕДИНЫЙ СТИЛЬ)
   ========================================================= */
.forest-card,
.news-card,
.competition-card,
.card-forest,
.card-news,
.card-competition {
    background: #ffffff !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06) !important;
    border: 1px solid rgba(0, 0, 0, 0.03) !important;
    height: 100% !important;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    flex-direction: column !important;
}

.forest-card:hover,
.news-card:hover,
.competition-card:hover,
.card-forest:hover,
.card-news:hover,
.card-competition:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08) !important;
}

.forest-card .card-body,
.news-card .card-body,
.competition-card .card-body,
.card-forest .card-body,
.card-news .card-body,
.card-competition .card-body {
    padding: 24px !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

.forest-card .card-title,
.news-card .card-title,
.competition-card .card-title,
.card-forest .card-title,
.card-news .card-title,
.card-competition .card-title {
    font-family: 'Merriweather', serif !important;
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    color: #1a472a !important;
    margin-bottom: 8px !important;
}

.forest-card .card-title a,
.news-card .card-title a {
    color: #1a472a !important;
}
.forest-card .card-title a:hover,
.news-card .card-title a:hover {
    color: #c8a951 !important;
}

.forest-card .card-text,
.news-card .card-text,
.competition-card .card-text,
.card-forest .card-text,
.card-news .card-text,
.card-competition .card-text {
    font-size: 0.95rem !important;
    color: #4a5a6a !important;
    line-height: 1.5 !important;
    flex: 1 !important;
}

.forest-card .badge-forest,
.news-card .badge-forest {
    background: var(--bg);
    color: var(--primary);
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    display: inline-block;
    align-self: flex-start;
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card .card-footer {
    background: transparent;
    border-top: 1px solid #f0f2f5;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* =========================================================
   КАРТА
   ========================================================= */
.map-container {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border: 2px solid #fff;
}
#map {
    height: 550px;
    width: 100%;
}

/* =========================================================
   КНОПКИ
   ========================================================= */
.btn-primary-custom {
    background: var(--primary);
    border: none;
    color: #fff;
    padding: 10px 28px;
    border-radius: 30px;
    font-weight: 500;
    transition: var(--transition);
}
.btn-primary-custom:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26, 71, 42, 0.25);
}

/* =========================================================
   ПРОФИЛЬНАЯ КАРТОЧКА
   ========================================================= */
.profile-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.3s ease;
}
.profile-card:hover {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
}

/* =========================================================
   СТАТУС-БЕЙДЖИ
   ========================================================= */
.status-badge {
    padding: 4px 16px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}
.status-open {
    background: #d4edda;
    color: #155724;
}
.status-voting {
    background: #fff3cd;
    color: #856404;
}
.status-closed {
    background: #e2e3e5;
    color: #383d41;
}
.status-draft {
    background: #f8f9fa;
    color: #6c757d;
}

/* =========================================================
   ПОДВАЛ
   ========================================================= */
.footer-custom {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.75);
    padding: 40px 0 20px;
    margin-top: auto;
    border-top: 3px solid var(--gold);
}
.footer-custom h5,
.footer-custom h6 {
    color: #fff;
    font-weight: 600;
}
.footer-custom a {
    color: rgba(255, 255, 255, 0.65);
    transition: var(--transition);
}
.footer-custom a:hover {
    color: var(--gold);
    text-decoration: none;
}
.footer-custom .border-bottom-line {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 24px;
    margin-bottom: 20px;
}

/* =========================================================
   АНИМАЦИИ
   ========================================================= */
.fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   АДАПТИВ (МОБИЛЬНЫЕ)
   ========================================================= */
@media (max-width: 768px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    section {
        margin-bottom: 32px;
    }
    .hero-section h1 {
        font-size: 2rem;
    }
    .hero-section {
        padding: 50px 0 40px;
    }
    .stat-card .number {
        font-size: 2rem;
    }
    .navbar-custom .navbar-brand {
        font-size: 1.1rem;
    }
    .forest-card .card-body,
    .news-card .card-body,
    .competition-card .card-body,
    .card-forest .card-body,
    .card-news .card-body,
    .card-competition .card-body {
        padding: 16px !important;
    }
    .forest-card .card-title,
    .news-card .card-title,
    .competition-card .card-title,
    .card-forest .card-title,
    .card-news .card-title,
    .card-competition .card-title {
        font-size: 1rem !important;
    }
}

@media (max-width: 576px) {
    .hero-search input {
        font-size: 0.9rem;
        padding: 12px 16px;
    }
    .hero-search button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    .footer-custom .row {
        text-align: center;
    }
    .footer-custom .container .row .col-md-3 {
        margin-bottom: 16px;
    }
}

/* =========================================================
   КОНКУРСЫ — ДОПОЛНИТЕЛЬНЫЕ СТИЛИ
   ========================================================= */

/* Статус-бейдж */
.status-badge {
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}
.status-draft {
    background: #e9ecef;
    color: #6c757d;
}
.status-open {
    background: #d4edda;
    color: #155724;
}
.status-voting {
    background: #fff3cd;
    color: #856404;
}
.status-closed {
    background: #f8d7da;
    color: #721c24;
}

/* Этапы */
.stages-progress .stage-item {
    font-size: 1rem;
}
.stage-number {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    color: white;
    border-radius: 50%;
    margin-right: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* Топ-3 */
.bg-gold-light {
    background: linear-gradient(135deg, #fff9e6, #fff3cc);
    border: 1px solid #ffd700;
}
.bg-silver-light {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #c0c0c0;
}
.bg-bronze-light {
    background: linear-gradient(135deg, #fdf2e9, #f5cba7);
    border: 1px solid #cd7f32;
}

/* Карточка заявки */
.entry-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid #dde2e8;
    height: 100%;
    transition: 0.3s ease;
}
.entry-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.1);
    border-color: var(--gold);
    transform: translateY(-2px);
}

/* Модальное окно */
.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.modal-header {
    background: var(--primary);
    color: #fff;
    border-radius: 16px 16px 0 0;
    border-bottom: 2px solid var(--gold);
}
.modal-header .btn-close {
    filter: invert(1);
}
.modal-footer {
    border-top: 1px solid #f0f2f5;
}

/* Кнопка gold */
.btn-gold {
    background: var(--gold);
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 10px 24px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-gold:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
.btn-gold.w-100 {
    display: flex;
    justify-content: center;
    padding: 12px 28px;
    font-size: 1rem;
}

.btn-outline-secondary {
    border-radius: 30px;
    padding: 8px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Хлебные крошки */
.breadcrumb {
    background: transparent;
    padding: 12px 0;
    font-size: 0.9rem;
}
.breadcrumb-item a {
    color: var(--primary);
}
.breadcrumb-item.active {
    color: #6c757d;
}

/* =========================================================
   КАЛЕНДАРЬ МЕРОПРИЯТИЙ
   ========================================================= */
.calendar-container {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    border: 1px solid #e0e5ec;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f2f5;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-weekday {
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: #6c757d;
    padding: 8px 0;
    text-transform: uppercase;
}

.calendar-day {
    min-height: 80px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 6px;
    background: #fafbfc;
    transition: 0.2s;
}
.calendar-day:hover {
    background: #f0f4f8;
}
.calendar-day.empty {
    background: transparent;
    border-color: transparent;
}
.calendar-day.today {
    background: #e8f5e9;
    border-color: var(--primary-light);
}

.day-number {
    font-weight: 600;
    font-size: 0.9rem;
    color: #495057;
    display: block;
    margin-bottom: 4px;
}

.day-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.day-event {
    font-size: 0.7rem;
    background: var(--primary);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    text-decoration: none;
    transition: 0.2s;
}
.day-event:hover {
    background: var(--gold);
    color: #fff;
}

/* Адаптив календаря */
@media (max-width: 768px) {
    .calendar-day {
        min-height: 60px;
        padding: 4px;
    }
    .day-number {
        font-size: 0.75rem;
    }
    .day-event {
        font-size: 0.6rem;
        padding: 1px 4px;
    }
    .calendar-header h3 {
        font-size: 1rem;
    }
}

/* Чекбокс согласия */
.form-check-input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    margin-right: 8px;
    cursor: pointer;
    flex-shrink: 0;
}
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 4px;
}
.form-check-label {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #4a5a6a;
    cursor: pointer;
}
.form-check-label a {
    color: var(--primary);
    text-decoration: underline;
}
.form-check-label a:hover {
    color: var(--gold);
}

.btn-gold.btn-sm {
    width: auto !important;
    display: inline-flex !important;
    padding: 6px 16px !important;
}
