/* =========================================
   CATEGORY SLIDER LAYOUT
========================================= */
#top .category-slider-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 97vh;
    min-height: 600px;
}

#top .category-swiper {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease !important;
    will-change: opacity; /* GPU layer */
}

#top .category-swiper.visible {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

#top .category-swiper:not(.visible) {
    z-index: 1;
}

/* =========================================
   SLIDES
========================================= */
#top .swiper-slide {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: #fff;
    height: 100%;
}

/* Background Image */
#top .slide-bg,
#top .cat-slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 0;
    transition: transform 1.5s ease, filter 1.5s ease !important;
    will-change: transform, filter; /* GPU layer */
}

/* Slight zoom effect on active slide */
#top .swiper-slide-active .slide-bg,
#top .swiper-slide-active .cat-slide-bg {
    transform: scale(1.05);
    filter: brightness(1.05);
}

/* Cinematic overlay */
#top .slide-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(circle at 75% 40%, rgba(0,0,0,0.0) 0%, rgba(0,0,0,0.25) 55%, rgba(0,0,0,0.6) 90%),
        linear-gradient(to right, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 40%, rgba(0,0,0,0.1) 80%),
        linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);
    transition: opacity 0.6s ease !important;
}

#top .slide-overlay.dark {
    background: linear-gradient(to right, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 50%, rgba(0,0,0,0.2) 100%);
}

/* =========================================
   SLIDE CONTENT
========================================= */
#top .slide-inner-container {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

#top .slide-inner-details {
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
}

#top .slide-content {
    position: relative;
    z-index: 2;
    padding: 0 84px;
    max-width: 784px;
}

#top .slide-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

#top .post-status {
    display: inline-block;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    color: var(--text-primary);
    background-color: var(--primary);
    border-radius: 100px;
}

#top .slide-title {
    font-size: 3.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#top.language-mr .slide-title {
    line-height: 1.35;
}

#top .slide-desc {
    font-size: 20px;
    opacity: 0.85;
    margin-bottom: 20px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

#top .slide-meta {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    color: var(--lavender-gray);
    font-size: 16px;
    opacity: 0.7;
    margin-bottom: 20px;
    gap: 16px;
}

#top .slide-post-date,
#top .slide-post-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#top .slide-post-tag {
    position: relative;
    align-items: flex-start;
}

/* Tag tooltip */
#top .slide-post-tag::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    background: #222;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    white-space: normal;
    max-width: 200px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease !important;
    z-index: 10;
}

#top .slide-post-tag:hover::after {
    opacity: 1;
}

#top .more-tags {
    background: rgba(255,255,255,0.15);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

#top .slide-post-date .icon-calendar {
    width: 13px;
    height: 15px;
    background: url('/wp-content/uploads/2026/01/calendar.svg') no-repeat;
    background-size: 100%;
}

#top .slide-post-tag .icon-tag {
    position: relative;
    top: 6px;
    width: 14px;
    height: 14px;
    background: url('/wp-content/uploads/2026/01/tag.svg') no-repeat;
    background-size: 100%;
    flex-shrink: 0;
}

/* =========================================
   BUTTONS
========================================= */
#top .read-more-btn.btn-link {
    margin-top: 0;
}

#top .btn-link {
    margin-top: 24px;
    margin-bottom: 16px;
}

#top .read-more-btn.btn-link .slide-btn {
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 16px;
    gap: 10px;
}

#top .slide-btn {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    color: #fff;
    padding: 18px 40px;
    border-radius: 10px;
    font-weight: 500;
    transition: transform 0.25s ease, box-shadow 0.25s ease !important;
    font-size: 18px;
    line-height: 1;
    gap: 16px;
}

#top .slide-btn:hover {
    transform: translateY(-0.5rem) scale(1.05);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

#top .slide-btn .icon-right {
    background: url('/wp-content/uploads/2026/01/move-right.svg') no-repeat;
    background-size: 100%;
    width: 20px;
    height: 10px;
}

/* =========================================
   CONTROLS
========================================= */
#top .slide-controls {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 5;
}

#top .pause-btn {
    font-family: 'Afacad', sans-serif;
    display: flex;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(0,0,0,0.20);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #fff;
    padding: 10px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.1;
    transition: background 0.25s ease !important;
    gap: 6px;
}

#top .pause-btn:hover {
    background: rgba(255,255,255,0.1);
}

#top .pause-btn i {
    background-size: 100%;
    background-repeat: no-repeat;
    display: inline-block;
}

#top .pause-btn .icon-pause {
    background-image: url('/wp-content/uploads/2026/02/pause.svg');
    width: 7px;
    height: 10px;
}

#top .pause-btn .icon-play {
    background-image: url('/wp-content/uploads/2026/02/play.svg');
    width: 8px;
    height: 9px;
}

#top .progress {
    position: relative;
    width: 84px;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 100px;
    overflow: hidden;
}

#top .progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff3b6a, #ff9d00, #ff3b6a);
    background-size: 200% 100%;
    border-radius: 100px;
    animation: progressGradient 5s linear infinite;
}

@keyframes progressGradient {
    0%   { background-position: 0% 0; }
    100% { background-position: 200% 0; }
}

#top .slide-count {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
}

/* =========================================
   CATEGORY ICONS
========================================= */
#top .category-icons-container {
    max-width: 1440px;
    margin: 0 auto;
    position: relative;
    height: 100%;
}

#top .category-icons {
    position: absolute;
    top: 50%;
    right: 70px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 10;
    border: 1px solid rgba(255,255,255,0.2);
    background-color: rgba(0,0,0,0.2);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 10px;
    border-radius: 16px;
}

/* FIX #2: removed duplicate conflicting `border:none` */
#top .category-icon {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background-color: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease-in !important;
}

#top .category-icon:hover {
    border-color: rgba(255,255,255,0.4);
    background-color: rgba(255,255,255,0.1);
}

#top .category-icon.active {
    background-color: var(--secondary);
    border-color: transparent;
}

#top .category-icon.active::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
    height: 24px;
    width: 4px;
    background-color: #fff;
    border-radius: 50px;
}

#top .category-icon .cat-icon {
    width: 19px;
    height: 19px;
    background-repeat: no-repeat;
    background-size: 100%;
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease !important;
}

#top .category-icon:hover .cat-icon,
#top .category-icon.active .cat-icon {
    opacity: 1;
    transform: scale(1.05);
}

#top .category-icon .icon-cultural-event { background-image: url('/wp-content/uploads/2026/01/music-4.svg'); }
#top .category-icon .icon-latest-news    { background-image: url('/wp-content/uploads/2026/01/newspaper.svg'); }
#top .category-icon .icon-education      { background-image: url('/wp-content/uploads/2026/01/graduation-cap.svg'); }
#top .category-icon .icon-drama-art      { background-image: url('/wp-content/uploads/2026/01/smile.svg'); }
#top .category-icon .icon-recognition    { background-image: url('/wp-content/uploads/2026/01/trophy.svg'); }

/* =========================================
   EXPLORE MORE SCROLL INDICATOR
========================================= */
#top .explore-more {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    max-width: 104px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
    cursor: pointer;
    opacity: 0.7;
    margin: 0 auto;
    animation: arrowBounce 4s infinite ease-in-out;
}

#top .explore-text {
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    margin-bottom: 4px;
}

#top.language-mr .explore-text {
    letter-spacing: 1px;
}

/* Mouse shape */
#top .mouse-scroll {
    width: 18px;
    height: 28px;
    border: 2px solid rgba(255,255,255,0.6);
    border-radius: 18px;
    position: relative;
    overflow: hidden; /* clip wheel scroll animation */
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* FIX #7: use wheelMove (fade-scroll) instead of arrowBounceSmall (just bounces) */
#top .wheel {
    position: absolute;
    top: 6px;
    left: 6px;
    /*left: 50%;*/
    /* margin-left: -1.5px; center: half of 3px width */
    width: 3px;
    height: 8px;
    background: rgba(255,255,255,0.8);
    border-radius: 2px;
    animation: wheelMove 1.5s infinite ease-in-out;
}

/* Arrow below mouse */
#top .arrow-down {
    display: block;
    margin-top: 4px;
    background: url('/wp-content/uploads/2025/04/arrow-down-white.svg') no-repeat center;
    background-size: 100%;
    width: 18px;
    height: 18px;
    animation: arrowBounce 1.5s infinite ease-in-out;
    animation-delay: 0.3s;
}

/* =========================================
   KEYFRAMES
========================================= */
@keyframes wheelMove {
    0%   { opacity: 0; transform: translateY(0); }
    30%  { opacity: 1; }
    70%  { opacity: 1; transform: translateY(10px); }
    100% { opacity: 0; transform: translateY(10px); }
}

@keyframes arrowBounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(4px); }
}

@keyframes progressGradient {
    0%   { background-position: 0% 0; }
    100% { background-position: 200% 0; }
}

/* =========================================
   RESPONSIVE DESIGN
========================================= */

/* Large screens (≤1200px) */
@media (max-width: 1200px) {
    #top .category-slider-container { height: 85vh; }
    #top .slide-content { padding: 0 20px; }
    #top .category-icons { right: 20px; }
}

/* Tablets (≤992px) */
@media (max-width: 992px) {
    #top .category-slider-container { height: 80vh; }
    #top .slide-content { max-width: 80%; }
    #top .slide-title { font-size: 2rem; }
    #top .category-icons { right: 16px; gap: 12px; }
    #top .category-icon { width: 46px; height: 46px; }
}

/* Mobile landscape / small tablets (≤768px) */
@media (max-width: 768px) {
    #top .category-slider-container { margin-top: 40px; }
    #top .slide-content { padding: 0 20px; max-width: 100%; }
    #top .slide-title { font-size: 2.6rem; line-height: 1.3; }
    #top .slide-desc { margin-bottom: 15px; }
    #top .slide-btn { padding: 16px 24px; font-size: 16px; }
    #top .slide-overlay {
        background:
            linear-gradient(to right, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 70%, rgba(0,0,0,0.2) 100%),
            linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.8));
    }
    #top .category-icons {
        top: auto;
        bottom: 70px;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        flex-direction: row;
    }
    #top .category-icon.active::before {
        left: 12px;
        bottom: -3px;
        top: auto;
        transform: unset;
        height: 4px;
        width: 24px;
    }
    #top .category-icon { width: 48px; height: 32px; border-radius: 10px; }
    #top .category-icon .cat-icon { width: 15px; height: 16px; }
    #top .slide-controls { gap: 8px; }
    #top .explore-more { bottom: 10px; }
    #top .explore-text { display: none; }
}

/* Small phones (≤575px) */
@media (max-width: 575px) {
    #top.logged-in .category-slider-container { margin-top: 40px; }
    #top .category-slider-container { height: 90vh; min-height: 400px; margin-top: 80px; }
    #top .slide-inner-container { align-items: flex-start; }
    #top .slide-content { padding-top: 60px; }
    #top .slide-title { font-size: 24px; }
    #top .slide-desc { font-size: 18px; }
    #top .slide-meta { flex-wrap: wrap; font-size: 14px; gap: 12px; }
    #top .slide-post-date .icon-calendar { width: 11px; height: 13px; }
    #top .btn-link { margin-top: 12px; }
    #top .slide-btn { padding: 14px 20px; font-size: 14px; }
    #top .pause-btn { font-size: 12px; }
    #top .slide-count { font-size: 12px; }
    #top .progress { width: 120px; height: 4px; }
    #top .category-icon { width: 40px; }
    #top .category-icon.active::before { width: 16px; left: 11px; bottom: -2px; }
    #top .category-icons { bottom: 90px; }
    #top .explore-more { bottom: 20px; }
}