/* Дополнительные стили для сайта университета */

/* Утилитарные классы для различных макетов слайдов */
.slide-layout-center {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.slide-layout-left {
    display: flex;
    align-items: center;
    text-align: left;
}

.slide-layout-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    text-align: right;
}

.slide-layout-top {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 4rem;
    text-align: center;
}

.slide-layout-bottom {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 4rem;
    text-align: center;
}

.slide-layout-split-left {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
}

.slide-layout-split-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
}

.slide-layout-split-top {
    display: flex;
    flex-direction: column;
}

.slide-layout-split-bottom {
    display: flex;
    flex-direction: column;
}

/* Классы для изображений */
.slide-image-full {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

/* Анимация для полноэкранных изображений */
.slide-image-full::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.03) 50%, transparent 70%);
    animation: shimmerSlide 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmerSlide {
    0%, 100% { 
        transform: translateX(-100%);
        opacity: 0;
    }
    50% { 
        transform: translateX(100%);
        opacity: 1;
    }
}

.slide-image-half {
    width: 50%;
    height: 100%;
    object-fit: cover;
}

.slide-image-third {
    width: 33.333%;
    height: 100%;
    object-fit: cover;
}

.slide-image-overlay {
    position: relative;
}

.slide-image-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, rgba(0,0,0,0.4), rgba(0,0,0,0.1));
    z-index: 1;
}

/* Текстовые области с различным позиционированием */
.slide-text-overlay {
    position: relative;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 1rem;
}

.slide-text-card {
    background: rgba(255, 255, 255, 0.95);
    color: #1f2937;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.slide-text-transparent {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    padding: 2rem;
    border-radius: 1rem;
}

/* Слайдер */
.slider-container {
    position: relative;
    width: 100%;
    height: 100vh;
}

.slide {
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

.slide.fade-in {
    animation: slideInFade 1s ease-in-out;
}

@keyframes slideInFade {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slider-nav {
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.slider-nav:hover {
    transform: scale(1.1);
    background-color: rgba(0, 0, 0, 0.6);
}

.slider-dots .dot.active {
    opacity: 1;
    transform: scale(1.2);
}

.slider-dots .dot {
    transition: all 0.3s ease;
    cursor: pointer;
}

.slider-dots .dot:hover {
    transform: scale(1.1);
}

/* Прогресс-бар для слайдера */
.slider-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background-color: rgba(245, 158, 11, 0.8);
    transition: width 5s linear;
    z-index: 10;
}

/* Стили для различных макетов слайдов */
.slide-overlay {
    transition: opacity 0.3s ease;
}

.slide-content {
    animation: slideContentIn 1s ease-out;
}

@keyframes slideContentIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-image-placeholder {
    transition: all 0.3s ease;
}

.slide-image-placeholder:hover {
    transform: scale(1.05);
}

/* Специальные стили для разных типов слайдов */
.slide:nth-child(1) .slide-content {
    animation: fadeInCenter 1s ease-out;
}

.slide:nth-child(2) .slide-content {
    animation: slideInLeft 1s ease-out;
}

.slide:nth-child(3) .slide-content {
    animation: slideInBottom 1s ease-out;
}

.slide:nth-child(4) .slide-content {
    animation: slideInRight 1s ease-out;
}

.slide:nth-child(5) .slide-content {
    animation: slideInTop 1s ease-out;
}

@keyframes fadeInCenter {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInBottom {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Адаптивность слайдера */
@media (max-width: 768px) {
    .slide h2 {
        font-size: 2.5rem !important;
    }
    
    .slide p {
        font-size: 1rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .slide .flex-col.sm\\:flex-row {
        gap: 1rem;
    }
    
    .slider-nav {
        display: none; /* Скрываем стрелки на мобильных */
    }
    
    .slider-dots {
        bottom: 4rem;
    }
    
    /* Мобильные адаптации для разных макетов */
    .slide .grid.md\\:grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .slide .text-left {
        text-align: center;
    }
    
    .slide .md\\:text-left {
        text-align: center !important;
    }
    
    .slide .hidden.md\\:block {
        display: none !important;
    }
    
    /* Для слайда с текстом внизу */
    .slide .justify-end {
        justify-content: center;
        padding-bottom: 2rem;
    }
    
    /* Для разделённого экрана */
    .slide .grid.h-full {
        height: auto;
        min-height: 100vh;
    }
}

@media (max-width: 480px) {
    .slide h2 {
        font-size: 2rem !important;
        line-height: 1.2;
    }
    
    .slide p {
        font-size: 0.9rem !important;
    }
    
    .slide a {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.875rem !important;
    }
    
    .slide .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Уменьшаем отступы на очень маленьких экранах */
    .slide .pb-20 {
        padding-bottom: 3rem !important;
    }
    
    .slide .mb-6 {
        margin-bottom: 1rem !important;
    }
    
    .slide .mb-8 {
        margin-bottom: 1.5rem !important;
    }
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Классы анимаций */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-slide-left {
    animation: slideInLeft 0.6s ease-out;
}

.animate-slide-right {
    animation: slideInRight 0.6s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Плавные переходы */
.transition-all {
    transition: all 0.3s ease;
}

/* Эффекты при наведении */
.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Градиенты */
.gradient-university {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
}

.gradient-gold {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
}

/* Тени */
.shadow-university {
    box-shadow: 0 4px 6px -1px rgba(30, 58, 138, 0.1), 0 2px 4px -1px rgba(30, 58, 138, 0.06);
}

.shadow-gold {
    box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.1), 0 2px 4px -1px rgba(245, 158, 11, 0.06);
}

/* Кастомные скроллбары */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #1e3a8a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1e40af;
}

/* Стили для форм */
.form-input {
    @apply w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all;
}

.form-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input.error {
    @apply border-red-500;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Кнопки */
.btn-primary {
    @apply bg-blue-600 hover:bg-blue-700 text-white px-6 py-3 rounded-lg font-semibold transition-all;
}

.btn-secondary {
    @apply bg-gray-200 hover:bg-gray-300 text-gray-800 px-6 py-3 rounded-lg font-semibold transition-all;
}

.btn-outline {
    @apply border-2 border-blue-600 text-blue-600 hover:bg-blue-600 hover:text-white px-6 py-3 rounded-lg font-semibold transition-all;
}

/* Карточки */
.card {
    @apply bg-white rounded-lg shadow-lg overflow-hidden transition-all;
}

.card:hover {
    @apply shadow-xl;
    transform: translateY(-2px);
}

/* Типография */
.text-gradient {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Навигация */
.nav-link {
    @apply relative px-3 py-2 text-white hover:text-yellow-400 transition-colors;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #f59e0b;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Мега-меню */
.mega-menu {
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.group:hover .mega-menu {
    transform: translateY(0);
}

.mega-menu h3 {
    position: relative;
    padding-bottom: 0.5rem;
}

.mega-menu h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: #f59e0b;
}

.mega-menu a {
    display: block;
    padding: 0.5rem 0;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.mega-menu a:hover {
    background-color: rgba(59, 130, 246, 0.05);
    padding-left: 0.5rem;
}

/* Поиск */
.search-toggle {
    position: relative;
}

.search-toggle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 40px;
    height: 40px;
    background-color: rgba(245, 158, 11, 0.2);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.search-toggle:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

#search-bar {
    animation: slideDown 0.3s ease-out;
}

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

#search-input:focus {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

#search-results {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-result-item {
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.search-result-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
}

/* Мобильные подменю */
.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.mobile-submenu.open {
    max-height: 200px;
}

/* Адаптивность мега-меню */
@media (max-width: 1024px) {
    .mega-menu {
        display: none !important;
    }
}

/* Блок образовательных программ */
.education-programs-block {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #6366f1 100%);
    position: relative;
    overflow: hidden;
}

.education-programs-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>') repeat;
    opacity: 0.3;
    animation: backgroundMove 30s linear infinite;
}

@keyframes backgroundMove {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-100px) translateY(-100px); }
}

/* Статистика с анимацией */
.stat-number {
    display: inline-block;
    font-weight: 800;
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: countUp 2s ease-out;
}

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

/* Блок образовательных программ - равная высота */
.education-programs-block .grid {
    display: grid;
    align-items: stretch;
}

/* Карточки программ обучения */
.education-card {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.education-card > div:last-child {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Изображения в карточках программ */
.education-card .program-header-image {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.education-card:hover .program-header-image {
    transform: scale(1.05);
}

.education-card .program-header-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.education-card:hover .program-header-image::before {
    transform: translateX(100%);
}

/* Декоративные элементы в изображениях */
.program-header-image .decorative-element {
    transition: all 0.3s ease;
}

.education-card:hover .decorative-element {
    transform: scale(1.2) rotate(180deg);
}

/* Иконки в изображениях программ */
.program-header-image i {
    transition: all 0.4s ease;
}

.education-card:hover .program-header-image i {
    transform: scale(1.1) rotate(10deg);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.education-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.education-card:hover::before {
    left: 100%;
}

.education-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Иконки программ */
.program-icon {
    background: rgba(245, 158, 11, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.education-card:hover .program-icon {
    background: rgba(245, 158, 11, 0.3);
    transform: rotate(360deg) scale(1.1);
}

/* Теги специальностей */
.specialty-tag {
    background: #dc2626;
    color: white;
    border: 1px solid #dc2626;
    transition: all 0.2s ease;
}

.specialty-tag:hover {
    background: #b91c1c;
    color: white;
    transform: scale(1.05);
}

/* Ссылки программ */
.program-link {
    position: relative;
    overflow: hidden;
}

.program-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    transition: width 0.3s ease;
}

.program-link:hover::after {
    width: 100%;
}

/* Секция поступления - равная высота */
.education-programs-block .grid.md\\:grid-cols-2 {
    display: grid;
    align-items: stretch;
}

/* Секция поступления и подбора программ */
.admission-section {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.admission-section > div:last-child {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.admission-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Шаги поступления */
.admission-step {
    position: relative;
}

.admission-step::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 40px;
    width: 2px;
    height: calc(100% - 20px);
    background: linear-gradient(to bottom, #fbbf24, transparent);
}

.admission-step:last-child::before {
    display: none;
}

.step-number {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    transition: all 0.3s ease;
}

.admission-step:hover .step-number {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
}

/* Call to Action секция */
.cta-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(245, 158, 11, 0.1) 50%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* CTA Campus Illustration */
.cta-campus-illustration {
    animation: float 6s ease-in-out infinite;
}

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

.cta-campus-illustration .building {
    transition: all 0.3s ease;
}

.cta-campus-illustration:hover .building {
    transform: scale(1.05);
}

/* CTA Success Metrics */
.cta-metric {
    transition: all 0.3s ease;
}

.cta-metric:hover {
    transform: scale(1.1);
}

.cta-metric .metric-number {
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { filter: drop-shadow(0 0 5px rgba(251, 191, 36, 0.5)); }
    to { filter: drop-shadow(0 0 15px rgba(251, 191, 36, 0.8)); }
}

/* Animated particles in CTA */
.cta-particle {
    animation: particle-float 4s ease-in-out infinite;
}

@keyframes particle-float {
    0%, 100% { 
        transform: translateY(0px) translateX(0px);
        opacity: 0.6;
    }
    25% { 
        transform: translateY(-5px) translateX(2px);
        opacity: 0.8;
    }
    50% { 
        transform: translateY(-10px) translateX(-2px);
        opacity: 1;
    }
    75% { 
        transform: translateY(-5px) translateX(1px);
        opacity: 0.8;
    }
}

/* Кнопки */
.btn-primary {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.6);
}

.btn-secondary {
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #fbbf24;
    color: #fbbf24;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

/* Модальное окно селектора программ */
.program-selector-modal {
    backdrop-filter: blur(10px);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.program-selector-modal .bg-white {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(59, 130, 246, 0.1);
}

/* Секция "Почему выбирают нас" */
.features-section {
    position: relative;
}

.features-section .grid {
    display: grid;
    align-items: stretch;
}

.features-section .feature-card {
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.features-section .feature-card > div:last-child {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.features-section .feature-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    animation: rotate 10s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.features-section .feature-card:hover::before {
    opacity: 1;
}

.features-section .feature-image {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.features-section .feature-card:hover .feature-image {
    transform: scale(1.05) rotate(2deg);
}

.features-section .feature-stats {
    transition: all 0.3s ease;
}

.features-section .feature-card:hover .feature-stats {
    transform: scale(1.1);
}

/* Дополнительные мини-карточки - равная высота */
.features-section .grid.grid-cols-2 {
    display: grid;
    align-items: stretch;
}

.features-section .grid.grid-cols-2 > div {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.features-section .grid.grid-cols-2 .text-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Секция программ */
.programs-section {
    position: relative;
}

.programs-section .grid {
    display: grid;
    align-items: stretch;
}

.programs-section .program-card {
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.programs-section .program-card > div:last-child {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.programs-section .program-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.8s ease;
}

.programs-section .program-card:hover::after {
    left: 100%;
}

.programs-section .program-image {
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.programs-section .program-card:hover .program-image {
    transform: scale(1.08);
}

.programs-section .program-image i {
    transition: all 0.4s ease;
}

.programs-section .program-card:hover .program-image i {
    transform: scale(1.2) rotate(10deg);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.programs-section .program-tags {
    transition: all 0.3s ease;
}

.programs-section .program-card:hover .program-tags {
    transform: translateY(-2px);
}

.programs-section .program-tag {
    transition: all 0.2s ease;
}

.programs-section .program-tag:hover {
    transform: scale(1.1);
    background-color: rgba(245, 158, 11, 0.3);
}

/* Популярные специализации */
.specialization-card {
    position: relative;
    overflow: hidden;
}

.specialization-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent, rgba(245, 158, 11, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.specialization-card:hover::before {
    opacity: 1;
}

.specialization-card i {
    transition: all 0.3s ease;
}

.specialization-card:hover i {
    transform: scale(1.4) rotate(360deg);
    color: #fbbf24;
    filter: drop-shadow(0 6px 12px rgba(251, 191, 36, 0.5));
}

/* Карточки специализаций - равная высота */
.programs-section .grid.grid-cols-2 {
    display: grid;
    align-items: stretch;
}

.specialization-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.specialization-card .text-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Enhanced program card styling */
.programs-section .program-card h4 {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.programs-section .program-card:hover h4 {
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    transform: scale(1.05);
    transition: all 0.3s ease;
}

.programs-section .program-card p {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.programs-section .program-card:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    transform: scale(1.08) translateY(-10px);
}

/* Enhanced card emphasis */
.feature-card-enhanced {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(147, 51, 234, 0.2)) border-box;
}

.feature-card-enhanced:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, rgba(59, 130, 246, 0.4), rgba(147, 51, 234, 0.4)) border-box;
}

.program-card-enhanced {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.program-card-enhanced:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(245, 158, 11, 0.5);
}

.enhanced-image-header {
    position: relative;
    overflow: hidden;
}

.enhanced-image-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.8s ease;
}

.feature-card-enhanced:hover .enhanced-image-header::after,
.program-card-enhanced:hover .enhanced-image-header::after {
    transform: translateX(100%);
}

/* Floating elements animation */
.floating-element {
    animation: float 6s ease-in-out infinite;
}

.floating-element:nth-child(2) {
    animation-delay: 2s;
}

.floating-element:nth-child(3) {
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-20px);
        opacity: 0.8;
    }
}

/* Quick stats animation */
.quick-stat {
    transition: all 0.3s ease;
}

.quick-stat:hover {
    transform: scale(1.15);
}

.quick-stat .stat-number {
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        filter: drop-shadow(0 0 5px rgba(251, 191, 36, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(251, 191, 36, 0.8));
    }
}

/* Адаптивность для образовательного блока */
@media (max-width: 768px) {
    .education-card {
        margin-bottom: 1rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .education-main-title {
        font-size: 2.5rem !important;
    }
    
    .admission-section {
        margin-bottom: 1rem;
    }
    
    .features-section .feature-card {
        margin-bottom: 2rem;
    }
    
    .programs-section .program-card {
        margin-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    .education-main-title {
        font-size: 2rem !important;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .education-card {
        padding: 1.5rem;
    }
    
    .features-section .feature-image {
        height: 180px;
    }
    
    .programs-section .program-image {
        height: 200px;
    }
    
    .programs-section .program-card {
        min-height: 480px;
    }
    
    /* Мобильная адаптация - равная высота */
    .features-section .grid,
    .programs-section .grid,
    .education-programs-block .grid {
        display: flex;
        flex-direction: column;
    }
    
    .features-section .feature-card,
    .programs-section .program-card,
    .education-card,
    .admission-section {
        height: auto;
        min-height: 300px;
    }
    
    .quick-stat {
        margin-bottom: 1rem;
    }
}

/* Enhanced Features Section Styles */
.enhanced-features-section {
    position: relative;
}

.enhanced-features-section .key-stats {
    animation: fadeInUp 0.8s ease-out;
}

.enhanced-features-section .key-stats > div {
    transition: all 0.3s ease;
}

.enhanced-features-section .key-stats > div:hover {
    transform: translateY(-5px);
    background: rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    padding: 8px;
}

.enhanced-features-section .key-stats .text-3xl {
    color: #1f2937 !important;
    background: none !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: initial !important;
    background-clip: initial !important;
}

/* Enhanced News Section Styles */
.enhanced-news-section {
    position: relative;
}

.enhanced-news-section .featured-news {
    animation: slideInUp 0.8s ease-out;
}

.enhanced-news-section .news-grid {
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.enhanced-news-section .news-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.enhanced-news-section .news-card:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.enhanced-news-section .news-card .category-badge {
    transition: all 0.3s ease;
}

.enhanced-news-section .news-card:hover .category-badge {
    transform: scale(1.1);
}

.enhanced-news-section .news-card h4 {
    transition: all 0.3s ease;
}

/* News animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Programs Slider Styles */
.programs-slider-container {
    position: relative;
    overflow: hidden;
}

.programs-slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.programs-slide {
    flex: 0 0 33.333%; /* каждая карточка занимает 1/3 экрана */
    padding: 0 1rem;
}

.programs-prev,
.programs-next {
    transition: all 0.3s ease;
}

.programs-prev:hover,
.programs-next:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.programs-dot {
    cursor: pointer;
    transition: all 0.3s ease;
}

.programs-dot:hover {
    transform: scale(1.2);
}

.programs-dot.active {
    background-color: #f59e0b;
    transform: scale(1.3);
}

/* Auto-slide animation */
@keyframes programsSlide {
    0%, 45% { transform: translateX(0); }
    55%, 95% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

.programs-slider.auto-slide {
    animation: programsSlide 8s infinite ease-in-out;
}

/* Планшеты - равная высота */
/* Modal Styles */
.modal {
    transition: opacity 0.3s ease-in-out;
}

.modal-content {
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

.modal:not(.hidden) .modal-content {
    transform: scale(1);
    opacity: 1;
}

/* Form Styles */
.modal input:focus,
.modal select:focus,
.modal textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.modal input[type="checkbox"]:checked {
    background-color: #1e3a8a;
    border-color: #1e3a8a;
}

/* Success Notification */
.notification-enter {
    transform: translateX(100%);
}

.notification-enter-active {
    transform: translateX(0);
    transition: transform 0.3s ease-out;
}

.notification-exit {
    transform: translateX(0);
}

.notification-exit-active {
    transform: translateX(100%);
    transition: transform 0.3s ease-in;
}

@media (min-width: 768px) and (max-width: 1023px) {
    .features-section .grid,
    .programs-section .grid,
    .education-programs-block .grid {
        display: grid;
        align-items: stretch;
    }
    
    .features-section .feature-card,
    .programs-section .program-card,
    .education-card,
    .admission-section {
        height: 100%;
        min-height: 400px;
    }
    
    .enhanced-news-section .news-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Хлебные крошки */
.breadcrumb {
    @apply flex items-center space-x-2 text-sm text-gray-600;
}

.breadcrumb a {
    @apply hover:text-blue-600 transition-colors;
}

/* Уведомления */
.notification {
    @apply fixed top-4 right-4 p-4 rounded-lg shadow-lg z-50 text-white;
    animation: slideInRight 0.3s ease-out;
}

.notification.success {
    @apply bg-green-500;
}

.notification.error {
    @apply bg-red-500;
}

.notification.warning {
    @apply bg-yellow-500;
}

.notification.info {
    @apply bg-blue-500;
}

/* Загрузчик */
.loader {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #1e3a8a;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Модальные окна */
.modal-overlay {
    @apply fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center;
}

.modal-content {
    @apply bg-white rounded-lg shadow-xl max-w-lg w-full mx-4 p-6;
    animation: fadeIn 0.3s ease-out;
}

/* Табы */
.tab-button {
    @apply px-4 py-2 font-medium text-gray-600 border-b-2 border-transparent hover:text-blue-600 hover:border-blue-300 transition-all;
}

.tab-button.active {
    @apply text-blue-600 border-blue-600;
}

/* Аккордеон */
.accordion-item {
    @apply border border-gray-200 rounded-lg mb-2 overflow-hidden;
}

.accordion-header {
    @apply bg-gray-50 px-4 py-3 cursor-pointer hover:bg-gray-100 transition-colors;
}

.accordion-content {
    @apply px-4 py-3 border-t border-gray-200;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-content.open {
    max-height: 1000px;
}

/* Прогресс-бар */
.progress-bar {
    @apply w-full bg-gray-200 rounded-full h-2;
}

.progress-fill {
    @apply bg-blue-600 h-2 rounded-full transition-all duration-300;
}

/* Бейджи */
.badge {
    @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
}

.badge-primary {
    @apply bg-blue-100 text-blue-800;
}

.badge-success {
    @apply bg-green-100 text-green-800;
}

.badge-warning {
    @apply bg-yellow-100 text-yellow-800;
}

.badge-error {
    @apply bg-red-100 text-red-800;
}

/* Темная тема */
.dark-theme {
    @apply bg-gray-900 text-white;
}

.dark-theme .card {
    @apply bg-gray-800 text-white;
}

.dark-theme .form-input {
    @apply bg-gray-800 border-gray-600 text-white;
}

.dark-theme .btn-secondary {
    @apply bg-gray-700 hover:bg-gray-600 text-white;
}

/* Адаптивность */
@media (max-width: 768px) {
    .mobile-hidden {
        display: none;
    }
    
    .mobile-full {
        width: 100%;
    }
    
    .mobile-text-center {
        text-align: center;
    }
}

/* Печать */
@media print {
    .print-hidden {
        display: none !important;
    }
    
    .print-break {
        page-break-after: always;
    }
}

/* Высокий контраст для доступности */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }
    
    .btn-primary {
        border: 2px solid #000;
    }
}

/* Уменьшенная анимация для пользователей с ограниченными возможностями */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Кастомные утилиты */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.text-shadow-lg {
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
}

.backdrop-blur {
    backdrop-filter: blur(10px);
}

.aspect-ratio-16-9 {
    aspect-ratio: 16 / 9;
}

.aspect-ratio-4-3 {
    aspect-ratio: 4 / 3;
}

.aspect-ratio-1-1 {
    aspect-ratio: 1 / 1;
}

/* Эффекты для изображений */
.image-overlay {
    position: relative;
}

.image-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(30, 58, 138, 0.8), rgba(59, 130, 246, 0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-overlay:hover::after {
    opacity: 1;
}

/* Стили для языковых кнопок */
.language-selector button {
    @apply px-3 py-1 rounded text-sm font-medium transition-all;
}

.language-selector button:hover {
    @apply bg-white bg-opacity-20;
}

.language-selector button.active {
    @apply bg-yellow-500 text-white;
}