/* =====================================================
   CoolBet España — site styles
   Palette matches original coolbet-spain.com:
     blue #043d7b/#005096/#0077b5/#235787 + orange-red #f70
   ===================================================== */

:root {
  --navy-900: #00325b;     /* deepest blue, page edges */
  --navy-800: #013469;     /* deep blue, secondary surfaces */
  --navy-700: #043d7b;     /* main header bg */
  --navy-600: #005096;     /* header alt + table head */
  --navy-500: #0077b5;     /* top bar / link blue */
  --navy-400: #235787;     /* borders, accents */
  --navy-300: #1e4b75;     /* nav hover underline */
  --orange-600: #d54a00;   /* deep orange-red on hover */
  --orange-500: #f70;      /* PRIMARY accent (#ff7700) */
  --orange-400: #ff8a2a;   /* lighter accent for hover/highlight */
  --ink-900: #111;
  --ink-700: #252525;
  --ink-500: #686868;
  --ink-300: #d3d8df;
  --paper: #ffffff;
  --paper-dim: #f4f6f8;
  --paper-mid: #eaecee;
  --line: #d8dde3;
  --shadow: 0 2px 12px rgba(0, 38, 76, 0.10);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: Tahoma, Geneva, Verdana, "DejaVu Sans", sans-serif;
  font-size: 16px;
  line-height: 1.62;
  color: var(--ink-700);
  background: var(--paper);
}

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

a {
  color: var(--orange-500);
  text-decoration: none;
}

a:hover {
  color: var(--orange-600);
  text-decoration: underline;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =====================================================
   HEADER
   ===================================================== */

.site-header {
  background: var(--navy-700);
  color: #fff;
  border-bottom: 3px solid var(--orange-500);
}

.site-header__top {
  background: var(--navy-500);
  padding: 8px 0;
}

.site-header__top-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.site-header__top-link {
  color: var(--paper-mid);
  font-size: 13px;
  text-decoration: none;
}

.site-header__top-link:hover {
  color: var(--orange-500);
}

.site-header__main {
  padding: 14px 0;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.site-logo {
  display: inline-block;
}

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

.primary-nav {
  flex: 0 1 auto;
  margin-left: 14px;
}

.primary-nav__list {
  display: flex;
  gap: 2px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.primary-nav__list a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 11px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-radius: 4px;
  transition: background 0.18s ease, color 0.18s ease;
}

.primary-nav__list a:hover,
.primary-nav__list a[aria-current="page"] {
  background: var(--navy-600);
  color: var(--orange-500);
  text-decoration: none;
}

.primary-nav__list a img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1) sepia(1) saturate(8) hue-rotate(355deg);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--register {
  background: var(--orange-500);
  color: #fff;
  box-shadow: 0 2px 0 var(--orange-600);
}

.btn--register:hover {
  background: var(--orange-600);
  color: #fff;
}

.btn--login {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
  padding: 8px 18px;
}

.btn--login:hover {
  background: #fff;
  color: var(--navy-700);
}

.btn--cta {
  background: var(--orange-500);
  color: #fff;
  font-size: 16px;
  padding: 14px 28px;
  box-shadow: 0 3px 0 var(--orange-600);
}

.btn--cta:hover {
  background: var(--orange-600);
  color: #fff;
}

.btn--inline {
  background: var(--navy-700);
  color: #fff;
  padding: 12px 26px;
  box-shadow: 0 3px 0 var(--navy-900);
}

.btn--inline:hover {
  background: var(--navy-700);
  color: var(--orange-500);
}

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

.header-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: var(--navy-700);
  color: #fff;
  border: 1px solid var(--navy-500);
  border-radius: 4px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

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

.header-lang:hover,
.header-lang[aria-expanded="true"] {
  background: var(--navy-500);
}

.header-lang__list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  list-style: none;
  margin: 0;
  padding: 6px;
  min-width: 170px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  display: none;
  z-index: 100;
}

.header-lang-wrap:hover .header-lang__list,
.header-lang-wrap.is-open .header-lang__list {
  display: block;
}

.header-lang__list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  color: var(--ink-700);
  font-size: 13px;
  font-weight: 600;
  border-radius: 3px;
}

.header-lang__list a:hover,
.header-lang__list a[aria-current="page"] {
  background: var(--paper-dim);
  color: var(--navy-700);
  text-decoration: none;
}

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

.menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 3px;
  background: #fff;
  margin: 5px 0;
  border-radius: 2px;
}

/* =====================================================
   WELCOME / HERO
   ===================================================== */

.welcome {
  background: linear-gradient(135deg, var(--navy-700) 0%, var(--navy-500) 100%);
  color: #fff;
  padding: 38px 0 32px;
  border-bottom: 4px solid var(--orange-500);
}

.welcome h1 {
  margin: 0 0 14px;
  font-size: 34px;
  line-height: 1.18;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.welcome p {
  margin: 0;
  max-width: 980px;
  font-size: 16px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.92);
}

main > .container {
  padding-top: 28px;
  padding-bottom: 40px;
}

/* =====================================================
   PROMO BANNER
   ===================================================== */

.promo-banner {
  position: relative;
  margin: 18px 0 22px;
  padding: 24px 28px;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(120deg, var(--navy-700) 0%, var(--navy-600) 60%, var(--navy-500) 100%);
  color: #fff;
  box-shadow: var(--shadow);
  border: 1px solid var(--navy-500);
}

.promo-banner__image {
  position: absolute;
  top: 0;
  right: 0;
  width: 38%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  pointer-events: none;
}

.promo-banner__content {
  position: relative;
  max-width: 580px;
}

.promo-banner__label {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--orange-500);
}

.promo-banner__value {
  margin: 0 0 16px;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 800;
  color: #fff;
}

/* =====================================================
   QUICK CATEGORIES
   ===================================================== */

.quick-categories {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 18px 0 26px;
}

.quick-categories__item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 65px;
  padding: 0 18px;
  background: var(--paper-dim);
  border: 1px solid var(--line);
  border-radius: 30px;
  color: var(--navy-700);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.quick-categories__item:hover {
  background: var(--navy-700);
  color: #fff;
  border-color: var(--navy-700);
  text-decoration: none;
}

.quick-categories__item img {
  width: 32px;
  height: 32px;
}

.quick-categories__item:hover img {
  filter: brightness(0) invert(1);
}

/* =====================================================
   GAME GRID + SPORTS GRID
   ===================================================== */

main h2 {
  font-size: 26px;
  line-height: 1.25;
  font-weight: 800;
  color: var(--navy-700);
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--orange-500);
  display: inline-block;
}

main h3 {
  font-size: 19px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--navy-700);
  margin: 22px 0 10px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin: 14px 0 20px;
}

.game-grid a {
  display: block;
  border-radius: 6px;
  overflow: hidden;
  background: var(--navy-700);
  border: 2px solid transparent;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  box-shadow: var(--shadow);
}

.game-grid a:hover {
  transform: translateY(-3px);
  border-color: var(--orange-500);
  box-shadow: 0 6px 18px rgba(0, 38, 76, 0.22);
}

.game-grid img {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.sports-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  list-style: none;
  margin: 14px 0 22px;
  padding: 0;
}

.sports-grid li {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 8px;
  background: var(--paper-dim);
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.sports-grid li:hover {
  background: #fff;
  border-color: var(--orange-500);
}

.sports-grid img {
  width: 56px;
  height: 56px;
  margin-bottom: 8px;
  object-fit: contain;
}

.sports-grid span {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy-700);
}

/* =====================================================
   ARTICLE BODY
   ===================================================== */

.article {
  margin-top: 24px;
}

.article p {
  margin: 0 0 14px;
}

.article ul,
.article ol {
  margin: 0 0 18px 0;
  padding-left: 24px;
}

.article li {
  margin-bottom: 8px;
}

.article-body section {
  clear: both;
  margin-bottom: 8px;
}

.toc {
  background: var(--paper-dim);
  border: 1px solid var(--line);
  border-left: 4px solid var(--orange-500);
  padding: 16px 22px 18px;
  margin: 0 0 22px;
  border-radius: 4px;
}

.toc__title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--navy-700);
}

.toc__list {
  margin: 0;
  padding-left: 20px;
}

.toc__list li {
  margin-bottom: 4px;
}

.toc__list a {
  color: var(--navy-700);
  font-weight: 600;
}

.toc__list a:hover {
  color: var(--orange-500);
}

.hero-image {
  margin: 22px auto;
  max-width: 800px;
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.section-with-image {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 26px;
  align-items: start;
  margin: 18px 0;
}

.section-image {
  margin: 0;
}

.section-image img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.float-right {
  float: right;
  width: 38%;
  max-width: 449px;
  margin: 6px 0 14px 22px;
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.float-left {
  float: left;
  width: 38%;
  max-width: 449px;
  margin: 6px 22px 14px 0;
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 22px;
  font-size: 14px;
  border: 1px solid var(--line);
}

.comparison-table th,
.comparison-table td {
  padding: 11px 14px;
  text-align: left;
  border: 1px solid var(--line);
  vertical-align: top;
}

.comparison-table thead th {
  background: var(--navy-700);
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.4px;
}

.comparison-table tbody tr:nth-child(2n) td {
  background: var(--paper-dim);
}

.cta-block {
  text-align: center;
  margin: 22px 0;
}

/* =====================================================
   FAQ
   ===================================================== */

.faq {
  margin: 18px 0 6px;
}

.faq__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.faq__item {
  background: var(--paper-dim);
  border: 1px solid var(--line);
  border-left: 3px solid var(--orange-500);
  border-radius: 4px;
  padding: 12px 16px;
}

.faq__question {
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  color: var(--navy-700);
  list-style: none;
  position: relative;
  padding-right: 24px;
}

.faq__question::-webkit-details-marker {
  display: none;
}

.faq__question::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--orange-500);
  line-height: 1;
}

.faq__item[open] .faq__question::after {
  content: "−";
}

.faq__answer {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 14px;
  color: var(--ink-700);
}

.faq__answer p {
  margin: 0 0 8px;
}

/* =====================================================
   FOOTER
   ===================================================== */

.site-footer {
  background: var(--navy-900);
  color: var(--paper-mid);
  margin-top: 50px;
  padding: 36px 0 18px;
  border-top: 4px solid var(--orange-500);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--navy-500);
}

.footer-brand img {
  max-height: 38px;
  width: auto;
  margin-bottom: 10px;
}

.footer-brand__text {
  font-size: 14px;
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.78);
}

.footer-social {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 8px;
}

.footer-social a {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--navy-700);
  color: #fff;
  border-radius: 50%;
  transition: background 0.18s ease, color 0.18s ease;
}

.footer-social a:hover {
  background: var(--orange-500);
  color: #fff;
  text-decoration: none;
}

.footer-heading {
  font-size: 14px;
  font-weight: 800;
  color: var(--orange-500);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--navy-500);
  display: block;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--orange-500);
  text-decoration: underline;
}

.footer-nav__label {
  margin: 0 0 4px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.footer-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--navy-500);
}

.footer-logos img {
  max-height: 60px;
  max-width: 90px;
  width: auto;
  height: auto;
  opacity: 0.85;
  transition: opacity 0.18s ease;
}

.footer-logos img:hover {
  opacity: 1;
}

.footer-payments {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--navy-500);
}

.footer-payments img {
  max-height: 19px;
  max-width: 80px;
  width: auto;
  height: auto;
  opacity: 0.85;
}

.footer-bottom {
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  text-align: center;
}

.copyright {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.5;
}

.footer-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: center;
}

.footer-partners img {
  max-height: 28px;
  max-width: 85px;
  width: auto;
  height: auto;
  opacity: 0.78;
}

/* =====================================================
   SCROLL-TOP
   ===================================================== */

.scroll-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--orange-500);
  color: #fff;
  border: 0;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  display: none;
  z-index: 90;
  transition: background 0.18s ease, transform 0.18s ease;
}

.scroll-top:hover {
  background: var(--orange-600);
  transform: translateY(-2px);
}

.scroll-top.is-visible {
  display: block;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 991px) {
  .welcome h1 {
    font-size: 28px;
  }
  main h2 {
    font-size: 22px;
  }
  .promo-banner__value {
    font-size: 22px;
  }
  .sports-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .quick-categories {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .section-with-image {
    grid-template-columns: 1fr;
  }
  .float-right,
  .float-left {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 14px 0;
  }
}

@media (max-width: 720px) {
  .menu-toggle {
    display: block;
    margin-left: auto;
  }
  .primary-nav {
    order: 5;
    width: 100%;
    display: none;
  }
  .primary-nav.is-open {
    display: block;
  }
  .primary-nav__list {
    flex-direction: column;
    align-items: stretch;
  }
  .primary-nav__list a {
    justify-content: flex-start;
  }
  .header-actions {
    margin-left: auto;
  }
  .btn--register,
  .btn--login {
    padding: 8px 14px;
    font-size: 13px;
  }
  .welcome {
    padding: 28px 0 24px;
  }
  .welcome h1 {
    font-size: 24px;
  }
  .promo-banner {
    padding: 20px;
  }
  .promo-banner__image {
    display: none;
  }
  .game-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .sports-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .quick-categories {
    grid-template-columns: 1fr;
  }
  .faq__list {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .comparison-table {
    font-size: 13px;
  }
  .comparison-table th,
  .comparison-table td {
    padding: 8px 10px;
  }
}


/* =============================================================================
   MOBILE FIXES — burger right-aligned, flag dropdown on mobile,
   close cue (X), uniform CTA size
   ========================================================================= */
@media (max-width: 720px) {
  .menu-toggle {
    order: 100;
    position: relative;
    z-index: 1101;
  }
  .menu-toggle span {
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) 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: 540px) {
  .header-actions .btn--login {
    display: none;
  }
}

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