/* =============================================
   GLOBAL STYLES
   Catatan (Bahasa Indonesia):
   Seluruh styling dibuat sederhana dan mudah
   dipelihara. Background putih, tipografi bersih,
   dan layout responsif untuk desktop & mobile.
   ============================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background-color: #ffffff;
  color: #111827;
}

/* Gunakan flex column agar footer selalu di bawah */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
  border-bottom: 1px solid #e5e7eb;
  padding: 16px 20px;
  background-color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo-title h1 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
}

.logo-title h1 span {
  font-variant-numeric: tabular-nums;
}

.tagline {
  margin: 4px 0 0 0;
  font-size: 0.9rem;
  color: #6b7280;
}

/* =============================================
   MAIN LAYOUT
   ============================================= */
.main-wrapper {
  flex: 1;
  padding: 24px 16px 40px;
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

/* Dua kolom jika lebar cukup (termasuk mobile landscape) */
@media (min-width: 720px) and (orientation: landscape) {
  .main-wrapper {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    align-items: stretch;
  }

  .ad-card {
    grid-column: 1 / -1;
  }
}

/* Juga dua kolom untuk layar desktop besar */
@media (min-width: 960px) {
  .main-wrapper {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    align-items: start;
  }

  .ad-card {
    grid-column: 1 / -1;
  }
}

/* =============================================
   KARTU (Time, Location, Ad)
   ============================================= */
.time-card,
.location-card,
.ad-card {
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  padding: 20px 20px 24px;
  background-color: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.section-title {
  margin: 0 0 12px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
}

/* =============================================
   TIME DISPLAY
   ============================================= */
.date-display {
  margin: 0;
  font-size: 1rem;
  color: #4b5563;
}

/* Waktu dibuat sangat besar agar fungsi web ter-highlight */
.time-display {
  margin: 4px 0 0 0;
  font-size: clamp(3rem, 10vw, 5rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: left;
}

.timezone-display {
  margin: 10px 0 0 0;
  font-size: 0.95rem;
  color: #6b7280;
}

/* =============================================
   LOCATION INFO GRID
   ============================================= */
.info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-top: 8px;
}

/* Dua kolom di layar lebih lebar */
@media (min-width: 640px) {
  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.info-item {
  padding: 8px 10px;
  border-radius: 10px;
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
}

.info-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
}

.info-value {
  display: block;
  margin-top: 2px;
  font-size: 0.95rem;
  color: #111827;
}

.helper-text {
  margin-top: 12px;
  font-size: 0.85rem;
  color: #6b7280;
}

/* =============================================
   AD CARD
   ============================================= */
.ad-placeholder {
  border-radius: 12px;
  border: 1px dashed #d1d5db;
  padding: 16px;
  text-align: left;
  background-color: #f9fafb;
}

.ad-label {
  margin: 0 0 4px 0;
  font-weight: 600;
  font-size: 0.95rem;
}

.ad-desc {
  margin: 0;
  font-size: 0.85rem;
  color: #4b5563;
}

/* =============================================
   AD POPUP MODAL
   ============================================= */
.ad-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.ad-modal.show {
  display: flex;
}

.ad-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.ad-modal-content {
  position: relative;
  z-index: 51;
  max-width: 420px;
  width: calc(100% - 32px);
  background: #ffffff;
  border-radius: 16px;
  padding: 20px 20px 16px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.3);
}

.ad-modal-content h2 {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
}

.ad-modal-content p {
  margin: 4px 0;
  font-size: 0.9rem;
  color: #374151;
}

.ad-small-note {
  font-size: 0.8rem;
  color: #6b7280;
}

.ad-modal-close {
  position: absolute;
  right: 12px;
  top: 10px;
  border: none;
  background: transparent;
  font-size: 1.3rem;
  cursor: pointer;
  color: #6b7280;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  border-top: 1px solid #e5e7eb;
  padding: 12px 16px;
  font-size: 0.85rem;
  color: #6b7280;
  text-align: center;
}
