/* КНИЖНЫЕ ГРАНИ — ФИНАЛЬНАЯ ВЕРСИЯ (БЕЗ ПОИСКА) */
:root {
    --neon-coral: #ff2e5a;
    --neon-coral-glow: rgba(255, 46, 90, 0.3);
    --neon-blue: #00d4ff;
    --graphite-deep: #fef9f0;
    --graphite-dark: #1e2a3a;
    --graphite-card: #3a4a6e;
    --text-primary: #111111;
    --text-secondary: #555566;
    --card-text: #e0e4f0;
    --card-text-secondary: #a0a8c0;
}

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

body {
    background: var(--graphite-deep);
    color: var(--text-primary);
    font-family: 'Space Grotesk', 'Inter', monospace;
    line-height: 1.4;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
}

/* ===== ШАПКА ===== */
header {
    background: var(--graphite-deep);
    border-bottom: 1px solid var(--neon-coral);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.8rem 0;
}

@media (min-width: 769px) {
    header {
        background: rgba(254, 249, 240, 0.95);
        backdrop-filter: blur(12px);
        padding: 1.5rem 0;
    }
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.5rem;
}

/* ===== ЛОГОТИПЫ ОРГАНИЗАТОРОВ ===== */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    flex: 0 0 auto;
}

.logo-cbs,
.logo-rost {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-cbs img {
    height: 44px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
    display: block;
}

.logo-rost img {
    height: 44px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
    display: block;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

@media (max-width: 768px) {
    .logo-cbs img {
        height: 34px;
        max-width: 80px;
    }
    
    .logo-rost img {
        height: 34px;
        max-width: 80px;
    }
    
    .logo {
        gap: 0.5rem;
        flex: 1;
    }
}

.menu-toggle {
    display: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--neon-coral);
    background: none;
    border: none;
    padding: 0;
    flex-shrink: 0;
    margin-left: auto;
}

/* ===== ЛОГОТИП (РОМБ + ВЕРТИКАЛЬНЫЕ ЛИНИИ + БОКОВАЯ ЗАКЛАДКА) ===== */
.logo-book {
    width: 36px;
    height: 36px;
    background: transparent;
    border: 2px solid var(--neon-coral);
    transform: rotate(45deg);
    position: relative;
    flex-shrink: 0;
    transition: transform 0.3s;
}

/* Левая линия (страница) */
.logo-book .line-left {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 10%;
    width: 1.5px;
    background: var(--neon-coral);
}

/* Центральная линия (корешок) */
.logo-book .line-center {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1.5px;
    background: var(--neon-coral);
    transform: translateX(-50%);
}

/* Правая линия (страница) */
.logo-book .line-right {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 10%;
    width: 1.5px;
    background: var(--neon-coral);
}

/* Боковая закладка (ленточка) */
.logo-book::after {
    content: '';
    position: absolute;
    bottom: 3px;
    right: -5px;
    width: 6px;
    height: 11px;
    background: var(--neon-coral);
    transform: rotate(-5deg);
    border-radius: 2px;
}

.logo-book:hover {
    transform: rotate(45deg) scale(1.05);
    border-color: var(--neon-blue);
}

.logo-book:hover .line-left,
.logo-book:hover .line-center,
.logo-book:hover .line-right,
.logo-book:hover::after {
    background: var(--neon-blue);
}

.logo-text {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .logo-book {
        width: 30px;
        height: 30px;
    }
    
    .logo-book::after {
        width: 5px;
        height: 9px;
        right: -4px;
        bottom: 2px;
    }
    
    .logo-text {
        font-size: 0.55rem;
        letter-spacing: 0.1em;
    }
}

/* ===== МЕНЮ ===== */
.desktop-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Центрируем меню в шапке */
@media (min-width: 769px) {
    .nav {
        flex: 1;
        display: flex;
        justify-content: center;
    }
    
    .desktop-menu {
        justify-content: center;
    }
}

.simple-menu-item a,
.dropdown-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.6rem 0;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.2s;
    cursor: pointer;
}

.simple-menu-item a:hover,
.simple-menu-item a.active,
.dropdown-title:hover,
.dropdown-title.active {
    color: var(--neon-coral);
}

.dropdown-title i:last-child {
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.dropdown:hover .dropdown-title i:last-child {
    transform: rotate(180deg);
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--graphite-dark);
    border: 1px solid var(--neon-coral);
    padding: 0.5rem 0;
    min-width: 240px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 100;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 0.7rem 1.5rem;
    color: #ccc;
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    transition: all 0.2s;
}

.dropdown-menu li a:hover {
    background: var(--neon-coral);
    color: #fff;
}

/* ===== УВЕЛИЧИВАЕМ ШРИФТ В МЕНЮ (ДЕСКТОП) ===== */
@media (min-width: 769px) {
    .simple-menu-item a,
    .dropdown-title {
        font-size: 0.85rem;
        letter-spacing: 0.12em;
    }
    
    .dropdown-menu li a {
        font-size: 0.9rem;
        letter-spacing: 0.08em;
        padding: 0.8rem 1.5rem;
    }
}

/* ===== МОБИЛЬНОЕ МЕНЮ ===== */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .header-inner {
        flex-wrap: nowrap;
    }
    
    .nav {
        display: none;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: var(--graphite-deep);
        border-bottom: 1px solid var(--neon-coral);
        padding: 1rem;
        z-index: 999;
    }
    
    .nav.active {
        display: block;
    }
    
    .desktop-menu {
        flex-direction: column;
        align-items: center;
        gap: 0;
        width: 100%;
        padding: 0;
    }
    
    .simple-menu-item {
        width: 100%;
    }
    
    .simple-menu-item a,
    .dropdown-title {
        justify-content: center;
        text-align: center;
        padding: 0.8rem 0;
        width: 100%;
        font-size: 0.9rem;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    
    .simple-menu-item a i,
    .dropdown-title i:first-child {
        margin-right: 0.5rem;
    }
    
    .dropdown {
        width: 100%;
        position: relative;
    }
    
    .dropdown-title {
        justify-content: center;
        position: relative;
    }
    
    .dropdown-title i:last-child {
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        margin: 0;
    }
    
    .dropdown.active .dropdown-title i:last-child {
        transform: translateY(-50%) rotate(180deg);
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: transparent;
        border: none;
        padding: 0;
        padding-left: 0;
        display: none;
        box-shadow: none;
        text-align: center;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
    
    .dropdown-menu li a {
        padding: 0.8rem 0;
        color: var(--text-secondary);
        font-size: 0.9rem;
        text-align: center;
    }
    
    .dropdown-menu li a:hover {
        background: transparent;
        color: var(--neon-coral);
    }
}

/* ===== ГЛАВНАЯ ПЛОЩАДКА (БИБЛИОТЕКА-МАСТЕРСКАЯ) ===== */
.venue-block {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: #fff;
    border-radius: 24px;
    padding: 2rem;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.venue-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: var(--neon-coral);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.venue-icon i {
    font-size: 2rem;
    color: #fff;
}

.venue-content {
    flex: 1;
}

.venue-title {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--neon-coral);
    margin-bottom: 0.5rem;
}

.venue-address {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.venue-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .venue-block {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .venue-icon {
        width: 50px;
        height: 50px;
    }
    
    .venue-icon i {
        font-size: 1.5rem;
    }
}

/* ===== ОСТАЛЬНЫЕ СТИЛИ ===== */
.hero {
    padding: 8rem 0 6rem;
    text-align: center;
    background: radial-gradient(circle at 50% 0%, rgba(255,46,90,0.08) 0%, rgba(255,46,90,0) 70%), var(--graphite-deep);
}

@media (max-width: 768px) {
    .hero {
        padding: 4rem 0;
        background: var(--graphite-deep);
    }
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
}

.hero h1 span {
    color: var(--neon-coral);
}

.hero-lead {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.hero-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
}

@media (max-width: 768px) {
    .hero-desc {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
}

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

@media (max-width: 768px) {
    .hero-buttons {
        gap: 1rem;
        flex-direction: column;
        align-items: center;
    }
}

/* ===== ОСНОВНЫЕ КНОПКИ ===== */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: transparent;
    border: 1.5px solid var(--neon-coral);
    color: var(--neon-coral);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: all 0.3s;
    cursor: pointer;
}

.btn:hover {
    background: var(--neon-coral);
    color: #fff;
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .btn {
        width: 100%;
        max-width: 250px;
        text-align: center;
        padding: 0.7rem 1.5rem;
    }
}

/* ===== КНОПКИ НА ТЁМНОМ ФОНЕ (ЛАКОНИЧНЫЕ) ===== */
/* Для карточек */
.direction-card .btn,
.event-card .btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    margin-top: auto;
    align-self: center;
}

.direction-card .btn:hover,
.event-card .btn:hover {
    background: var(--neon-coral);
    border-color: var(--neon-coral);
    color: #ffffff;
    transform: translateY(-3px);
}

.direction-card .btn-sm,
.event-card .btn-sm {
    font-size: 0.7rem;
    padding: 0.5rem 1.2rem;
}

/* Для любых других блоков с тёмным фоном (например, #1e2a47) */
.dark-bg .btn,
[style*="background: #1e2a47"] .btn,
[style*="background:#1e2a47"] .btn,
div[style*="background: #1e2a47"] .btn,
div[style*="background:#1e2a47"] .btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
}

.dark-bg .btn:hover,
[style*="background: #1e2a47"] .btn:hover,
[style*="background:#1e2a47"] .btn:hover,
div[style*="background: #1e2a47"] .btn:hover,
div[style*="background:#1e2a47"] .btn:hover {
    background: var(--neon-coral);
    border-color: var(--neon-coral);
    color: #ffffff;
    transform: translateY(-3px);
}

.section {
    padding: 5rem 0;
    border-top: 1px solid rgba(0,0,0,0.05);
}

@media (max-width: 768px) {
    .section {
        padding: 3rem 0;
    }
}

.section-title {
    font-size: 2.8rem;
    font-weight: 800;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 2.5rem;
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--neon-coral);
    margin: 0.5rem auto 0;
}

.section-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.section .btn-outline {
    margin-top: 0.5rem;
}

/* ===== КАРТОЧКИ СОБЫТИЙ И НАПРАВЛЕНИЙ (ВЫРОВНЕННЫЕ) ===== */
.events-grid,
.directions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .events-grid,
    .directions-grid {
        grid-template-columns: 1fr;
    }
}

.event-card,
.direction-card {
    background: var(--graphite-card);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 1.8rem;
    text-align: center;
    transition: all 0.3s;
    color: var(--card-text);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

@media (min-width: 769px) {
    .event-card:hover,
    .direction-card:hover {
        transform: translateY(-5px);
        border-color: var(--neon-coral);
    }
}

.event-number {
    font-size: 0.7rem;
    color: var(--neon-coral);
    letter-spacing: 0.2em;
    margin-bottom: 0.5rem;
}

.event-date {
    font-size: 0.75rem;
    color: var(--card-text-secondary);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.event-card h3,
.direction-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: #fff;
    min-height: 3.2rem;
}

.event-card p,
.direction-card p {
    font-size: 1rem;
    color: var(--card-text-secondary);
    line-height: 1.5;
    margin-bottom: 1.5rem;
    flex: 1;
}

.direction-card i {
    font-size: 2.5rem;
    color: var(--neon-coral);
    margin-bottom: 1rem;
}

/* ===== КОМАНДА — КРУГЛЫЕ ФОТО (ВЫРОВНЕННЫЕ) ===== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .team-grid {
        grid-template-columns: 1fr;
    }
}

.team-card {
    background: var(--graphite-card);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 1.8rem;
    text-align: center;
    transition: all 0.3s;
    color: var(--card-text);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.team-card:hover {
    transform: translateY(-5px);
    border-color: var(--neon-coral);
}

/* Круглая обёртка для фото */
.team-card .team-photo-wrapper {
    width: 180px;
    height: 180px;
    margin: 0 auto 1rem auto;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--neon-coral);
    background: var(--graphite-dark);
    flex-shrink: 0;
}

.team-card .team-photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Заголовок */
.team-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: #fff;
    min-height: 3rem;
}

/* Текст описания */
.team-card p {
    font-size: 0.85rem;
    color: var(--card-text-secondary);
    line-height: 1.5;
    flex: 1;
}

/* Цитата — только у Панковой */
.team-quote {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.15);
    font-size: 0.85rem;
    font-style: italic;
    color: var(--neon-coral);
    text-align: left;
}

@media (max-width: 768px) {
    .team-card .team-photo-wrapper {
        width: 140px;
        height: 140px;
    }
    
    .team-card {
        padding: 1.2rem;
    }
    
    .team-card h3 {
        font-size: 1rem;
        min-height: 2.5rem;
    }
    
    .team-card p {
        font-size: 0.75rem;
    }
}

/* ===== ПАРТНЁРЫ ===== */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    align-items: center;
    justify-items: center;
}

.partner-item {
    text-align: center;
    width: 100%;
    max-width: 160px;
}

.partner-item a {
    text-decoration: none;
    border-bottom: none;
}

.partner-item a:hover {
    text-decoration: none;
    border-bottom: none;
}

.partner-logo {
    width: 120px;
    height: 85px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.partner-item:hover .partner-logo {
    transform: scale(1.03);
}

.partner-item p {
    margin-top: 0.6rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    font-weight: 400;
}

@media (max-width: 768px) {
    .partners-grid {
        gap: 1.2rem;
        grid-template-columns: repeat(2, 1fr);
    }
    
    .partner-logo {
        width: 100px;
        height: 70px;
    }
    
    .partner-item p {
        font-size: 0.6rem;
    }
}

/* ===== FAQ ===== */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.faq-question {
    padding: 1rem 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.faq-question i {
    transition: transform 0.3s;
    color: var(--neon-coral);
}

.faq-question.active i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
}

.faq-answer.show {
    max-height: 300px;
    padding-bottom: 1rem;
}

/* ===== ПОДВАЛ ===== */
footer {
    background: var(--graphite-deep);
    border-top: 1px solid rgba(0,0,0,0.1);
    padding: 3rem 0 2rem;
    margin-top: 3rem;
    text-align: center;
}

@media (max-width: 768px) {
    footer {
        padding: 2rem 0;
        margin-top: 2rem;
    }
}

.footer-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-col h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 0.8rem;
    color: var(--neon-coral);
}

.footer-col p,
.footer-col a {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    line-height: 1.8;
}

.footer-col a:hover {
    color: var(--neon-coral);
}

.footer-social {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 0.5rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,46,90,0.2);
    color: var(--neon-coral);
    font-size: 1.2rem;
    transition: all 0.3s;
}

.footer-social a:hover {
    background: var(--neon-coral);
    color: #fff;
}

.footer-bottom {
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid rgba(0,0,0,0.1);
    font-size: 0.65rem;
    color: var(--text-secondary);
}

/* ===== КНОПКА НАВЕРХ (НЕОНОВАЯ) ===== */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: transparent;
    border: 2px solid var(--neon-coral);
    color: var(--neon-coral);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.3rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    cursor: pointer;
    border-radius: 50%;
}

.back-to-top:hover {
    background: var(--neon-coral);
    color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 0 15px var(--neon-coral-glow);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .back-to-top {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }
}

/* ===== АНИМАЦИЯ КАРТОЧЕК ===== */
.event-card, .direction-card, .team-card, .partner-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.event-card.visible, .direction-card.visible, .team-card.visible, .partner-item.visible {
    opacity: 1;
    transform: translateY(0);
}