/* ==========================================
   1. VARIABLES & RESET
   ========================================== */
:root {
  --brand: #5746c8;
  --brand-dark: #4032a3;
  --brand-light: #eeeaff;
  --ink: #20213a;
  --muted: #777b91;
  --line: #e9e8f1;
  --surface: #ffffff;
  --bg: #f8f8fc;
  --green: #14866d;
  --shadow: 0 15px 40px rgba(35, 29, 83, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "DM Sans", sans-serif;
  line-height: 1.6;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
}

.wrap {
  width: min(1160px, 91%);
  margin: 0 auto;
}

/* ==========================================
   2. BUTTONS & UI UTILITIES
   ========================================== */
.btn {
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 800;
  transition: transform 0.18s, background 0.18s, box-shadow 0.18s;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: white;
  background: var(--brand);
  box-shadow: 0 6px 15px rgba(87, 70, 200, 0.15);
}

.btn-primary:hover {
  background: var(--brand-dark);
}

.btn-light {
  color: var(--brand);
  background: var(--brand-light);
}

.btn-light:hover {
  background: #e2dcff;
}

.btn-hero {
  color: var(--brand);
  background: white;
  margin-top: 8px;
}

.btn-small {
  padding: 10px 12px;
  font-size: 11px;
}

.full-width {
  width: 100%;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--brand);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.15px;
  text-transform: uppercase;
}

.toast {
  position: fixed;
  z-index: 200;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 15px);
  opacity: 0;
  pointer-events: none;
  max-width: min(90%, 480px);
  padding: 13px 18px;
  border-radius: 10px;
  background: #25223e;
  color: white;
  box-shadow: var(--shadow);
  font-size: 12px;
  transition: 0.25s;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ==========================================
   3. HEADER & NAVIGATION
   ========================================== */
.site-header {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: 76px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 800 19px Manrope, sans-serif;
  white-space: nowrap;
}

.logo i {
  color: var(--brand);
  font-size: 23px;
}

.navlinks {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  margin: 0 auto;
}

.navlinks a {
  color: #666981;
  font-size: 13px;
  font-weight: 700;
}

.navlinks a:hover,
.footer-links a:hover {
  color: var(--brand);
}

.navactions {
  display: flex;
  gap: 9px;
  align-items: center;
}

.ticket-count {
  font-size: 11px;
}

/* ==========================================
   4. HERO SECTION
   ========================================== */
.hero {
  background: radial-gradient(circle at 82% 15%, #7f71e9 0, transparent 28%),
    linear-gradient(125deg, #4635ae, #6b58d8 58%, #8c7ae9);
  color: white;
  padding: 30px 0 45px; /* Kurangi padding dari 70px 0 82px jadi 40px 0 55px */
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 55px;
  align-items: center;
}

.hero .eyebrow {
  color: #e0dcff;
}

.hero h1 {
font: 800 clamp(28px, 3.6vw, 44px) / 1.12 Manrope, sans-serif;
  letter-spacing: -1.2px;
  margin: 14px 0;
}

.hero h1 span {
  color: #d7d0ff;
}

.hero-copy > p {
  max-width: 540px;
  color: #e8e5ff;
  font-size: 15px;
  margin: 0 0 20px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  margin-top: 33px;
}

.hero-stats div {
  display: flex;
  flex-direction: column;
}

.hero-stats strong {
  font: 800 18px Manrope, sans-serif;
}

.hero-stats span {
  color: #ddd8ff;
  font-size: 10px;
}

/* Kontainer Luar yang Membentuk Frame Bingkai Melayang */
.hero-visual {
  height: 350px;
  position: relative;
  border-radius: 24px;
  padding: 10px; /* Jarak bingkai di sekeliling gambar */
  background: rgba(255, 255, 255, 0.15); /* Efek kaca/frame murni */
  backdrop-filter: blur(10px);
}

/* Gambar di Dalam Bingkai */
.hero-visual > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px; /* Lengkungan sudut gambar */
  box-shadow: 0 25px 60px rgba(33, 21, 107, 0.33);
}

.hero-mini {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 17px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.hero-mini strong,
.hero-mini span {
  display: block;
}

.hero-mini strong {
  font: 800 13px Manrope, sans-serif;
}

.hero-mini span {
  color: var(--muted);
  font-size: 10px;
}

.tagline {
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

/* ==========================================
   5. SEARCHBAR & FILTERS
   ========================================== */
.search-wrap {
  position: relative;
  margin-top: -29px;
  z-index: 3;
}

.searchbar {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr auto;
  gap: 12px;
  padding: 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.field {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
}

.field input,
.field select {
  width: 100%;
  min-width: 0;
  padding: 12px 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
}

.field input::placeholder {
  color: #a3a4b4;
}

/* ==========================================
   6. SECTIONS, CATEGORIES & CARDS
   ========================================== */
.section {
  padding-top: 64px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-head h2 {
  font: 800 clamp(25px, 3vw, 32px) / 1.25 Manrope, sans-serif;
  margin: 8px 0 6px;
  letter-spacing: -0.7px;
}

.section-head p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.event-count {
  color: var(--muted);
  font-size: 12px;
  padding-bottom: 5px;
}

.categories {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin: 27px 0;
}

.cat {
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 14px 12px;
  color: var(--ink);
  transition: 0.2s;
}

.cat:hover,
.cat.active {
  border-color: #bcb3ff;
  background: #f0edff;
}

.cat-icon {
  flex: 0 0 39px;
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 16px;
}

.cat strong,
.cat small {
  display: block;
}

.cat strong {
  font-size: 11px;
}

.cat small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

/* Events Grid */
.events {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.event-card {
  min-width: 0;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.event-image-link {
  height: 220px;
  display: block;
  position: relative;
  overflow: hidden;
  background: #f2f0fc; /* Warna pastel terang menyatu dengan tema */
}

.event-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s;
}

.event-card:hover .event-image {
  transform: scale(1.035);
}

.event-badge {
  position: absolute;
  top: 13px;
  left: 13px;
  padding: 6px 10px;
  border-radius: 7px;
  background: white;
  color: var(--brand);
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 4px 12px #201a4b12;
}

.event-body {
  padding: 17px;
}

.event-date {
  color: var(--muted);
  font-size: 10px;
}

.event-date i,
.event-location i {
  color: var(--brand);
  margin-right: 5px;
}

.event-body h3 {
  font: 800 16px / 1.4 Manrope, sans-serif;
  margin: 9px 0;
}

.event-body h3 a:hover {
  color: var(--brand);
}

.event-location {
  color: var(--muted);
  font-size: 11px;
  margin: 0 0 10px;
}

.event-description {
  color: #777b91;
  font-size: 11px;
  line-height: 1.6;
  min-height: 53px;
}

.event-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  margin-top: 12px;
}

.event-bottom small,
.event-bottom strong {
  display: block;
}

.event-bottom small {
  color: var(--muted);
  font-size: 10px;
}

.event-bottom strong {
  color: var(--brand);
  font: 800 15px Manrope, sans-serif;
  margin-top: 3px;
}

.availability {
  color: var(--muted);
  font-size: 10px;
  margin-top: 11px;
}

.empty-state,
.empty-tickets {
  padding: 45px 15px;
  text-align: center;
  color: var(--muted);
}

.empty-state > i,
.empty-tickets > i {
  color: #aaa2e8;
  font-size: 36px;
}

.empty-state h3,
.empty-tickets h3 {
  color: var(--ink);
  margin-bottom: 3px;
}

.empty-state p,
.empty-tickets p {
  font-size: 13px;
}

/* Organizer Banner */
.banner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 32px;
  border-radius: 20px;
  background: linear-gradient(110deg, #eeeaff, #f7f5ff);
  border: 1px solid #e4dfff;
}

.banner > div {
  flex: 1;
}

.banner h2 {
  font: 800 24px Manrope, sans-serif;
  margin: 8px 0;
}

.banner p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.banner-icon {
  color: #b4aaff;
  font-size: 48px;
}

/* ==========================================
   7. DETAIL PAGE STYLES
   ========================================== */
.detail-page {
  padding-top: 24px;
}

.breadcrumbs {
  color: var(--muted);
  font-size: 12px;
  margin: 12px 0 25px;
}

.breadcrumbs a {
  color: var(--brand);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 25px;
  align-items: start;
}

.detail-cover {
  height: 350px;
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #e7e3ff;
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Mengubah dari cover ke contain agar poster tidak terpotong */
  background: #f0edff; /* Latar belakang netral untuk area kosong di kiri-kanan */
}

.detail-card {
  margin-top: 20px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.detail-card h1 {
  font: 800 clamp(27px, 3vw, 36px) / 1.2 Manrope, sans-serif;
  margin: 10px 0 14px;
}

.detail-card > p {
  color: #64677d;
  font-size: 13px;
}

.detail-card h2 {
  font: 800 18px Manrope, sans-serif;
  margin: 25px 0 10px;
}

.detail-meta {
  display: grid;
  gap: 14px;
  padding: 20px 0;
  margin: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.detail-meta > div {
  display: flex;
  gap: 13px;
  align-items: center;
}

.detail-meta > div > i {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border-radius: 11px;
  color: var(--brand);
  background: var(--brand-light);
}

.detail-meta small,
.detail-meta strong {
  display: block;
}

.detail-meta small {
  color: var(--muted);
  font-size: 10px;
}

.detail-meta strong {
  font-size: 12px;
}

.booking-card {
  position: sticky;
  top: 100px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  box-shadow: var(--shadow);
}

.booking-card h2 {
  font: 800 21px Manrope, sans-serif;
  margin: 8px 0 20px;
}

.price-caption {
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 0;
}

.detail-price {
  display: block;
  color: var(--brand);
  font: 800 28px Manrope, sans-serif;
  margin: 4px 0 12px;
}

.back-to-list {
  margin-top: 9px;
}

.related-section {
  padding-bottom: 15px;
}

.related-events {
  margin-top: 20px;
}

/* ==========================================
   8. MODALS & RECEIPTS
   ========================================== */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 22px;
  background: rgba(24, 20, 55, 0.58);
  backdrop-filter: blur(4px);
}

.overlay[hidden] {
  display: none !important;
}

.modal {
  width: min(520px, 100%);
  max-height: min(90vh, 850px);
  overflow-y: auto;
  border-radius: 18px;
  background: white;
  box-shadow: 0 30px 100px #100d2e55;
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: white;
}

.modal-head h2 {
  font: 800 17px Manrope, sans-serif;
  margin: 0;
}

.close {
  width: 33px;
  height: 33px;
  border: 0;
  border-radius: 9px;
  color: #686a80;
  background: #f3f2f9;
  font-size: 21px;
}

.modal-content {
  padding: 22px;
}

.modal-content label {
  display: block;
  margin: 13px 0 6px;
  font-size: 12px;
  font-weight: 700;
}

.modal-content input,
.modal-content select,
.modal-content textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #deddea;
  border-radius: 9px;
  outline: none;
  color: var(--ink);
  background: white;
  font-size: 13px;
}

.modal-content input:focus,
.modal-content select:focus,
.modal-content textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px #5746c81c;
}

.form-intro {
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 16px;
}

.modal-poster {
  display: block;
  width: 100%;
  max-height: 280px; /* Sedikit dipertinggi agar poster lebih jelas */
  object-fit: contain; /* Mengubah cover menjadi contain agar gambar utuh tidak terpotong */
  background: #f0edff; /* Latar netral untuk mengisi area kosong jika poster berbentuk vertikal */
  border-radius: 12px;
  margin-bottom: 15px;
}

.inline-badge {
  position: static;
  display: inline-block;
  margin-bottom: 8px;
}

.modal-event-title {
  font: 800 19px Manrope, sans-serif;
  margin: 7px 0;
}

.modal-meta {
  color: var(--muted);
  font-size: 12px;
  margin: 7px 0;
}

.modal-description {
  color: #595d73;
  font-size: 13px;
  margin: 16px 0;
}

.modal-facts {
  display: flex;
  gap: 40px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 16px 0;
}

.modal-facts small,
.modal-facts strong {
  display: block;
}

.modal-facts small {
  color: var(--muted);
  font-size: 10px;
}

.modal-facts strong {
  color: var(--brand);
}

.map-link {
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.modal-actions > * {
  flex: 1;
}

.total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin: 18px 0;
  padding: 15px;
  background: #f5f3ff;
  border-radius: 10px;
  font-size: 12px;
}

.total strong {
  color: var(--brand);
  font: 800 17px Manrope, sans-serif;
}

.demo-note {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
  margin: 14px 0;
}

/* Receipt & Tickets List */
.receipt-success {
  text-align: center;
}

.receipt-success i {
  color: var(--green);
  font-size: 38px;
}

.receipt-success h3 {
  margin-bottom: 3px;
}

.receipt-success p {
  color: var(--muted);
  font-size: 12px;
}

.receipt-code {
  text-align: center;
  padding: 16px;
  margin: 18px 0;
  border: 1px dashed #b9b0f6;
  border-radius: 12px;
  background: #f6f4ff;
}

.receipt-code small,
.receipt-code strong {
  display: block;
}

.receipt-code small {
  color: var(--muted);
  font-size: 10px;
}

.receipt-code strong {
  color: var(--brand);
  font: 800 24px Manrope, sans-serif;
  letter-spacing: 2px;
}

.receipt-list > div,
.ticket-item-bottom {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.receipt-list span {
  color: var(--muted);
}

.receipt-list strong {
  text-align: right;
  overflow-wrap: anywhere;
}

.ticket-list {
  display: grid;
  gap: 13px;
}

.ticket-item {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.ticket-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 11px;
}

.ticket-item h3 {
  margin: 10px 0;
  font: 800 15px Manrope, sans-serif;
}

.ticket-item p {
  color: var(--muted);
  font-size: 11px;
  margin: 6px 0;
}

.ticket-item-bottom strong {
  color: var(--brand);
}

/* ==========================================
   9. FOOTER
   ========================================== */
footer {
  margin-top: 70px;
  padding: 42px 0 20px;
  background: #211e3b;
  color: #b9b7cb;
}

.footer-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 45px;
}

.footer-logo {
  color: white;
}

.footer-logo i {
  color: #a99cff;
}

.footer-row p {
  max-width: 420px;
  color: #aaa8bf;
  font-size: 12px;
  line-height: 1.8;
}

.footer-row > div > strong {
  color: white;
  font-size: 12px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 13px;
  font-size: 12px;
}

.copyright {
  border-top: 1px solid #ffffff1f;
  margin-top: 28px;
  padding-top: 18px;
  color: #9097ab;
  font-size: 11px;
}

/* ==========================================
   10. MEDIA QUERIES (RESPONSIVE)
   ========================================== */
@media (max-width: 1000px) {
  .nav {
    gap: 15px;
  }
  .navlinks {
    gap: 13px;
  }
  .categories {
    grid-template-columns: repeat(3, 1fr);
  }
  .events {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .searchbar {
    grid-template-columns: 1fr 1fr;
  }
  .searchbar > .btn {
    min-height: 44px;
  }
}

@media (max-width: 720px) {
  .nav {
    flex-wrap: wrap;
    padding: 13px 0;
  }
  .navlinks {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 4px 0;
  }
  .navlinks a {
    white-space: nowrap;
  }
  .navactions {
    margin-left: auto;
  }
  .navactions .btn {
    padding: 10px;
    font-size: 10px;
  }
  .hero {
    padding: 48px 0 65px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .hero h1 {
    font-size: 37px;
  }
  .hero-visual {
    height: 260px;
  }
  .hero-stats {
    gap: 18px;
  }
  .searchbar {
    grid-template-columns: 1fr;
  }
  .categories {
    grid-template-columns: 1fr 1fr;
  }
  .events {
    grid-template-columns: 1fr;
  }
  .section {
    padding-top: 45px;
  }
  .banner {
    flex-wrap: wrap;
    padding: 23px;
  }
  .banner-icon {
    display: none;
  }
  .banner > button {
    width: 100%;
  }
  .footer-row {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .booking-card {
    position: static;
    grid-row: 1;
  }
  .detail-cover {
    height: 245px;
  }
  .detail-card {
    padding: 20px;
  }
}

@media (max-width: 390px) {
  .categories {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 32px;
  }
  .hero-mini {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 12px;
  }
  .tagline {
    display: none;
  }
}
