/* Публичные страницы */

/* Навигация */
.public-nav {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.nav-logo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.nav-logo span {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: #6b7280;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #7c3aed;
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    color: #374151;
    font-weight: 500;
    margin-right: 8px;
}

.btn-nav {
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-nav.btn-outline {
    color: #7c3aed;
    border: 2px solid #7c3aed;
}

.btn-nav.btn-outline:hover {
    background: #7c3aed;
    color: white;
}

.btn-nav.btn-primary {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: white;
}

.btn-nav.btn-primary:hover {
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

/* Контент страницы */
.page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 12px;
}

.page-header p {
    color: #6b7280;
    font-size: 18px;
}

/* Алерты */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.alert-success {
    background: #d1fae5;
    color: #059669;
}

.alert-error {
    background: #fee2e2;
    color: #dc2626;
}

.alert-link {
    margin-left: auto;
    font-weight: 600;
    text-decoration: underline;
}

/* Фильтр направлений */
.direction-filter {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.filter-btn:hover {
    border-color: #7c3aed;
    color: #7c3aed;
}

.filter-btn.active {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: white;
    border-color: transparent;
}

/* Сетка мероприятий */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.event-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.event-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: #1a1a2e;
    position: relative;
}

.event-direction {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #7c3aed;
}

.event-content {
    padding: 24px;
}

.event-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 12px;
}

.event-description {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.event-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6b7280;
    font-size: 14px;
}

.meta-item i {
    width: 16px;
    color: #7c3aed;
}

.event-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.participants-count {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 14px;
}

.participants-count i {
    color: #7c3aed;
}

.btn-event {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-apply {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: white;
}

.btn-apply:hover {
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
    transform: translateY(-2px);
}

.btn-registered {
    background: #d1fae5;
    color: #059669;
    cursor: default;
}

.btn-full {
    background: #fee2e2;
    color: #dc2626;
    cursor: default;
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state i {
    font-size: 80px;
    color: #d1d5db;
    margin-bottom: 24px;
}

.empty-state h3 {
    font-size: 24px;
    color: #374151;
    margin-bottom: 12px;
}

.empty-state p {
    color: #6b7280;
}

/* Новости */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
}

.news-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.news-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #1a1a2e;
}

.news-content {
    padding: 24px;
}

.news-date {
    font-size: 13px;
    color: #7c3aed;
    font-weight: 600;
    margin-bottom: 12px;
}

.news-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 12px;
    line-height: 1.4;
}

.news-excerpt {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 16px;
}

.news-author {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #9ca3af;
    font-size: 13px;
}

/* Футер */
.public-footer {
    background: #1a1a2e;
    color: rgba(255, 255, 255, 0.7);
    padding: 30px 0;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}

/* Адаптивность */
@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .events-grid {
        grid-template-columns: 1fr;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header h1 {
        font-size: 28px;
    }
}
