/* Homepage v3 — storytelling ringkas, fokus klien */

.pub-home-hero {
    position: relative;
    min-height: min(92vh, 820px);
    display: flex;
    align-items: center;
    padding: calc(var(--mb-header-h, 128px) + 1.5rem) 0 3rem;
    overflow: hidden;
    color: #fff;
}

.pub-home-hero__bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, #0c4a6e 0%, #0369a1 45%, #0284c7 100%);
    z-index: 0;
}

.pub-home-hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 90% 20%, rgba(56, 189, 248, 0.35), transparent),
        radial-gradient(ellipse 50% 40% at 10% 90%, rgba(249, 115, 22, 0.2), transparent);
}

.pub-home-hero__slides {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.pub-home-hero__slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1);
    transition: opacity 1.8s ease;
    filter: saturate(0.92) contrast(1.04) brightness(0.96);
    will-change: transform, opacity;
}

.pub-home-hero__slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        165deg,
        rgba(12, 74, 110, 0.22) 0%,
        rgba(8, 47, 73, 0.08) 40%,
        rgba(15, 23, 42, 0.28) 100%
    );
    pointer-events: none;
}

.pub-home-hero__slide.is-active {
    opacity: 1;
    animation: pub-hero-cinema-zoom 22s ease-out forwards;
}

@keyframes pub-hero-cinema-zoom {
    from { transform: scale(1); }
    to { transform: scale(1.08); }
}

.pub-home-hero__slides::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        rgba(8, 47, 73, 0.9) 0%,
        rgba(8, 47, 73, 0.62) 38%,
        rgba(8, 47, 73, 0.22) 62%,
        rgba(8, 47, 73, 0.06) 100%
    );
    z-index: 2;
}

/* Lapisan sinematik — kabut berdenyut, gambar jelas di sela-sela */
.pub-home-hero__cinema {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
}

/* Kabut & awan: hilang → muncul → hilang lagi (loop ~24 detik) */
.pub-home-hero__fog-layer {
    position: absolute;
    inset: 0;
    opacity: 0;
    animation: pub-fog-cycle 24s ease-in-out infinite;
}

@keyframes pub-fog-cycle {
    0%, 20% { opacity: 0; }
    35% { opacity: 0.85; }
    50%, 62% { opacity: 0.65; }
    78%, 100% { opacity: 0; }
}

.pub-home-hero__mist {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 38%;
    overflow: hidden;
    mask-image: linear-gradient(0deg, #000 0%, #000 28%, transparent 92%);
    -webkit-mask-image: linear-gradient(0deg, #000 0%, #000 28%, transparent 92%);
}

.pub-home-hero__mist-band {
    position: absolute;
    bottom: -20%;
    left: 0;
    width: 200%;
    height: 100%;
    background:
        radial-gradient(ellipse 28% 70% at 8% 85%, rgba(255, 255, 255, 0.3) 0%, transparent 72%),
        radial-gradient(ellipse 22% 65% at 22% 90%, rgba(186, 230, 253, 0.26) 0%, transparent 68%),
        radial-gradient(ellipse 26% 75% at 38% 88%, rgba(255, 255, 255, 0.22) 0%, transparent 70%),
        radial-gradient(ellipse 24% 68% at 55% 92%, rgba(224, 242, 254, 0.24) 0%, transparent 65%),
        radial-gradient(ellipse 30% 72% at 72% 86%, rgba(255, 255, 255, 0.28) 0%, transparent 70%),
        radial-gradient(ellipse 25% 68% at 88% 91%, rgba(186, 230, 253, 0.22) 0%, transparent 68%);
    filter: blur(16px);
    animation: pub-mist-drift 42s linear infinite;
}

.pub-home-hero__mist-band:last-child {
    bottom: -10%;
    opacity: 0.55;
    filter: blur(22px);
    animation-duration: 56s;
    animation-direction: reverse;
}

@keyframes pub-mist-drift {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.pub-home-hero__cloud {
    position: absolute;
    border-radius: 50%;
    filter: blur(48px);
    animation: pub-cloud-drift 26s ease-in-out infinite;
}

.pub-home-hero__cloud--a {
    width: min(48vw, 380px);
    height: min(24vw, 170px);
    top: 22%;
    right: 2%;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.2) 0%, transparent 72%);
    animation-duration: 28s;
    animation-delay: 0s;
}

.pub-home-hero__cloud--b {
    width: min(40vw, 320px);
    height: min(20vw, 140px);
    bottom: 28%;
    right: 8%;
    background: radial-gradient(ellipse at center, rgba(224, 242, 254, 0.16) 0%, transparent 70%);
    animation-duration: 34s;
    animation-delay: -12s;
}

@keyframes pub-cloud-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-20px, -8px) scale(1.05); }
    66% { transform: translate(-10px, 10px) scale(1.02); }
}

.pub-home-hero__vignette {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 90% 80% at 50% 48%, transparent 42%, rgba(8, 47, 73, 0.32) 100%),
        linear-gradient(0deg, rgba(8, 47, 73, 0.28) 0%, transparent 18%);
}

.pub-home-hero__grain {
    position: absolute;
    inset: 0;
    opacity: 0.045;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 180px 180px;
    animation: pub-grain-shift 0.5s steps(2) infinite;
}

@keyframes pub-grain-shift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-2%, -2%); }
}

@media (prefers-reduced-motion: reduce) {
    .pub-home-hero__slide.is-active { animation: none; }
    .pub-home-hero__fog-layer {
        animation: none;
        opacity: 0;
    }
    .pub-home-hero__mist-band,
    .pub-home-hero__cloud,
    .pub-home-hero__grain {
        animation: none !important;
    }
}

.pub-home-hero__content {
    position: relative;
    z-index: 5;
}

.pub-home-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 1rem;
    backdrop-filter: blur(6px);
    color: #fff;
}

.pub-home-hero__badge i {
    display: inline-block;
}

/* ── Hero text animations ── */
.pub-hero-title-line {
    display: block;
}

.pub-hero-word {
    display: inline-block;
    margin-right: 0.22em;
    opacity: 0;
    transform: translateY(1.15em);
    filter: blur(6px);
    animation: pub-hero-word-in 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: calc(0.45s + var(--i, 0) * 0.09s);
}

.pub-hero-word--accent {
    color: #7dd3fc;
    -webkit-text-fill-color: #7dd3fc;
    position: relative;
    margin-right: 0;
    animation:
        pub-hero-word-in 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards,
        pub-hero-accent-glow 2.8s ease-in-out calc(0.45s + var(--i, 0) * 0.09s + 0.9s) infinite;
}

.pub-hero-word--accent::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.06em;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, #7dd3fc, #fde68a);
    transform: scaleX(0);
    transform-origin: left;
    animation: pub-hero-underline 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: calc(0.45s + var(--i, 0) * 0.09s + 0.5s);
}

.pub-hero-anim {
    opacity: 0;
    transform: translateY(1.25rem);
    animation: pub-hero-fade-up 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: calc(0.2s + var(--hero-i, 0) * 0.1s);
}

.pub-home-hero__badge.pub-hero-anim {
    transform: translateX(-1.25rem);
    animation-name: pub-hero-slide-in;
}

.pub-home-search.pub-hero-anim {
    transform: translateY(1.25rem) scale(0.97);
    animation-name: pub-hero-search-in;
    animation-delay: calc(0.2s + var(--hero-i, 0) * 0.1s);
}

.pub-hero-arrow {
    display: inline-block;
    animation: pub-hero-arrow-nudge 1.6s ease-in-out 1.8s infinite;
}

@keyframes pub-hero-word-in {
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes pub-hero-accent-glow {
    0%, 100% {
        text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
        color: #7dd3fc;
        -webkit-text-fill-color: #7dd3fc;
    }
    50% {
        text-shadow: 0 0 22px rgba(125, 211, 252, 0.55), 0 2px 16px rgba(0, 0, 0, 0.4);
        color: #bae6fd;
        -webkit-text-fill-color: #bae6fd;
    }
}

@keyframes pub-hero-underline {
    to { transform: scaleX(1); }
}

@keyframes pub-hero-fade-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pub-hero-slide-in {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pub-hero-search-in {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pub-hero-arrow-nudge {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(4px); }
}

.pub-home-hero.is-ready .pub-home-hero__badge i {
    animation: pub-hero-compass 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

@keyframes pub-hero-compass {
    0% { transform: rotate(-30deg) scale(0.6); opacity: 0; }
    60% { transform: rotate(8deg) scale(1.08); opacity: 1; }
    100% { transform: rotate(0deg) scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .pub-hero-word,
    .pub-hero-anim,
    .pub-hero-word--accent,
    .pub-hero-word--accent::after,
    .pub-hero-arrow,
    .pub-home-hero.is-ready .pub-home-hero__badge i {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }

    .pub-hero-word--accent::after {
        transform: scaleX(1);
    }
}

/* theme.css memaksa h1 gelap — paksa putih + bayangan agar terbaca di foto */
.pub-home-hero h1.pub-home-hero__title {
    font-family: var(--pub-display);
    font-size: clamp(2rem, 5.5vw, 3.35rem);
    font-weight: 700;
    line-height: 1.08;
    margin-bottom: 1rem;
    max-width: 14ch;
    color: #ffffff !important;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.45);
}

.pub-home-hero__title .pub-hero-word:not(.pub-hero-word--accent) {
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
}

.pub-home-hero__text {
    font-size: 1.05rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.95);
    max-width: 32rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}

.pub-home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1.75rem;
}

.pub-home-search {
    max-width: 36rem;
    background: rgba(255, 255, 255, 0.97);
    border-radius: var(--pub-radius-lg);
    padding: 0.45rem;
    box-shadow: var(--pub-shadow-lg);
}

.pub-home-search form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.pub-home-search input,
.pub-home-search select {
    flex: 1 1 140px;
    border: none;
    background: var(--pub-mist);
    border-radius: 0.65rem;
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
    color: var(--pub-ink);
}

.pub-home-search button {
    flex: 0 0 auto;
    border: none;
    border-radius: 0.65rem;
    background: var(--pub-primary);
    color: #fff;
    font-weight: 600;
    padding: 0.65rem 1.1rem;
    cursor: pointer;
}

.pub-home-search button:hover { background: var(--pub-primary-dark); }

/* Quick actions — 4 hal yang paling dicari klien */
.pub-quick-grid {
    margin-top: -2.5rem;
    position: relative;
    z-index: 5;
}

.pub-quick-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.25rem 1.15rem;
    background: var(--pub-surface);
    border-radius: var(--pub-radius-lg);
    border: 1px solid var(--pub-border);
    box-shadow: var(--pub-shadow);
    text-decoration: none;
    color: var(--pub-ink);
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    cursor: pointer;
}

.pub-quick-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--pub-shadow-lg);
    border-color: rgba(2, 132, 199, 0.25);
    color: var(--pub-ink);
}

.pub-quick-card--accent {
    background: linear-gradient(145deg, #fff7ed, #fff);
    border-color: rgba(249, 115, 22, 0.2);
}

.pub-quick-card__icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    background: var(--pub-mist);
    color: var(--pub-primary);
}

.pub-quick-card--accent .pub-quick-card__icon {
    background: #ffedd5;
    color: var(--pub-accent);
}

.pub-quick-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.pub-quick-card p {
    font-size: 0.82rem;
    color: var(--pub-ink-muted);
    margin: 0;
    line-height: 1.4;
}

/* Program cards */
.pub-program-card {
    position: relative;
    border-radius: var(--pub-radius-lg);
    overflow: hidden;
    min-height: 280px;
    display: block;
    text-decoration: none;
    color: #fff;
    box-shadow: var(--pub-shadow);
    transition: transform 0.3s;
    cursor: pointer;
}

.pub-program-card:hover {
    transform: scale(1.02);
    color: #fff;
}

.pub-program-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.pub-program-card:hover img { transform: scale(1.06); }

.pub-program-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(8, 47, 73, 0.92) 0%, rgba(8, 47, 73, 0.2) 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.35rem;
}

.pub-program-card__tag {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #7dd3fc;
    margin-bottom: 0.35rem;
}

.pub-program-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.pub-program-card p {
    font-size: 0.85rem;
    opacity: 0.88;
    margin: 0;
    line-height: 1.4;
}

/* Stats */
.pub-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    text-align: center;
}

@media (max-width: 575.98px) {
    .pub-stats { grid-template-columns: 1fr; }
}

.pub-stat {
    padding: 1rem;
    background: var(--pub-surface);
    border-radius: var(--pub-radius);
    border: 1px solid var(--pub-border);
}

.pub-stat strong {
    display: block;
    font-family: var(--pub-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--pub-primary);
    line-height: 1.1;
}

.pub-stat span {
    font-size: 0.8rem;
    color: var(--pub-ink-muted);
}

/* Package cards — reuse tt-dest-card with v3 polish */
.pub-home .tt-dest-card {
    border-radius: var(--pub-radius-lg);
    border: 1px solid var(--pub-border);
    overflow: hidden;
    background: var(--pub-surface);
    transition: transform 0.25s, box-shadow 0.25s;
}

.pub-home .tt-dest-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--pub-shadow-lg);
}

/* Journey steps */
.pub-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    counter-reset: pubstep;
    list-style: none;
    padding: 0;
    margin: 0;
}

@media (max-width: 767.98px) {
    .pub-steps { grid-template-columns: 1fr; }
}

.pub-steps li {
    position: relative;
    padding: 1.25rem 1.15rem 1.15rem 3.25rem;
    background: var(--pub-surface);
    border-radius: var(--pub-radius);
    border: 1px solid var(--pub-border);
    font-weight: 600;
    font-size: 0.92rem;
}

.pub-steps li::before {
    counter-increment: pubstep;
    content: counter(pubstep);
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pub-primary), var(--pub-accent));
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Testimonials compact */
.pub-testi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.pub-testi {
    background: var(--pub-surface);
    border-radius: var(--pub-radius-lg);
    padding: 1.25rem;
    border: 1px solid var(--pub-border);
    height: 100%;
}

.pub-testi p {
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--pub-ink-muted);
    margin-bottom: 1rem;
}

.pub-testi cite {
    font-style: normal;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--pub-ink);
}

/* CTA band */
.pub-cta-band {
    background: linear-gradient(135deg, #0369a1 0%, #0c4a6e 100%);
    border-radius: var(--pub-radius-lg);
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.pub-cta-band::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.15);
    top: -100px;
    right: -80px;
}

.pub-cta-band h2 {
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    position: relative;
}

.pub-cta-band p {
    opacity: 0.9;
    max-width: 32rem;
    margin: 0 auto 1.25rem;
    position: relative;
}

.pub-cta-band .pub-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
    position: relative;
}

/* Hero dots */
.pub-hero-dots {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    gap: 0.4rem;
}

.pub-hero-dots button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.4);
    padding: 0;
    cursor: pointer;
}

.pub-hero-dots button.is-active {
    background: #fff;
    width: 24px;
    border-radius: 4px;
}

/* Partner marquee */
.pub-partners {
    background: var(--pub-mist);
    overflow: hidden;
}

.pub-partner-marquee {
    position: relative;
    overflow: hidden;
    border-radius: var(--pub-radius-lg);
    border: 1px solid var(--pub-border);
    background: var(--pub-surface);
    box-shadow: var(--pub-shadow);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
}

.pub-partner-track {
    display: flex;
    align-items: stretch;
    gap: 0.85rem;
    width: max-content;
    padding: 1rem 1.1rem;
    animation: pub-partner-scroll 45s linear infinite;
}

.pub-partner-marquee:hover .pub-partner-track {
    animation-play-state: paused;
}

@keyframes pub-partner-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.pub-partner-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 200px;
    max-width: 260px;
    padding: 0.55rem 0.75rem;
    border-radius: var(--pub-radius);
    border: 1px solid var(--pub-border);
    background: var(--pub-mist);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.pub-partner-item:hover {
    transform: translateY(-2px);
    border-color: rgba(2, 132, 199, 0.25);
    box-shadow: var(--pub-shadow);
}

.pub-partner-item img {
    width: 52px;
    height: 52px;
    border-radius: 0.65rem;
    object-fit: contain;
    object-position: center;
    flex-shrink: 0;
    background: #fff;
    padding: 0.2rem;
    border: 1px solid var(--pub-border);
}

.pub-partner-item span {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--pub-ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 575.98px) {
    .pub-partner-item {
        min-width: 170px;
        max-width: 200px;
        padding: 0.45rem 0.6rem;
    }

    .pub-partner-item img {
        width: 44px;
        height: 44px;
    }

    .pub-partner-item span {
        font-size: 0.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pub-partner-marquee {
        -webkit-mask-image: none;
        mask-image: none;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .pub-partner-track {
        animation: none;
        flex-wrap: wrap;
        width: 100%;
        justify-content: center;
    }
}

html[data-bs-theme='dark'] .pub-partner-item img {
    background: rgba(255, 255, 255, 0.06);
}
