/* ==========================================================================
   CoolBet Sweden — Stylesheet
   Dark navy theme. Purple banner (#4b35a1). Gold-to-red gradient CTAs.
   ========================================================================== */

/* Reset & base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: #e6e8ee;
  background: #0d1424;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: #d7a42a;
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: #f0bc40;
}

ul,
ol {
  padding: 0;
  margin: 0;
}

ul {
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0 0 0.6em;
  line-height: 1.25;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(1.85rem, 4.2vw, 2.6rem);
  text-align: center;
  margin-top: 1.5rem;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 1.875rem);
  margin-top: 2.2rem;
  font-weight: 700;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 1.5rem;
}

p {
  margin: 0 0 1em;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.25em 0;
  background: #131a2c;
  border-radius: 10px;
  overflow: hidden;
}

th,
td {
  padding: 0.7em 0.9em;
  text-align: left;
  border-bottom: 1px solid #1f2942;
  vertical-align: top;
}

th {
  background: #1d2331;
  color: #ffffff;
  font-weight: 700;
}

tr:last-child td {
  border-bottom: none;
}

/* Container
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 0.65em 1.3em;
  border-radius: 8px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition:
    transform 0.12s ease,
    filter 0.12s ease;
  line-height: 1.2;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn--register {
  background: linear-gradient(90deg, #d7a42a 0%, #ac3a31 100%);
  color: #ffffff;
}

.btn--login {
  background: #1d2331;
  color: #ffffff;
  border: 1px solid #2a3450;
}

.btn--play {
  background: linear-gradient(90deg, #d7a42a 0%, #ac3a31 100%);
  color: #ffffff;
  font-size: 1.05rem;
  padding: 0.75em 1.6em;
}

/* Header
   -------------------------------------------------------------------------- */
.site-header {
  background: #0a1020;
  border-bottom: 1px solid #1a2338;
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
}

.site-logo img {
  max-height: 38px;
  width: auto;
}

.primary-nav {
  flex: 1;
}

.primary-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}

.primary-nav__list a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.55em 0.9em;
  color: #cfd5e3;
  font-weight: 600;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.primary-nav__list a:hover {
  background: #1a2338;
  color: #ffffff;
}

.primary-nav__list a[aria-current="page"] {
  background: #1a2338;
  color: #ffffff;
}

.primary-nav__list img {
  width: 16px;
  height: 16px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-actions .btn {
  padding: 0.55em 1.05em;
  font-size: 0.92rem;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: #1a2338;
  position: relative;
}

.menu-toggle::before,
.menu-toggle::after,
.menu-toggle span {
  content: "";
  display: block;
  position: absolute;
  left: 9px;
  right: 9px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
}

.menu-toggle::before {
  top: 12px;
}

.menu-toggle span {
  top: 19px;
}

.menu-toggle::after {
  top: 26px;
}

/* Language dropdown
   -------------------------------------------------------------------------- */
.header-lang-wrap {
  position: relative;
}

.header-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.45em 0.7em;
  background: #1a2338;
  border-radius: 6px;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
}

.header-lang img {
  width: 22px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
}

.header-lang-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: #131a2c;
  border: 1px solid #2a3450;
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.18s ease;
  z-index: 60;
}

.header-lang-wrap:hover .header-lang-list,
.header-lang-wrap.is-open .header-lang-list {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.header-lang-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.45em 0.6em;
  color: #cfd5e3;
  border-radius: 5px;
  font-size: 0.9rem;
}

.header-lang-list a:hover {
  background: #1a2338;
  color: #ffffff;
}

.header-lang-list a[aria-current="page"] {
  background: #1a2338;
  color: #ffffff;
}

.header-lang-list img {
  width: 22px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
}

/* Welcome / hero section
   -------------------------------------------------------------------------- */
.welcome {
  padding: 1.4rem 0 0;
  text-align: center;
}

.welcome p {
  max-width: 820px;
  margin: 0 auto 1em;
  color: #c5cad8;
}

/* Promo banner
   -------------------------------------------------------------------------- */
.promo-banner {
  margin: 1.5rem 0;
  padding: 28px 32px;
  background-color: #4b35a1;
  background-image: linear-gradient(135deg, #4b35a1 0%, #34268a 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 28px;
  position: relative;
  overflow: hidden;
}

.promo-banner__image {
  flex-shrink: 0;
  max-width: 220px;
  width: 30%;
}

.promo-banner__image img {
  width: 100%;
  height: auto;
}

.promo-banner__content {
  flex: 1;
  min-width: 0;
}

.promo-banner__label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  font-weight: 700;
  color: #d7a42a;
  margin: 0 0 6px;
}

.promo-banner__amount {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
  margin: 0 0 14px;
}

.promo-banner .btn {
  background: linear-gradient(90deg, #d7a42a 0%, #ac3a31 100%);
  color: #ffffff;
  font-size: 1rem;
  padding: 0.75em 1.7em;
}

/* Quick category row (4 pills)
   -------------------------------------------------------------------------- */
.quick-cats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 1.5rem 0;
}

.quick-cats__item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 65px;
  padding: 0 18px;
  background: #1d2331;
  color: #fefefe;
  border-radius: 30px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.95rem;
  transition:
    transform 0.15s ease,
    background 0.15s ease;
}

.quick-cats__item:hover {
  background: #232a3d;
  color: #ffffff;
  transform: translateY(-1px);
}

.quick-cats__item img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Casino tile grid
   -------------------------------------------------------------------------- */
.section-heading {
  font-size: clamp(1.4rem, 3vw, 1.875rem);
  margin: 2.4rem 0 1.2rem;
  color: #ffffff;
  font-weight: 800;
}

.casino-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 2rem;
}

.casino-tiles a {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  background: #1a2338;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.casino-tiles a:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.casino-tiles img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Sport grid (7-up at 1200px)
   -------------------------------------------------------------------------- */
.sport-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  margin-bottom: 2rem;
}

.sport-grid__item {
  background: #1d2331;
  color: #fefefe;
  border-radius: 12px;
  padding: 16px 8px;
  text-align: center;
  transition:
    background 0.15s ease,
    transform 0.15s ease;
}

.sport-grid__item:hover {
  background: #232a3d;
  transform: translateY(-2px);
}

.sport-grid__item img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin: 0 auto 8px;
}

.sport-grid__item .sport-name {
  font-weight: 700;
  font-size: 0.9rem;
}

/* TOC
   -------------------------------------------------------------------------- */
.toc {
  background: #131a2c;
  border: 1px solid #1f2942;
  border-radius: 10px;
  padding: 18px 22px;
  margin: 2rem 0;
}

.toc__title {
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

.toc ol {
  margin: 0;
  padding-left: 1.3em;
  color: #cfd5e3;
}

.toc li {
  margin: 4px 0;
}

.toc a {
  color: #d7a42a;
}

.toc a:hover {
  color: #f0bc40;
}

/* Article body
   -------------------------------------------------------------------------- */
.article-body {
  max-width: 980px;
  margin: 0 auto;
}

.article-body section {
  margin: 2.2rem 0;
  clear: both;
}

.article-body section::after {
  content: "";
  display: block;
  clear: both;
}

.article-body ul,
.article-body ol {
  padding-left: 1.5em;
  margin: 1em 0;
}

.article-body ul {
  list-style: disc;
}

.article-body ol {
  list-style: decimal;
}

.article-body li {
  margin: 0.4em 0;
}

.article-body strong {
  color: #ffffff;
}

/* Hero gallery image (centered illustration)
   -------------------------------------------------------------------------- */
.hero-gallery {
  max-width: 800px;
  margin: 1.6rem auto;
}

.hero-gallery img {
  width: 100%;
  border-radius: 14px;
}

/* Floated section images
   -------------------------------------------------------------------------- */
.float-right {
  float: right;
  width: 38%;
  max-width: 449px;
  margin: 0 0 1rem 1.4rem;
  border-radius: 12px;
}

.float-left {
  float: left;
  width: 38%;
  max-width: 449px;
  margin: 0 1.4rem 1rem 0;
  border-radius: 12px;
}

@media (max-width: 991px) {
  .float-right,
  .float-left {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 1rem 0;
  }
}

/* FAQ
   -------------------------------------------------------------------------- */
.faq {
  margin: 2.5rem 0;
}

.faq__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.faq__item {
  background: #1a2338;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #1f2942;
}

.faq__question {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  padding: 14px 16px;
  font-weight: 700;
  color: #ffffff;
  font-size: 1rem;
}

.faq__question::after {
  content: "";
  width: 14px;
  height: 14px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 12px;
}

.faq__item.is-open .faq__question::after {
  transform: rotate(-135deg);
}

.faq__answer {
  display: none;
  padding: 0 16px 16px;
  color: #cfd5e3;
}

.faq__item.is-open .faq__answer {
  display: block;
}

@media (max-width: 720px) {
  .faq__list {
    grid-template-columns: 1fr;
  }
}

/* Play CTA after article
   -------------------------------------------------------------------------- */
.cta-row {
  text-align: center;
  margin: 2rem 0 2.5rem;
}

/* Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: #0a1020;
  border-top: 1px solid #1a2338;
  margin-top: 3rem;
  padding: 2.5rem 0 1.5rem;
}

.site-footer .site-logo img {
  max-height: 40px;
  margin-bottom: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 2rem;
}

.footer-col h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
  margin: 0 0 14px;
}

.footer-col p {
  color: #aab2c5;
  margin: 0 0 12px;
  font-size: 0.93rem;
}

.footer-col ul li {
  margin: 6px 0;
}

.footer-col ul a {
  color: #cfd5e3;
  font-size: 0.93rem;
}

.footer-col ul a:hover {
  color: #ffffff;
}

.footer-col .menu-description {
  color: #aab2c5;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.social-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.social-row a {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #1a2338;
  color: #cfd5e3;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.social-row a:hover {
  background: #d7a42a;
  color: #0a1020;
}

.social-row svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-partners,
.footer-payments,
.footer-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px 22px;
  padding: 18px 0;
  border-top: 1px solid #1a2338;
}

.footer-partners img {
  max-height: 50px;
  max-width: 90px;
  object-fit: contain;
  filter: brightness(0.95) contrast(1.05);
}

.footer-payments img {
  max-height: 19px;
  max-width: 75px;
  object-fit: contain;
}

.footer-badges img {
  max-height: 28px;
  max-width: 85px;
  object-fit: contain;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid #1a2338;
  color: #8a93a8;
  font-size: 0.85rem;
}

/* Scroll-to-top button
   -------------------------------------------------------------------------- */
.scroll-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #1a2338;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
  z-index: 40;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  background: #d7a42a;
  color: #0a1020;
}

.scroll-top svg {
  width: 18px;
  height: 18px;
}

/* 404 page
   -------------------------------------------------------------------------- */
.error-page {
  text-align: center;
  padding: 4rem 0;
}

.error-page h1 {
  font-size: clamp(3rem, 10vw, 6rem);
  margin: 0 0 0.4em;
  background: linear-gradient(90deg, #d7a42a 0%, #ac3a31 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.error-page p {
  max-width: 500px;
  margin: 0 auto 1.5em;
  color: #c5cad8;
}

/* Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .sport-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 880px) {
  .menu-toggle {
    display: block;
  }
  .primary-nav {
    position: fixed;
    inset: 0;
    background: #0a1020;
    padding: 80px 24px 24px;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 40;
    overflow-y: auto;
  }
  .primary-nav.is-open {
    transform: translateX(0);
  }
  .primary-nav__list {
    flex-direction: column;
    gap: 4px;
    align-items: stretch;
  }
  .primary-nav__list a {
    padding: 0.85em 1em;
    font-size: 1.05rem;
  }
  .header-actions .btn {
    padding: 0.5em 0.9em;
    font-size: 0.85rem;
  }
}

@media (max-width: 720px) {
  .promo-banner {
    flex-direction: column;
    text-align: center;
    padding: 22px 18px;
  }
  .promo-banner__image {
    max-width: 160px;
    width: 50%;
  }
  .quick-cats {
    grid-template-columns: repeat(2, 1fr);
  }
  .sport-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-bottom {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .casino-tiles {
    grid-template-columns: repeat(2, 1fr);
  }
  .sport-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .header-actions .btn--login {
    display: none;
  }
}


/* =============================================================================
   MOBILE FIXES — burger right-aligned, flag dropdown on mobile,
   close cue (X), uniform CTA size
   ========================================================================= */
@media (max-width: 880px) {
  .menu-toggle {
    order: 100;
    position: relative;
    z-index: 1101;
  }
  .menu-toggle::before,
  .menu-toggle span,
  .menu-toggle::after {
    transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
  }
  .menu-toggle[aria-expanded="true"]::before {
    top: 19px;
    transform: rotate(45deg);
  }
  .menu-toggle[aria-expanded="true"] span {
    opacity: 0;
  }
  .menu-toggle[aria-expanded="true"]::after {
    top: 19px;
    transform: rotate(-45deg);
  }
  .primary-nav {
    z-index: 1100;
  }
  /* Show language dropdown on mobile too */
  .header-lang-wrap,
  .header-lang {
    display: inline-flex !important;
  }
  .header-lang-wrap {
    margin-left: 0;
    order: 99;
    position: relative;
    z-index: 1102;
  }
  .header-lang {
    padding: 6px 8px;
    align-items: center;
  }
  .header-lang__list {
    right: 0;
    left: auto;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  /* Equal-sized header CTAs */
  .header-actions .btn--register,
  .header-actions .btn--login {
    padding: 0.5rem 0.9rem;
    font-size: 0.8rem;
    line-height: 1.2;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .header-actions .btn--login {
    display: none;
  }
}

/* Push header-actions to right edge so lang sits right next to burger */
@media (max-width: 880px) {
  .header-actions {
    margin-left: auto;
  }
}
