/* ===== ПЕРЕМЕННЫЕ И СБРОС ===== */
:root {
    --blue-yu: #0044cc;
    --red-yu: #cc0000;
    --gold: #d4a017;
    --dark: #1a1a2e;
    --darker: #0f0f1a;
    --card-bg: #16213e;
    --card-border: #1a3a5c;
    --text: #e8e8e8;
    --text-muted: #a0a0b0;
    --gradient-yu: linear-gradient(135deg, var(--blue-yu), #1a237e, var(--red-yu));
    --shadow: 0 8px 32px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 30px rgba(0, 68, 204, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--darker);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== НАВИГАЦИЯ ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 160, 23, 0.3);
    transition: all 0.3s ease;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold);
}

.coat-of-arms {
    font-size: 1.8rem;
    color: var(--red-yu);
    text-shadow: 0 0 10px rgba(204, 0, 0, 0.5);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover {
    color: var(--gold);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

/* ===== ГЛАВНЫЙ ЭКРАН ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--dark);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(0, 68, 204, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(204, 0, 0, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(212, 160, 23, 0.1) 0%, transparent 50%);
    animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 20px;
}

.flag-container {
    margin-bottom: 30px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.flag {
    display: inline-flex;
    position: relative;
    width: 160px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    border: 3px solid var(--gold);
}

.stripe {
    flex: 1;
}

.stripe.blue { background: #0044cc; }
.stripe.white { background: #ffffff; }
.stripe.red { background: #cc0000; }

.star {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    color: var(--gold);
    text-shadow: 0 0 15px rgba(212, 160, 23, 0.8);
    filter: drop-shadow(0 0 5px rgba(212, 160, 23, 0.6));
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #fff, var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.subtitle {
    font-size: 1.4rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.years {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 40px;
    letter-spacing: 8px;
}

.hero-stats {
    display: flex;
    gap: 50px;
    justify-content: center;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--gold);
    text-shadow: 0 0 15px rgba(212, 160, 23, 0.4);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    max-width: 180px;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    font-size: 1.5rem;
    color: var(--gold);
    opacity: 0.6;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* ===== ОБЩИЕ СЕКЦИИ ===== */
.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 60px;
    position: relative;
    color: var(--gold);
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--gradient-yu);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* ===== ИСТОРИЯ ===== */
.history-section {
    background: var(--dark);
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.history-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 35px 30px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.history-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-yu);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.history-card:hover::before {
    transform: scaleX(1);
}

.history-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow), var(--shadow-glow);
    border-color: rgba(212, 160, 23, 0.3);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.history-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--gold);
}

.history-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
}

/* ===== АРМИЯ ===== */
.army-section {
    background: linear-gradient(180deg, var(--darker), var(--dark));
}

.army-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.army-branches {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}

.branch {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 35px 30px;
    text-align: center;
    transition: all 0.4s ease;
}

.branch:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow), var(--shadow-glow);
    border-color: var(--gold);
}

.branch-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.branch h3 {
    font-size: 1.3rem;
    color: var(--gold);
    margin-bottom: 12px;
}

.branch p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.7;
}

.branch-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 15px;
    border-top: 1px solid var(--card-border);
}

.branch-stats span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.branch-stats span::before {
    content: '▸ ';
    color: var(--gold);
}

/* ===== ТЕХНИКА ===== */
.equipment-section {
    background: var(--dark);
}

.equipment-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 30px;
    border: 2px solid var(--card-border);
    background: transparent;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.tab-btn.active {
    background: var(--gold);
    color: var(--dark);
    border-color: var(--gold);
}

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.equip-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 0;
    text-align: center;
    transition: all 0.3s ease;
    overflow: hidden;
}

.equip-img-wrap {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
    background: #0d1b2a;
}

.equip-img-wrap.img-error {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d1b2a, #1a3a5c);
}

.equip-img-wrap.img-error::after {
    content: '📷';
    font-size: 3rem;
    opacity: 0.4;
}

.equip-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.4s ease;
    filter: saturate(0.85);
}

.equip-img-wrap::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(transparent, var(--card-bg));
    z-index: 1;
    pointer-events: none;
}

.equip-card:hover .equip-img {
    transform: scale(1.08);
    filter: saturate(1.1);
}

.equip-card h4 {
    color: var(--gold);
    margin-bottom: 8px;
    font-size: 1rem;
    padding: 15px 15px 0;
}

.equip-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 0 15px;
}

.equip-tag {
    display: inline-block;
    margin: 12px 0 15px;
    padding: 3px 10px;
    background: rgba(212, 160, 23, 0.15);
    border-radius: 10px;
    font-size: 0.75rem;
    color: var(--gold);
}

.equip-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--gold);
}

/* ===== СТРУКТУРА ===== */
.structure-section {
    background: linear-gradient(180deg, var(--darker), var(--dark));
}

.org-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 60px;
}

.org-level {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.org-box {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 12px;
    padding: 18px 28px;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.org-box:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-glow);
}

.org-box.supreme {
    background: linear-gradient(135deg, rgba(204, 0, 0, 0.3), rgba(0, 68, 204, 0.3));
    border-color: var(--gold);
    font-size: 1.1rem;
}

.org-box small {
    display: block;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 4px;
}

.org-box.small {
    padding: 12px 20px;
    font-size: 0.85rem;
}

.org-connector {
    font-size: 1.5rem;
    color: var(--gold);
    opacity: 0.5;
}

/* Специальные подразделения */
.special-forces h3 {
    text-align: center;
    color: var(--gold);
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.special-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.special-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 30px 25px;
    text-align: center;
    transition: all 0.3s;
}

.special-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
    box-shadow: var(--shadow-glow);
}

.special-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
}

.special-card h4 {
    color: var(--gold);
    margin-bottom: 10px;
}

.special-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ===== ТАЙМЛАЙН ===== */
.timeline-section {
    background: var(--dark);
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: var(--gradient-yu);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 20px 40px;
}

.timeline-item.left {
    left: 0;
    text-align: right;
}

.timeline-item.right {
    left: 50%;
}

.timeline-item::after {
    content: '★';
    position: absolute;
    top: 30px;
    width: 24px;
    height: 24px;
    background: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--dark);
    font-weight: bold;
    z-index: 2;
}

.timeline-item.left::after {
    right: -12px;
}

.timeline-item.right::after {
    left: -12px;
}

.timeline-content {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s;
}

.timeline-content:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-glow);
}

.timeline-date {
    display: inline-block;
    background: var(--gold);
    color: var(--dark);
    padding: 4px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.timeline-content h3 {
    color: var(--gold);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ===== ПОДВАЛ ===== */
.footer {
    background: var(--darker);
    border-top: 1px solid var(--card-border);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    color: var(--gold);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.footer-section p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 3px 0;
}

.footer-section ul li::before {
    content: '◆ ';
    color: var(--gold);
    font-size: 0.6rem;
    vertical-align: middle;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--card-border);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-credit {
    margin-top: 8px;
    font-size: 0.78rem !important;
    opacity: 0.7;
}

.footer-credit a {
    color: var(--gold);
    text-decoration: none;
}

.footer-credit a:hover {
    text-decoration: underline;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
        padding: 12px 20px;
    }

    .nav-links {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .years {
        font-size: 1.5rem;
        letter-spacing: 4px;
    }

    .hero-stats {
        gap: 30px;
    }

    .stat-number {
        font-size: 1.6rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        text-align: left !important;
        padding-left: 50px;
        padding-right: 20px;
    }

    .timeline-item::after {
        left: 8px !important;
        right: auto !important;
    }
}

/* ===== АНИМАЦИЯ ПОЯВЛЕНИЯ ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}