.gb-main-wrapper { max-width: 1200px; margin: 0 auto; overflow-x: hidden; font-family: 'Segoe UI', sans-serif; }
.header-branding-area {
    padding: 14px 0 14px 0;
    display: flex;
    justify-content: left;
    overflow: hidden;
    max-height: 160px;
}

.branding-flex {
    display: flex;
    align-items: center;
    gap: 25px;
}

/* 1. Logo HSI - Masuk dari Kiri */
.brand-hsi-logo {
    opacity: 0;
    transform: translateX(-100px);
    animation: slideInFromLeft 0.8s ease-out forwards;
}

/* 2. Garis Pembatas - Masuk dari Atas */
.brand-divider {
    width: 2px;
    height: 80px;
    background-color: #cbd5e1;
    opacity: 0;
    transform: translateY(-50px);
    animation: slideInFromTop 0.8s ease-out 0.3s forwards; /* Delay sedikit */
}

/* 3. Logo Majalah & Tagline - Masuk dari Kanan */
.brand-content-right {
    opacity: 0;
    transform: translateX(100px);
    animation: slideInFromRight 0.8s ease-out 0.5s forwards; /* Delay paling akhir */
}

/* --- EFEK ZOOM BERGANTIAN (Setelah Masuk) --- */

/* Logo Majalah Nge-zoom */
.brand-majalah-logo {
    height: 60px; /* Sesuai rasio 973x256 Anda */
    width: auto;
    display: block;
    margin-bottom: 2px;
    animation: pulseLogo 8s infinite 2s; /* Berulang tiap 8 detik */
}

/* Tagline Nge-zoom */
.brand-tagline {
    font-family: 'Segoe UI', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #1a365d;
    letter-spacing: -0.5px;
    line-height: 1;
    animation: pulseTagline 8s infinite 6s; /* Berulang tiap 8 detik, mulai di detik ke-6 */
}

/* --- KEYFRAMES --- */

@keyframes slideInFromLeft {
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInFromTop {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInFromRight {
    to { opacity: 1; transform: translateX(0); }
}

/* Animasi Zoom Bergantian */
@keyframes pulseLogo {
    0%, 10%, 100% { transform: scale(1); }
    5% { transform: scale(1.08); color: #2563eb; } /* Ngezoom dikit & berubah warna bentar */
}

@keyframes pulseTagline {
    0%, 10%, 100% { transform: scale(1); }
    5% { transform: scale(1.1); filter: brightness(1.5); }
}
.mega-featured-card { display: flex; align-items: stretch; background: #104c89; padding: 20px; border-radius: 0px; margin-bottom: 35px; border: 1px solid #f0f0f0; box-shadow: 0 10px 30px rgba(0,0,0,0.04); min-height: 250px; }
.f-cover-box { flex: 0 0 20%; display: flex; justify-content: center; align-items: center; position: relative; }
.gb-book-cover-mega { width: auto; aspect-ratio: 3/4; position: relative; box-shadow: 15px 20px 40px rgba(0,0,0,0.2); border-radius: 4px 12px 12px 4px; overflow: hidden; }
.gb-book-cover-mega img { width: 100%; height: 100%; object-fit: cover; }
.badge-terbaru { position: absolute;
    top: 56px;
    right: 0px;
    background: #ea4335;
    color: white;
    padding: 5px 7px;
    font-size: 13px;
    font-weight: 600;
    z-index: 10; }
.badge-kategori {color:white;}
.badge-kategorimobile {display:none; position: absolute; top: 15px; right: -5px; color: white; padding: 5px 12px; font-size: 13px; font-weight: 600; z-index: 10; }

.f-content-box { flex: 1; padding-left: 40px; display: flex; flex-direction: column; justify-content: center; }
.f-title { font-size: 2.2rem; font-weight: 800; color: #202124; margin-bottom: 15px; }
.f-summary { color: #fff; line-height: 1.6; margin-bottom: 25px; }
.f-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-f { padding: 10px 18px; border-radius: 8px; font-weight: 700; display: flex; align-items: center; gap: 8px; cursor: pointer; border: none; font-size: 13px; text-decoration: none; transition: 0.2s; }
/* Base Button */
.btn-read { 
    display: inline-flex;
    align-items: center; 
    justify-content: center;
    padding: 12px 12px;
    border-radius: 8px; /* Kotak sedikit membulat lebih formal daripada bulat sempurna */
    font-weight: 700;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

/* Elegant Theme */
.btn-elegant {
    background: #1B345E; /* Biru Navy khas Ilmiah/Professional */
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(27, 52, 94, 0.2);
}

/* Efek Cahaya Menyapu (Glossy Shine) */
.btn-elegant::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent
    );
    transition: none;
    animation: sweep 4s infinite;
}

/* Animasi Berdenyut Halus pada Shadow */
.btn-elegant {
    animation: elegant-pulse 3s infinite;
}

/* Keyframes */
@keyframes sweep {
    0% { left: -100%; }
    20% { left: 100%; }
    100% { left: 100%; }
}

@keyframes elegant-pulse {
    0% { box-shadow: 0 0 0 0 rgba(27, 52, 94, 0.4); }
    70% { box-shadow: 0 0 0 12px rgba(27, 52, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(27, 52, 94, 0); }
}

/* Hover State */
.btn-elegant:hover {
    background: #25467d;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(27, 52, 94, 0.4);
    letter-spacing: 2px; /* Memberi kesan dinamis saat disentuh */
}

.btn-elegant:active {
    transform: translateY(0);
}

/* Pastikan container tombol mengizinkan elemen di dalamnya "keluar" sedikit saat animasi */
.btn-elegant {
    position: relative;
    overflow: visible !important; /* Diubah dari hidden ke visible supaya teks bisa keluar button */
    z-index: 1;
}

.btn-text {
    display: inline-block;
    font-weight: 800;
    color: #ffffff;
    /* Animasi Zoom yang keluar button */
    animation: elasticZoom 3s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3); /* Agar teks tetap terbaca jelas saat keluar */
}

/* Keyframes Zoom sampai keluar button */
@keyframes elasticZoom {
    0%, 100% { 
        transform: scale(1); 
        filter: brightness(1);
    }
    50% { 
        transform: scale(1.35); /* Nge-zoom 35% lebih besar, biasanya akan menabrak garis button */
        filter: brightness(1.2); /* Sedikit lebih terang saat membesar */
    }
}

/* Hover: Animasi berhenti di posisi paling besar supaya mantap diklik */
.btn-elegant:hover .btn-text {
    animation-play-state: paused;
    transform: scale(1.2);
    transition: transform 0.3s ease;
}

/* Tambahan: Efek bayangan di bawah tombol agar terlihat melayang */
.btn-elegant {
    background: #1B345E;
    transition: all 0.3s ease;
}

.btn-elegant:hover {
    background: #25467d;
    box-shadow: 0 10px 25px rgba(27, 52, 94, 0.5);
    transform: translateY(-3px);
}
.btn-primary { background: #59769c; color: #fff; }
.btn-secondary { background: #f1f3f4; color: #3c4043; }
.btn-outline { background: #afd0f2; border: 1px solid #dadce0; color: #5f6368; }

.modern-search-container { max-width: 600px; margin: 0 auto 30px; padding: 0 15px; }
.modern-search-form { display: flex; background: #fff; border-radius: 50px; border: 1px solid #dfe1e5; padding: 5px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.modern-search-form input { flex: 1; border: none; padding: 10px 20px; outline: none; font-size: 16px; background: transparent; }
.modern-search-btn { background: #537789; border: none; padding: 10px 25px; border-radius: 50px; cursor: pointer; font-weight: 700; }

.tab-scroll-wrapper { display: flex; gap: 10px; margin-bottom: 25px; padding: 0 15px; overflow-x: auto; scrollbar-width: none; }
.tab-trigger.active { background: #e8f0fe !important; border-color: #1a73e8 !important; color: #1a73e8 !important; }

.history-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 25px; padding: 0 15px; }
/* --- ANIMASI DAFTAR ARSIP (IKON SELALU MUNCUL) --- */

/* Wrapper utama item */
.history-item {
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

/* Container Cover */
.history-cover {
    position: relative;
    aspect-ratio: 3/4;
    border-radius: 4px 12px 12px 4px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    background: #f0f0f0;
    transition: all 0.3s ease;
}

/* EFEK HOVER: Cover naik sedikit */
.history-item:hover {
    transform: translateY(-8px);
}

.history-item:hover .history-cover {
    box-shadow: 0 12px 24px rgba(0,0,0,0.25);
}

.history-item:hover .history-cover img {
    transform: scale(1.08);
}

/* EFEK KLIK (ACTIVE): Meresap masuk */
.history-item:active {
    transform: translateY(-2px) scale(0.96);
    transition: transform 0.1s ease;
}

/* Gambar Dasar */
.history-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* TOMBOL AKSI (CART & DOWNLOAD) - SELALU MUNCUL */
.btn-download-arsip, .btn-cart-arsip {
    position: absolute;
    bottom: 8px;
    width: 30px;
    height: 30px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    opacity: 1; /* Pastikan selalu terlihat */
    transform: translateY(0); /* Posisi normal */
    transition: all 0.2s ease;
    z-index: 10;
}

.btn-download-arsip { right: 8px; color: #1a73e8; }
.btn-cart-arsip { right: 45px; color: #59769c; }

/* Reaksi Tombol saat Hover (Efek Perorangan) */
.btn-download-arsip:hover, .btn-cart-arsip:hover {
    transform: scale(1.15);
    background: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.btn-download-arsip:active, .btn-cart-arsip:active {
    transform: scale(0.9);
}

.history-info { display: flex; flex-direction: column; padding-top: 10px; }
.history-title { margin: 0; font-size: 15px; color: #1a73e8; font-weight: 700; }
.history-book-name { color: #202124; margin: 4px 0 6px 0; font-size: 13px; line-height: 1.4; font-weight: 600; min-height: 36px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.history-meta-row {
    display: flex;
    align-items: center;
    gap: 10px; /* Memberikan jarak antar item */
    font-size: 11px;
    color: #64748b;
}

.meta-downloads svg {
    margin-bottom: 1px; /* Penyesuaian posisi ikon agar sejajar teks */
}
.meta-views { font-size: 13px; color: #888; display: flex; align-items: center; gap: 3px; }
.history-rating { display: flex; align-items: center; gap: 3px; cursor: pointer; font-size: 13px; background: #f8f9fa; padding: 2px 6px; border-radius: 4px; }

.btn-download-arsip, .btn-cart-arsip { position: absolute; bottom: 8px; width: 30px; height: 30px; background: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: none; cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.btn-download-arsip { right: 8px; color: #1a73e8; }
.btn-cart-arsip { right: 45px; color: #59769c; }
.badge-cetak-tersedia { position: absolute; top: 8px; left: 8px; background: #166534; color: #fff; font-size: 10px; padding: 2px 8px; border-radius: 4px; font-weight: 700; }

@media (max-width: 850px) {
        .mega-featured-card {
        flex-direction: column;
        height: auto;
        min-height: unset;
        max-height: 450px;
        padding-bottom: 0px;
        border: none !important;
        background: #3c3c3c00;
        /* box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18), 0 20px 45px rgba(8, 22, 73, 0.25); */
    }
    .f-cover-box { height: 380px; margin-bottom: 10px; margin-top:115px}
   .gb-book-cover-mega {
  height: 320px;
  aspect-ratio: 3 / 4;
  position: relative;
  overflow: visible;

  /* OFFSET halus supaya shadow kelihatan */
  transform: translate(1px, 1px);

  box-shadow:
    3px 3px 3px rgba(0,0,0,.9),
    6px 8px 16px rgba(0,0,0,.6),
    12px 12px 18px rgba(0,0,0,.6);
}
.gb-book-cover-mega img {
  height: 320px;
  width: auto;
  object-fit: cover;
  box-sizing: border-box;
  display: block;
}


.modern-search-container {
    max-width: 600px;
    margin: 12px auto 0px;
    padding: 0 15px;
}

.badge-terbaru {
    position: absolute;
    top: 16px;
    right: -10px;
    background: #ea4335;
    color: white;
    padding: 5px 7px;
    font-size: 13px;
    font-weight: 600;
    z-index: 10;
}

    .f-title, .f-summary, .badge-kategori { display: none !important; }
    .f-content-box { padding-left: 0; align-items: center; }
    .f-btns {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        max-width: 245px;
        gap: 8px;
        margin-top: -69px;
        z-index: 3000;
    }
    
    .f-btns2 {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items:center;
        justify-content:center;
        width: 65%;
        gap: 4px;
        margin-top: -85px;
        z-index: 3000;
    }
    .btn-read {
        width: 68%;
        order: -1;
        justify-content: center;
        border-radius: 30px !important;
        padding: 12px;
        margin-bottom: 40px;
        margin-left: 16%;
        margin-right: 16%;
    }
    .btn-primary, .btn-secondary, .btn-outline { flex: 1; padding: 10px 5px; border-radius: 30px; justify-content: center; }
    .btn-2 {
        background-color: #073b6f;
        color: white;
        box-shadow: 0 3px 0 0 #002244;
        border-radius: 14px;
        border: solid 1px #000;
        max-width: 24px;
        padding: 9px 9px 5px 12px;
    }
    .history-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 20px 15px !important; }
}

@media (max-width: 600px) {
    .branding-flex { gap: 15px; }
    .brand-hsi-logo img { height: 60px; }
    .brand-majalah-logo { height: 45px; margin-bottom: -4px; }
    .brand-tagline { font-size: 11px;  font-weight:600;}
    .brand-divider { height: 60px; }
    .header-branding-area {
        padding: 11px 0px;
        display: flex;
        justify-content: center;
        overflow: hidden;
        margin-top: 10px;
        z-index: 100;
        position: sticky;
        top: 0;
        background: white;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
        width: 100%;
        height: 48px;
    }
}

}
/* Struktur Tombol 3D Tipis */
.btn-f {
    display: inline-block;
    padding: 10px 8px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border-radius: 10px; /* Lebih kotak sedikit agar rapi */
    border: 1px solid rgba(0,0,0,0.1); /* Outline halus */
    position: relative;
    transition: all 0.05s ease; /* Transisi lebih cepat agar 'snappy' */
    user-select: none;
}

/* Warna Secondary (Abu-abu) */
.btn-secondary {
    background-color: #073b6f;
    color: white;
    box-shadow: 0 3px 0 0 #002244;
    border-radius: 52px;
    border: solid 1px #000;

}

/* Saat Hover (Sedikit turun) */
.btn-secondary:hover {
    background-color: #8c9899;
    transform: translateY(1px);
    box-shadow: 0 2px 0 0 #666f70;
}

/* Saat Klik (Meresap ke lantai) */
.btn-secondary:active {
    transform: translateY(3px); /* Turun sedalam shadow */
    box-shadow: 0 0 0 0 #666f70;
}

.icon-hsi-cart {
  width: 1.1em;
  height: 1.1em;
  margin-right: .35em;
  vertical-align: -0.15em;

  stroke: currentColor;
  stroke-width: 2.2;          /* TEBAL TAPI SOPAN */
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* Placeholder agar Swiper tidak kosong/putih saat loading */
.featured-area {
    min-height: 400px; /* Sesuaikan dengan tinggi area featured */
    background: linear-gradient(90deg, #0d3b6b 25%, #104c89 50%, #0d3b6b 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    position: relative;
    overflow: hidden;
    
}

/* Animasi mengalir untuk efek loading */
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Mengunci ukuran logo agar tidak jumping */
.brand-hsi-logo, .brand-majalah-logo {
    aspect-ratio: auto; 
    display: inline-block;
}

/* Sembunyikan Swiper Slide yang berantakan sebelum JS aktif */
.myFeaturedSwiper:not(.swiper-initialized) .swiper-slide:not(:first-child) {
    display: none;
}

/* ===== CLS LOCK ===== */

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.featured-area {
    min-height: 450px;
    margin-top: -122px;
}

.swiper,
.swiper-wrapper,
.swiper-slide {
    height: 100%;
}

.search-bar-area {
    min-height: 80px;
}

.pagination-wrapper {
    min-height: 60px;
}

.logo-hsi{
    width:120px;
    aspect-ratio:1/1;
}

.logo-hsi img{
    width:100%;
    height:100%;
    object-fit:contain;
    display:block;
}

/* MOBILE */
@media (max-width:600px){
    .logo-hsi{
        width:60px;
    }
}