@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* ===================================
   BASE STYLES - LAYOUT & STRUCTURE
   Colors are managed in theme/ folder
   =================================== */
* {
    box-sizing: border-box;
}

/* Default CSS Variables (fallback before theme JS loads) */
:root {
    --bg-primary: #1a1a1a;
    --bg-secondary: #0f1419;
    --bg-tertiary: #2a2a2a;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-tertiary: #a0a0a0;
    --text-light: #888888;
    --text-muted: #666666;
    --btn-primary: #ffffff;
    --btn-primary-hover: #e0e0e0;
    --btn-secondary: #e0e0e0;
    --btn-secondary-hover: #b0b0b0;
    --btn-success: #25D366;
    --btn-success-hover: #1da857;
    --btn-accent: #7c5cff;
    --card-bg: rgba(255, 255, 255, 0.08);
    --card-bg-hover: rgba(255, 255, 255, 0.12);
    --card-border: rgba(255, 255, 255, 0.1);
    --card-shadow: rgba(0, 0, 0, 0.5);
    --border-primary: #444444;
    --border-secondary: #333333;
    --border-light: #555555;
    --border-lighter: #333333;
    --color-transparent: transparent;
    --color-white: #fff;
    --color-black: #000;
    --gradient-carousel: linear-gradient(70deg, #8B2E1F, #1a3a52);
}

   
/* Root CSS Variables for Carousel Positions */
:root {
    --carousel-height: 800px;
    --carousel-margin-top: 0px;
    --carousel-list-width: 1140px;
    --carousel-list-max-width: 90%;
    --hero-max-width: 420px;
    
    /* Carousel Item Positions */
    --item1-transform: translateX(-100%) translateY(-5%) scale(1.5);
    --item1-filter: blur(20px);
    --item1-zIndex: 11;
    --item1-opacity: 0;

    --item2-transform: translateX(0);
    --item2-filter: blur(0px);
    --item2-zIndex: 10;
    --item2-opacity: 1;

    --item3-transform: translate(50%,10%) scale(0.8);
    --item3-filter: blur(8px);
    --item3-zIndex: 9;
    --item3-opacity: 1;

    --item4-transform: translate(90%,20%) scale(0.5);
    --item4-filter: blur(20px);
    --item4-zIndex: 8;
    --item4-opacity: 1;
    
    --item5-transform: translate(120%,30%) scale(0.3);
    --item5-filter: blur(30px);
    --item5-zIndex: 7;
    --item5-opacity: 0;
}

/* HTML & Body Base Styles */
html {
    width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Body Base Styles */
body {
    margin: 0;
    padding: 0;
    font-family: Poppins;
    transition: background-image 0.5s ease-in-out;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
}

/* Header Styles */
header {
    width: 100%;
    max-width: 100%;
    padding: auto;
    display: flex;
    justify-content: space-between;
    margin: 0 auto;
    height: 50px;
    align-items: center;
    position: relative;
    z-index: 100;
    box-sizing: border-box;
}

header .logo {
    font-weight: bold;
}

/* ===================================
   CAROUSEL CORE - LAYOUT & STRUCTURE
   =================================== */

.carousel {
    position: relative;
    height: 100vh;
    margin-top: var(--carousel-margin-top);
    overflow: hidden;
}

/* Seamless blend into body background */
.carousel::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to bottom, transparent, var(--bg-primary));
    pointer-events: none;
    z-index: 10;
}
.carousel .list {
    position: absolute;
    width: 100%;
    max-width: 1200px;
    height: 100%;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
}

.carousel .list .item {
    position: absolute;
    left: 0%;
    width: 100%;
    max-width: 1200px;
    height: 100%;
    font-size: 15px;
    transition: left 0.5s, opacity 0.5s, width 0.5s;
    overflow: hidden;
    display: flex;
    flex-direction: column !important;
    align-items: center;
    justify-content: center;
    gap: 3vh;
    padding: 0 20px;
    text-align: center;
    transform-origin: center center; /* for scaling */
    transform: var(--item-pos-transform, none) scale(var(--carousel-scale, 1));
}

.carousel .list .item:nth-child(n + 6) {
    opacity: 0;
    pointer-events: none;
}

.carousel .list .item img {
    width: auto;
    max-width: 90%;
    max-height: 40vh; /* Responsive height */
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 15px 45px rgba(0,0,0,0.7);
    z-index: 1;
    position: relative;
    transition: all 0.5s ease;
    /* Removed gradients for a cleaner "photo-first" look as requested */
}

.carousel .list .item .icon {
    width: 128px; /* Match Atlas Sprite size exactly */
    height: 128px;
    background-repeat: no-repeat;
    background-size: auto; /* Scale handled by --carousel-scale */
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    flex-shrink: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--text-primary);
    overflow: hidden;
}

/* ===================================
   CAROUSEL ITEMS - POSITION STATES
   =================================== */

.carousel .list .item:nth-child(1) {
    transform: var(--item1-transform);
    filter: var(--item1-filter);
    z-index: var(--item1-zIndex);
    opacity: var(--item1-opacity);
    pointer-events: none;
}

/* Single item fallback: show the first item as active when only 1 post exists. */
.carousel.single-item .list .item:nth-child(1) {
    --item-pos-transform: var(--item2-transform);
    transform: var(--item2-transform);
    filter: var(--item2-filter);
    z-index: var(--item2-zIndex);
    opacity: var(--item2-opacity);
    pointer-events: auto;
}

.carousel.single-item .list .item:nth-child(1) .introduce {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.5s;
}

.carousel .list .item:nth-child(2) {
    --item-pos-transform: var(--item2-transform);
    filter: var(--item2-filter);
    z-index: var(--item2-zIndex);
    opacity: var(--item2-opacity);
}

.carousel .list .item:nth-child(3) {
    --item-pos-transform: var(--item3-transform);
    filter: var(--item3-filter);
    z-index: var(--item3-zIndex);
    opacity: var(--item3-opacity);
}

.carousel .list .item:nth-child(4) {
    --item-pos-transform: var(--item4-transform);
    filter: var(--item4-filter);
    z-index: var(--item4-zIndex);
    opacity: var(--item4-opacity);
}

.carousel .list .item:nth-child(5) {
    --item-pos-transform: var(--item5-transform);
    filter: var(--item5-filter);
    z-index: var(--item5-zIndex);
    opacity: var(--item5-opacity);
    pointer-events: none;
}

/* ===================================
   CAROUSEL ICON & CONTENT ELEMENTS
   =================================== */

/* Removed legacy .icon position logic */


.carousel .list .item .introduce {
    width: 100%;
    max-width: 800px;
    opacity: 0;
    pointer-events: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2vh;
    z-index: 20;
}

.carousel .list .item:nth-child(2) .introduce,
.carousel .list .item:nth-child(3) .introduce,
.carousel .list .item:nth-child(4) .introduce {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.5s;
}

.carousel .list .item .introduce .topic {
    font-size: clamp(1.4rem, 4.5vh, 2.8rem); /* Scaling font */
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-primary);
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.carousel .list .item .introduce .des {
    font-size: clamp(0.9rem, 2vh, 1.2rem); /* Scaling font */
    color: var(--text-secondary);
    font-weight: 500;
}

.carousel .list .item .introduce .seeMore {
    margin-top: 2px;
    font-family: Poppins;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text-primary);
    cursor: pointer;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 12px;
    pointer-events: auto;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.carousel .list .item .detail {
    opacity: 0;
    pointer-events: none;
}

/* ===================================
   HERO SECTION
   =================================== */

.hero-static {
    position: absolute;
    top: clamp(80px, 18vh, 150px);
    left: 4%;
    transform-origin: left top;
    transform: scale(var(--hero-scale, var(--carousel-scale, 1)));
    z-index: 60;
    pointer-events: none; /* Let clicks pass to carousel if needed */
    color: var(--text-primary);
    width: 90%;
    max-width: clamp(280px, 35vw, 420px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: opacity 0.5s ease, visibility 0.5s, transform 0.3s ease;
}

.hero-static.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.hero-eyebrow {
    margin: 0;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-light);
}

.hero-title {
    margin: 0;
    font-size: clamp(2.4rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: 1px;
    color: #a0a0a0;
}

.hero-subtitle {
    margin: 0;
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    font-weight: 600;
    color: #5b61ff;
}

.hero-tags {
    margin: 0;
    font-size: clamp(0.8rem, 2.5vw, 0.95rem);
    color: var(--text-muted);
}

.hero-cta {
    margin-top: 10px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ===================================
   BUTTONS
   =================================== */

.btn-primary,
    .btn-secondary {
    font-family: Poppins;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.btn-primary {
    background: linear-gradient(135deg, #0a0a0a 0%, #6c4bff 100%);
    color: #fff;
    box-shadow: 0 10px 25px rgba(108, 75, 255, 0.35);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(108, 75, 255, 0.45);
}

.btn-secondary {
    background: #2d2f3a;
    color: #fff;
}

.btn-secondary:hover {
    background: #3a3d4b;
    transform: translateY(-1px);
}

/* ===================================
   CAROUSEL ANIMATIONS - CONTENT SHOW
   =================================== */

@keyframes showContent {
    from {
        transform: translateY(-30px);
        filter: blur(10px);
    }
    to {
        transform: translateY(0);
        opacity: 1;
        filter: blur(0px);
    }
}

.carousel .list .item:nth-child(2) .introduce .topic,
.carousel .list .item:nth-child(2) .introduce .des,
.carousel .list .item:nth-child(2) .introduce .seeMore {
    opacity: 0;
    animation: showContent 0.5s 1s ease-in-out 1 forwards;
}

.carousel .list .item:nth-child(2) .introduce .topic {
    animation-delay: 1.2s;
}

.carousel .list .item:nth-child(2) .introduce .des {
    animation-delay: 1.4s;
}

.carousel .list .item:nth-child(2) .introduce .seeMore {
    animation-delay: 1.6s;
}

/* ===================================
   CAROUSEL ARROWS & NAVIGATION
   =================================== */

.arrows {
    position: absolute;
    bottom: 100px;
    width: 90vw;
    max-width: var(--carousel-list-max-width);
    display: flex;
    justify-content: space-between;
    align-items: center;
    left: 50%;
    transform: translateX(-50%);
    box-sizing: border-box;
}

#prev,
#next {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-family: monospace;
    border: 1px solid;
    font-size: large;
    cursor: pointer;
    background-color: transparent;
    transition: opacity 0.3s ease, transform 0.2s ease;
}

#prev:hover,
#next:hover {
    transform: scale(1.05);
}

/* Carousel Background Blob */
.carousel::before {
    width: 500px;
    height: 300px;
    content: '';
    position: absolute;
    z-index: -1;
    border-radius: 20% 30% 80% 10%;
    filter: blur(150px);
    top: 50%;
    left: 50%;
    transform: translate(-10%, -50%);
    transition: 1s;
}

/* ===================================
   CAROUSEL STATE - NEXT ANIMATION
   =================================== */

@keyframes transformFromPosition2 {
    from {
        transform: var(--item2-transform);
        filter: var(--item2-filter);
        opacity: var(--item2-opacity);
    }
}

@keyframes transformFromPosition3 {
    from {
        transform: var(--item3-transform);
        filter: var(--item3-filter);
        opacity: var(--item3-opacity);
    }
}

@keyframes transformFromPosition4 {
    from {
        transform: var(--item4-transform);
        filter: var(--item4-filter);
        opacity: var(--item4-opacity);
    }
}

@keyframes transformFromPosition5 {
    from {
        transform: var(--item5-transform);
        filter: var(--item5-filter);
        opacity: var(--item5-opacity);
    }
}

.carousel.next .item:nth-child(1) {
    animation: transformFromPosition2 0.5s ease-in-out 1 forwards;
}

.carousel.next .item:nth-child(2) {
    animation: transformFromPosition3 0.7s ease-in-out 1 forwards;
}

.carousel.next .item:nth-child(3) {
    animation: transformFromPosition4 0.9s ease-in-out 1 forwards;
}

.carousel.next .item:nth-child(4) {
    animation: transformFromPosition5 1.1s ease-in-out 1 forwards;
}

/* ===================================
   CAROUSEL STATE - PREV ANIMATION
   =================================== */

@keyframes transformFromPosition1 {
    from {
        transform: var(--item1-transform);
        filter: var(--item1-filter);
        opacity: var(--item1-opacity);        
    }
}

.carousel.prev .list .item:nth-child(5) {
    animation: transformFromPosition4 0.5s ease-in-out 1 forwards;
}

.carousel.prev .list .item:nth-child(4) {
    animation: transformFromPosition3 0.7s ease-in-out 1 forwards;
}

.carousel.prev .list .item:nth-child(3) {
    animation: transformFromPosition2 0.9s ease-in-out 1 forwards;
}

.carousel.prev .list .item:nth-child(2) {
    animation: transformFromPosition1 1.1s ease-in-out 1 forwards;
}

/* ===================================
   CAROUSEL STATE - SHOW DETAIL
   =================================== */

.carousel.showDetail .list .item:nth-child(2) {
    width: 100%;
}

.carousel.showDetail .list .item:nth-child(2) .introduce {
    opacity: 0;
    pointer-events: none;
}

.carousel.showDetail .list .item:nth-child(2) img {
    position: absolute;
    left: 10%;
    top: 50%;
    transform: translateY(-50%);
    width: 35%;
}

.carousel.showDetail .list .item:nth-child(2) .icon {
    position: absolute;
    left: 20%;
    top: 50%;
    transform: translate(-50%, -50%) scale(1.2);
}

.carousel.showDetail .list .item:nth-child(3),
.carousel.showDetail .list .item:nth-child(4) {
    left: 100%;
    opacity: 0;
    pointer-events: none;
}

/* Detail Panel Styles */
.carousel.showDetail .list .item:nth-child(2) .detail {
    opacity: 1;
    width: 50%;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);

    pointer-events: auto;
}


.carousel.showDetail .list .item:nth-child(2) .detail .title {
    font-size: 2em;
    opacity: 0;
    animation: showContent 0.5s 1s ease-in-out 1 forwards;
}

.carousel.showDetail .list .item:nth-child(2) .detail .des {
    opacity: 0;
    animation: showContent 0.5s 1s ease-in-out 1 forwards;
    animation-delay: 1.2s;
}

.carousel.showDetail .list .item:nth-child(2) .detail .specifications {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-top: 20px;
    opacity: 0;
    animation: showContent 0.5s 1s ease-in-out 1 forwards;
    animation-delay: 1.4s;
}

.carousel.showDetail .list .item:nth-child(2) .detail .specifications div {
    width: 90px;
    text-align: center;
    flex-shrink: 0;
}

.carousel.showDetail .list .item:nth-child(2) .detail .specifications div p {
    margin: 5px 0;
}

.carousel.showDetail .list .item:nth-child(2) .detail .specifications div p:first-child {
    font-weight: bold;
}

.carousel.showDetail .list .item:nth-child(2) .detail .detail-action {
    opacity: 0;
    animation: showContent 0.5s 1s ease-in-out 1 forwards;
    animation-delay: 1.6s;
}

.carousel.showDetail::before {
    transform: translate(-100%, -50%) rotate(90deg);
    filter: blur(130px);
}

/* Show Detail Button Styles */
.carousel.showDetail #prev,
.carousel.showDetail #next {
    opacity: 0;
    pointer-events: none;
}

/* ===================================
   RESPONSIVE DESIGN - MOBILE & TABLET
   =================================== */

@media screen and (max-width: 1024px) {
    .hero-static {
        display: flex !important; /* Force show on mobile/tablet */
        top: 80px !important;
        left: 20px !important;
    }

    .carousel .list .item {
        padding: 140px 20px 40px !important;
        justify-content: flex-start !important; /* Push from top instead of center */
        gap: 2vh !important;
    }

    .carousel .list .item img {
        max-height: 35vh !important;
    }

    /* == ATURAN PINTAR BARU: STACK MODE UNTUK "BACA SELENGKAPNYA" == */
    .carousel.showDetail .list .item:nth-child(2) {
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        padding-top: 100px !important; 
    }

    .carousel.showDetail .list .item:nth-child(2) img {
        position: relative !important;
        left: 0 !important;
        top: 0 !important;
        transform: none !important;
        width: 75% !important;
        max-width: 320px !important;
        margin: 0 auto !important;
        max-height: 30vh !important;
    }

    .carousel.showDetail .list .item:nth-child(2) .detail {
        position: relative !important;
        right: 0 !important;
        top: 0 !important;
        transform: none !important;
        width: 100% !important;
        margin-top: 20px !important;
        text-align: center !important;
    }

    .carousel.showDetail .list .item:nth-child(2) .detail .title {
        font-size: 1.6em !important;
        margin-bottom: 10px !important;
    }

    .carousel.showDetail .list .item:nth-child(2) .detail .des {
        height: auto;
        max-height: none !important;
        overflow: visible !important;
        text-align: center !important;
    }

    .carousel.showDetail .list .item:nth-child(2) .detail .detail-action {
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
        float: none !important;
        margin-top: 15px !important;
    }
}

/* ===================================
   RESPONSIVE DESIGN - TABLET (768-1024px)
   =================================== */

@media screen and (min-width: 768px) and (max-width: 1024px) {
    .carousel {
        height: 600px;
    }

    .carousel .list .item {
        font-size: 12px;
    }

    .hero-static {
        top: 12%;
        max-width: 340px;
    }

    .carousel .list .item .icon {
        width: 100px;
        height: 100px;
    }
}

/* ===================================
   THEME MODAL - THEME SELECTOR
   =================================== */
/* ===================================
   THEME MODAL - THEME SELECTOR
   =================================== */

.theme-modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    backdrop-filter: blur(5px);
}

.theme-modal.active {
    display: flex;
}

.theme-content {
    margin: 15% auto; 
    padding: 20px;
    border-radius: 15px;
    width: 300px;
    text-align: center;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.close-theme {
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 5px;
    background: none;
    border: none;
    padding: 0;
    transition: transform 0.2s ease;
}

.close-theme:hover {
    transform: scale(1.1);
}

.theme-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

.theme-option {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.theme-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.theme-option.active {
    background-color: #5b61ff;
    color: #fff;
    border-color: #5b61ff;
}

/* ===================================
   THEME TOGGLE BUTTON
   =================================== */

#theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease, transform 0.2s ease;
    color: var(--text-primary);
}

#theme-toggle:hover {
    background-color: rgba(128, 128, 128, 0.1);
    transform: scale(1.1);
}

/* ===================================
   POST SOCIAL BUTTONS
   =================================== */

.post-socials {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(128, 128, 128, 0.1);
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    text-decoration: none;
}

.social-btn:hover {
    transform: translateY(-3px);
    background: rgba(128, 128, 128, 0.2);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Brand Colors on Hover */
.social-btn.youtube:hover { color: #FF0000; border-color: #FF0000; background: rgba(255, 0, 0, 0.1); }
.social-btn.instagram:hover { color: #E1306C; border-color: #E1306C; background: rgba(225, 48, 108, 0.1); }
.social-btn.tiktok:hover { color: var(--text-primary); border-color: var(--text-primary); background: rgba(128, 128, 128, 0.2); }
.social-btn.facebook:hover { color: #1877F2; border-color: #1877F2; background: rgba(24, 119, 242, 0.1); }
