/* =========================================================================
   HOME PAGE - NCSOFT REPLICA STYLE
   ========================================================================= */

/* Hero Section with Local Parallax Assets */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 90px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('../img/bk3_essence.png'); /* Switched to a wider composition asset */
    background-size: cover;
    background-position: center top;
    z-index: 1;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-layer {
    position: absolute;
    pointer-events: none;
    z-index: 2;
}

.hero-smoke {
    bottom: -100px; left: 0; width: 100%;
    opacity: 0.8;
    mix-blend-mode: screen;
    animation: drift 20s ease-in-out infinite alternate;
}

.sparks-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 3;
}

.fx-spark {
    position: absolute;
    mix-blend-mode: screen;
    opacity: 0;
    animation: sparkFloat 8s linear infinite;
}
.s1 { width: 400px; left: 10%; bottom: -50px; animation-duration: 12s; animation-delay: 0s; }
.s2 { width: 250px; right: 20%; bottom: -100px; animation-duration: 9s; animation-delay: 2s; }
.s3 { width: 350px; left: 40%; bottom: 0; animation-duration: 15s; animation-delay: 4s; }
.s4 { width: 500px; right: 5%; bottom: -200px; animation-duration: 18s; animation-delay: 1s; }

@keyframes drift {
    0% { transform: translateX(-2%) scale(1.05); }
    100% { transform: translateX(2%) scale(1.1); }
}

@keyframes sparkFloat {
    0% { transform: translateY(100px) rotate(0deg); opacity: 0; }
    20% { opacity: 0.8; }
    80% { opacity: 0.8; }
    100% { transform: translateY(-800px) rotate(45deg); opacity: 0; }
}

.hero-gradient {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, transparent 30%, rgba(6, 9, 14, 0.8) 100%),
                linear-gradient(to top, #06090e 0%, transparent 40%);
    z-index: 4;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 1000px;
    padding: 0 20px;
}

.hero-logo {
    max-width: 500px;
    margin: 0 auto 30px;
    filter: drop-shadow(0 0 30px rgba(0,0,0,0.8));
    animation: slideUpFade 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
    opacity: 0;
    animation: slideUpFade 1s 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.hero-actions .btn {
    font-size: 1.2rem;
    padding: 18px 50px;
}

/* Quick Nav / Status Bar */
.quick-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(8, 11, 16, 0.85);
    border-top: 1px solid rgba(255,255,255,0.05);
    backdrop-filter: blur(20px);
    z-index: 10;
    display: flex;
    justify-content: center;
}

.quick-nav-list {
    display: flex;
    max-width: 1400px;
    width: 100%;
}

.quick-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 25px 20px;
    border-right: 1px solid rgba(255,255,255,0.05);
    color: #b5bbcf;
    transition: all 0.3s ease;
    cursor: pointer;
}

.quick-item:first-child { border-left: 1px solid rgba(255,255,255,0.05); }
.quick-item:hover { background: rgba(255,255,255,0.03); color: #fff; }

.quick-item i {
    font-size: 1.8rem;
    color: var(--clr-primary);
}

.quick-item-text h4 {
    font-size: 1rem;
    margin-bottom: 2px;
}

.quick-item-text p {
    font-size: 0.8rem;
    color: #6a7191;
}

/* Home Promo Events Grid (NCSoft Style) */
.home-promo {
    background: #06090e;
    position: relative;
    z-index: 20;
}

.banners-container {
    width: min(1280px, 92%);
    margin: 24px auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.banner-item {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(12, 16, 25, 0.65);
}

.banner-item a,
.banner-item img {
    display: block;
    width: 100%;
}

.banner-item img {
    height: auto;
}

.banner-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.banner-popup-overlay.active {
    display: flex;
}

.banner-popup-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #0b0f18;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.banner-popup-container img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.banner-popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.promo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    width: 100%;
}

.promo-banner {
    position: relative;
    height: 400px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 50px 40px;
    text-decoration: none;
    border-right: 1px solid #1a1e2b;
}

.promo-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, #06090e 0%, rgba(6, 9, 14, 0.5) 40%, transparent 100%);
    transition: opacity 0.5s ease;
}

.promo-banner::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(212, 160, 55, 0.1);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.promo-banner:hover::after { opacity: 1; }

.promo-content {
    position: relative;
    z-index: 2;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.promo-banner:hover .promo-content {
    transform: translateY(0);
}

.promo-tag {
    display: inline-block;
    background: var(--clr-primary);
    color: #000;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 800;
    padding: 5px 12px;
    margin-bottom: 15px;
}

.promo-content h3 {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.promo-date {
    font-size: 0.9rem;
    color: var(--clr-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.4s ease 0.1s;
}

.promo-banner:hover .promo-date {
    opacity: 1;
}

@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(40px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Additional Home Sections */
.home-rankings,
.home-top-clans,
.home-trailer,
.home-supporters,
.home-cta {
    background: #070a10;
}

.section-heading {
    max-width: 780px;
    margin: 0 auto 36px;
    text-align: center;
}

.section-heading h2 {
    font-size: clamp(1.6rem, 3vw, 2.35rem);
    margin-bottom: 12px;
    color: #fff;
}

.section-heading p {
    color: #8189a8;
    font-size: 1rem;
}

.home-rankings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.home-card {
    background: rgba(12, 16, 25, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 28px 24px;
}

.home-card h3 {
    font-size: 1.2rem;
    color: var(--clr-primary);
    margin-bottom: 18px;
}

.home-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.home-links-list a {
    display: inline-flex;
    align-items: center;
    color: #d5daea;
    transition: color 0.25s ease, transform 0.25s ease;
}

.home-links-list a::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 10px;
    background: var(--clr-primary);
}

.home-links-list a:hover {
    color: #fff;
    transform: translateX(4px);
}

.clans-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
}

.clans-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
    background: rgba(12, 16, 25, 0.88);
}

.clans-table th,
.clans-table td {
    padding: 13px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #d5daea;
    text-align: left;
    font-size: 0.92rem;
}

.clans-table th {
    color: #fff;
    font-family: var(--font-heading);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.section-action {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.trailer-shell {
    position: relative;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #000;
    aspect-ratio: 16 / 9;
}

.trailer-shell iframe {
    width: 100%;
    height: 100%;
    display: block;
}

.supporters-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.supporter-card {
    background: rgba(12, 16, 25, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px;
    text-align: center;
}

.supporter-card img,
.supporter-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    object-fit: cover;
    background: #111722;
    margin-bottom: 10px;
}

.supporter-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--clr-primary);
    font-size: 2rem;
}

.supporter-card h4 {
    color: #f4f6ff;
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.supporter-card-empty {
    grid-column: 1 / -1;
    max-width: 300px;
    margin: 0 auto;
}

.home-cta {
    background: linear-gradient(180deg, #0a0f18 0%, #070a10 100%);
}

.home-cta-inner {
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: clamp(24px, 5vw, 44px);
    background: rgba(12, 16, 25, 0.75);
}

.home-cta-inner h2 {
    color: #fff;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    margin-bottom: 12px;
}

.home-cta-inner p {
    color: #8f97b6;
    margin-bottom: 24px;
}

.home-cta-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.home-cta-status {
    margin-top: 18px;
    display: inline-block;
    color: #9aa2bf;
    font-size: 0.9rem;
}

.home-cta-status strong {
    color: var(--clr-primary);
}

@media (max-width: 1024px) {
    .promo-grid { grid-template-columns: 1fr; }
    .promo-banner { height: 300px; border-right: none; border-bottom: 1px solid #1a1e2b; }
    .quick-nav-list { flex-wrap: wrap; }
    .quick-item { min-width: 50%; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.05); }
    .supporters-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .banners-container { width: 94%; }
}
@media (max-width: 600px) {
    .hero {
        min-height: auto;
        padding-top: 105px;
        padding-bottom: 24px;
        align-items: flex-start;
    }

    .hero-content {
        padding: 0 12px;
    }

    .quick-item { min-width: 100%; }
    .quick-item {
        justify-content: flex-start;
        padding: 16px 14px;
    }

    .quick-item i {
        font-size: 1.4rem;
    }

    .hero-logo {
        max-width: 88%;
        margin-bottom: 16px;
    }

    .hero-actions {
        flex-direction: column;
        gap: 12px;
        margin-top: 18px;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 320px;
        padding: 14px 16px;
        font-size: 0.95rem;
    }

    .quick-nav {
        position: static;
        margin-top: 24px;
        background: rgba(8, 11, 16, 0.92);
    }

    .sparks-container,
    .hero-smoke {
        opacity: 0.45;
    }

    .promo-banner {
        height: 230px;
        padding: 24px 18px;
    }

    .promo-content h3 {
        font-size: 1.25rem;
    }

    .section-heading {
        margin-bottom: 24px;
    }

    .section-heading p {
        font-size: 0.92rem;
    }

    .home-rankings-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .home-card {
        padding: 20px 16px;
    }

    .clans-table th,
    .clans-table td {
        padding: 10px 12px;
        font-size: 0.84rem;
    }

    .supporters-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .supporter-card {
        padding: 10px;
    }

    .home-cta-inner {
        padding: 20px 14px;
    }

    .home-cta-actions {
        flex-direction: column;
    }

    .home-cta-actions .btn {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .hero-logo {
        max-width: 95%;
    }

    .quick-item-text h4 {
        font-size: 0.9rem;
    }

    .quick-item-text p {
        font-size: 0.75rem;
    }
}