* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a0a0a 0%, #2d1515 100%);
    color: #e8e8e8;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

@media (hover: none) {
    a, button, .leader-discord, .btn { cursor: pointer; -webkit-tap-highlight-color: transparent; }
    .btn:active, .btn-sm:active, .leader-discord:active { transform: scale(0.98); opacity: 0.9; }
}

.header {
    background: linear-gradient(180deg, #8b0000 0%, #5c0000 100%);
    padding: 15px 0;
    border-bottom: 3px solid #d4af37;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.logo {
    font-size: 1.3rem;
    font-weight: bold;
    color: #ffd700;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.logo-emblem { width: 50px; height: auto; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4)); }
.nav { display: flex; gap: 20px; }
.nav a {
    color: #f0f0f0; font-weight: 500; padding: 8px 14px; border-radius: 4px; border: 1px solid transparent; transition: all 0.3s ease;
}
.nav a:hover, .nav a.active {
    color: #ffd700; border-color: #d4af37; background: rgba(212, 175, 55, 0.1); box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.hero {
    position: relative;
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.9) 0%, rgba(45, 0, 0, 0.95) 100%);
    min-height: 500px; display: flex; align-items: center; justify-content: center; text-align: center;
    border-bottom: 3px solid #d4af37;
}
.hero::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.4) 100%); pointer-events: none;
}
.hero-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 1; }
.hero-content { position: relative; z-index: 2; padding: 0 20px; max-width: 900px; margin: 0 auto; width: 100%; }
.hero-emblem { width: 150px; height: auto; margin: 0 auto 25px auto; display: block; filter: drop-shadow(0 6px 12px rgba(0,0,0,0.5)); }
.hero-title {
    font-size: 2.6rem;
    background: linear-gradient(135deg, #ffd700 0%, #d4af37 50%, #ffd700 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    margin-bottom: 15px; text-transform: uppercase; letter-spacing: 3px; line-height: 1.2; font-weight: 700;
}
.hero-subtitle { font-size: 1.2rem; color: #f5f5f5; margin-bottom: 35px; font-weight: 300; text-shadow: 0 2px 6px rgba(0,0,0,0.6); }

.hero-buttons { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }
.btn {
    padding: 14px 30px; border-radius: 6px; font-weight: 600; font-size: 0.95rem; cursor: pointer;
    display: inline-block; border: 2px solid transparent; min-height: 48px; transition: all 0.3s ease;
    text-transform: uppercase; letter-spacing: 1px;
}
.btn-primary {
    background: linear-gradient(135deg, #d4af37 0%, #ffd700 100%); color: #2d1515; border-color: #d4af37;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}
.btn-primary:hover { background: linear-gradient(135deg, #ffd700 0%, #d4af37 100%); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(212, 175, 55, 0.6); }
.btn-secondary { background: transparent; color: #ffd700; border: 2px solid #d4af37; }
.btn-secondary:hover { background: rgba(212, 175, 55, 0.15); transform: translateY(-3px); }
.btn-sm {
    padding: 8px 16px; font-size: 0.85rem; background: linear-gradient(135deg, #d4af37 0%, #ffd700 100%);
    color: #2d1515; border-radius: 4px; cursor: pointer; transition: all 0.3s; min-height: 38px; font-weight: 600; border: 1px solid #d4af37;
}
.btn-sm:hover { background: linear-gradient(135deg, #ffd700 0%, #d4af37 100%); transform: translateY(-2px); }

.main { padding: 60px 0; }
.main h2, .page-title { color: #ffd700; margin-bottom: 20px; border-left: 5px solid #d4af37; padding-left: 15px; }
.main h2 { font-size: 1.9rem; }
.page-title { 
    font-size: 2.2rem; line-height: 1.3;
    background: linear-gradient(135deg, #ffd700 0%, #d4af37 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.intro-text {
    font-size: 1.05rem; color: #d0d0d0; margin-bottom: 40px; max-width: 800px; line-height: 1.8;
    padding: 20px; background: rgba(139, 0, 0, 0.2); border-left: 4px solid #d4af37; border-radius: 0 8px 8px 0;
}

.contacts-page { padding-top: 60px; padding-bottom: 60px; min-height: auto; }
.senior-staff-section { margin-top: 60px; }
.dept-block {
    margin-bottom: 50px; padding: 30px;
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.3) 0%, rgba(45, 0, 0, 0.4) 100%);
    border-radius: 10px; border: 2px solid #d4af37;
}
.dept-title {
    font-size: 1.5rem; color: #ffd700; margin-bottom: 25px; display: flex; align-items: center; gap: 10px;
    border-bottom: 2px solid #d4af37; padding-bottom: 12px;
}

.leaders-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 22px; width: 100%; }
.leader-card {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.4) 0%, rgba(45, 0, 0, 0.5) 100%);
    border: 2px solid #d4af37; border-radius: 10px; padding: 28px 22px; transition: all 0.3s; text-align: center;
}
.leader-card:hover { border-color: #ffd700; transform: translateY(-6px); box-shadow: 0 12px 30px rgba(212, 175, 55, 0.4); }
.leader-main { border: 3px solid #ffd700; background: linear-gradient(135deg, rgba(139, 0, 0, 0.6) 0%, rgba(45, 0, 0, 0.7) 100%); }
.leader-rank { font-size: 0.9rem; font-weight: 600; color: #ffd700; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1.5px; }
.leader-name { font-size: 1.3rem; color: #ffffff; margin-bottom: 6px; font-weight: 700; }
.leader-position { color: #e0e0e0; font-size: 0.92rem; margin-bottom: 22px; min-height: 40px; }
.leader-discord {
    background: rgba(45, 0, 0, 0.6); border: 1.5px solid #d4af37; border-radius: 8px; padding: 14px 16px;
    display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer;
    transition: all 0.3s; flex-direction: column; min-height: 65px;
}
.leader-discord:hover { border-color: #ffd700; background: rgba(139, 0, 0, 0.4); box-shadow: 0 0 15px rgba(212, 175, 55, 0.4); }
.discord-icon { font-size: 1.2rem; }
.discord-handle { font-weight: 600; color: #ffd700; font-family: 'Consolas', monospace; word-break: break-all; }
.discord-hint { display: block; font-size: 0.72rem; color: #c0c0c0; margin-top: 4px; }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }
.discord-copied { animation: pulse 0.3s ease; color: #4caf50 !important; }

.star-lg {
    font-size: 1.5em; color: #ffd700; text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    margin-right: 3px; display: inline-block; line-height: 1; vertical-align: middle;
}

.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.structure-table {
    width: 100%; border-collapse: collapse;
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.3) 0%, rgba(45, 0, 0, 0.4) 100%);
    border-radius: 10px; overflow: hidden; border: 2px solid #d4af37; table-layout: auto;
}
.structure-table th, .structure-table td {
    padding: 14px 16px; text-align: left; border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    white-space: normal; word-wrap: break-word;
}
.structure-table th {
    background: linear-gradient(135deg, #8b0000 0%, #5c0000 100%);
    color: #ffd700; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
    border-bottom: 2px solid #d4af37; font-size: 0.92rem;
}
.structure-table tr:last-child td { border-bottom: none; }
.structure-table tr:hover { background: rgba(212, 175, 55, 0.1); }

.rank-badge {
    display: inline-block; padding: 5px 14px; border-radius: 15px; font-size: 0.85rem;
    font-weight: 600; text-align: center; min-width: 30px; border: 1.5px solid;
}
.rank-high    { background: linear-gradient(135deg, #d4af37 0%, #ffd700 100%); color: #2d1515; border-color: #d4af37; }
.rank-mid     { background: rgba(139, 0, 0, 0.5); color: #ffd700; border-color: #d4af37; }
.rank-low     { background: rgba(45, 0, 0, 0.5); color: #c0c0c0; border-color: #8b7355; }
.rank-legislation { background: linear-gradient(135deg, #6b3fa0 0%, #8b5fbf 100%); color: #ffffff; border-color: #9b7fbf; }
.rank-act     { background: linear-gradient(135deg, #2a9d8f 0%, #3dbfae 100%); color: #ffffff; border-color: #4fbfbf; }
.rank-table   { background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%); color: #ffffff; border-color: #f39c12; }
.rank-charter { background: linear-gradient(135deg, #8b4513 0%, #cd853f 100%); color: #ffffff; border-color: #daa520; }

.about-block { margin-bottom: 55px; }
.about-block h2 { font-size: 1.6rem; margin-bottom: 22px; display: flex; align-items: center; gap: 10px; }

.accordion-container { display: flex; flex-direction: column; gap: 15px; }
.accordion-item {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.3) 0%, rgba(45, 0, 0, 0.4) 100%);
    border: 2px solid #d4af37; border-radius: 10px; overflow: hidden; transition: all 0.3s ease;
}
.accordion-item:hover { border-color: #ffd700; box-shadow: 0 0 15px rgba(212, 175, 55, 0.2); }
.accordion-header {
    width: 100%; padding: 20px 25px; background: transparent; border: none; color: #ffffff;
    font-size: 1.1rem; font-weight: 600; text-align: left; cursor: pointer;
    display: flex; align-items: center; gap: 15px; transition: background 0.3s;
}
.accordion-header:hover { background: rgba(212, 175, 55, 0.1); }
.dept-icon { font-size: 1.2rem; }
.accordion-header .arrow { margin-left: auto; transition: transform 0.3s ease; color: #ffd700; }
.accordion-item.active .accordion-header { background: rgba(212, 175, 55, 0.15); color: #ffd700; }
.accordion-item.active .accordion-header .arrow { transform: rotate(180deg); }
.accordion-body {
    max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out, padding 0.3s ease;
    background: rgba(0, 0, 0, 0.2); border-top: 1px solid rgba(212, 175, 55, 0.3);
}
.accordion-item.active .accordion-body { max-height: 500px; padding: 20px 25px; }
.accordion-body p { color: #e0e0e0; line-height: 1.7; margin: 0; }
.accordion-body p strong { color: #ffd700; display: block; margin-bottom: 8px; font-size: 1.05rem; }

.dresscode-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 30px; margin-top: 30px; }
.dresscode-card {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.4) 0%, rgba(45, 0, 0, 0.5) 100%);
    border: 2px solid #d4af37; border-radius: 12px; overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4); transition: all 0.3s ease; display: flex; flex-direction: column;
}
.dresscode-card:hover { transform: translateY(-5px); box-shadow: 0 12px 35px rgba(212, 175, 55, 0.3); border-color: #ffd700; }
.dresscode-image {
    width: 100%; height: auto; min-height: 400px; overflow: hidden; background: rgba(0,0,0,0.3);
    border-bottom: 2px solid #d4af37; display: flex; align-items: center; justify-content: center;
}
.dresscode-image img {
    width: 100%; height: auto; max-height: 700px; object-fit: contain; transition: transform 0.3s ease;
}
.dresscode-card:hover .dresscode-image img { transform: scale(1.02); }
.dresscode-content { padding: 25px; flex: 1; }
.dresscode-content h3 { color: #ffd700; font-size: 1.4rem; margin-bottom: 15px; }
.dresscode-meta { margin-bottom: 15px; }
.dresscode-rank { display: inline-block; padding: 5px 12px; background: rgba(212, 175, 55, 0.2); border: 1px solid #d4af37; border-radius: 6px; color: #ffd700; font-size: 0.9rem; font-weight: 600; }
.dresscode-desc { color: #d0d0d0; margin-bottom: 12px; line-height: 1.6; font-size: 0.95rem; }
.dresscode-desc strong { color: #ffd700; }
.dresscode-rules { margin-top: 20px; padding: 18px; background: rgba(0,0,0,0.3); border-radius: 8px; border-left: 4px solid #d4af37; }
.dresscode-rules h4 { color: #4caf50; margin-bottom: 12px; font-size: 1.05rem; }
.dresscode-rules ul { list-style: none; padding: 0; }
.dresscode-rules li { padding: 6px 0; color: #e0e0e0; padding-left: 24px; position: relative; }
.dresscode-rules li:before { content: "✓"; position: absolute; left: 0; color: #4caf50; font-weight: bold; }

.departments-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.dept-card {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.4) 0%, rgba(45, 0, 0, 0.5) 100%);
    border: 2px solid #d4af37; padding: 20px 22px; border-radius: 8px;
    font-weight: 500; transition: all 0.3s; color: #f0f0f0;
}
.dept-card:hover { border-color: #ffd700; transform: translateY(-4px); box-shadow: 0 8px 20px rgba(212, 175, 55, 0.35); }

.section { padding: 65px 0; }
.section-title { font-size: 1.9rem; color: #ffd700; margin-bottom: 30px; border-left: 5px solid #d4af37; padding-left: 15px; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 25px; }
.news-card {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.35) 0%, rgba(45, 0, 0, 0.45) 100%);
    border: 2px solid #d4af37; border-radius: 10px; padding: 28px; transition: all 0.3s;
}
.news-card:hover { transform: translateY(-6px); border-color: #ffd700; }
.news-date { display: inline-block; font-size: 0.88rem; color: #ffd700; font-weight: 600; margin-bottom: 12px; padding: 4px 10px; background: rgba(212, 175, 55, 0.15); border-radius: 4px; border: 1px solid rgba(212, 175, 55, 0.3); }
.news-title { font-size: 1.28rem; color: #ffffff; margin-bottom: 14px; }
.news-text { color: #d0d0d0; font-size: 0.96rem; margin-bottom: 20px; line-height: 1.6; }
.news-link { color: #ffd700; font-weight: 600; font-size: 0.92rem; }

.docs-controls { display: flex; gap: 15px; margin-bottom: 28px; flex-wrap: wrap; }
.docs-controls input, .docs-controls select {
    padding: 11px 16px; border-radius: 6px; border: 2px solid #d4af37;
    background: rgba(45, 0, 0, 0.6); color: #f0f0f0; font-size: 0.95rem; outline: none; transition: all 0.3s; min-height: 46px;
}
.docs-controls input { flex: 1; min-width: 200px; }
.docs-controls input:focus, .docs-controls select:focus { border-color: #ffd700; box-shadow: 0 0 12px rgba(212, 175, 55, 0.4); }
.docs-table th:last-child, .docs-table td:last-child { text-align: center; }
.doc-link { color: #ffd700; font-weight: 500; transition: all 0.2s; word-break: break-word; }
.doc-link:hover { color: #d4af37; text-decoration: underline; text-shadow: 0 0 8px rgba(255, 215, 0, 0.5); }
.docs-table th:nth-child(1), .docs-table td:nth-child(1) { width: 70px; text-align: center; font-weight: 600; color: #ffd700; }
.docs-table th:nth-child(2), .docs-table td:nth-child(2) { width: auto; }
.docs-table th:nth-child(3), .docs-table td:nth-child(3) { width: 130px; text-align: center; }
.docs-table th:nth-child(4), .docs-table td:nth-child(4) { width: 110px; text-align: center; }

/* === КОНТАКТЫ === */
.contacts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 22px; margin-bottom: 45px; }
.contact-card {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.35) 0%, rgba(45, 0, 0, 0.45) 100%);
    border: 2px solid #d4af37; padding: 28px; border-radius: 10px; text-align: center; transition: all 0.3s;
}
.contact-card:hover { border-color: #ffd700; transform: translateY(-4px); }
.contact-card h3 { color: #ffd700; margin-bottom: 12px; font-size: 1.25rem; }
.contact-card p { color: #d0d0d0; margin-bottom: 16px; font-size: 0.96rem; }
.contact-mail { display: block; margin-top: 12px; color: #ffd700; font-weight: 600; word-break: break-all; }
.contact-form {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.3) 0%, rgba(45, 0, 0, 0.4) 100%);
    padding: 35px; border-radius: 10px; border: 2px solid #d4af37; max-width: 700px;
}
.form-group { margin-bottom: 22px; }
.form-group label { display: block; margin-bottom: 9px; color: #ffd700; font-weight: 500; }
.form-group input, .form-group textarea {
    width: 100%; padding: 13px; border-radius: 6px; border: 2px solid #d4af37;
    background: rgba(45, 0, 0, 0.6); color: #ffffff; font-size: 0.96rem; outline: none; transition: all 0.3s; min-height: 46px;
}
.form-group textarea { min-height: 130px; resize: vertical; }
.form-group input:focus, .form-group textarea:focus { border-color: #ffd700; box-shadow: 0 0 12px rgba(212, 175, 55, 0.4); }
.form-status { margin-top: 16px; font-weight: 500; }
.form-status.success { color: #4caf50; }
.form-status.error { color: #f44336; }

.footer {
    background: linear-gradient(180deg, #2d1515 0%, #1a0a0a 100%);
    padding: 25px 0; text-align: center; border-top: 3px solid #d4af37;
    font-size: 0.9rem; color: #b0b0b0;
}

@media (max-width: 768px) {
    .header-inner { flex-direction: column; text-align: center; gap: 12px; }
    .nav { flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; }
    .nav a { padding: 9px 13px; font-size: 0.88rem; }
    .hero { min-height: 400px; padding: 65px 20px; }
    .hero-title { font-size: 1.9rem; letter-spacing: 2px; }
    .hero-subtitle { font-size: 1.05rem; }
    .hero-buttons { flex-direction: column; align-items: stretch; }
    .btn { width: 100%; text-align: center; }
    .hero-emblem { width: 100px; } .logo-emblem { width: 42px; }
    .page-title { font-size: 1.7rem; } .main { padding: 45px 0; }
    .container { padding: 0 16px; }
    .structure-table { font-size: 0.88rem; }
    .structure-table th, .structure-table td { padding: 11px 13px; }
    .dept-block { padding: 20px; margin-bottom: 35px; }
    .dept-title { font-size: 1.25rem; flex-wrap: wrap; }
    .leaders-grid { gap: 16px; }
    .docs-controls { flex-direction: column; }
    .docs-controls input, .docs-controls select { width: 100%; }
    
    /* Адаптив для дресс-кода и аккордеона */
    .dresscode-grid { grid-template-columns: 1fr; gap: 25px; }
    .dresscode-image { min-height: 300px; }
    .dresscode-image img { max-height: 500px; }
    .dresscode-content { padding: 20px; }
    .dresscode-rules-full { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .logo { font-size: 1.05rem; }
    .hero-title { font-size: 1.6rem; }
    .leader-name { font-size: 1.15rem; }
    .leader-position { font-size: 0.88rem; min-height: 48px; }
    .leader-discord { padding: 12px; }
    .discord-handle { font-size: 0.86rem; }
    .star-lg { font-size: 1.3em; }
    .hero-emblem { width: 80px; margin-bottom: 18px; }
    .logo-emblem { width: 36px; }
    .news-grid, .departments-list, .contacts-grid { grid-template-columns: 1fr; }
    .dept-card, .leader-card, .news-card, .contact-card { padding: 22px 16px; }
    .dresscode-image { min-height: 250px; }
    .dresscode-image img { max-height: 400px; }
    .dresscode-content h3 { font-size: 1.2rem; }
}