/* ============================================================
 * 55bmw.homes - layout.css
 * Mobile-first styles (prefix: sda1-)
 * Palette: #CD853F | #DA70D6 | #DB7093 | #1C2833 | #8470FF
 * ============================================================ */

:root {
  --sda1-primary: #8470FF;
  --sda1-gold: #CD853F;
  --sda1-orchid: #DA70D6;
  --sda1-rose: #DB7093;
  --sda1-bg: #1C2833;
  --sda1-bg2: #243447;
  --sda1-bg3: #0f1620;
  --sda1-text: #f5f7fb;
  --sda1-muted: #9aa6b8;
  --sda1-border: rgba(132,112,255,0.25);
  --sda1-shadow: 0 8px 24px rgba(0,0,0,0.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

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

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

a { color: var(--sda1-orchid); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--sda1-gold); }

h1, h2, h3, h4 { line-height: 1.7rem; font-weight: 700; color: #fff; }
h1 { font-size: 2.2rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.7rem; }
h4 { font-size: 1.5rem; }
p { margin-bottom: 1.2rem; color: var(--sda1-text); }

/* ===== Container (mobile-first, max 430px) ===== */
.sda1-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.2rem;
  position: relative;
}

.sda1-wrapper {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  background: var(--sda1-bg);
  min-height: 100vh;
  box-shadow: 0 0 40px rgba(0,0,0,0.6);
}

/* ===== Header ===== */
.sda1-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: linear-gradient(180deg, #0f1620 0%, #1C2833 100%);
  border-bottom: 1px solid var(--sda1-border);
  box-shadow: var(--sda1-shadow);
}
.sda1-header-inner {
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.2rem;
  gap: 0.8rem;
}
.sda1-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.8rem;
  color: #fff;
}
.sda1-logo img { width: 28px; height: 28px; border-radius: 6px; }
.sda1-logo span { background: linear-gradient(90deg, var(--sda1-gold), var(--sda1-rose)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

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

.sda1-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 36px;
  padding: 0 1.2rem;
  border: none;
  border-radius: 20px;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.sda1-btn:active { transform: scale(0.96); }
.sda1-btn-primary { background: linear-gradient(90deg, var(--sda1-gold), var(--sda1-rose)); box-shadow: 0 4px 12px rgba(219,112,147,0.4); }
.sda1-btn-secondary { background: linear-gradient(90deg, var(--sda1-primary), var(--sda1-orchid)); box-shadow: 0 4px 12px rgba(132,112,255,0.4); }
.sda1-btn-ghost { background: transparent; border: 1px solid var(--sda1-border); color: var(--sda1-text); }

.sda1-menu-btn {
  background: transparent;
  border: 1px solid var(--sda1-border);
  border-radius: 8px;
  width: 38px;
  height: 38px;
  color: var(--sda1-text);
  font-size: 2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Mobile menu ===== */
#sda1-mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
  background: var(--sda1-bg2);
  border-top: 1px solid var(--sda1-border);
}
#sda1-mobile-menu.sda1-menu-open { max-height: 520px; }
.sda1-menu-list { list-style: none; padding: 0.8rem 1.2rem; }
.sda1-menu-list li { border-bottom: 1px solid rgba(255,255,255,0.06); }
.sda1-menu-list li:last-child { border-bottom: none; }
.sda1-menu-list a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 0.4rem;
  color: var(--sda1-text);
  font-size: 1.4rem;
}
.sda1-menu-list a:hover { color: var(--sda1-orchid); padding-left: 1rem; }

/* ===== Main content (offset for fixed header) ===== */
.sda1-main { padding-top: 64px; padding-bottom: 90px; }

/* ===== Carousel ===== */
.sda1-carousel {
  position: relative;
  margin: 1.2rem 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--sda1-shadow);
}
.sda1-slide {
  display: none;
  position: relative;
}
.sda1-slide.sda1-active { display: block; }
.sda1-slide img { width: 100%; height: 180px; object-fit: cover; }
.sda1-slide-cap {
  position: absolute;
  left: 1rem; bottom: 1rem; right: 1rem;
  background: linear-gradient(90deg, rgba(15,22,32,0.85), rgba(132,112,255,0.55));
  padding: 0.8rem 1rem;
  border-radius: 10px;
  font-size: 1.3rem;
  font-weight: 600;
}
.sda1-dots {
  position: absolute;
  bottom: 0.8rem; right: 1rem;
  display: flex; gap: 0.5rem;
}
.sda1-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none; cursor: pointer;
}
.sda1-dot.sda1-active { background: var(--sda1-gold); width: 18px; border-radius: 4px; }

/* ===== Section ===== */
.sda1-section { padding: 1.6rem 0; }
.sda1-section-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  font-size: 1.8rem;
  color: #fff;
}
.sda1-section-title i { color: var(--sda1-gold); font-size: 2rem; }
.sda1-section-title .sda1-more { margin-left: auto; font-size: 1.2rem; color: var(--sda1-orchid); font-weight: 600; }

/* ===== Ticker ===== */
.sda1-ticker {
  background: linear-gradient(90deg, var(--sda1-gold), var(--sda1-rose));
  color: #fff;
  font-size: 1.2rem;
  padding: 0.6rem 0;
  overflow: hidden;
  white-space: nowrap;
}
.sda1-ticker-track {
  display: inline-block;
  white-space: nowrap;
  animation: sda1-scroll 28s linear infinite;
  padding-left: 100%;
}
.sda1-ticker-track span { margin-right: 3rem; font-weight: 600; }
@keyframes sda1-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* ===== Game grid ===== */
.sda1-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}
.sda1-card {
  background: var(--sda1-bg2);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--sda1-border);
  text-align: center;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.sda1-card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(132,112,255,0.3); }
.sda1-card img { width: 100%; height: 88px; object-fit: cover; }
.sda1-card-name {
  font-size: 1.1rem;
  padding: 0.5rem;
  color: var(--sda1-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

/* ===== Category tag ===== */
.sda1-cat-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(132,112,255,0.18);
  color: var(--sda1-primary);
  padding: 0.3rem 0.9rem;
  border-radius: 12px;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

/* ===== Info blocks ===== */
.sda1-block {
  background: var(--sda1-bg2);
  border-radius: 12px;
  padding: 1.2rem;
  margin-bottom: 1rem;
  border-left: 3px solid var(--sda1-gold);
}
.sda1-block h3 { color: var(--sda1-gold); margin-bottom: 0.6rem; }
.sda1-block p { font-size: 1.3rem; color: var(--sda1-text); }

/* ===== Promo banner ===== */
.sda1-promo-banner {
  background: linear-gradient(120deg, var(--sda1-orchid), var(--sda1-rose), var(--sda1-gold));
  border-radius: 14px;
  padding: 1.6rem;
  text-align: center;
  color: #fff;
  margin: 1rem 0;
  box-shadow: var(--sda1-shadow);
}
.sda1-promo-banner h3 { color: #fff; font-size: 1.9rem; margin-bottom: 0.5rem; }
.sda1-promo-banner p { font-size: 1.3rem; opacity: 0.95; margin-bottom: 1rem; }

/* ===== Feature list ===== */
.sda1-features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
.sda1-feature {
  background: var(--sda1-bg2);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  border: 1px solid var(--sda1-border);
}
.sda1-feature i { font-size: 2.6rem; color: var(--sda1-orchid); margin-bottom: 0.5rem; }
.sda1-feature h4 { font-size: 1.3rem; margin-bottom: 0.3rem; }
.sda1-feature p { font-size: 1.1rem; color: var(--sda1-muted); margin: 0; }

/* ===== RTP compact table ===== */
.sda1-rtp-table { width: 100%; border-collapse: collapse; font-size: 1.2rem; }
.sda1-rtp-table th, .sda1-rtp-table td { padding: 0.6rem; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.06); }
.sda1-rtp-table th { color: var(--sda1-gold); font-weight: 700; }
.sda1-rtp-bar { display: inline-block; height: 6px; background: var(--sda1-primary); border-radius: 3px; vertical-align: middle; }

/* ===== Testimonials ===== */
.sda1-testimonials { display: grid; gap: 0.8rem; }
.sda1-testimonial { background: var(--sda1-bg2); border-radius: 12px; padding: 1rem; border-left: 3px solid var(--sda1-rose); }
.sda1-testimonial .sda1-stars { color: var(--sda1-gold); margin-bottom: 0.4rem; font-size: 1.2rem; }
.sda1-testimonial p { font-size: 1.25rem; margin-bottom: 0.4rem; }
.sda1-testimonial small { color: var(--sda1-muted); }

/* ===== Payment icons ===== */
.sda1-payments { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; padding: 1rem 0; }
.sda1-payment {
  background: var(--sda1-bg2);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  font-size: 1.1rem;
  border: 1px solid var(--sda1-border);
  display: flex; align-items: center; gap: 0.4rem;
  color: var(--sda1-text);
}

/* ===== Inline promo text link ===== */
.sda1-text-link {
  color: var(--sda1-gold);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}
.sda1-text-link:hover { color: var(--sda1-rose); }

/* ===== Back to top ===== */
#sda1-top-btn {
  position: fixed;
  right: 16px; bottom: 80px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sda1-gold), var(--sda1-rose));
  color: #fff; border: none;
  font-size: 2rem; cursor: pointer;
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
  z-index: 999;
  box-shadow: var(--sda1-shadow);
}
#sda1-top-btn.sda1-visible { opacity: 1; visibility: visible; }

/* ===== Footer ===== */
.sda1-footer {
  background: var(--sda1-bg3);
  border-top: 1px solid var(--sda1-border);
  padding: 2rem 1.2rem;
  color: var(--sda1-muted);
  font-size: 1.2rem;
}
.sda1-footer h4 { color: #fff; margin-bottom: 0.6rem; font-size: 1.4rem; }
.sda1-footer-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; margin: 0.8rem 0; }
.sda1-footer-links a { color: var(--sda1-muted); font-size: 1.2rem; }
.sda1-footer-links a:hover { color: var(--sda1-orchid); }
.sda1-footer-promos { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.8rem 0; }
.sda1-footer-copy { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.06); text-align: center; }

/* ===== Mobile bottom navigation ===== */
.sda1-bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 62px;
  background: linear-gradient(180deg, #1C2833, #0f1620);
  border-top: 1px solid var(--sda1-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -4px 18px rgba(0,0,0,0.5);
}
.sda1-nav-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--sda1-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 60px;
  min-height: 60px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: color .2s ease, transform .15s ease;
  position: relative;
}
.sda1-nav-btn i { font-size: 2.2rem; }
.sda1-nav-btn:active { transform: scale(0.9); }
.sda1-nav-btn:hover { color: var(--sda1-orchid); }
.sda1-nav-btn.sda1-active { color: var(--sda1-gold); }
.sda1-nav-btn.sda1-active::before {
  content: "";
  position: absolute; top: 0; left: 25%; right: 25%;
  height: 3px; border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--sda1-gold), var(--sda1-rose));
}
.sda1-nav-badge {
  position: absolute; top: 6px; right: 18px;
  background: var(--sda1-rose);
  color: #fff; font-size: 0.9rem; font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 8px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
}

/* ===== Desktop: hide bottom nav, widen container ===== */
@media (min-width: 769px) {
  .sda1-bottom-nav { display: none; }
  .sda1-main { padding-bottom: 2rem; }
}

@media (max-width: 768px) {
  .sda1-main { padding-bottom: 90px; }
}

/* helpers */
.sda1-center { text-align: center; }
.sda1-row { display: flex; align-items: center; gap: 0.6rem; }
.sda1-spacer { height: 1rem; }
