/* ===== Основные стили (общие) ===== */
* { box-sizing: border-box; }
html, body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    color: #0f172a;
    background: #fff;
    scroll-behavior: smooth;
}
a { color: inherit; text-decoration: none; transition: 0.3s; }
img { max-width: 100%; display: block; }

.container {
    width: min(1200px, 92%);
    margin: 0 auto;
}


/* ================= EVENTS HERO ================= */
.hero-events {
    position: relative;
    height: 1100px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #fff;
}

/* 🔹 ФОН */
.hero-events .hero-bg {
    position: absolute;
    top: -10%;
    left: 0;
    right: 0;
    bottom: -18%;

    background:
        linear-gradient(
            rgba(0, 0, 0, 0.25),
            rgba(0, 0, 0, 0.55)
        ),
        url('../img/events.webp') center / cover no-repeat;

    filter:
        brightness(0.8)
        contrast(1.05)
        saturate(1.05);

    z-index: 0;
    transform: scale(1.18);
    animation: heroZoom 14s ease-in-out infinite alternate;
}

/* 🔹 ЧЁРНЫЙ OVERLAY */
.hero-events .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        rgba(0, 0, 0, 0.35),
        rgba(0, 0, 0, 0.5)
    );
    z-index: 1;
}

/* 🔹 GLASS-КАРТОЧКА */
.hero-events .hero-content {
    position: relative;
    z-index: 2;
    padding: 44px 56px;

    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.22);

    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

/* 🔹 ТЕКСТ */
.hero-events h1 {
    font-size: clamp(38px, 4vw, 56px);
    margin-bottom: 12px;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.75);
}

.hero-events p {
    font-size: clamp(18px, 1.3vw, 22px);
    opacity: 0.9;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

/* 🔹 АНИМАЦИЯ */
@keyframes heroZoom {
    from { transform: scale(1.12); }
    to   { transform: scale(1.24); }
}



.section {
    padding: 90px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f0f9ff 50%, #faf5ff 100%);
    position: relative;
    overflow: hidden;
    margin-top: 90px;
}
.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10%); }
}

/* ====== EVENTS GRID ====== */
.events-grid {
    margin-top: 160px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 36px;
    position: relative;
    z-index: 1;
}

/* ====== EVENT CARD - Enhanced Blue/White/Purple ====== */
.event-card {
    background: linear-gradient(145deg, #ffffff 0%, #f0f9ff 50%, #faf5ff 100%);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(17, 63, 142, 0.7);
    border: 2px solid #332957;
    background-clip: padding-box;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.event-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #a855f7);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s ease;
}

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

.event-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 50%, #a855f7 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.event-card:hover::after {
    transform: scaleX(1);
}

/* Image Container with Gradient Overlay */
.event-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 230px;
}

.event-img-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(59, 130, 246, 0.1) 100%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.event-card:hover .event-img-wrapper::before {
    opacity: 1;
}

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

.event-card:hover img {
    transform: scale(1.12) rotate(1deg);
}

.event-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(59, 130, 246, 0.3), 0 10px 20px rgba(139, 92, 246, 0.2);
}

/* ====== EVENT CONTENT ====== */
.event-body {
    padding: 28px 30px 32px;
    position: relative;
    z-index: 2;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.5));
}

.event-body b {
    display: block;
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #1e40af, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    line-height: 1.4;
    transition: all 0.3s ease;
}

.event-card:hover .event-body b {
    transform: translateX(4px);
}

.event-body p {
    color: #475569;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 20px;
}

/* ====== READ MORE BUTTON - Enhanced ====== */
.read-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: #060606 !important;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35);
    position: relative;
    overflow: hidden;
    border: 2px solid #332957;
}

.read-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.read-btn::after {
    content: '→';
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.read-btn:hover::before {
    opacity: 1;
}

.read-btn:hover::after {
    transform: translateX(4px);
}

.read-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.45);
}

.read-btn span {
    position: relative;
    z-index: 1;
}

/* ====== MORE ARTICLES ====== */
.more-title {
    margin-top: 80px;
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #1e40af, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    position: relative;
    z-index: 1;
}

.more-links {
    margin: 40px auto 60px;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.more-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-radius: 14px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    border: 2px solid #dbeafe;
    color: #1e40af;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08);
}

.more-links a::after {
    content: '→';
    font-size: 18px;
    transition: transform 0.3s ease;
}

.more-links a:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: #fff;
    border-color: transparent;
    transform: translateX(10px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
}

.more-links a:hover::after {
    transform: translateX(6px);
}

/* ====== PAGINATION - Enhanced ====== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
}

.pagination a {
    padding: 12px 18px;
    border-radius: 10px;
    border: 2px solid #dbeafe;
    background: #ffffff;
    color: #1e40af;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 44px;
    text-align: center;
}

.pagination a:hover {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #fff;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.3);
}

.pagination a.active {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.4);
}

/* ====== EVENT DETAIL PAGE ====== */
.event-detail {
    padding: 80px 0;
    background: linear-gradient(to bottom, #ffffff, #f0f9ff);
}

.event-title {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, #1e40af, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    line-height: 1.3;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    color: #3b82f6;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-btn::before {
    content: '←';
    transition: transform 0.3s ease;
}

.back-btn:hover {
    color: #8b5cf6;
}

.back-btn:hover::before {
    transform: translateX(-4px);
}

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

.detail-gallery img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #e0f2fe;
}

.detail-gallery img:hover {
    transform: scale(1.05) rotate(1deg);
    box-shadow: 0 16px 40px rgba(59, 130, 246, 0.3), 0 8px 16px rgba(139, 92, 246, 0.2);
    border-color: #3b82f6;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 920px) {
    .events-grid {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 640px) {
    .events-grid {
        grid-template-columns: 1fr;
    }
    .event-title {
        font-size: 28px;
    }
}
