:root {
    --hitam: #0f0f0f;
    --putih: #ffffff;
    --merah: #7a0c0c;
    --kuning: #d4af37;
}

/* RESET */
body {
    margin: 0;
    font-family: "Segoe UI", sans-serif;
}

/* CONTAINER */
.container {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

/* ========================= */
/* HEADER */
/* ========================= */

.header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(15,15,15,0.85);
    backdrop-filter: blur(10px);
    color: var(--putih);
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(15,15,15,0.95);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo img {
    height: 35px;
    filter: brightness(1.5) contrast(1.2);
    transition: 0.3s;
}

.logo img:hover {
    transform: scale(1.05);
}

/* NAV */
.nav a {
    color: var(--putih);
    margin-left: 25px;
    text-decoration: none;
    position: relative;
    font-weight: 500;
}

.nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0%;
    height: 2px;
    background: var(--kuning);
    transition: 0.3s;
}

.nav a:hover::after,
.nav a.active::after {
    width: 100%;
}

.nav a.active {
    color: var(--kuning);
}

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

.hero {
    position: relative;
    height: 590px;
    margin-top: 55px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), rgba(0,0,0,0.85));
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--putih);
}

.hero-title {
    font-size: 3.5rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

/* BUTTON */

.hero-btns {
    margin-top: 70px;

    display: flex;
    justify-content: center;
    gap: 30px; /* ⬅️ ini yang atur jarak antar tombol */
    flex-wrap: wrap;
}

.btn {
    display: inline-block; /* ⬅️ WAJIB */
    position: relative;

    color: var(--kuning);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 1px;

    padding-bottom: 5px; /* kasih ruang garis */
}

/* garis bawah */
.btn::after {
    content: "";
    position: absolute;

    left: 50%;              /* ⬅️ kunci center */
    bottom: 0;
    transform: translateX(-50%);

    width: 0%;
    height: 2px;
    background: var(--kuning);

    transition: 0.3s ease;
}

/* hover */
.btn:hover::after {
    width: 100%;
}

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

.section {
    padding: 80px 20px;
    text-align: center;
}

.section h1 {
    margin-bottom: 30px;
}

/* ========================= */
/* TOMBOL KEMBALI */
/* ========================= */

.back-btn {
    display: inline-block;
    margin-bottom: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    color: #333;
    transition: 0.3s;
}

.back-btn:hover {
    color: var(--kuning);
}

/* ========================= */
/* FILTER KATEGORI */
/* ========================= */

.gallery-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 30px 0 40px;
    position: sticky;
    top: 70px; /* sesuaikan dengan tinggi header kamu */
    z-index: 10;

    background: #fff;
    padding: 10px 0;
    margin-bottom: 40px;

    border-bottom: 1px solid #eee;
}

/* tombol */
.filter-btn {
    padding: 8px 16px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;

    background: #f5f5f5;
    color: #333;

    transition: all 0.25s ease;
}

/* 🔥 HOVER PREMIUM */
.filter-btn:hover {
    background: var(--kuning);
    color: #000;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

/* ACTIVE */
.filter-btn.active {
    background: var(--kuning);
    color: #000;
    font-weight: 600;
}


/* ========================= */
/* GRID GALERI */
/* ========================= */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 360px));
    gap: 35px;
    justify-content: center;
}

/* 🔥 LOAD MORE ANIMATION */
.load-item {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.load-item[style*="display: none"] {
    opacity: 0;
    transform: translateY(10px);
}

/* ========================= */
/* RELATED POSTS (FIX RATIO) */
/* ========================= */

.related-posts .gallery-image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
}

.related-posts .gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 🔥 ini kunci biar gak gepeng */
}

/* CARD */
.gallery-card {
    display: block;
    text-decoration: none;
    color: #000; /* ⬅️ ini penting */
}

.gallery-card:hover {
    transform: translateY(-6px);
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; /* ⬅️ penting */
    aspect-ratio: 4/3;
    transition: 0.4s ease;
}

.gallery-image {
    overflow: hidden;
    border-radius: 12px;
    background: #000;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4/3;
    transition: 0.4s ease;
}

.gallery-card:hover img {
    transform: scale(1.04);
}

.gallery-card:hover h3 {
    color: var(--kuning);
}

.gallery-info {
    margin-top: 10px;
    text-align: right;
    background: none; /* pastikan tidak ada bg */
}

.gallery-info h3 {
    font-size: 0.85rem;   /* lebih kecil & elegan */
    font-weight: 500;
    line-height: 1.3;
    margin: 0;
    transition: 0.3s;
}

.gallery-card:hover .gallery-info h3 {
    color: var(--kuning);
}

/* ========================= */
/* DETAIL PAGE */
/* ========================= */

.gallery-detail {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px; /* 🔥 lebih rapat & elegan */
    align-items: start;
}

.gallery-image img {
    width: 100%;
    max-height: 600px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.gallery-info {
    text-align: left;
    padding-top: 10px;
}

.gallery-info h1 {
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 25px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.gallery-info h1:hover {
    color: var(--kuning);
    transition: 0.3s;
}

.gallery-info h3 {
    opacity: 0.85;
    transition: 0.3s;
}

.gallery-card:hover .gallery-info h3 {
    opacity: 1;
    color: var(--kuning);
}

.gallery-info p {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 6px 0;
    font-size: 0.9rem;
    color: #555;
}

.gallery-info p strong {
    min-width: 160px;
    color: #000;
    font-weight: 600;
}

.gallery-info div {
    margin-top: 25px;
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
    max-width: 500px;
}

/* SHARE */
.gallery-share {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.gallery-share span {
    display: block;
    margin-bottom: 10px;
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: #777;
}

.gallery-share a {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    margin-right: 8px;
    padding: 6px 12px;

    border-radius: 20px;
    text-decoration: none;

    background: #f5f5f5;
    color: #333;

    font-size: 0.8rem;
    font-weight: 500;

    transition: all 0.25s ease;
}

.gallery-share a:hover {
    background: var(--kuning);
    color: #000;

    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* ========================= */
/* FOOTER */
/* ========================= */

.footer {
    text-align: center;
    padding: 20px 10px; /* 🔥 lebih kecil */
    background: var(--hitam);
    color: var(--putih);
    font-size: 0.85rem; /* 🔥 lebih compact */
    line-height: 1.6;
}

.footer p {
    margin: 4px 0; /* 🔥 rapatkan antar baris */
}

.footer a {
    color: var(--kuning);
    text-decoration: none;
    font-size: 0.8rem;
    opacity: 0.85;
}

.footer a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* SEMBUNYIKAN DI DESKTOP */
#menu-toggle {
    display: none;
}

.menu-icon {
    display: none;
}

/* ========================= */
/* MOBILE */
/* ========================= */

@media (max-width: 768px) {

.menu-icon {
    display: block;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--putih);
}

/* NAV MOBILE DEFAULT (tertutup) */
.nav {
    position: absolute;
    top: 60px;
    right: 0;
    width: 100%;

    background: rgba(15,15,15,0.95);
    backdrop-filter: blur(10px);

    display: flex;
    flex-direction: column;
    align-items: center;

    max-height: 0;
    overflow: hidden;

    transition: 0.3s ease;
}

/* SAAT DIBUKA */
#menu-toggle:checked ~ .nav {
    max-height: 300px;
}

    .gallery-detail {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .hero {
        height: auto;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }
}

/* LIGHTBOX */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
}

.lightbox-content {
    display: block;
    margin: auto;
    max-width: 90%;
    max-height: 80vh;
    border-radius: 10px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 35px;
    cursor: pointer;
}

/* ========================= */
/* FIX GAMBAR DETAIL (NO CROP) */
/* ========================= */

.gallery-detail .gallery-image {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 12px;
}

.gallery-detail .gallery-image img {
    width: 100%;
    height: auto;
    max-height: 75vh;

    object-fit: contain; /* 🔥 kunci utama */

    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);

    cursor: zoom-in;
    transition: 0.3s ease;
}

/* hover halus */
.gallery-detail .gallery-image img:hover {
    transform: scale(1.01);
}

/* ========================= */
/* RELATED POSTS */
/* ========================= */

.related-section {
    margin-top: 80px;
    text-align: left;
}

.related-section h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 25px;
    position: relative;
}

.related-section h2::after {
    content: "";
    width: 50px;
    height: 2px;
    background: var(--kuning);
    display: block;
    margin-top: 8px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.related-card {
    text-decoration: none;
    color: #000;
    transition: 0.3s ease;
}

.related-image {
    overflow: hidden;
    border-radius: 10px;
    background: #000;
}

.related-image img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    transition: 0.3s ease;
}

.related-title {
    font-size: 0.85rem;
    margin-top: 8px;
    line-height: 1.4;
}

.related-card:hover img {
    transform: scale(1.05);
}

.related-card:hover .related-title {
    color: var(--kuning);
}

/* ========================= */
/* PAGE CONTENT (ABOUT, PRIVACY) */
/* ========================= */

.page-content {
    max-width: 720px;
    margin: 0 auto;
    text-align: left;

    font-size: 1rem;
    line-height: 1.9;
    color: #444;
}

.page-content p {
    margin-bottom: 14px;
}

.page-content h1 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.page-content h2 {
    font-size: 1.3rem;
    margin-top: 35px;
    margin-bottom: 15px;
}

.page-content h3 {
    font-size: 1.1rem;
    margin-top: 20px;
    margin-bottom: 3px; /* 🔥 diperkecil */
    font-weight: 600;
    color: #000;
}

.page-content h3 + p {
    margin-top: 0; /* 🔥 hapus jarak tambahan dari paragraf */
}

.page-content a {
    color: var(--kuning);
    text-decoration: none;
}

.page-content a:hover {
    text-decoration: underline;
}
