/* Topics Section Styles */
.topics {
    background-color: rgba(255, 255, 255, 0.5);
    padding: 6rem 0;
}

.topics .section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.topics .section-title span {
    font-size: 1.5rem;
    font-weight: 400;
    opacity: 0.7;
    margin-left: 0.5rem;
    vertical-align: middle;
    /* Reset inherited transparent text from parent .section-title */
    background: none;
    -webkit-text-fill-color: var(--text-color);
}

.section-subtitle {
    font-size: 1.1rem;
    color: #666;
    max-width: 800px;
    margin: 1rem auto 0;
    line-height: 1.8;
    padding: 0 1rem;
    word-break: auto-phrase;
}

/* Responsive Utilities */
.pc-only {
    display: block;
}

.sp-only {
    display: none;
}

@media (max-width: 600px) {
    .pc-only {
        display: none;
    }

    .sp-only {
        display: block;
    }

    .section-subtitle {
        font-size: 0.95rem;
        text-align: left;
    }

    .topics .section-title span {
        display: block;
        margin-left: 0;
        margin-top: 0.5rem;
        font-size: 1.1rem;
    }
}

/* Horizontal Scroll Container for Mobile */
.topics-grid {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding: 1rem 0.5rem 3rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    /* Firefox */
}

/* Hide scrollbar for Chrome/Safari */
.topics-grid::-webkit-scrollbar {
    height: 6px;
}

.topics-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.topics-grid::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 10px;
}

/* Topic Card */
.topic-card {
    flex: 0 0 320px;
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    scroll-snap-align: start;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.topic-img-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1.4;
    /* Poster/Flyer ratio */
    overflow: hidden;
    position: relative;
    background: #f0f0f0;
}

.topic-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.topic-card:hover .topic-img-wrapper img {
    transform: scale(1.05);
}

.topic-info {
    padding: 1.5rem;
}

.topic-date {
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

.topic-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Empty State / Loading */
.loading-placeholder,
.empty-state {
    width: 100%;
    text-align: center;
    padding: 3rem;
    color: #888;
    font-size: 1.1rem;
}

/* Footer Button */
.topics-footer {
    text-align: center;
    margin-top: 2rem;
}

.btn-more-activities {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-more-activities:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

/* Lightbox Modal */
.topics-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    border-radius: 10px;
    animation: zoom 0.3s;
}

.modal-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 20px 0;
}

@keyframes zoom {
    from {
        transform: scale(0.1)
    }

    to {
        transform: scale(1)
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
    color: var(--accent-color);
    text-decoration: none;
}

/* Responsive Grid Adjustments */
@media (min-width: 901px) {
    .topics-grid {
        justify-content: center;
        overflow-x: visible;
        padding-bottom: 0;
    }

    .topic-card {
        flex: 0 1 320px;
    }
}

@media (max-width: 600px) {
    .topic-card {
        flex: 0 0 280px;
    }

    .modal-content {
        width: 95%;
    }
}

/* YouTube Latest Video Block */
.youtube-latest-block {
    margin-top: 5rem;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.yt-block-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-color);
    position: relative;
    display: inline-block;
}

.yt-block-title::after {
    content: '';
    border-radius: 2px;
}

.yt-video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    margin-bottom: 2.5rem;
}

.yt-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.yt-link-footer {
    display: flex;
    justify-content: center;
}

.btn-yt-latest {
    display: inline-block;
    padding: 1rem 2rem;
    background: #ff0000;
    /* YouTube Red */
    color: #fff !important;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.btn-yt-latest:hover {
    background: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
}

@media (max-width: 768px) {
    .youtube-latest-block {
        padding: 2rem 1.5rem;
        margin-top: 4rem;
        border-radius: 15px;
    }

    .yt-block-title {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
    }

    .btn-yt-latest {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        width: 100%;
    }
}

/* Modal External Link Styles */
.modal-link-wrapper {
    text-align: center;
    padding-bottom: 30px;
}

.modal-link {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    background: #ff6b6b;
    color: #fff !important;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.modal-link:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.modal-link .arrow {
    margin-left: 5px;
}

/* --- 100-Point Mega Promotion Styles --- */
.mega-banner {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.mega-banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.mega-banner-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7) blur(1px);
    transform: scale(1.05);
    animation: slow-zoom 30s infinite alternate;
}

@keyframes slow-zoom {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.15);
    }
}

.mega-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(26, 26, 46, 0.4) 0%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 2;
}

.mega-banner-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: #fff;
    padding: 2rem;
    max-width: 900px;
}

.mega-tag {
    display: inline-block;
    background: #ff6b6b;
    color: #fff;
    padding: 0.4rem 1.5rem;
    border-radius: 50px;
    font-weight: 900;
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 30px rgba(255, 107, 107, 0.6);
    animation: mega-flash 2.5s infinite;
}

@keyframes mega-flash {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(0.95);
    }
}

.mega-headline {
    font-size: 3.5rem;
    font-weight: 950;
    margin-bottom: 1.5rem;
    text-shadow: 0 5px 20px rgba(0, 0, 0, 0.8);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.mega-subtext {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    font-weight: 400;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.mega-btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
    color: #fff !important;
    padding: 1.4rem 4rem;
    border-radius: 100px;
    font-weight: 900;
    font-size: 1.4rem;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    box-shadow: 0 15px 40px rgba(255, 107, 107, 0.5);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.mega-btn-primary:hover {
    transform: scale(1.08) translateY(-8px);
    box-shadow: 0 20px 50px rgba(255, 107, 107, 0.7);
    border-color: #fff;
}

/* Premium Card Highlighting */
.topic-card.has-external-link {
    transform: scale(1.03);
    z-index: 10;
    background: #fff;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2) !important;
}

.topic-card.has-external-link::after {
    content: '';
    position: absolute;
    inset: -4px;
    background: linear-gradient(45deg, #ff6b6b, #ffD93D, #ff6b6b, #ffD93D);
    background-size: 400% 400%;
    z-index: -1;
    border-radius: 18px;
    filter: blur(10px);
    animation: gold-glow 6s ease infinite;
}

@keyframes gold-glow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@media (max-width: 900px) {
    .mega-banner {
        height: auto;
        padding: 5rem 1rem;
    }

    .mega-headline {
        font-size: 2rem;
    }

    .mega-subtext {
        font-size: 1.1rem;
    }

    .mega-btn-primary {
        padding: 1.2rem 2.5rem;
        font-size: 1.1rem;
    }
}