/* ========================
   homepage.css — Специфичные стили для главной страницы
   ========================
   Этот файл содержит:
   - Стили для Hero-секции с эффектным дизайном
   - Улучшенные стили для быстрого доступа
   - Стили для статистики кафедры
   - Адаптивность и анимации
   ======================== */

/* ========================
   1. Hero-секция с улучшенным дизайном
   ======================== */
.hero {
    background: linear-gradient(135deg, #0a192f 0%, #1a2d57 50%, #2c3e67 100%);
    color: var(--color-text);
    padding: 96px 0 72px;
    text-align: center;
    margin-bottom: 72px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    position: relative;
    overflow: hidden;
}

/* Эффектный фон с градиентами и узором */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(201, 168, 76, 0.04) 20px, rgba(201, 168, 76, 0.04) 22px),
        repeating-linear-gradient(-45deg, transparent, transparent 20px, rgba(201, 168, 76, 0.04) 20px, rgba(201, 168, 76, 0.04) 22px),
        radial-gradient(circle at 20% 30%, rgba(201, 168, 76, 0.15) 0%, transparent 45%),
        radial-gradient(circle at 80% 70%, rgba(201, 168, 76, 0.15) 0%, transparent 45%);
    pointer-events: none;
    animation: backgroundPulse 15s ease-in-out infinite alternate;
}

/* Свечение в центре */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(201, 168, 76, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

/* Блик на углу */
.hero__glow {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: float 8s ease-in-out infinite;
}

.hero__glow--top-left {
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.hero__glow--bottom-right {
    bottom: -100px;
    right: -100px;
    animation-delay: 4s;
}

.hero__title {
    font-size: 3rem;
    margin-bottom: 32px;
    font-family: var(--font-serif);
    line-height: 1.25;
    color: var(--color-accent);
    font-weight: 700;
    text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
    letter-spacing: -0.5px;
}

.hero__subtitle {
    font-size: 1.15rem;
    opacity: 0.95;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
    padding: 0 20px;
    color: white;
    position: relative;
    z-index: 1;
    font-weight: 300;
    letter-spacing: 0.2px;
}

.hero__description {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.hero__description p {
    font-size: 1.05rem;
    opacity: 0.95;
    line-height: 1.85;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.92);
}

/* ========================
   2. Улучшенный быстрый доступ
   ======================== */
.quick-access {
    margin-bottom: 72px;
}

.quick-access__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.quick-access__card {
    background: linear-gradient(180deg, #ffffff 0%, #f9f9fb 100%);
    padding: 40px 32px;
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 2px solid transparent;
    box-shadow: var(--shadow);
    color: var(--color-text);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Эффект градиента при наведении */
.quick-access__card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(201, 168, 76, 0.1), transparent);
    transition: left 0.5s ease;
}

.quick-access__card:hover::before {
    left: 100%;
}

.quick-access__card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.15);
    border-color: var(--color-accent);
}

.quick-access__card h3 {
    font-family: var(--font-serif);
    color: var(--color-primary);
    margin-bottom: 20px;
    font-size: 1.45rem;
    position: relative;
    line-height: 1.3;
}

/* Градиентная линия под заголовком */
.quick-access__card h3::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.quick-access__card:hover h3::after {
    width: 100%;
}

.quick-access__card p {
    margin-bottom: 0;
    line-height: 1.7;
    color: var(--color-text);
    flex-grow: 1;
    font-size: 0.975rem;
}

/* ========================
   3. Улучшенная секция "О кафедре"
   ======================== */
.department-overview {
    margin-bottom: 72px;
}

.department-overview__content {
    margin-top: 40px;
}

.department-overview__stats {
    display: flex;
    gap: 32px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 40px;
}

.stat {
    text-align: center;
    padding: 32px 36px;
    background: linear-gradient(180deg, #ffffff 0%, #f9f9fb 100%);
    border-radius: var(--radius);
    min-width: 160px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 2px solid transparent;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

/* Искрящийся эффект при hover */
.stat::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.15) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    transform: scale(0.5);
}

.stat:hover::before {
    opacity: 1;
    transform: scale(1);
}

.stat:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    border-color: var(--color-accent);
}

.stat__number {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--color-accent);
    display: block;
    font-family: var(--font-serif);
    padding-bottom: 16px;
    border-bottom: 2px solid var(--color-border);
    line-height: 1;
    position: relative;
}

.stat__label {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

/* ========================
   4. Дополнительные ресурсы
   ======================== */
.additional-resources {
    margin-bottom: 72px;
}

.additional-resources__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.additional-resources__card {
    background: linear-gradient(180deg, #ffffff 0%, #f9f9fb 100%);
    padding: 40px 32px;
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--color-text);
    border: 2px solid transparent;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    position: relative;
}

.additional-resources__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.15);
    border-color: var(--color-accent);
}

.additional-resources__card h3 {
    font-family: var(--font-serif);
    color: var(--color-primary);
    margin-bottom: 20px;
    font-size: 1.45rem;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--color-border);
    position: relative;
}

.additional-resources__card h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    transition: width 0.4s ease;
}

.additional-resources__card:hover h3::after {
    width: 100%;
}

.additional-resources__card p {
    font-size: 0.975rem;
    color: var(--color-text);
    margin-bottom: 0;
    flex-grow: 1;
    line-height: 1.7;
}

/* ========================
   5. Анимации
   ======================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes backgroundPulse {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0.8;
    }
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(20px, -30px);
    }
}

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }
.delay-4 { animation-delay: 0.6s; }
.delay-5 { animation-delay: 0.75s; }

/* ========================
   6. Улучшенная адаптивность
   ======================== */
@media (max-width: 1024px) {
    .hero__title {
        font-size: 2.5rem;
    }
    
    .quick-access__grid,
    .department-overview__stats,
    .additional-resources__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 64px 0 48px;
        margin-bottom: 48px;
    }
    
    .hero__title {
        font-size: 2rem;
        margin-bottom: 24px;
    }
    
    .hero__subtitle {
        font-size: 1.05rem;
        margin-bottom: 32px;
        padding: 0 16px;
        line-height: 1.65;
    }
    
    .quick-access__grid,
    .department-overview__stats,
    .additional-resources__grid {
        grid-template-columns: 1fr;
    }
    
    .stat {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 48px 0 36px;
    }
    
    .hero__title {
        font-size: 1.75rem;
    }
    
    .quick-access__card {
        padding: 28px 24px;
    }
    
    .additional-resources__card {
        padding: 28px 24px;
    }
}
