/* Единый шрифт для всего сайта */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap');

:root {
    --primary: #004a99;
    --dark: #002d5d;
    --accent: #ffcc00;
    --bg: #ffffff;
    --light-bg: #f8f9fa;
    --text: #333;
    --danger: #d32f2f;
}

/* Темная тема */
body.dark-theme {
    --primary: #4a9eff;
    --dark: #1e3a5f;
    --accent: #ffcc00;
    --bg: #1a1a1a;
    --light-bg: #2a2a2a;
    --text: #e0e0e0;
}

body.dark-theme {
    background: var(--bg);
    color: var(--text);
}

body.dark-theme header,
body.dark-theme .card,
body.dark-theme .sidebar-item,
body.dark-theme .dropdown-content,
body.dark-theme .mobile-menu {
    background: var(--light-bg);
    color: var(--text);
}

body.dark-theme .spec-box,
body.dark-theme .file-item,
body.dark-theme .course-card {
    background: #333;
}

body.dark-theme .data-table th {
    background: var(--dark);
}

/* Кнопка переключения темы */
.theme-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 50%;
    transition: all 0.3s ease;
    margin-left: 15px;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

body { 
    font-family: 'Inter', sans-serif; 
    margin: 0; padding: 0; 
    color: var(--text); 
    background: var(--bg); 
    line-height: 1.6;
}

/* Шапка и соцсети */
.top-bar { 
    background: var(--dark); 
    color: white; 
    padding: 8px 5%; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    font-size: 0.85rem; 
}
.top-links a { color: white; text-decoration: none; margin-left: 20px; transition: 0.3s; }
.top-links a:hover { color: var(--accent); }

header { 
    background: white; 
    padding: 10px 5%; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    position: sticky; 
    top: 0; z-index: 1000; 
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    gap: 20px;
}

/* Поиск */
.search-container {
    display: flex;
    align-items: center;
    background: var(--light-bg);
    border-radius: 25px;
    padding: 5px 10px;
    min-width: 250px;
}

.search-input {
    border: none;
    background: none;
    outline: none;
    padding: 8px 12px;
    flex: 1;
    font-size: 0.9rem;
    color: var(--text);
}

.search-input::placeholder {
    color: #999;
}

.search-btn {
    background: var(--primary);
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
}

.search-btn:hover {
    background: var(--dark);
    transform: scale(1.05);
}

/* Результаты поиска */
#search-results {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.search-result-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: 0.3s;
}

.search-result-item:hover {
    background: var(--light-bg);
}

.search-result-item h4 {
    color: var(--primary);
    margin: 0 0 8px 0;
}

.search-result-item p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}
.logo-box { display: flex; align-items: center; gap: 15px; text-decoration: none; color: var(--primary); }
.logo-box img { height: 65px; }
.logo-box h1 { font-size: 1.1rem; margin: 0; text-transform: uppercase; font-weight: 800; }

/* Навигация */
nav ul { list-style: none; display: flex; gap: 25px; margin: 0; padding: 0; }
nav a, .drop-trigger { 
    text-decoration: none; 
    color: var(--dark); 
    font-weight: 600; 
    font-size: 0.85rem; 
    text-transform: uppercase; 
    cursor: pointer; 
}

.dropdown { position: relative; padding-bottom: 15px; margin-bottom: -15px; }
.dropdown-content { 
    visibility: hidden; opacity: 0; 
    position: absolute; background: white; 
    min-width: 260px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); 
    border-radius: 6px; top: 100%; left: 0; 
    transition: all 0.3s ease; 
    transition-delay: 0.1s;
    transform: translateY(10px);
    z-index: 1100;
}
.dropdown:hover .dropdown-content { visibility: visible; opacity: 1; transform: translateY(0); }
.dropdown-content a { 
    padding: 12px 20px; 
    border-bottom: 1px solid #f1f1f1; 
    display: block; 
    text-transform: none; 
    font-weight: 500; 
}

/* Слайдер */
.slider { width: 100%; height: 480px; position: relative; overflow: hidden; background: #000; }
.slides { display: flex; height: 100%; transition: 0.7s cubic-bezier(0.4, 0, 0.2, 1); }
.slide { min-width: 100%; position: relative; }
.slide img { width: 100%; height: 100%; object-fit: cover; opacity: 0.65; }
.slide-info { position: absolute; bottom: 60px; left: 8%; color: white; border-left: 5px solid var(--accent); padding-left: 20px; }
.slide-info h2 { font-size: 2.8rem; margin: 0; }

/* Кнопки навигации слайдера */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.slider-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.slider-prev {
    left: 20px;
}

.slider-next {
    right: 20px;
}

/* Индикаторы слайдов */
.slider-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.slider-dot.active {
    background: var(--accent);
    width: 35px;
    border-radius: 6px;
}

/* Контентная сетка */
.main-container { max-width: 1300px; margin: 40px auto; padding: 0 20px; display: grid; grid-template-columns: 300px 1fr; gap: 40px; }

.sidebar-item { background: var(--light-bg); border-radius: 10px; padding: 25px; margin-bottom: 25px; border: 1px solid #eee; }
.sidebar-item h3 { color: var(--primary); margin-top: 0; border-bottom: 2px solid var(--accent); padding-bottom: 8px; font-size: 1rem; }

.card { background: white; border-radius: 12px; padding: 30px; border: 1px solid #eee; box-shadow: 0 4px 15px rgba(0,0,0,0.03); margin-bottom: 30px; }
.spec-box { background: #f9fbff; border-left: 4px solid var(--primary); padding: 15px; margin: 15px 0; border-radius: 4px; }

/* Стили для текста структуры */
.struct-section { margin-bottom: 25px; }
.struct-section h4 { color: var(--primary); text-transform: uppercase; margin-bottom: 10px; border-bottom: 1px solid #eee; display: inline-block; }
.struct-list { padding-left: 20px; }
.struct-list li { margin-bottom: 8px; }

/* Дополнительные стили для контактов */
.contact-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.bank-details { background: #f4f7f9; border: 1px dashed #004a99; padding: 15px; border-radius: 8px; font-size: 0.9rem; margin-top: 15px; }

/* Таблица горячих линий и вакансий */
.data-table { width: 100%; border-collapse: collapse; margin-top: 15px; }
.data-table th, .data-table td { padding: 12px 10px; border-bottom: 1px solid #eee; font-size: 0.9rem; text-align: left; }
.data-table th { background: #f4f7f9; color: var(--primary); }
.data-table tr:hover { background: #fcfcfc; }

.hotline-table { width: 100%; border-collapse: collapse; margin-top: 15px; }
.hotline-table td { padding: 8px 5px; border-bottom: 1px solid #eee; font-size: 0.9rem; }
.hotline-table tr:last-child td { border: none; }
.hotline-table td:last-child { text-align: right; font-weight: bold; color: var(--danger); }

/* Стили для расписания в режиме работы */
.work-time-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.work-time-table th, .work-time-table td { text-align: left; padding: 12px; border-bottom: 1px solid #eee; }
.work-time-table th { color: var(--primary); font-size: 0.9rem; }

/* Стиль для кнопки YouTube */
.yt-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #ff0000;
    color: white !important;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}
.yt-btn:hover { background: #cc0000; transform: scale(1.05); }

/* Стили для файлов правил приема */
.file-item {
    background: #f9fbff;
    border-left: 4px solid var(--primary);
    padding: 15px 20px;
    margin: 10px 0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: 0.3s;
}
.file-item:hover {
    background: #f0f5ff;
    transform: translateX(5px);
}
.file-item i {
    font-size: 2rem;
    color: var(--danger);
}
.file-item a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    flex: 1;
}
.file-item a:hover {
    color: var(--dark);
}

/* Стили для курсов */
.course-card {
    background: linear-gradient(135deg, #f9fbff 0%, #f0f5ff 100%);
    border-left: 4px solid var(--primary);
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.course-card h4 {
    color: var(--primary);
    margin-top: 0;
    font-size: 1.1rem;
}
.course-card p {
    margin: 10px 0;
    line-height: 1.7;
}
.teachers {
    background: white;
    padding: 10px 15px;
    border-radius: 5px;
    margin-top: 10px;
    font-size: 0.9rem;
}
.price-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}
.price-table th {
    background: var(--primary);
    color: white;
    padding: 12px;
    text-align: left;
    font-size: 0.9rem;
}
.price-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}
.price-table tr:last-child td {
    border-bottom: none;
}
.price-table tr:hover {
    background: #f9fbff;
}

/* Стили для истории */
.history-highlight {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-left: 4px solid var(--accent);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}
.stat-box {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #eee;
    transition: 0.3s;
}
.stat-box:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.stat-box .number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
}
.stat-box .label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

footer { background: var(--dark); color: white; text-align: center; padding: 30px; margin-top: 50px; font-size: 0.9rem; }

/* Стили для раскрывающейся кнопки Instagram */
.instagram-toggle {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
    color: white;
    padding: 18px 35px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 6px 20px rgba(131, 58, 180, 0.3);
}

.instagram-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(131, 58, 180, 0.4);
}

.instagram-toggle i.fab {
    font-size: 1.8rem;
}

.instagram-toggle i.fas {
    font-size: 1rem;
    transition: transform 0.3s;
}

.instagram-dropdown {
    margin-top: 25px;
    padding: 25px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.instagram-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    padding: 18px 25px;
    border-radius: 12px;
    text-decoration: none;
    margin: 12px 0;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.instagram-item:hover {
    transform: translateX(10px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.instagram-item.main {
    background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
    padding: 22px 25px;
    border: 2px solid rgba(255,255,255,0.3);
}

.instagram-item i {
    font-size: 2.5rem;
    opacity: 0.9;
}

.instagram-item div {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.instagram-item strong {
    font-size: 1.15rem;
    margin-bottom: 5px;
}

.instagram-item span {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Стиль для Instagram в отделениях */
.dept-instagram {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    margin: 15px 0;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.dept-instagram:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.dept-instagram i {
    font-size: 1.5rem;
}

/* Стили для раскрывающейся кнопки телефонов */
.phone-toggle {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, #004a99 0%, #002d5d 100%);
    color: white;
    padding: 18px 35px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 6px 20px rgba(0, 74, 153, 0.3);
}

.phone-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 74, 153, 0.4);
}

.phone-toggle i.fas.fa-phone-alt {
    font-size: 1.3rem;
}

.phone-toggle i.fas.fa-chevron-down {
    font-size: 1rem;
    transition: transform 0.3s;
}

.phones-dropdown {
    margin-top: 25px;
    padding: 25px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    animation: slideDown 0.3s ease;
}

/* Стили для новостей */
.news-refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 74, 153, 0.2);
}

.news-refresh-btn:hover {
    background: var(--dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 74, 153, 0.3);
}

.news-refresh-btn i {
    font-size: 1.1rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s;
    border: 1px solid #eee;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.news-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #f0f0f0;
}

.news-content {
    padding: 25px;
}

.news-category {
    display: inline-block;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.news-title {
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 15px 0;
    line-height: 1.4;
}

.news-date {
    color: #666;
    font-size: 0.85rem;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-excerpt {
    color: var(--text);
    line-height: 1.7;
    font-size: 0.95rem;
    margin-top: 15px;
}

/* Адаптивность для новостей */
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ
   ============================================ */

/* Мобильное меню */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 10px;
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 350px;
    height: 100vh;
    background: white;
    z-index: 9999;
    overflow-y: auto;
    transition: right 0.3s ease;
    box-shadow: -5px 0 20px rgba(0,0,0,0.2);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    background: var(--primary);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
}

.mobile-menu-items {
    padding: 20px 0;
}

.mobile-menu-items a,
.mobile-menu-items .mobile-dropdown-trigger {
    display: block;
    padding: 15px 20px;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    transition: background 0.3s;
}

.mobile-menu-items a:hover,
.mobile-menu-items .mobile-dropdown-trigger:hover {
    background: #f8f9fa;
}

.mobile-dropdown-trigger {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 1rem;
}

.mobile-dropdown-content {
    display: none;
    background: #f8f9fa;
    padding-left: 20px;
}

.mobile-dropdown-content.active {
    display: block;
}

.mobile-dropdown-content a {
    padding: 12px 20px;
    font-weight: 500;
    font-size: 0.95rem;
    border-bottom: 1px solid #e0e0e0;
}

.mobile-dropdown-content a:last-child {
    border-bottom: none;
}

/* Адаптация для планшетов и мобильных */
@media screen and (max-width: 1024px) {
    /* Шапка */
    header {
        padding: 10px 3%;
    }
    
    .logo-box h1 {
        font-size: 0.9rem;
    }
    
    .logo-box img {
        height: 50px;
    }
    
    /* Скрываем десктопное меню */
    nav {
        display: none;
    }
    
    /* Показываем мобильную кнопку */
    .mobile-menu-toggle {
        display: block;
    }
    
    /* Показываем мобильное меню */
    .mobile-menu {
        display: block;
    }
    
    /* Поиск на планшетах */
    .search-container {
        min-width: 200px;
    }
    
    /* Слайдер */
    .slider {
        height: 300px;
    }
    
    .slide-info h2 {
        font-size: 1.8rem;
    }
    
    /* Кнопки слайдера на планшетах */
    .slider-btn {
        padding: 12px 16px;
        font-size: 1.3rem;
    }
    
    /* Контейнер */
    .main-container {
        grid-template-columns: 1fr;
        padding: 0 15px;
        gap: 20px;
        margin: 20px auto;
    }
    
    /* Сайдбар */
    aside {
        order: 2;
    }
    
    main {
        order: 1;
    }
    
    /* Карточки */
    .card {
        padding: 20px;
    }
    
    /* Контактная сетка */
    .contact-card-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* Статистика */
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
}

@media screen and (max-width: 768px) {
    /* Верхняя панель */
    .top-bar {
        flex-direction: column;
        gap: 10px;
        padding: 10px 3%;
        text-align: center;
    }
    
    .top-links {
        display: flex;
        gap: 15px;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .top-links a {
        margin-left: 0;
    }
    
    /* Логотип */
    .logo-box {
        gap: 10px;
    }
    
    .logo-box img {
        height: 40px;
    }
    
    .logo-box h1 {
        font-size: 0.75rem;
    }
    
    /* Поиск на телефонах */
    .search-container {
        min-width: 120px;
        padding: 2px 6px;
    }
    
    .search-input {
        padding: 5px 8px;
        font-size: 0.8rem;
    }
    
    .search-btn {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
    
    /* Слайдер */
    .slider {
        height: 250px;
    }
    
    .slide-info {
        left: 5%;
        bottom: 30px;
        padding-left: 15px;
        border-left-width: 3px;
    }
    
    .slide-info h2 {
        font-size: 1.3rem;
    }
    
    .slide-info p {
        font-size: 0.85rem;
    }
    
    /* Кнопки слайдера на телефонах */
    .slider-btn {
        padding: 8px 12px;
        font-size: 1rem;
    }
    
    .slider-prev {
        left: 5px;
    }
    
    .slider-next {
        right: 5px;
    }
    
    .slider-indicators {
        bottom: 10px;
    }
    
    .slider-dot {
        width: 6px;
        height: 6px;
    }
    
    .slider-dot.active {
        width: 20px;
    }
    
    /* Контейнер */
    .main-container {
        margin: 15px auto;
        padding: 0 10px;
    }
    
    /* Карточки */
    .card {
        padding: 15px;
    }
    
    .card h2 {
        font-size: 1.3rem;
    }
    
    /* Таблицы */
    .data-table,
    .hotline-table,
    .work-time-table,
    .price-table {
        font-size: 0.85rem;
    }
    
    .data-table th,
    .data-table td,
    .price-table th,
    .price-table td {
        padding: 8px 5px;
    }
    
    /* Кнопки */
    .instagram-toggle,
    .phone-toggle,
    .news-refresh-btn {
        padding: 14px 25px;
        font-size: 1rem;
    }
    
    /* Instagram карточки */
    .instagram-item {
        padding: 15px 20px;
    }
    
    .instagram-item i {
        font-size: 2rem;
    }
    
    .instagram-item strong {
        font-size: 1rem;
    }
    
    /* Файлы */
    .file-item {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .file-item i {
        font-size: 1.5rem;
    }
    
    /* Статистика */
    .stat-box .number {
        font-size: 2rem;
    }
    
    /* Курсы */
    .course-card {
        padding: 15px;
    }
    
    /* Футер */
    footer {
        padding: 20px;
        font-size: 0.85rem;
    }
}

@media screen and (max-width: 480px) {
    /* Верхняя панель */
    .top-bar {
        font-size: 0.75rem;
    }
    
    .top-links {
        font-size: 0.8rem;
    }
    
    /* Логотип */
    .logo-box h1 {
        font-size: 0.65rem;
    }
    
    .logo-box img {
        height: 35px;
    }
    
    /* Слайдер */
    .slider {
        height: 200px;
    }
    
    .slide-info h2 {
        font-size: 1.1rem;
    }
    
    .slide-info p {
        font-size: 0.75rem;
    }
    
    /* Сайдбар */
    .sidebar-item {
        padding: 15px;
    }
    
    .sidebar-item h3 {
        font-size: 0.9rem;
    }
    
    .sidebar-item p {
        font-size: 0.8rem;
    }
    
    /* Карточки */
    .card h2 {
        font-size: 1.1rem;
    }
    
    /* Кнопки */
    .instagram-toggle,
    .phone-toggle,
    .news-refresh-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    /* Instagram */
    .instagram-item {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    
    .instagram-item i {
        font-size: 2.5rem;
    }
    
    /* Таблицы - горизонтальная прокрутка */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Новости */
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-card {
        margin: 0;
    }
    
    .news-title {
        font-size: 1.1rem;
    }
    
    /* Отделения Instagram */
    .dept-instagram {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Ландшафтная ориентация мобильных */
@media screen and (max-width: 896px) and (orientation: landscape) {
    .slider {
        height: 280px;
    }
    
    .main-container {
        grid-template-columns: 250px 1fr;
    }
}

/* Дополнительная адаптивность */
@media screen and (max-width: 768px) {
    /* Обертка для таблиц с горизонтальной прокруткой */
    .phones-dropdown table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Уменьшаем шрифт в таблицах на мобильных */
    .data-table th,
    .data-table td {
        font-size: 0.8rem;
        padding: 10px 8px;
    }
}

/* Улучшения для очень маленьких экранов */
@media screen and (max-width: 360px) {
    .logo-box h1 {
        font-size: 0.6rem;
    }
    
    .instagram-toggle,
    .phone-toggle,
    .news-refresh-btn {
        font-size: 0.85rem;
        padding: 10px 18px;
    }
    
    .card {
        padding: 12px;
    }
    
    .spec-box {
        padding: 12px;
        font-size: 0.85rem;
    }
}

/* Современная фото-галерея */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    aspect-ratio: 4/3;
}

.gallery-item.gallery-large {
    grid-column: span 2;
    aspect-ratio: 16/9;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,74,153,0.85), rgba(255,204,0,0.85));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: white;
    font-size: 2.5rem;
    transform: scale(0.5);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay i {
    transform: scale(1);
}

/* Адаптивность галереи */
@media (max-width: 768px) {
    .photo-gallery {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .gallery-item.gallery-large {
        grid-column: span 1;
        aspect-ratio: 4/3;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .photo-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-item.gallery-large {
        grid-column: span 2;
    }
}

/* Lightbox для просмотра фото */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.3);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 50px;
    color: white;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    transition: transform 0.2s ease;
    z-index: 10000;
}

.lightbox-close:hover {
    transform: scale(1.2);
    color: var(--accent);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { 
        transform: scale(0.5);
        opacity: 0;
    }
    to { 
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 40px;
    }
    
    .lightbox-content {
        max-width: 95%;
        max-height: 85%;
    }
}

/* Переключатель языков */
.language-switcher {
    display: inline-flex;
    gap: 5px;
    margin-right: 15px;
}

.lang-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: 0.3s;
}

.lang-btn:hover {
    background: rgba(255,255,255,0.1);
}

.lang-btn.active {
    background: var(--accent);
    color: var(--dark);
    border-color: var(--accent);
}

/* Контроль размера шрифта */
.font-size-control {
    display: inline-flex;
    gap: 5px;
    margin-right: 15px;
    align-items: center;
}

.font-size-control button {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.font-size-control button:hover {
    background: rgba(255,255,255,0.1);
}

/* Кнопка карты */
.map-button {
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(0, 74, 153, 0.3);
}

.map-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 74, 153, 0.4);
}

.map-button i {
    margin-right: 10px;
}

/* Контейнер карты */
.map-container {
    position: relative;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-top: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.map-container.map-show {
    opacity: 1;
    transform: translateY(0);
}

.map-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: 0.3s;
}

.map-close:hover {
    transform: rotate(90deg);
}

/* Полезные ссылки */
.useful-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.useful-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.useful-link::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 74, 153, 0.1), transparent);
    transition: left 0.5s;
}

.useful-link:hover::before {
    left: 100%;
}

.useful-link:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 74, 153, 0.15);
}

.link-icon {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
    transition: all 0.3s;
}

.useful-link:hover .link-icon {
    background: var(--dark);
    transform: rotate(5deg) scale(1.1);
}

.link-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.link-info strong {
    color: var(--primary);
    font-size: 1.05rem;
    font-weight: 600;
}

.link-info span {
    color: #666;
    font-size: 0.85rem;
}

.useful-link > .fa-external-link-alt {
    color: var(--primary);
    font-size: 1rem;
    opacity: 0.5;
    transition: all 0.3s;
}

.useful-link:hover > .fa-external-link-alt {
    opacity: 1;
    transform: translateX(3px);
}

/* Калькулятор */
.calculator-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 30px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
}

.calc-field {
    margin-bottom: 20px;
}

.calc-field label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary);
    font-weight: 600;
}

.calc-field select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: 0.3s;
}

.calc-field select:focus {
    outline: none;
    border-color: var(--primary);
}

.calc-result {
    background: var(--primary);
    color: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    margin-top: 20px;
}

.calc-result-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 10px;
}

.calc-result-value {
    font-size: 2.5rem;
    font-weight: 800;
}

/* Стипендии */
.scholarship-card {
    background: linear-gradient(135deg, #f9fbff 0%, #f0f5ff 100%);
    border-left: 4px solid var(--primary);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.scholarship-card h3 {
    color: var(--primary);
    margin-top: 0;
}

.scholarship-card ul {
    margin: 10px 0;
    padding-left: 25px;
    line-height: 1.8;
}

/* Опросы */
.poll-container {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    margin: 25px 0;
}

.poll-container h3 {
    color: var(--primary);
    margin-top: 0;
}

.poll-options {
    margin: 20px 0;
}

.poll-option {
    display: block;
    padding: 15px;
    margin: 10px 0;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
}

.poll-option:hover {
    border-color: var(--primary);
    background: #f9fbff;
}

.poll-option input {
    margin-right: 10px;
}

.poll-bar {
    background: #e0e0e0;
    height: 8px;
    border-radius: 4px;
    margin: 10px 0;
    overflow: hidden;
}

.poll-bar-fill {
    background: var(--primary);
    height: 100%;
    transition: 0.5s;
}

.poll-percent {
    position: absolute;
    right: 15px;
    top: 15px;
    color: var(--primary);
    font-weight: 600;
}

.suggestion-textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: 0.3s;
}

.suggestion-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.submit-suggestion-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    transition: 0.3s;
}

.submit-suggestion-btn:hover {
    background: var(--dark);
}

/* FAQ */
.faq-category {
    margin: 30px 0;
}

.faq-category h3 {
    color: var(--primary);
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.faq-item {
    margin: 15px 0;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: 0.3s;
}

.faq-item:hover {
    border-color: var(--primary);
}

.faq-question {
    padding: 15px 20px;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--primary);
    transition: 0.3s;
}

.faq-question:hover {
    background: #f0f5ff;
}

.faq-question i {
    transition: 0.3s;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: white;
}

.faq-answer p, .faq-answer ul {
    padding: 15px 20px;
    margin: 0;
}

.faq-item.active .faq-answer {
    border-top: 1px solid #e0e0e0;
}

/* Календарь */
.calendar-month {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-nav-btn {
    background: var(--primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.calendar-nav-btn:hover {
    background: var(--dark);
    transform: scale(1.1);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-grid > div {
    padding: 10px;
    text-align: center;
    font-weight: 600;
    color: var(--primary);
}

.calendar-day {
    background: #f8f9fa;
    border-radius: 8px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    font-weight: normal;
    color: var(--text);
}

.calendar-day:hover {
    background: #e3f2fd;
}

.calendar-day.empty {
    background: transparent;
    cursor: default;
}

.calendar-day.today {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.calendar-day.event {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 2px solid var(--accent);
}

.event-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #f9fbff;
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    margin: 10px 0;
}

.event-date {
    background: var(--primary);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.event-day {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}

.event-month {
    font-size: 0.8rem;
    text-transform: uppercase;
}

.event-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.event-info strong {
    color: var(--primary);
    margin-bottom: 5px;
}

.event-info span {
    color: #666;
    font-size: 0.9rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .useful-links {
        grid-template-columns: 1fr;
    }
    
    .useful-link {
        padding: 15px;
    }
    
    .link-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .language-switcher,
    .font-size-control {
        display: none;
    }
    
    .calc-result-value {
        font-size: 2rem;
    }
    
    .calendar-day {
        min-height: 40px;
        font-size: 0.9rem;
    }
}
