/* ═══════════════════════════════════════════════════
   MrHeb — Premium Adult Gallery
   Design: Ultra-dark, gold accents, cinematic feel
   ═══════════════════════════════════════════════════ */

/* ── Google Fonts ─────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@700&display=swap');

/* ── Reset ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Design Tokens ────────────────────────────── */
:root {
  --bg:       #070709;
  --bg2:      #0f0f12;
  --bg3:      #18181d;
  --bg4:      #222228;
  --bg5:      #2c2c34;

  --gold:     #d4a843;
  --gold-lt:  #e8c76a;
  --gold-dim: rgba(212,168,67,.12);
  --gold-glow:rgba(212,168,67,.25);

  --text:     #f0ede8;
  --text2:    #9e9b95;
  --text3:    #58565200;
  --text3v:   #585652;

  --border:   rgba(255,255,255,.07);
  --border2:  rgba(255,255,255,.13);
  --border-gold: rgba(212,168,67,.35);

  --radius:   10px;
  --radius-sm:6px;
  --radius-lg:16px;
  --maxw:     1400px;
  --font:     'Inter', system-ui, sans-serif;
  --font-serif:'Playfair Display', Georgia, serif;

  --nav-h:    64px;
  --shadow-card: 0 2px 16px rgba(0,0,0,.6);
  --shadow-hover:0 8px 40px rgba(0,0,0,.8);
}

/* ── Base ─────────────────────────────────────── */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--gold); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold-lt); }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; }

/* ── Layout ───────────────────────────────────── */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
main  { flex: 1; padding-bottom: 64px; }

/* ═══════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════ */
#site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(7,7,9,.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.nav-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 20px;
}

/* Logo */
.logo {
  display: flex;
  align-items: baseline;
  gap: 1px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-text {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--gold);
  line-height: 1;
  letter-spacing: -.01em;
}
.logo-dot { color: var(--text3v); font-size: 1.6rem; font-family: var(--font-serif); }

/* Nav search */
.nav-search {
  flex: 1;
  max-width: 400px;
  position: relative;
}
.nav-search-input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 9px 38px 9px 16px;
  border-radius: 24px;
  font-size: .875rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s, background .2s;
  appearance: none;
  -webkit-appearance: none;
}
.nav-search-input:focus {
  border-color: var(--gold);
  background: var(--bg2);
}
.nav-search-input::placeholder { color: var(--text3v); }
.nav-search-btn {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  cursor: pointer; color: var(--text3v);
  padding: 4px; line-height: 0;
  transition: color .2s;
}
.nav-search-btn:hover { color: var(--gold); }
.nav-search-btn svg { width: 16px; height: 16px; }

/* Nav links */
.nav-menu {
  display: flex;
  list-style: none;
  gap: 2px;
  flex-shrink: 0;
}
.nav-menu li a {
  display: block;
  color: var(--text2);
  font-size: .85rem;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.nav-menu li a:hover,
.nav-menu li a.active {
  background: var(--bg3);
  color: var(--text);
}
.nav-menu li a.active {
  color: var(--gold);
}

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: none;
  cursor: pointer; padding: 8px;
  flex-shrink: 0;
}
.burger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .28s ease, opacity .28s;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 720px) {
  .burger { display: flex; }
  .nav-menu {
    display: none;
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px 16px 20px;
    gap: 4px;
    z-index: 999;
  }
  .nav-menu.is-open { display: flex; }
  .nav-menu li a { padding: 12px 16px; font-size: .95rem; }
}
@media (max-width: 480px) {
  .nav-search { display: none; }
}

/* ═══════════════════════════════════════════════
   HERO / PAGE HEADER
   ═══════════════════════════════════════════════ */
.page-hdr {
  position: relative;
  padding: 48px 0 36px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.page-hdr::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse 80% 100% at 50% 0%, rgba(212,168,67,.06) 0%, transparent 70%);
  pointer-events: none;
}
.page-hdr-inner { position: relative; }
.page-hdr h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 10px;
}
.page-hdr p {
  color: var(--text2);
  font-size: 1rem;
  max-width: 620px;
  line-height: 1.6;
}
.page-hdr .meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gold-dim);
  border: 1px solid var(--border-gold);
  color: var(--gold);
  font-size: .78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  letter-spacing: .03em;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  color: var(--text3v);
  margin-bottom: 14px;
}
.breadcrumb a { color: var(--text3v); transition: color .2s; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb .sep { color: var(--text3v); opacity: .5; }

/* ═══════════════════════════════════════════════
   HOME HERO BANNER
   ═══════════════════════════════════════════════ */
.hero {
  position: relative;
  padding: 72px 0 60px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 20% 50%, rgba(212,168,67,.05) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 80% 30%, rgba(212,168,67,.04) 0%, transparent 60%);
  pointer-events: none;
}
.hero-inner { position: relative; }
.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero-label::before {
  content: '';
  display: block;
  width: 28px; height: 1px;
  background: var(--gold);
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  max-width: 700px;
  margin-bottom: 18px;
}
.hero h1 em {
  font-style: normal;
  color: var(--gold);
}
.hero p {
  color: var(--text2);
  font-size: 1.05rem;
  max-width: 540px;
  line-height: 1.65;
  margin-bottom: 32px;
}
.hero-stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
.hero-stat-item { text-align: left; }
.hero-stat-item .num {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--gold);
  line-height: 1;
  font-weight: 700;
}
.hero-stat-item .lbl {
  font-size: .75rem;
  color: var(--text3v);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 3px;
}

/* ═══════════════════════════════════════════════
   SECTION DIVIDER
   ═══════════════════════════════════════════════ */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 0 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.section-head h2 {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text3v);
}
.section-head .sh-right {
  font-size: .78rem;
  color: var(--text3v);
}
.section-head .sh-right a {
  color: var(--gold);
  font-size: .78rem;
}

/* ═══════════════════════════════════════════════
   GALLERY CARD GRID (index / galleries)
   ═══════════════════════════════════════════════ */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 48px;
}

.cat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .3s, transform .3s, box-shadow .3s;
  position: relative;
  will-change: transform;
}
.cat-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.cat-card a { display: block; color: inherit; text-decoration: none; }

/* Cover image */
.cat-card .cover {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg3);
  position: relative;
}
.cat-card .cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .45s ease, filter .45s;
  filter: brightness(.92);
}
.cat-card:hover .cover img {
  transform: scale(1.08);
  filter: brightness(1);
}

/* Gradient overlay on cover */
.cat-card .cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7,7,9,.7) 0%, transparent 55%);
  pointer-events: none;
}

/* Count pill */
.count-pill {
  position: absolute;
  bottom: 10px; right: 10px;
  z-index: 2;
  background: rgba(7,7,9,.82);
  backdrop-filter: blur(6px);
  color: var(--gold);
  font-size: .68rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 20px;
  border: 1px solid var(--border-gold);
  letter-spacing: .04em;
}

/* No-image placeholder */
.cover-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--bg5);
}
.cover-ph svg { width: 40px; height: 40px; }

.cat-card .info {
  padding: 12px 13px 14px;
}
.cat-card .info .card-title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 5px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color .2s;
}
.cat-card:hover .info .card-title { color: var(--gold-lt); }
.cat-card .info .card-sub {
  font-size: .74rem;
  color: var(--text3v);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  line-height: 1.4;
}

/* ═══════════════════════════════════════════════
   PHOTO GRID (galeri.php) — Responsive columns
   ═══════════════════════════════════════════════ */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 56px;
}
@media (max-width: 1100px) {
  .photo-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 860px) {
  .photo-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
}
@media (max-width: 560px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 5px; }
}
@media (max-width: 360px) {
  .photo-grid { grid-template-columns: 1fr; gap: 5px; }
}

.photo-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color .22s, box-shadow .22s;
  position: relative;
}
.photo-item:hover {
  border-color: rgba(212,168,67,.4);
  box-shadow: 0 4px 24px rgba(0,0,0,.5);
}

.photo-item .img-wrap {
  overflow: hidden;
  background: var(--bg3);
  position: relative;
  cursor: pointer;
}
.photo-item .img-wrap img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.photo-item:hover .img-wrap img {
  transform: scale(1.06);
}

/* Shimmer for lazy images */
.photo-item .img-wrap img[data-src] {
  background: linear-gradient(
    90deg,
    var(--bg3) 25%,
    var(--bg4) 50%,
    var(--bg3) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Photo number overlay */
.photo-item .img-wrap::before {
  content: attr(data-num);
  position: absolute;
  top: 7px; left: 9px;
  z-index: 2;
  font-size: .65rem;
  color: rgba(255,255,255,.55);
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0,0,0,.8);
  pointer-events: none;
}

.photo-item .caption {
  padding: 7px 9px 9px;
  font-size: .72rem;
  color: var(--text2);
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ═══════════════════════════════════════════════
   SEARCH PAGE
   ═══════════════════════════════════════════════ */
.search-box {
  display: flex;
  gap: 10px;
  max-width: 680px;
  margin: 32px 0 12px;
}
.search-box input {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
  appearance: none;
  -webkit-appearance: none;
}
.search-box input:focus { border-color: var(--gold); }
.search-box input::placeholder { color: var(--text3v); }
.search-box button {
  background: var(--gold);
  color: #0a0805;
  border: none;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .9rem;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s;
  white-space: nowrap;
}
.search-box button:hover { background: var(--gold-lt); }

.search-results-info {
  font-size: .875rem;
  color: var(--text2);
  margin-bottom: 28px;
  padding: 12px 16px;
  background: var(--bg2);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.search-results-info strong { color: var(--gold); }

/* ═══════════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════════ */
.pager {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 0 48px;
}
.pager a,
.pager span {
  display: inline-flex;
  align-items: center; justify-content: center;
  min-width: 40px; height: 40px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  border: 1px solid var(--border);
  color: var(--text2);
  background: var(--bg2);
  transition: border-color .2s, color .2s, background .2s;
}
.pager a:hover {
  border-color: var(--border-gold);
  color: var(--gold);
  background: var(--gold-dim);
}
.pager .current {
  background: var(--gold);
  color: #0a0805;
  border-color: var(--gold);
  font-weight: 700;
}
.pager .dots {
  border: none;
  background: transparent;
  color: var(--text3v);
  min-width: 24px;
}

/* ═══════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════ */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding: 48px 0 40px;
}
@media (max-width: 720px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
}
.footer-brand .logo-text { font-size: 1.35rem; }
.footer-brand p {
  font-size: .82rem;
  color: var(--text3v);
  line-height: 1.6;
  margin-top: 10px;
  max-width: 280px;
}
.footer-col h3 {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text3v);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 9px; }
.footer-col ul li a {
  color: var(--text2);
  font-size: .84rem;
  transition: color .2s;
}
.footer-col ul li a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 18px 0;
  text-align: center;
  font-size: .75rem;
  color: var(--text3v);
  line-height: 1.7;
}

/* ═══════════════════════════════════════════════
   STATIC PAGES (DMCA etc)
   ═══════════════════════════════════════════════ */
.static-page {
  max-width: 820px;
  padding: 48px 0 72px;
}
.static-page h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold);
  margin: 32px 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.static-page p,
.static-page li {
  color: var(--text2);
  font-size: .93rem;
  line-height: 1.75;
  margin-bottom: 10px;
}
.static-page ul { padding-left: 20px; }
.static-page a { color: var(--gold); }

/* ═══════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text3v);
}
.empty-state svg {
  width: 52px; height: 52px;
  margin: 0 auto 16px;
  opacity: .2;
}
.empty-state p { font-size: .95rem; }

/* ═══════════════════════════════════════════════
   BACK TO TOP BUTTON
   ═══════════════════════════════════════════════ */
#back-to-top {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 46px; height: 46px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 50%;
  color: var(--text2);
  font-size: 18px;
  display: flex;
  align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 800;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s, background .2s, color .2s, transform .2s;
  line-height: 1;
}
#back-to-top.visible {
  opacity: 1;
  visibility: visible;
}
#back-to-top:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #0a0805;
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════
   GALLERY DETAIL META BAR
   ═══════════════════════════════════════════════ */
.gallery-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 14px 20px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.gallery-bar .gb-item {
  font-size: .8rem;
  color: var(--text2);
}
.gallery-bar .gb-item strong { color: var(--text); font-weight: 600; }
.gallery-bar .gb-sep {
  width: 1px; height: 16px;
  background: var(--border2);
}

/* ═══════════════════════════════════════════════
   FANCYBOX OVERRIDES
   ═══════════════════════════════════════════════ */
.fancybox__container { --fancybox-bg: rgba(5,5,7,.98); }
.fancybox__caption { font-size: .82rem; color: #ccc; text-align: center; padding: 14px 20px; }

/* ═══════════════════════════════════════════════
   RELATED GALLERIES SECTION
   ═══════════════════════════════════════════════ */
.related-section {
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 0;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE TWEAKS
   ═══════════════════════════════════════════════ */
@media (max-width: 600px) {
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .hero { padding: 44px 0 36px; }
  .hero h1 { font-size: 1.8rem; }
  .hero-stats { gap: 20px; }
  .wrap { padding: 0 14px; }
  .gallery-bar { padding: 12px 14px; }
}

/* Accessibility: skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--gold);
  color: #0a0805;
  padding: 8px 16px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 700;
  font-size: .875rem;
  z-index: 9999;
  transition: top .2s;
}
.skip-link:focus { top: 0; }
