/* ──────────── GOOGLE FONTS ──────────── */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700;900&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,400&display=swap');

/* ──────────── ROOT VARIABLES ──────────── */
:root {
  --brown-darkest: #1a0f08;
  --brown-dark: #2c1810;
  --brown-mid: #3d2415;
  --gold-mid: #c9a227;
  --gold-bright: #f0c040;
  --gold-shine: #fde68a;
  --cream: #f5e6c8;
}

/* ──────────── RESET & BASE ──────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  width: 100%;
}

body {
  min-height: 100dvh;
  background: var(--brown-darkest);
  font-family: 'Cormorant Garamond', serif;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* OPTIMASI: Background static tanpa filter */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('asset/18_Background_Sampurasun_jpg.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.35;
  z-index: -2;
  will-change: auto;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(26,15,8,0.3) 0%, rgba(26,15,8,0.95) 100%);
  z-index: -1;
}

/* ──────────── PARTICLE CANVAS ──────────── */
#particle-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ──────────── WRAPPER ──────────── */
.page-wrapper {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100dvh;
  padding: max(12px, env(safe-area-inset-top)) 16px max(12px, env(safe-area-inset-bottom)) 16px;
}

/* ──────────── CARD ──────────── */
.card {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: auto;
  max-height: 780px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(240, 192, 64, 0.35);
  background: rgba(44, 24, 16, 0.45);
  backdrop-filter: blur(2px);
}

/* Card background layers */
.card-bg {
  position: absolute;
  inset: 0;
  background-image: url('asset/18_Background_Sampurasun_jpg.jpeg');
  background-size: cover;
  background-position: center;
  opacity: 0.4;
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(26, 15, 8, 0.7) 0%,
    rgba(26, 15, 8, 0.2) 30%,
    rgba(26, 15, 8, 0.3) 60%,
    rgba(26, 15, 8, 0.85) 100%
  );
}

.card-frame {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(201, 162, 39, 0.5);
  border-radius: 20px;
  pointer-events: none;
}

.card-frame::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 0.5px solid rgba(201, 162, 39, 0.25);
  border-radius: 16px;
}

/* ──────────── CORNERS ──────────── */
.corner {
  position: absolute;
  width: 34px;
  height: 34px;
  pointer-events: none;
  z-index: 10;
  color: var(--gold-mid);
}

.corner.tl { top: 12px; left: 12px; }
.corner.tr { top: 12px; right: 12px; transform: scaleX(-1); }
.corner.bl { bottom: 12px; left: 12px; transform: scaleY(-1); }
.corner.br { bottom: 12px; right: 12px; transform: scale(-1, -1); }

.corner svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 2px rgba(240, 192, 64, 0.5));
}

/* ──────────── CARD CONTENT ──────────── */
.card-content {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 20px 24px;
  gap: 8px;
  overflow-y: auto;
  max-height: 100%;
  scrollbar-width: none;
}

.card-content::-webkit-scrollbar {
  display: none;
}

/* ──────────── LOGO ──────────── */
.header {
  flex-shrink: 0;
  text-align: center;
  margin-bottom: 4px;
}

.logo-img-custom {
  max-width: 160px;
  max-height: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(201, 162, 39, 0.5));
}

/* ──────────── DIVIDER ──────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  flex-shrink: 0;
  margin: 4px 0;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-mid), transparent);
}

.divider-diamond {
  width: 6px;
  height: 6px;
  background: var(--gold-mid);
  transform: rotate(45deg);
  box-shadow: 0 0 4px var(--gold-bright);
}

/* ──────────── WILUJENG SUMPING ──────────── */
.wilujeng-wrap {
  flex-shrink: 0;
  text-align: center;
  margin: 2px 0;
}

.wilujeng-text {
  font-style: italic;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--gold-shine);
  text-shadow: 0 0 8px rgba(240, 192, 64, 0.5);
}

/* ──────────── BUTTONS ──────────── */
.buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin: 8px 0;
}

.link-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 60px;
  border: 1px solid rgba(201, 162, 64, 0.4);
  background: linear-gradient(135deg, rgba(44, 24, 16, 0.95) 0%, rgba(61, 36, 21, 0.9) 100%);
  cursor: pointer;
  text-decoration: none;
  color: var(--cream);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
}

.link-btn:active {
  transform: scale(0.98);
  background: linear-gradient(135deg, rgba(61, 36, 21, 0.95) 0%, rgba(44, 24, 16, 0.9) 100%);
}

.link-btn:hover {
  border-color: rgba(240, 192, 64, 0.7);
  color: var(--gold-shine);
}

/* Button Icons */
.btn-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.icon-tiktok {
  background: #000000 !important;
}

.icon-web {
  background: rgba(240, 192, 64, 0.15) !important;
}

.icon-news {
  background: rgba(255, 140, 0, 0.15) !important;
}

.icon-menu {
  background: rgba(220, 60, 40, 0.15) !important;
}

.icon-wa {
  background: rgba(37, 211, 102, 0.15) !important;
}

.btn-icon svg {
  width: 22px;
  height: 22px;
}

/* Button Text */
.btn-text {
  flex: 1;
  text-align: left;
  min-width: 0;
}

.btn-label {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--cream);
  line-height: 1.3;
  letter-spacing: 0.5px;
}

.btn-desc {
  display: block;
  font-size: 11px;
  opacity: 0.6;
  font-style: italic;
  color: var(--cream);
  margin-top: 2px;
  letter-spacing: 0.3px;
}

.btn-arrow {
  font-size: 20px;
  font-weight: 300;
  opacity: 0.5;
  color: var(--gold-mid);
  flex-shrink: 0;
}

/* ──────────── FOOTER ──────────── */
.footer {
  flex-shrink: 0;
  padding-top: 12px;
  text-align: center;
}

.halal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 30px;
  border: 0.5px solid rgba(201, 162, 39, 0.35);
  background: rgba(44, 24, 16, 0.6);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--gold-mid);
  text-transform: uppercase;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

/* ──────────── POPUP ──────────── */
.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.popup-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.popup-box {
  background: linear-gradient(145deg, #2c1810, #1a0f08);
  border: 1px solid rgba(201, 162, 39, 0.5);
  border-radius: 24px;
  padding: 28px 20px 24px;
  width: min(380px, 100%);
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  position: relative;
}

.popup-box::-webkit-scrollbar {
  display: none;
}

.popup-title {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 16px;
  color: var(--gold-bright);
  text-align: center;
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.popup-sub {
  font-size: 12px;
  color: var(--cream);
  opacity: 0.6;
  text-align: center;
  font-style: italic;
  margin-bottom: 16px;
}

.popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(201, 162, 39, 0.3);
  color: var(--gold-mid);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.popup-close:active {
  background: rgba(201, 162, 39, 0.2);
  transform: scale(0.95);
}

/* Branch List */
.branch-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.branch-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(201, 162, 39, 0.2);
  text-decoration: none;
  color: var(--cream);
  transition: all 0.2s;
}

.branch-item:active {
  background: rgba(201, 162, 39, 0.1);
  border-color: rgba(201, 162, 39, 0.5);
  transform: scale(0.98);
}

.branch-icon {
  width: 40px;
  height: 40px;
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.branch-icon svg {
  width: 20px;
  height: 20px;
  fill: #25D366;
}

.branch-info {
  flex: 1;
}

.branch-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-shine);
  margin-bottom: 3px;
}

.branch-number {
  font-size: 11px;
  opacity: 0.6;
  color: var(--cream);
}

.branch-arrow {
  font-size: 18px;
  color: var(--gold-mid);
  opacity: 0.5;
}

/* ──────────── RESPONSIVE ADJUSTMENTS ──────────── */
@media (max-width: 480px) {
  .card-content {
    padding: 20px 16px 18px;
    gap: 6px;
  }
  
  .logo-img-custom {
    max-width: 130px;
    max-height: 65px;
  }
  
  .wilujeng-text {
    font-size: 17px;
  }
  
  .link-btn {
    padding: 12px 16px;
    gap: 12px;
  }
  
  .btn-icon {
    width: 40px;
    height: 40px;
  }
  
  .btn-icon svg {
    width: 20px;
    height: 20px;
  }
  
  .btn-label {
    font-size: 14px;
  }
  
  .btn-desc {
    font-size: 10px;
  }
  
  .btn-arrow {
    font-size: 18px;
  }
  
  .corner {
    width: 28px;
    height: 28px;
  }
  
  .corner.tl { top: 8px; left: 8px; }
  .corner.tr { top: 8px; right: 8px; }
  .corner.bl { bottom: 8px; left: 8px; }
  .corner.br { bottom: 8px; right: 8px; }
}

@media (max-height: 700px) {
  .card-content {
    padding: 16px 16px 14px;
    gap: 4px;
  }
  
  .logo-img-custom {
    max-width: 110px;
    max-height: 55px;
  }
  
  .buttons {
    gap: 8px;
    margin: 4px 0;
  }
  
  .link-btn {
    padding: 10px 14px;
  }
  
  .btn-icon {
    width: 36px;
    height: 36px;
  }
  
  .footer {
    padding-top: 6px;
  }
}