/* ==========================================================================
   BestSweepCasino clone – Stylesheet
   Structure:
     1. Design tokens (CSS custom properties)
     2. Base / reset
     3. Utilities (container, buttons, icons)
     4. Components (topbar, hero, casino card, info, footer)
     5. Animations
     6. Responsive rules live next to each component
   ========================================================================== */

/* 1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  --background: hsl(265 55% 16%);
  --foreground: hsl(280 30% 92%);
  --card: hsl(268 45% 22%);
  --primary: hsl(45 95% 55%);
  --primary-foreground: hsl(265 55% 14%);
  --secondary: hsl(268 40% 26%);
  --muted: hsl(268 35% 24%);
  --muted-foreground: hsl(270 20% 65%);
  --accent: hsl(290 80% 60%);
  --border: hsl(270 40% 32%);
  --footer-bg: hsl(265 55% 12%);

  --cta-gradient: linear-gradient(135deg, hsl(48 100% 62%), hsl(40 100% 48%));
  --cta-glow: hsl(45 95% 55% / 0.45);
  --cta-glow-strong: hsl(45 95% 55% / 0.75);

  --radius: 0.5rem;
  --font-heading: "Oswald", sans-serif;
  --font-body: "Inter", sans-serif;
}

/* 2. Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  border-color: var(--border);
}

body {
  margin: 0;
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  margin: 0;
}

p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* 3. Utilities
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: 2rem;
}

.icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.icon--primary { color: var(--primary); }

.btn {
  display: inline-block;
  border-radius: var(--radius);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.btn:hover { transform: scale(1.05); }

.btn--cta {
  position: relative;
  overflow: hidden;
  background: var(--cta-gradient);
  color: var(--primary-foreground);
  padding: 0.875rem 2.5rem;
  font-size: 0.875rem;
}

/* Moving shine sweep across the button */
.btn--cta::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent,
    hsl(0 0% 100% / 0.55),
    transparent
  );
  transform: translateX(-150%) skewX(-20deg);
  animation: shine 2.5s ease-in-out infinite;
}

.btn--lg {
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
}

.btn--glow { animation: pulse-glow 2s ease-in-out infinite; }

/* 4a. Navbar
   -------------------------------------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: hsl(265 55% 16% / 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 4.5rem;
}

.navbar__brand { flex-shrink: 0; }

.navbar__logo {
  width: 180px;
  height: auto;
  filter: drop-shadow(0 1px 2px hsl(265 55% 10% / 0.4));
}

.navbar__trust {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-foreground);
  white-space: nowrap;
}

@media (max-width: 768px) {
  .navbar__inner { height: 4rem; }
  .navbar__logo { width: 150px; }
}

/* 4b. Hero (mobile-first)
   Mobile: image banner on top, content panel below it.
   Desktop: content overlaps the image (grid-stack).
   -------------------------------------------------------------------------- */
.hero {
  background-image: url("../assets/img/hero-bg2.png");
  background-image: image-set(
    url("../assets/img/hero-bg2.webp") type("image/webp"),
    url("../assets/img/hero-bg2.png") type("image/png")
  );
  background-size: cover;
  background-position: center;
  aspect-ratio: 4 / 3;
}

/* Overlay only exists on desktop */
.hero__overlay { display: none; }

/* Panel holding the hero text + carousel below the image */
.hero__panel {
  position: relative;
  margin: 0.75rem 0.75rem 0;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  box-shadow: 0 20px 40px -15px hsl(265 55% 8% / 0.5);
}

.hero__content {
  text-align: center;
  padding-block: 1.75rem;
}

.hero__title {
  font-size: clamp(1.9rem, 8vw, 2.4rem);
  font-weight: 700;
  line-height: 1.15;
  max-width: 42rem;
}

.hero__bullets { display: none; }

.hero__subtitle {
  margin-top: 1rem;
  max-width: 36rem;
  font-size: 1.125rem;
  color: hsl(40 20% 90% / 0.8);
}

.hero__bullets {
  margin-top: 1rem;
  gap: 0.5rem;
}

.hero__bullet {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: hsl(40 20% 90% / 0.9);
}

.hero__bullet .icon { width: 1.25rem; height: 1.25rem; }

.hero__updated {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--muted-foreground);
}

.hero__updated-date {
  font-weight: 600;
  color: var(--foreground);
}

.hero__features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1rem;
  margin-top: 1.25rem;
}

.hero__feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: hsl(40 20% 90% / 0.8);
  font-size: 0.8125rem;
}

.hero__feature-icon {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  background-color: hsl(45 100% 55% / 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Desktop: content overlays the image as before */
@media (min-width: 768px) {
  .hero-stack { display: grid; }

  .hero,
  .hero__panel { grid-area: 1 / 1; }

  .hero {
    position: relative;
    aspect-ratio: auto;
    background-image: url("../assets/img/hero-bg.png");
    background-position: center;
  }

  .hero__overlay {
    display: block;
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to bottom right,
      hsl(290 80% 55% / 0.55),
      hsl(265 55% 16% / 0.65),
      hsl(265 55% 16% / 0.92)
    );
  }

  .hero__panel {
    display: flex; /* fill the stack height so content can expand vertically */
    margin: 0;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .hero__content {
    text-align: left;
    padding-block: 6rem;
  }

  .hero__title { font-size: 3.75rem; }

  .hero__subtitle { display: block; }
  .hero__bullets { display: grid; }

  .hero__updated {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    letter-spacing: normal;
  }

  .hero__features {
    justify-content: flex-start;
    gap: 1.5rem;
    margin-top: 2rem;
  }

  .hero__feature { font-size: 0.9375rem; }

  .hero__feature-icon { width: 2rem; height: 2rem; }
}

/* 4c. Casino cards
   -------------------------------------------------------------------------- */
.listing__inner {
  padding-block: 2rem;
  display: grid;
  gap: 1rem;
}

.casino-card {
  position: relative;
  background-color: var(--card);
  border: 2px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px hsl(0 0% 0% / 0.2);
  transition: all 0.3s ease;
}

.casino-card:hover {
  transform: scale(1.02);
  border-color: hsl(45 95% 55% / 0.5);
  box-shadow: 0 25px 50px -12px hsl(265 55% 8% / 0.6);
}

/* The #1 card keeps a permanent gold border + glow (matches the original) */
.casino-card--top {
  border-color: var(--primary);
  box-shadow: 0 0 30px hsl(45 95% 55% / 0.2);
}

/* Rank ribbon (top-left corner) */
.casino-card__rank {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  background-color: var(--primary);
  color: var(--primary-foreground);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.25rem 0.75rem;
  border-bottom-right-radius: var(--radius);
}

/* Badge (Top Rated, Hot Offer, ...) */
.casino-card__badge {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 10;
  background-color: var(--accent);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.375rem 1rem;
  border-bottom-left-radius: var(--radius);
}

.casino-card__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  padding-top: 2.25rem;
}

.casino-card__logo-link {
  flex-shrink: 0;
  width: 11rem;
}

.casino-card__logo {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  object-fit: contain;
}

.casino-card__main {
  flex: 1;
  text-align: center;
}

.casino-card__offer {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foreground);
  transition: color 0.2s ease;
}

.casino-card__offer:hover { color: var(--primary); }

.casino-card__tagline {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.casino-card__perks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 1rem;
  row-gap: 0.375rem;
  margin-top: 0.75rem;
  text-align: left;
}

.casino-card__perk {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: hsl(280 30% 92% / 0.75);
}

.casino-card__perk .icon { width: 0.875rem; height: 0.875rem; }

/* Score block */
.casino-card__score-box {
  flex-shrink: 0;
  text-align: center;
  background-color: hsl(45 95% 55% / 0.08);
  border: 1px solid hsl(45 95% 55% / 0.2);
  border-radius: 0.75rem;
  padding: 1rem;
  min-width: 120px;
}

.casino-card__score {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.casino-card__score-label {
  font-size: 0.625rem;
  color: var(--muted-foreground);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

.casino-card__stars {
  display: flex;
  justify-content: center;
  gap: 0.125rem;
  margin-top: 0.5rem;
}

.casino-card__star {
  width: 1rem;
  height: 1rem;
  fill: var(--primary);
  color: var(--primary);
}

.casino-card__star--half { fill: hsl(45 95% 55% / 0.5); }
.casino-card__star--empty { fill: var(--border); }

.casino-card__votes {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}

/* Actions */
.casino-card__actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.casino-card__actions .btn--cta { width: 100%; }

.casino-card__visit {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  transition: color 0.2s ease;
}

.casino-card__visit:hover { color: var(--primary); }

.casino-card__terms {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  padding: 0.75rem 1.5rem 1rem;
  border-top: 1px solid hsl(270 40% 32% / 0.6);
}

@media (min-width: 768px) {
  .casino-card__body {
    flex-direction: row;
    padding-top: 1.5rem;
  }
  .casino-card__main { text-align: left; }
  .casino-card__actions { width: auto; }
  .casino-card__actions .btn--cta { width: auto; }
}

/* 4d. Info section
   -------------------------------------------------------------------------- */
.info { padding-block: 2rem; }

.info__inner { max-width: 48rem; }

.info__box {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 10px 15px -3px hsl(265 55% 8% / 0.3);
}

.info__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.info__body {
  display: grid;
  gap: 1rem;
  color: hsl(280 30% 92% / 0.75);
  line-height: 1.7;
}

@media (min-width: 768px) {
  .info__title { font-size: 1.875rem; }
}

/* 4e. Bottom CTA
   -------------------------------------------------------------------------- */
.bottom-cta { padding-block: 2rem 4rem; }

.bottom-cta__inner { text-align: center; }

/* 4f. Footer
   -------------------------------------------------------------------------- */
.footer {
  background-color: var(--footer-bg);
  border-top: 1px solid var(--border);
}

.footer__inner { padding-block: 3rem; }

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
}

.footer__link { transition: color 0.2s ease; }
.footer__link:hover { color: var(--primary); }

.footer__text {
  max-width: 60rem;
  margin-inline: auto;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  display: grid;
  gap: 1rem;
}

.footer__states-title {
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.footer__states-list {
  font-size: 0.75rem;
  line-height: 1.7;
}

.footer__age {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding-top: 1rem;
}

.footer__age-badge {
  border: 2px solid hsl(0 72% 50%);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  color: hsl(0 72% 55%);
  background-color: #fff;
  font-weight: 700;
  font-size: 1.125rem;
}

.footer__copyright-bar {
  border-top: 1px solid var(--border);
  padding-block: 1rem;
}

.footer__copyright {
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* 5. Animations
   -------------------------------------------------------------------------- */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px var(--cta-glow); }
  50% { box-shadow: 0 0 35px var(--cta-glow-strong); }
}

@keyframes shine {
  0% { transform: translateX(-150%) skewX(-20deg); }
  60%, 100% { transform: translateX(250%) skewX(-20deg); }
}
