/**
 * Hann Resorts - theme stylesheet
 * All custom classes use the pg47- prefix per project spec.
 * Mobile-first design with a 430px content ceiling.
 * Palette: #1E90FF (primary) | #40E0D0 (accent) | #0C0C0C (bg) | #D3D3D3 (text) | #A9A9A9 (muted)
 */

:root {
  --pg47-primary: #1E90FF;
  --pg47-accent: #40E0D0;
  --pg47-bg: #0C0C0C;
  --pg47-bg-alt: #14181f;
  --pg47-bg-card: #1a1f29;
  --pg47-text: #D3D3D3;
  --pg47-text-strong: #ffffff;
  --pg47-muted: #A9A9A9;
  --pg47-border: #2a3140;
  --pg47-gold: #ffd76b;
  --pg47-radius: 1.2rem;
  --pg47-shadow: 0 0.4rem 1.6rem rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html {
  font-size: 62.5%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Roboto, Arial, sans-serif;
  background: var(--pg47-bg);
  color: var(--pg47-text);
  line-height: 1.5rem;
  font-size: 1.4rem;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: var(--pg47-accent); text-decoration: none; }
a:hover { color: var(--pg47-primary); }

h1, h2, h3, h4 { color: var(--pg47-text-strong); line-height: 1.6rem; margin: 0 0 1rem; }
h1 { font-size: 2.2rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.6rem; }

.pg47-wrapper {
  max-width: 430px;
  margin: 0 auto;
  position: relative;
  min-height: 100vh;
}

/* ---------- Header ---------- */
.pg47-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #0b1622 0%, #11203a 100%);
  border-bottom: 0.1rem solid var(--pg47-border);
  padding: 0.8rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.pg47-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}
.pg47-brand img {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 0.6rem;
  object-fit: cover;
}
.pg47-brand-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--pg47-text-strong);
  white-space: nowrap;
}
.pg47-brand-name span { color: var(--pg47-accent); }

.pg47-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.pg47-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 3.6rem;
  padding: 0 1.2rem;
  border: none;
  border-radius: 2rem;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-decoration: none;
  line-height: 1;
}
.pg47-btn:active { transform: scale(0.96); }
.pg47-btn-login {
  background: transparent;
  color: var(--pg47-text);
  border: 0.1rem solid var(--pg47-border);
}
.pg47-btn-register {
  background: linear-gradient(135deg, var(--pg47-primary), var(--pg47-accent));
  color: #062018;
  box-shadow: 0 0.4rem 1rem rgba(30, 144, 255, 0.35);
}
.pg47-btn-cta {
  background: linear-gradient(135deg, var(--pg47-gold), #ff9d3a);
  color: #2a1500;
  width: 100%;
  padding: 1.2rem;
  font-size: 1.5rem;
}

#pg47-menu-toggle {
  background: transparent;
  border: 0.1rem solid var(--pg47-border);
  color: var(--pg47-text-strong);
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 0.8rem;
  font-size: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ---------- Mobile menu ---------- */
.pg47-mobile-menu {
  display: none;
  background: var(--pg47-bg-alt);
  border-bottom: 0.1rem solid var(--pg47-border);
  padding: 1rem 1.2rem 1.4rem;
}
.pg47-mobile-menu.pg47-menu-open { display: block; }
.pg47-mobile-menu a {
  display: block;
  padding: 1rem 0.8rem;
  border-bottom: 0.1rem dashed var(--pg47-border);
  color: var(--pg47-text);
  font-weight: 600;
}
.pg47-mobile-menu a:last-child { border-bottom: none; }

/* ---------- Hero / Carousel ---------- */
.pg47-carousel {
  position: relative;
  margin: 1rem;
  border-radius: var(--pg47-radius);
  overflow: hidden;
  box-shadow: var(--pg47-shadow);
}
.pg47-slides { position: relative; }
.pg47-slide {
  display: none;
  position: relative;
  cursor: pointer;
}
.pg47-slide img {
  width: 100%;
  height: 18rem;
  object-fit: cover;
}
.pg47-slide-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.2rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  color: var(--pg47-text-strong);
}
.pg47-slide-overlay h3 { margin: 0 0 0.4rem; font-size: 1.5rem; }
.pg47-slide-overlay p { margin: 0; font-size: 1.2rem; color: var(--pg47-text); }
.pg47-slide-active { display: block; }
.pg47-dots {
  position: absolute;
  bottom: 0.8rem;
  right: 1rem;
  display: flex;
  gap: 0.4rem;
}
.pg47-dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
}
.pg47-dot-active { background: var(--pg47-accent); }

/* ---------- Sections ---------- */
.pg47-section {
  padding: 1.6rem 1rem;
}
.pg47-section-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.7rem;
  margin-bottom: 1.2rem;
  color: var(--pg47-text-strong);
}
.pg47-section-title i { color: var(--pg47-accent); }
.pg47-section-title .pg47-link {
  margin-left: auto;
  font-size: 1.2rem;
  color: var(--pg47-primary);
  font-weight: 600;
}

/* ---------- Game grid ---------- */
.pg47-chips {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 0.4rem 0 1rem;
  -webkit-overflow-scrolling: touch;
}
.pg47-chip {
  flex: 0 0 auto;
  padding: 0.7rem 1.2rem;
  border-radius: 2rem;
  background: var(--pg47-bg-card);
  color: var(--pg47-text);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  border: 0.1rem solid var(--pg47-border);
}
.pg47-chip-active {
  background: linear-gradient(135deg, var(--pg47-primary), var(--pg47-accent));
  color: #06201a;
  border-color: transparent;
}

.pg47-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}
.pg47-game {
  background: var(--pg47-bg-card);
  border-radius: 0.8rem;
  overflow: hidden;
  border: 0.1rem solid var(--pg47-border);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
  text-align: center;
}
.pg47-game:hover, .pg47-game:focus {
  transform: translateY(-0.2rem);
  border-color: var(--pg47-accent);
}
.pg47-game img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.pg47-game-name {
  font-size: 1.1rem;
  padding: 0.5rem 0.4rem;
  color: var(--pg47-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Cards ---------- */
.pg47-card {
  background: var(--pg47-bg-card);
  border-radius: var(--pg47-radius);
  padding: 1.4rem;
  margin-bottom: 1rem;
  border: 0.1rem solid var(--pg47-border);
  box-shadow: var(--pg47-shadow);
}
.pg47-card h3 { color: var(--pg47-accent); margin-bottom: 0.6rem; }
.pg47-card p { margin: 0 0 0.6rem; }

.pg47-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}
.pg47-feature {
  background: var(--pg47-bg-alt);
  border-radius: 0.8rem;
  padding: 1rem;
  text-align: center;
  border: 0.1rem solid var(--pg47-border);
}
.pg47-feature i { font-size: 2.2rem; color: var(--pg47-primary); }
.pg47-feature h4 { margin: 0.6rem 0 0.2rem; font-size: 1.3rem; }
.pg47-feature p { margin: 0; font-size: 1.1rem; color: var(--pg47-muted); }

/* ---------- RTP / stats ---------- */
.pg47-rtp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 0.1rem dashed var(--pg47-border);
}
.pg47-rtp-row:last-child { border-bottom: none; }
.pg47-rtp-bar {
  flex: 1;
  height: 0.7rem;
  background: var(--pg47-bg-alt);
  border-radius: 1rem;
  margin: 0 0.8rem;
  overflow: hidden;
}
.pg47-rtp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pg47-primary), var(--pg47-accent));
}
.pg47-rtp-pct { color: var(--pg47-gold); font-weight: 700; font-size: 1.2rem; }

/* ---------- Testimonials ---------- */
.pg47-testimonial {
  background: var(--pg47-bg-alt);
  border-left: 0.3rem solid var(--pg47-accent);
  border-radius: 0.6rem;
  padding: 1rem;
  margin-bottom: 0.8rem;
}
.pg47-testimonial-stars { color: var(--pg47-gold); font-size: 1.1rem; }
.pg47-testimonial cite {
  display: block;
  margin-top: 0.4rem;
  color: var(--pg47-muted);
  font-style: normal;
  font-size: 1.1rem;
}

/* ---------- Winners / payments ---------- */
.pg47-winners {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pg47-winners li {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 0.1rem dashed var(--pg47-border);
  font-size: 1.2rem;
}
.pg47-winners li:last-child { border-bottom: none; }
.pg47-winners .pg47-amount { color: var(--pg47-gold); font-weight: 700; }

.pg47-pay-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  text-align: center;
}
.pg47-pay {
  background: var(--pg47-bg-alt);
  padding: 0.8rem 0.4rem;
  border-radius: 0.6rem;
  border: 0.1rem solid var(--pg47-border);
}
.pg47-pay i { font-size: 2rem; color: var(--pg47-accent); }
.pg47-pay span { display: block; font-size: 1rem; margin-top: 0.3rem; color: var(--pg47-muted); }

/* ---------- App CTA ---------- */
.pg47-app-cta {
  background: linear-gradient(135deg, #10203a, #0a2a2a);
  border-radius: var(--pg47-radius);
  padding: 1.6rem;
  text-align: center;
  border: 0.1rem solid var(--pg47-border);
}
.pg47-app-cta h3 { color: var(--pg47-text-strong); }
.pg47-app-cta .pg47-btn { margin: 0.6rem auto; }

/* ---------- Reveal animation ---------- */
.pg47-reveal {
  opacity: 0;
  transform: translateY(1.2rem);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.pg47-revealed { opacity: 1; transform: none; }

/* ---------- Footer ---------- */
.pg47-footer {
  background: var(--pg47-bg-alt);
  border-top: 0.1rem solid var(--pg47-border);
  padding: 1.6rem 1rem 8rem;
  margin-top: 2rem;
  font-size: 1.2rem;
}
.pg47-footer h4 { color: var(--pg47-accent); margin-bottom: 0.6rem; font-size: 1.3rem; }
.pg47-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin: 0.8rem 0;
}
.pg47-footer-links a {
  color: var(--pg47-text);
  font-size: 1.15rem;
}
.pg47-footer-promo {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.8rem 0;
}
.pg47-footer-promo .pg47-btn {
  padding: 0.6rem 1rem;
  font-size: 1.15rem;
  min-height: 3rem;
}
.pg47-copy {
  color: var(--pg47-muted);
  text-align: center;
  margin-top: 1rem;
  font-size: 1.1rem;
}

/* ---------- Mobile bottom nav ---------- */
.pg47-bottomnav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(180deg, #0e1a2c, #060b14);
  border-top: 0.1rem solid var(--pg47-border);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  height: 6rem;
  padding: 0.4rem 0.2rem;
}
.pg47-bottomnav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--pg47-muted);
  font-size: 1rem;
  min-width: 6rem;
  min-height: 5rem;
  gap: 0.2rem;
  border-radius: 0.6rem;
  transition: color 0.15s ease, transform 0.15s ease;
}
.pg47-bottomnav a i { font-size: 2rem; }
.pg47-bottomnav a.active { color: var(--pg47-accent); }
.pg47-bottomnav a:active { transform: scale(0.92); }
.pg47-bottomnav a:hover { color: var(--pg47-text-strong); }

/* ---------- Desktop ---------- */
@media (min-width: 769px) {
  .pg47-bottomnav { display: none; }
  .pg47-wrapper { max-width: 760px; }
  .pg47-grid { grid-template-columns: repeat(5, 1fr); }
  .pg47-feature-grid { grid-template-columns: repeat(4, 1fr); }
  .pg47-footer { padding-bottom: 2rem; }
}

@media (min-width: 431px) and (max-width: 768px) {
  .pg47-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
  main { padding-bottom: 7.5rem; }
}
