/* ========== Reset & Base ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0d47a1;
    --primary-dark: #002171;
    --primary-light: #5472d3;
    --secondary: #1565c0;
    --accent: #ff6f00;
    --accent-hover: #e65100;
    --text-primary: #212121;
    --text-secondary: #757575;
    --bg-light: #f5f5f5;
    --bg-white: #ffffff;
    --border-light: #e0e0e0;
    --success: #43a047;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-white);
    font-size: 16px;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

a:hover {
    color: var(--accent);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========== Accessibility Panel ========== */
.accessibility-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    padding: 20px;
}

.accessibility-panel.active {
    display: flex;
    opacity: 1;
}

.accessibility-content {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    margin: auto;
}

.accessibility-panel.active .accessibility-content {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--accent);
    transform: rotate(90deg);
}

.accessibility-content h3 {
    color: var(--primary);
    margin-bottom: 30px;
    font-size: 24px;
}

.accessibility-content h3 i {
    margin-right: 10px;
}

.control-group {
    margin-bottom: 25px;
}

.control-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.control-group label i {
    margin-right: 8px;
    color: var(--primary);
}

.btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-group button {
    padding: 10px 20px;
    border: 2px solid var(--border-light);
    background: var(--bg-white);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-group button:hover,
.btn-group button.active {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--bg-white);
}

/* ========== Header Top ========== */
.header-top {
    background: var(--bg-white);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-light);
}

.header-top-content {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 30px;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: var(--bg-white);
}

.logo-text h1 {
    font-size: 20px;
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: 5px;
}

.logo-text p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.header-contacts {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.contact-item i {
    color: var(--primary);
    width: 18px;
    text-align: center;
}

.accessibility-btn {
    padding: 10px 20px;
    background: var(--accent);
    color: var(--bg-white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}

.accessibility-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.accessibility-btn i {
    margin-right: 6px;
}

/* ========== Navigation ========== */
.main-nav {
    background: var(--primary);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.main-nav.scrolled {
    box-shadow: var(--shadow-lg);
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    flex: 1;
}

.nav-menu a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 12px;
    color: var(--bg-white);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--accent);
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--primary-dark);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--bg-white);
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
}

/* ========== Hero Slider ========== */
.hero-slider {
    position: relative;
    height: 550px;
    overflow: hidden;
}

.slider-wrapper {
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.slide.active {
    opacity: 1;
    visibility: visible;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
}

.slide-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    z-index: 2;
}

.slide-title {
    font-size: 48px;
    color: var(--bg-white);
    font-weight: 700;
    margin-bottom: 20px;
    animation: slideUp 0.8s ease forwards;
    opacity: 0;
}

.slide.active .slide-title {
    animation: slideUp 0.8s ease forwards;
}

.slide-text {
    font-size: 20px;
    color: var(--bg-white);
    margin-bottom: 30px;
    max-width: 700px;
    line-height: 1.5;
    animation: slideUp 0.8s 0.2s ease forwards;
    opacity: 0;
}

.slide.active .slide-text {
    animation: slideUp 0.8s 0.2s ease forwards;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-white);
    animation: slideUp 0.8s 0.4s ease forwards;
    opacity: 0;
}

.slide.active .btn-primary {
    animation: slideUp 0.8s 0.4s ease forwards;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--bg-white);
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: var(--bg-white);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-nav:hover {
    background: rgba(255,255,255,0.4);
    transform: translateY(-50%) scale(1.1);
}

.slider-nav.prev {
    left: 30px;
}

.slider-nav.next {
    right: 30px;
}

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: var(--transition);
}

.slider-dot.active {
    background: var(--bg-white);
    width: 40px;
    border-radius: 6px;
}

/* ========== Quick Links ========== */
.quick-links {
    padding: 80px 0;
    background: var(--bg-light);
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.quick-link-card {
    background: var(--bg-white);
    padding: 35px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-top: 4px solid transparent;
}

.quick-link-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-top-color: var(--primary);
}

.card-icon {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 20px;
}

.quick-link-card h3 {
    font-size: 20px;
    color: var(--primary-dark);
    margin-bottom: 15px;
    font-weight: 600;
}

.quick-link-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 15px;
}

.card-link {
    color: var(--primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.card-link:hover {
    gap: 12px;
}

/* ========== Sections ========== */
.section-title {
    font-size: 38px;
    color: var(--primary-dark);
    text-align: center;
    margin-bottom: 50px;
    font-weight: 700;
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

/* ========== About Section ========== */
.about-section {
    padding: 80px 0;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    align-items: start;
}

.about-text p {
    margin-bottom: 20px;
    line-height: 1.8;
    color: var(--text-primary);
    font-size: 16px;
}

.about-text ul {
    list-style: none;
    margin-top: 25px;
}

.about-text li {
    padding: 12px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
}

.about-text li i {
    color: var(--success);
    font-size: 18px;
}

.director-card {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.director-photo {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    color: var(--bg-white);
}

.director-label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.director-card h3 {
    color: var(--primary-dark);
    margin-bottom: 10px;
    font-size: 20px;
}

.director-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* ========== Statistics ========== */
.statistics {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--bg-white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.stat-item {
    text-align: center;
}

.stat-icon {
    font-size: 50px;
    margin-bottom: 20px;
    color: var(--accent);
}

.stat-number {
    font-size: 52px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--bg-white);
}

.stat-label {
    font-size: 16px;
    opacity: 0.9;
}

/* ========== Main Info Section ========== */
.main-info-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.info-card {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-left: 4px solid var(--primary);
}

.info-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.info-card-header i {
    font-size: 24px;
    color: var(--primary);
}

.info-card-header h3 {
    font-size: 16px;
    color: var(--primary-dark);
    font-weight: 600;
}

.info-card p {
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 15px;
}

.info-card a {
    color: var(--primary);
    font-weight: 600;
}

/* ========== Founder Section ========== */
.founder-section {
    padding: 80px 0;
}

.founder-card {
    background: var(--bg-light);
    padding: 40px;
    border-radius: 12px;
    border-left: 6px solid var(--primary);
    box-shadow: var(--shadow-sm);
}

.founder-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.founder-header i {
    font-size: 36px;
    color: var(--primary);
}

.founder-header h3 {
    font-size: 22px;
    color: var(--primary-dark);
    font-weight: 700;
}

.founder-content {
    display: grid;
    gap: 20px;
}

.founder-info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: var(--bg-white);
    border-radius: 8px;
}

.founder-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.founder-icon i {
    color: var(--bg-white);
    font-size: 18px;
}

.founder-info-item strong {
    display: block;
    margin-bottom: 5px;
    color: var(--primary-dark);
}

.founder-info-item a {
    color: var(--primary);
    font-weight: 600;
}

/* ========== Map Section ========== */
.map-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.map-container {
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

/* ========== Footer ========== */
.footer {
    background: var(--primary-dark);
    color: var(--bg-white);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
    margin-bottom: 50px;
}

.footer-column h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--accent);
    font-weight: 600;
}

.footer-column h3 i {
    margin-right: 8px;
}

.footer-column p {
    margin-bottom: 12px;
    line-height: 1.6;
    font-size: 14px;
}

.footer-contact {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-column a {
    color: var(--bg-white);
    transition: var(--transition);
}

.footer-column a:hover {
    color: var(--accent);
}

.footer-menu {
    list-style: none;
}

.footer-menu li {
    margin-bottom: 12px;
}

.footer-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.footer-menu a:hover {
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: var(--transition);
}

.social-link.vk {
    background: #0077FF;
}

.social-link.telegram {
    background: #0088cc;
}

.social-link.ok {
    background: #EE8208;
}

.social-link.youtube {
    background: #FF0000;
}

.social-link:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.footer-contacts p {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.footer-contacts i {
    margin-top: 3px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright p {
    font-size: 14px;
    opacity: 0.8;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ========== Scroll to Top ========== */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent);
    color: var(--bg-white);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--shadow-md);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--accent-hover);
    transform: translateY(-5px);
}

/* ========== Animations ========== */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ========== Accessibility Styles ========== */
body.font-small {
    font-size: 14px;
}

body.font-large {
    font-size: 18px;
}

body.color-black-white {
    filter: grayscale(100%) contrast(1.2);
}

body.color-blue-white {
    background: #e3f2fd;
}

body.color-blue-white .header-top,
body.color-blue-white .quick-link-card,
body.color-blue-white .info-card,
body.color-blue-white .founder-card,
body.color-blue-white .director-card {
    background: #bbdefb;
}

body.spacing-wide {
    letter-spacing: 1.5px;
}

/* ========== Responsive Design ========== */
@media (max-width: 1024px) {
    .header-top-content {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }
    
    .header-contacts {
        align-items: center;
    }
    
    .quick-links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .info-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: var(--primary-dark);
        flex-direction: column;
        padding: 80px 20px 20px;
        transition: var(--transition);
        overflow-y: auto;
        box-shadow: var(--shadow-lg);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu a {
        justify-content: flex-start;
        padding: 15px 20px;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero-slider {
        height: 400px;
    }
    
    .slide-title {
        font-size: 32px;
    }
    
    .slide-text {
        font-size: 16px;
    }
    
    .slider-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .slider-nav.prev {
        left: 15px;
    }
    
    .slider-nav.next {
        right: 15px;
    }
    
    .quick-links-grid,
    .stats-grid,
    .info-cards {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .slide-title {
        font-size: 24px;
    }
    
    .slide-text {
        font-size: 14px;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .quick-link-card,
    .info-card {
        padding: 25px;
    }
    
    .stat-number {
        font-size: 40px;
    }
}