/* ===== ROOT VARIABLES ===== */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #357abd;
    --accent-color: #5ba3f5;
    --background-dark: #1a1f2e;
    --background-secondary: #242d3d;
    --text-primary: #e0e0e0;
    --text-secondary: #a8a8a8;
    --border-color: rgba(74, 144, 226, 0.3);
    --transition: all 0.3s ease;
}

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--background-dark);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 3rem;
    align-items: center;
}

.nav-menu > li {
    position: relative;
    padding-bottom: 0.3rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Dropdown Menu */
.nav-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    min-width: 200px;
    list-style: none;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    z-index: 1001;
}

.nav-item:hover .nav-dropdown {
    display: block;
}

.nav-item {
    position: relative;
}

/* Расширенная hover зона для dropdown */
.nav-item::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 0.5rem;
    z-index: 999;
}

.nav-dropdown li {
    padding: 0;
    margin: 0;
}

.nav-dropdown li:first-child a {
    border-radius: 12px 12px 0 0;
}

.nav-dropdown li:last-child a {
    border-radius: 0 0 12px 12px;
}

.nav-dropdown a {
    display: block;
    padding: 0.8rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: capitalize;
    transition: var(--transition);
    letter-spacing: 0;
    font-weight: normal;
}

.nav-dropdown a:hover {
    background: rgba(74, 144, 226, 0.15);
    color: var(--primary-color);
}


/* ===== MAIN CONTENT ===== */
.main-content {
    margin-top: 80px;
}

.section {
    display: none;
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===== HERO ===== */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    position: relative;
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeIn 0.8s ease;
}

.hero-title {
    font-size: 5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1rem;
    letter-spacing: 3px;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-icon {
    font-size: 1.2rem;
}

.hero-glow {
    display: none;
}

/* ===== PROJECTS SECTION ===== */
.projects-section {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-intro {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: inherit;
}

.project-card::before {
    display: none;
}

.project-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.2);
    transform: translateY(-4px);
}

.project-card:hover .project-arrow {
    opacity: 1;
    transform: translateX(5px);
}

.project-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.project-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.project-arrow {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: var(--transition);
    opacity: 0.7;
}

/* ===== INFO SECTION ===== */
.info-section {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.info-card {
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.info-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.2);
    transform: translateY(-4px);
}

.info-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.info-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.info-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== CTA SECTION ===== */
.cta-section {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cta-section h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.cta-section p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.cta-description {
    color: var(--text-secondary);
    margin: 1rem 0 2rem 0;
    font-size: 1.1rem;
}

.cta-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    justify-content: center;
}

.btn-primary-large,
.btn-secondary-large {
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    border: 2px solid;
    cursor: pointer;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary-large {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary-large:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-3px);
}

.btn-secondary-large {
    background: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary-large:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* ===== LINKS GRID ===== */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.link-card {
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.link-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.2);
    transform: translateY(-4px);
}

.link-icon {
    font-size: 2.5rem;
}

.link-card h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
}

.link-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.link-arrow {
    font-size: 1.2rem;
    color: var(--primary-color);
    opacity: 0.7;
    transition: var(--transition);
    margin-top: auto;
}

.link-card:hover .link-arrow {
    opacity: 1;
    transform: translateX(5px);
}

/* ===== RULES & INFO ===== */
.rules-intro {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--background-secondary);
    border-left: 4px solid var(--primary-color);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.rules-intro p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.guide-content {
    max-width: 900px;
    margin: 0 auto;
}

.guide-content h2 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.guide-content ol {
    margin-left: 2rem;
}

.guide-content ol li {
    margin-bottom: 0.8rem;
}

/* ===== RULE ITEM ===== */
.rule-item {
    background: var(--background-secondary);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    display: flex;
    gap: 1.5rem;
}

.rule-item-number {
    min-width: 40px;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    flex-shrink: 0;
}

.rule-item-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.rule-item-content p {
    color: var(--text-secondary);
}

/* ===== INFO CONTENT ===== */
.info-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-card {
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--background-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-section p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section {
        padding: 2rem 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .buttons-grid {
        grid-template-columns: 1fr;
    }

    .rule-item {
        flex-direction: column;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .main-content {
        margin-top: 120px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .nav-link {
        font-size: 0.8rem;
    }

    .projects-grid,
    .links-grid {
        grid-template-columns: 1fr;
    }
}
