/*!
 * perya.homes - core stylesheet
 * Mobile-first (max-width: 430px) PH gaming portal
 * All custom classes use the dynamic "va40-" prefix.
 * Palette: #CD853F | #FFA500 | #FFEFD5 | #1A1A2E
 * 1rem = 10px via html { font-size: 62.5% }
 */

:root {
  --va40-primary: #ffa500;
  --va40-accent: #cd853f;
  --va40-cream: #ffefd5;
  --va40-bg: #1a1a2e;
  --va40-bg-deep: #14142a;
  --va40-bg-soft: #232347;
  --va40-text: #ffefd5;
  --va40-text-dim: #c9b8a0;
  --va40-success: #4caf50;
  --va40-danger: #ff5252;
  --va40-gold: #ffd700;
  --va40-radius: 1.2rem;
  --va40-radius-sm: 0.8rem;
  --va40-shadow: 0 0.4rem 1.2rem rgba(0, 0, 0, 0.35);
  --va40-shadow-gold: 0 0 1.2rem rgba(255, 165, 0, 0.45);
  --va40-header-h: 6rem;
  --va40-bottom-nav-h: 6.4rem;
  --va40-font: "Segoe UI", "Helvetica Neue", Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding: 0;
  font-family: var(--va40-font);
  background: var(--va40-bg);
  color: var(--va40-text);
  line-height: 1.5rem;
  font-size: 1.5rem;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--va40-primary);
  text-decoration: none;
}

a:hover {
  color: var(--va40-gold);
}

/* ----------------- Layout helpers ----------------- */
.va40-wrapper {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  position: relative;
  background: var(--va40-bg);
  min-height: 100vh;
}

.va40-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.2rem;
}

main {
  padding-top: var(--va40-header-h);
}

@media (max-width: 768px) {
  main {
    padding-bottom: calc(var(--va40-bottom-nav-h) + 1.5rem);
  }
}

/* ----------------- Header ----------------- */
.va40-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #14142a 0%, #2a2a4a 100%);
  border-bottom: 0.2rem solid var(--va40-primary);
  box-shadow: var(--va40-shadow);
}

.va40-header-inner {
  max-width: 430px;
  margin: 0 auto;
  padding: 0.8rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.va40-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.va40-brand-logo {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 0.6rem;
  object-fit: cover;
  box-shadow: var(--va40-shadow-gold);
}

.va40-brand-name {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--va40-primary);
  letter-spacing: 0.05rem;
  text-transform: lowercase;
}

.va40-brand-name span {
  color: var(--va40-cream);
}

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

.va40-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  border-radius: var(--va40-radius-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.va40-btn:active {
  transform: scale(0.96);
}

.va40-btn-login {
  background: transparent;
  color: var(--va40-cream);
  border: 0.15rem solid var(--va40-accent);
  padding: 0.6rem 1rem;
  font-size: 1.3rem;
}

.va40-btn-register,
.va40-btn-promo {
  background: linear-gradient(135deg, var(--va40-primary) 0%, var(--va40-accent) 100%);
  color: #1a1a2e;
  padding: 0.6rem 1.1rem;
  font-size: 1.3rem;
  box-shadow: var(--va40-shadow-gold);
}

.va40-hamburger {
  background: transparent;
  border: none;
  color: var(--va40-cream);
  font-size: 2.2rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  -webkit-tap-highlight-color: transparent;
}

/* ----------------- Mobile slide menu ----------------- */
.va40-mobile-nav {
  position: fixed;
  top: 0;
  right: -80%;
  width: 80%;
  max-width: 32rem;
  height: 100vh;
  background: var(--va40-bg-deep);
  z-index: 9999;
  padding: 7rem 1.5rem 2rem;
  transition: right 0.3s ease;
  border-left: 0.2rem solid var(--va40-primary);
  overflow-y: auto;
}

.va40-mobile-nav.va40-nav-open {
  right: 0;
  box-shadow: -1rem 0 3rem rgba(0, 0, 0, 0.5);
}

.va40-mobile-nav h4 {
  font-size: 1.3rem;
  text-transform: uppercase;
  color: var(--va40-primary);
  margin: 1.5rem 0 0.6rem;
  letter-spacing: 0.08rem;
}

.va40-mobile-nav a {
  display: block;
  padding: 0.9rem 0.6rem;
  color: var(--va40-cream);
  border-bottom: 0.1rem solid rgba(255, 165, 0, 0.15);
  font-size: 1.4rem;
}

.va40-mobile-nav a:hover {
  background: rgba(255, 165, 0, 0.08);
  padding-left: 1rem;
}

.va40-nav-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: transparent;
  border: none;
  color: var(--va40-primary);
  font-size: 2.4rem;
  cursor: pointer;
}

.va40-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.va40-menu-active .va40-overlay {
  opacity: 1;
  visibility: visible;
}

/* ----------------- Hero carousel ----------------- */
.va40-carousel {
  position: relative;
  border-radius: var(--va40-radius);
  overflow: hidden;
  margin: 1.2rem 0;
  box-shadow: var(--va40-shadow);
}

.va40-carousel-track {
  position: relative;
  height: 18rem;
}

.va40-carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  cursor: pointer;
}

.va40-carousel-slide.va40-slide-active {
  opacity: 1;
}

.va40-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.va40-carousel-caption {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  background: rgba(20, 20, 42, 0.78);
  padding: 0.5rem 0.9rem;
  border-radius: var(--va40-radius-sm);
  border-left: 0.3rem solid var(--va40-primary);
  font-size: 1.2rem;
  color: var(--va40-cream);
}

.va40-carousel-dots {
  position: absolute;
  bottom: 0.6rem;
  right: 0.8rem;
  display: flex;
  gap: 0.4rem;
}

.va40-carousel-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: rgba(255, 239, 213, 0.5);
  border: none;
  cursor: pointer;
}

.va40-carousel-dot.va40-dot-active {
  background: var(--va40-primary);
}

/* ----------------- Headings & sections ----------------- */
.va40-section {
  margin: 2rem 0;
}

.va40-h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--va40-cream);
  margin: 1.5rem 0 0.6rem;
  line-height: 1.25;
}

.va40-h1 span,
.va40-h2 span {
  color: var(--va40-primary);
}

.va40-h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--va40-cream);
  margin: 1.8rem 0 0.8rem;
  padding-left: 0.8rem;
  border-left: 0.4rem solid var(--va40-primary);
}

.va40-h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--va40-primary);
  margin: 1.2rem 0 0.5rem;
}

.va40-lead {
  color: var(--va40-text-dim);
  font-size: 1.35rem;
  line-height: 1.55;
}

.va40-text p {
  margin: 0 0 1rem;
  color: var(--va40-text-dim);
  line-height: 1.55;
}

.va40-text strong {
  color: var(--va40-cream);
}

.va40-text a {
  color: var(--va40-primary);
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

.va40-pill {
  display: inline-block;
  padding: 0.2rem 0.8rem;
  border-radius: 1rem;
  background: rgba(255, 165, 0, 0.15);
  color: var(--va40-primary);
  font-size: 1.1rem;
  margin-right: 0.4rem;
  font-weight: 600;
}

/* ----------------- Game grid ----------------- */
.va40-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}

.va40-card {
  background: var(--va40-bg-soft);
  border-radius: var(--va40-radius-sm);
  padding: 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: 0.1rem solid rgba(255, 165, 0, 0.12);
  overflow: hidden;
}

.va40-card:hover {
  transform: translateY(-0.3rem);
  box-shadow: var(--va40-shadow-gold);
  border-color: var(--va40-primary);
}

.va40-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0.6rem;
}

.va40-card-name {
  display: block;
  font-size: 1.15rem;
  color: var(--va40-cream);
  margin-top: 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.va40-card-hot {
  position: relative;
}

.va40-card-hot::after {
  content: "HOT";
  position: absolute;
  top: 0.3rem;
  left: 0.3rem;
  background: var(--va40-danger);
  color: #fff;
  font-size: 0.9rem;
  padding: 0.1rem 0.5rem;
  border-radius: 0.4rem;
  font-weight: 700;
}

/* ----------------- CTA banner ----------------- */
.va40-cta {
  background: linear-gradient(135deg, var(--va40-accent) 0%, var(--va40-primary) 100%);
  color: #1a1a2e;
  border-radius: var(--va40-radius);
  padding: 1.5rem;
  text-align: center;
  margin: 1.5rem 0;
  box-shadow: var(--va40-shadow-gold);
}

.va40-cta h3 {
  color: #1a1a2e;
  margin-top: 0;
}

.va40-cta p {
  color: #1a1a2e;
  margin: 0.5rem 0 1rem;
  font-weight: 600;
}

.va40-cta .va40-btn {
  background: var(--va40-bg);
  color: var(--va40-primary);
  padding: 0.9rem 1.6rem;
  font-size: 1.4rem;
}

/* ----------------- Feature list ----------------- */
.va40-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  margin: 1rem 0;
}

.va40-feature {
  background: var(--va40-bg-soft);
  border-radius: var(--va40-radius-sm);
  padding: 1rem;
  border-top: 0.2rem solid var(--va40-primary);
}

.va40-feature .material-icons,
.va40-feature .bi {
  color: var(--va40-primary);
  font-size: 2rem;
}

.va40-feature h4 {
  margin: 0.4rem 0;
  font-size: 1.25rem;
  color: var(--va40-cream);
}

.va40-feature p {
  margin: 0;
  font-size: 1.15rem;
  color: var(--va40-text-dim);
  line-height: 1.4;
}

/* ----------------- Testimonials ----------------- */
.va40-testimonial {
  background: var(--va40-bg-soft);
  border-radius: var(--va40-radius-sm);
  padding: 1rem;
  margin-bottom: 0.8rem;
  border-left: 0.3rem solid var(--va40-primary);
}

.va40-testimonial p {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: var(--va40-cream);
  font-style: italic;
}

.va40-stars {
  color: var(--va40-gold);
  font-size: 1.2rem;
}

.va40-testimonial .va40-author {
  font-size: 1.1rem;
  color: var(--va40-text-dim);
}

/* ----------------- RTP / stats table ----------------- */
.va40-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--va40-bg-soft);
  border-radius: var(--va40-radius-sm);
  overflow: hidden;
  font-size: 1.2rem;
}

.va40-table th,
.va40-table td {
  padding: 0.7rem 0.6rem;
  text-align: left;
  border-bottom: 0.1rem solid rgba(255, 165, 0, 0.12);
}

.va40-table th {
  background: rgba(255, 165, 0, 0.15);
  color: var(--va40-primary);
  font-weight: 700;
}

.va40-table td {
  color: var(--va40-text-dim);
}

.va40-rtp-bar {
  height: 0.6rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0.4rem;
  overflow: hidden;
}

.va40-rtp-bar > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--va40-primary), var(--va40-gold));
}

/* ----------------- Payment / winners ----------------- */
.va40-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.8rem 0;
}

.va40-chip {
  background: var(--va40-bg-soft);
  border: 0.1rem solid rgba(255, 165, 0, 0.25);
  border-radius: 0.6rem;
  padding: 0.5rem 0.8rem;
  font-size: 1.1rem;
  color: var(--va40-cream);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.va40-winners {
  background: var(--va40-bg-soft);
  border-radius: var(--va40-radius-sm);
  padding: 0.6rem;
}

.va40-winner-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.4rem;
  border-bottom: 0.1rem solid rgba(255, 165, 0, 0.1);
  font-size: 1.2rem;
}

.va40-winner-row:last-child {
  border-bottom: none;
}

.va40-winner-name {
  color: var(--va40-cream);
  font-weight: 600;
}

.va40-winner-amount {
  color: var(--va40-gold);
  font-weight: 800;
}

/* ----------------- FAQ ----------------- */
.va40-faq-item {
  background: var(--va40-bg-soft);
  border-radius: var(--va40-radius-sm);
  margin-bottom: 0.6rem;
  padding: 0.9rem 1rem;
  border-left: 0.3rem solid var(--va40-accent);
}

.va40-faq-item h4 {
  margin: 0 0 0.4rem;
  font-size: 1.25rem;
  color: var(--va40-primary);
}

.va40-faq-item p {
  margin: 0;
  color: var(--va40-text-dim);
  font-size: 1.2rem;
  line-height: 1.5;
}

/* ----------------- App download ----------------- */
.va40-app-cta {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
}

.va40-app-cta .va40-btn {
  flex: 1;
  min-width: 12rem;
  padding: 1rem;
  font-size: 1.25rem;
  background: var(--va40-bg);
  color: var(--va40-primary);
  border: 0.15rem solid var(--va40-primary);
}

/* ----------------- Footer ----------------- */
.va40-footer {
  background: var(--va40-bg-deep);
  padding: 2rem 1.2rem 8rem;
  border-top: 0.2rem solid var(--va40-primary);
  margin-top: 2rem;
}

.va40-footer h4 {
  color: var(--va40-primary);
  font-size: 1.3rem;
  margin: 1.2rem 0 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
}

.va40-footer p {
  color: var(--va40-text-dim);
  font-size: 1.2rem;
  line-height: 1.5;
}

.va40-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.8rem 0;
}

.va40-footer-links a {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background: var(--va40-bg-soft);
  border-radius: 0.6rem;
  color: var(--va40-cream);
  font-size: 1.15rem;
  border: 0.1rem solid rgba(255, 165, 0, 0.18);
}

.va40-footer-links a:hover {
  border-color: var(--va40-primary);
  color: var(--va40-primary);
}

.va40-promo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.8rem 0;
}

.va40-promo-row .va40-btn {
  flex: 1;
  min-width: 45%;
  padding: 0.8rem;
  font-size: 1.2rem;
}

.va40-copyright {
  text-align: center;
  font-size: 1.1rem;
  color: var(--va40-text-dim);
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 0.1rem solid rgba(255, 165, 0, 0.15);
}

/* ----------------- Bottom nav (mobile only) ----------------- */
.va40-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--va40-bottom-nav-h);
  background: linear-gradient(180deg, #2a2a4a 0%, #14142a 100%);
  border-top: 0.2rem solid var(--va40-primary);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -0.4rem 1rem rgba(0, 0, 0, 0.4);
}

.va40-bottom-nav-btn {
  flex: 1;
  min-width: 6rem;
  min-height: 6rem;
  background: transparent;
  border: none;
  color: var(--va40-text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  font-size: 1rem;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease, transform 0.15s ease;
}

.va40-bottom-nav-btn:active {
  transform: scale(0.9);
}

.va40-bottom-nav-btn .material-icons,
.va40-bottom-nav-btn .fas,
.va40-bottom-nav-btn .far,
.va40-bottom-nav-btn .bi,
.va40-bottom-nav-btn .ion {
  font-size: 2.2rem;
}

.va40-bottom-nav-btn.va40-bottom-nav-active {
  color: var(--va40-primary);
}

.va40-bottom-nav-btn.va40-bottom-nav-active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3rem;
  height: 0.3rem;
  background: var(--va40-primary);
  border-radius: 0 0 0.3rem 0.3rem;
}

.va40-bottom-nav-btn .va40-nav-badge {
  position: absolute;
  top: 0.6rem;
  right: 1.4rem;
  background: var(--va40-danger);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 0.8rem;
  padding: 0 0.35rem;
  min-width: 1.4rem;
  height: 1.4rem;
  line-height: 1.4rem;
  text-align: center;
}

.va40-back-top {
  position: fixed;
  right: 1.2rem;
  bottom: calc(var(--va40-bottom-nav-h) + 1rem);
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--va40-primary), var(--va40-accent));
  color: #1a1a2e;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  z-index: 999;
  box-shadow: var(--va40-shadow-gold);
  display: none;
}

@media (max-width: 768px) {
  .va40-back-top {
    display: block;
  }
}

/* ----------------- Desktop: hide bottom nav, show desktop nav ----------------- */
@media (min-width: 769px) {
  .va40-bottom-nav {
    display: none;
  }

  .va40-wrapper,
  .va40-container,
  .va40-header-inner {
    max-width: 768px;
  }

  .va40-footer {
    padding-bottom: 2rem;
  }

  main {
    padding-bottom: 2rem;
  }
}

/* ----------------- Utility ----------------- */
.va40-mt-1 { margin-top: 0.5rem; }
.va40-mt-2 { margin-top: 1rem; }
.va40-mb-2 { margin-bottom: 1rem; }
.va40-center { text-align: center; }
.va40-row { display: flex; gap: 0.8rem; align-items: center; }
.va40-hidden-mobile { display: none; }

@media (min-width: 769px) {
  .va40-hidden-mobile { display: block; }
  .va40-hidden-desktop { display: none; }
}
