﻿/* --- BIẾN MÀU SẮC (Theme Cheese) --- */
:root {
    --bg-cream: #FCF5EF;
    --brown-dark: #4B3022;
    --brown-light: #8D6E63;
    --gold: #FFD700;
    --green-active: #6fb490;
    --red-upcoming: #ff6b81;
    --gray-expired: #95a5a6;
}

/* REUSE INTRO (Copy từ các file css trước để đồng bộ) */
#intro-picture {
    width: 100%;
    height: 500px;
    position: relative;
    overflow: hidden;
}

.introSwiper {
    width: 100%;
    height: 100%;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.9);
}

.title-cheese {
    text-wrap: nowrap;
    font-family: "Inter", sans-serif;
    font-weight: 900;
    font-size: clamp(40px, 7vw, 100px);
    color: white;
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards 0.5s;
    display: flex;
    gap: 0;
}

    .title-cheese span {
        display: inline-block;
        text-shadow: 0 4px 30px rgba(0,0,0,0.5);
        animation: jumpDiscrete 6s ease-in-out infinite;
    }

    .title-cheese:after {
        content: '';
        position: absolute;
        bottom: -15px;
        left: 50%;
        transform: translateX(-50%);
        height: 4px;
        width: 60%;
        background: var(--gold);
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
        animation: expandLine 1s ease-out forwards 1.2s;
    }

.subtitle-cheese {
    font-family: "Pacifico", cursive;
    font-weight: bold;
    position: absolute;
    top: 65%;
    left: 50%;
    transform: translate(-50%, -20%);
    z-index: 100;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    font-size: clamp(18px, 2vw, 30px);
    width: 100%;
    text-align: center;
    animation: subtitleAppear 1s ease-out forwards 1.8s;
    opacity: 0;
}

/* KEYFRAMES (Giữ nguyên như cũ) */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate(-50%, -30%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes expandLine {
    from {
        width: 0%;
    }

    to {
        width: 60%;
    }
}

@keyframes jumpDiscrete {
    0%, 100% {
        transform: translateY(0);
    }

    2% {
        transform: translateY(-20px);
        color: var(--gold);
    }

    4% {
        transform: translateY(0);
        color: white;
    }
}

@keyframes subtitleAppear {
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* --- EVENT SECTION --- */
.section-events {
    padding: 80px 0;
    background-color: var(--bg-cream);
    min-height: 800px;
}

    .section-events .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 15px;
    }

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-family: "Allura", cursive;
    font-size: 5rem;
    color: var(--brown-dark);
    margin-bottom: 10px;
    line-height: 1;
}

.section-desc {
    font-family: "Kanit", sans-serif;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 20px;
}

.divider-img {
    height: 30px;
    opacity: 0.6;
}

/* GRID SYSTEM */
.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); /* Card to hơn product */
    gap: 40px;
}

/* EVENT CARD */
.event-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .event-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    }

/* Image Area */
.event-img-wrapper {
    position: relative;
    height: 250px;
    overflow: hidden;
}

    .event-img-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s ease;
    }

.event-card:hover .event-img-wrapper img {
    transform: scale(1.1);
}

/* Badges */
.discount-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--gold);
    color: var(--brown-dark);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 2;
    transform: rotate(-15deg);
}

    .discount-badge span {
        font-size: 0.7rem;
        font-family: "Kanit";
        font-weight: 500;
    }

    .discount-badge strong {
        font-size: 1.2rem;
        font-family: "Kanit";
        line-height: 1;
    }

.status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    font-family: "Kanit";
    color: white;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

    .status-badge.active {
        background: var(--green-active);
    }

    .status-badge.upcoming {
        background: var(--red-upcoming);
    }

    .status-badge.expired {
        background: var(--gray-expired);
    }

/* Body Area */
.event-body {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.event-date {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--brown-light);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 10px;
    font-family: "Kanit";
}

.event-title {
    margin: 0 0 15px 0;
    line-height: 1.4;
}

    .event-title a {
        text-decoration: none;
        color: var(--brown-dark);
        font-family: "Pacifico", cursive;
        font-size: 1.8rem;
        transition: 0.3s;
    }

        .event-title a:hover {
            color: var(--gold);
        }

.event-desc {
    font-family: "Kanit";
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-footer {
    margin-top: auto;
}

.btn-event-detail {
    text-decoration: none;
    color: var(--brown-dark);
    font-weight: bold;
    font-family: "Kanit";
    font-size: 1rem;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .btn-event-detail:hover {
        color: var(--gold);
        gap: 12px;
    }

/* Utilities */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

    .fade-up.active {
        opacity: 1;
        transform: translateY(0);
    }

.delay-2 {
    transition-delay: 0.2s;
}

.no-event {
    width: 100%;
    text-align: center;
    font-size: 1.2rem;
    color: #888;
    font-family: "Kanit";
}

/* Responsive */
@media (max-width: 768px) {
    .section-title {
        font-size: 3.5rem;
    }

    .event-grid {
        grid-template-columns: 1fr;
    }
}
