@import url('../interface/module_base.css');

/* =========================================
   MEMBER HOMEPAGE V2 - DYNAMIC DESIGN UI
   ========================================= */

body {
    background-color: #f1f5f9; /* Soft background */
}

.home-main-container {
    transition: filter 0.8s ease; /* For grayscale transition */
}

/* Shared Empty State Styles Handled Globally */


/* --- STATE: TOURNAMENT EXIST (Handled by global event-hero) --- */

.event-status-capsule {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.pulse-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #ccc;
    box-shadow: 0 0 8px rgba(255,255,255,0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.hero-explicit-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    margin-bottom: 25px;
    text-align: center;
    width: 100%;
}

.hero-info-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 10px;
}

.hero-info-row.title-row {
    margin-bottom: 10px;
}

.uppercase-text {
    text-transform: uppercase;
}

.h-label {
    font-size: 0.9rem; /* Giảm size nhãn */
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    white-space: nowrap;
    opacity: 0.8;
}

.event-title.inline-title {
    font-size: 2.1rem;
    font-weight: 900;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 4px 15px rgba(0,0,0,0.5);
    line-height: 1.4; /* Tăng để chữ không quá dính */
    word-break: normal;
    overflow-wrap: break-word; /* Đảm bảo ngắt dòng đúng */
    display: inline-block;
    max-width: 100%;
}

.h-value {
    font-size: 1.2rem; /* Giảm để hài hòa với tiêu đề */
    font-weight: 800;
    color: #ffffff;
    line-height: 1.5;
    max-width: 1200px;
}

.btn-register-glow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--primary-red) 0%, #e11d48 100%);
    color: white;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(225, 29, 72, 0.4);
    transition: all 0.3s;
}

.btn-register-glow:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(225, 29, 72, 0.6);
}

/* --- DETAILS GRID NEW ASYMMETRIC --- */
.event-details-grid {
    width: 95%;
    max-width: 1600px;
    margin: 60px auto 80px;
    padding: 0 20px;
}

.grid-inner-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    column-gap: 80px;
    row-gap: 10px; /* Reduced vertical gap for desktop */
    align-items: center;
}

/* Modern Typography Information */
.grid-left-info {
    padding: 20px 0;
}

.section-title-modern {
    font-size: 1.05rem;
    color: var(--primary-red);
    letter-spacing: 2px;
    margin-bottom: 25px;
    font-weight: 800;
}

.info-list-modern {
    list-style: none;
    padding: 0; margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-list-modern li {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-list-modern .info-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-list-modern .info-value {
    font-size: 1.1rem;
    color: #0f172a;
    font-weight: 600;
    line-height: 1.5;
}

/* Graphic Dates */
.date-bounds {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    margin-top: 5px;
}

.date-box {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.date-spacer {
    color: #cbd5e1;
    font-size: 1.5rem;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.d-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.d-value {
    font-size: 1.05rem;
    font-weight: 800;
}

.text-blue { color: #0284c7; }
.text-red { color: #dc2626; }
.text-green { color: #059669; }
.text-orange { color: #ea580c; }

.reg-bounds {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

/* Right Poster 3D Glow */
.grid-right-graphic {
    position: relative;
    width: 100%;
}

.modern-poster {
    position: relative;
    border-radius: 20px;
    z-index: 2;
}

.modern-poster img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    position: relative;
    z-index: 2;
    background: white;
}

/* The Glow Behind */
.modern-poster .poster-glow {
    position: absolute;
    top: 5%; left: 5%; width: 90%; height: 90%;
    background-size: cover;
    background-position: center;
    filter: blur(40px);
    z-index: 1;
    opacity: 0.6;
}

.modern-poster.empty {
    aspect-ratio: 4/5;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #cbd5e1;
}

/* SPONSOR SECTION */
.sponsors-section {
    width: 95%;
    max-width: 1600px;
    margin: 0 auto 10px; /* Giảm mạnh lề dưới áp sát footer */
    text-align: center;
}

.section-title {
    font-size: 1.4rem;
    color: #64748b;
    letter-spacing: 2px;
    margin-bottom: 10px; /* Thu hẹp khoảng cách với logo */
    font-weight: 800;
}

.sponsor-carousel-container {
    padding: 10px 0; /* Thu nhỏ padding trên dưới */
    width: 100%;
}

.sponsor-track {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 40px; 
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
}

.static-grid {
    animation: none !important;
    transform: none !important;
}

.sponsor-logo-box {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none !important;
    background: none !important;
    padding: 15px;
}

.sponsor-logo-box a {
    display: block;
    border: none !important;
    outline: none !important;
}

.sponsor-logo-box img {
    display: block;
    width: auto;
    height: auto;
    max-height: 150px;
    max-width: 320px;
    object-fit: contain;
    transition: transform 0.3s ease;
    filter: none !important;
}

.sponsor-logo-box:hover img {
    transform: scale(1.08);
}

@keyframes marqueeFrame {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } 
}

/* GRAYSCALE STATE - FINISHED */
.home-main-container.ended-state {
    filter: grayscale(100%) opacity(0.8);
    pointer-events: none; /* Disable interactions if ended */
}

/* MOBILE RESPONSIVE */
@media (max-width: 900px) {
    .grid-inner-container {
        display: flex;
        flex-direction: column;
        gap: 20px; /* Reduced from 40px */
    }
    
    .grid-left-info {
        order: 2; /* Đẩy thông tin xuống dưới */
    }
    
    .grid-right-graphic {
        order: 1; /* Nâng Banner lên trên */
    }
    
    .event-title.inline-title {
        font-size: 1.6rem;
        line-height: 1.4;
    }
    
    .h-value {
        font-size: 1.15rem;
    }
    
    .h-label {
        font-size: 0.95rem;
    }
    
    .event-meta-hero {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .empty-state {
        padding: 60px 15px; /* Universal Mobile Sync height */
    }

    .empty-title {
        font-size: 1.8rem;
        line-height: 1.3;
        margin-bottom: 12px;
    }

    .empty-desc {
        font-size: 1rem;
        line-height: 1.5;
    }

    /* Override sponsor track for mobile fade looping */
    .sponsor-track {
        gap: 15px;
        padding: 0 10px;
    }
    
    .sponsor-logo-box {
        padding: 5px;
    }
    
    .sponsor-logo-box img {
        max-height: 70px;
        max-width: 140px;
    }
}

/* --- MEDALS SECTION --- */
.medals-container-home {
    grid-column: 2; /* Desktop: Right Column */
    align-self: start;
    margin-top: 10px; /* Reduced from 40px */
    text-align: center;
    background: transparent; /* No white box */
    padding: 0; /* No padding */
    box-shadow: none; /* No shadow */
    position: relative;
    z-index: 5;
}

.grid-left-info {
    grid-row: 1 / span 2; /* Desktop: Spans two rows on the left */
}

.medals-section-title {
    font-size: 1.1rem;
    color: var(--primary-red);
    letter-spacing: 2px;
    margin-bottom: 25px;
    font-weight: 800;
    text-transform: uppercase;
}

.medals-flex-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.medal-showcase-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.medal-showcase-item:hover {
    transform: scale(1.15) translateY(-10px);
}

.medal-showcase-item img {
    width: 100%;
    max-width: 140px;
    height: auto;
    object-fit: contain;
    /* Shadows removed as requested */
}

/* Gold Medal is special */
.medal-showcase-item.gold { order: 2; }
.medal-showcase-item.silver { order: 1; }
.medal-showcase-item.bronze { order: 3; }

.medal-showcase-item.gold img {
    max-width: 190px;
}

.medal-showcase-item.silver img {
    max-width: 150px;
}

.medal-showcase-item.bronze img {
    max-width: 150px;
}

@media (max-width: 900px) {
    .medals-container-home {
        grid-column: 1; /* Reset for mobile flex */
        order: 3; /* Mobile: Banner(1) > Info(2) > Medals(3) */
        margin-top: 10px; /* Reduced from 40px */
        padding: 0;
    }
    
    .medals-flex-wrapper {
        gap: 15px;
    }

    .medal-showcase-item img {
        max-width: 100px;
    }
    .medal-showcase-item.gold img {
        max-width: 130px;
    }
    .medal-showcase-item.silver img,
    .medal-showcase-item.bronze img {
        max-width: 110px;
    }

    .grid-left-info {
        order: 2; /* Info second on mobile */
    }
    
    .grid-right-graphic {
        order: 1; /* Banner first on mobile */
    }

    .sponsors-section .section-title {
        font-size: 0.8rem; /* Reduced by ~50% from 1.4rem */
        margin-bottom: 20px;
    }
}

/* GOOGLE MAPS LINKS */
.map-link-hero {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    padding: 4px 12px;
    border-radius: 20px;
    color: #fff !important;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    vertical-align: middle;
}

.map-link-hero i {
    color: #3b82f6;
}

.map-link-hero:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.map-link-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    color: #3b82f6 !important;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.map-link-inline:hover {
    color: #2563eb !important;
    text-decoration: underline;
}

/* SPONSOR LINK STYLES */
.sponsor-logo-box a {
    display: block;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

.sponsor-logo-box a:hover {
    transform: scale(1.05);
}

.map-link-compact {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    margin-left: 8px;
    background: #3b82f6;
    color: #fff !important;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
    transition: all 0.3s ease;
    vertical-align: middle;
    border: none;
}

.map-link-compact:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}


/* --- MEDAL MAIN GALLERY (NEW) --- */
.medal-main-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 15px;
    width: 100%;
}

.medal-main-card {
    flex: 0 0 calc(50% - 15px); /* 2 ảnh mỗi hàng mặc định */
    max-width: 400px;
    background: #ffffff;
    padding: 12px;
    border-radius: 24px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0,0,0,0.03);
}

.medal-main-card img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.medal-main-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    border-color: var(--primary-red);
}

.medal-main-card:hover img {
    transform: scale(1.08);
}

/* Nếu chỉ có 1 ảnh duy nhất, cho ảnh to ra */
.medal-main-gallery:has(.medal-main-card:only-child) .medal-main-card {
    flex: 0 0 100%;
    max-width: 700px;
}

@media (max-width: 900px) {
    .medal-main-gallery {
        gap: 15px;
    }
    .medal-main-card {
        flex: 0 0 100%; /* Xếp chồng trên mobile */
        padding: 8px;
    }
}
