/* ============================================================
   Coolbet Brasil — refined design tokens
   Base palette: deep navy (#013469) + orange CTA (#ff7a18)
   ============================================================ */

:root {
  --bg: #013469;
  --bg-2: #022a55;
  --bg-3: #001f44;
  --surface: #0a3f7a;
  --surface-2: #0c4a90;
  --border: #1a508f;
  --text: #ffffff;
  --text-muted: #b9c8de;
  --orange: #ff7a18;
  --orange-2: #ff9242;
  --orange-dark: #e66510;
  --accent: #ffd166;
  --link: #7fb6ff;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --maxw: 1180px;
  --gap: 1.25rem;
}

* { box-sizing: border-box; }

html { font-size: 16px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--orange-2); text-decoration: underline; }

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

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Header ---------- */
.site-header {
  background: linear-gradient(180deg, #022a55 0%, #013469 100%);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  max-width: var(--maxw);
  margin: 0 auto;
}

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

.primary-nav { flex: 1; }
.primary-nav ul {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  justify-content: center;
}
.primary-nav a {
  display: block;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.primary-nav a:hover { background: var(--surface); color: var(--orange-2); text-decoration: none; }
.primary-nav a[aria-current="page"] {
  background: var(--orange);
  color: #fff;
}

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

.btn {
  display: inline-block;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.4px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(180deg, var(--orange-2), var(--orange));
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 122, 24, 0.35);
}
.btn-primary:hover { background: linear-gradient(180deg, var(--orange), var(--orange-dark)); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.4);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); color: var(--text); }

/* ---------- Language dropdown ---------- */
.lang-dropdown { position: relative; }
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}
.lang-toggle img { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; }
.lang-toggle:hover { background: rgba(255, 255, 255, 0.14); }

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  list-style: none;
  margin: 0;
  padding: 0.4rem 0;
  min-width: 200px;
  display: none;
  box-shadow: var(--shadow);
  z-index: 200;
}
.lang-dropdown:hover .lang-menu,
.lang-dropdown.is-open .lang-menu { display: block; }

.lang-menu a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.9rem;
  color: var(--text);
  font-size: 0.92rem;
  text-decoration: none;
}
.lang-menu a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.lang-menu img { width: 22px; height: 16px; object-fit: cover; border-radius: 2px; }
.lang-item.is-current a {
  background: rgba(255, 122, 24, 0.18);
  color: var(--orange-2);
  font-weight: 700;
}

/* ---------- Hamburger / Mobile ---------- */
.hamburger {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.4rem;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
  transition: transform 0.2s, opacity 0.2s;
}

.mobile-nav { display: none; background: var(--bg-2); border-top: 1px solid var(--border); }
.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
}
.mobile-nav a {
  display: block;
  padding: 0.7rem 1.5rem;
  color: var(--text);
  font-weight: 600;
}
.mobile-nav a:hover { background: var(--surface); }
.mobile-nav.is-open { display: block; }

/* ---------- Main / breadcrumb / H1 ---------- */
main { padding: 2rem 0 4rem; }

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.5rem;
  color: var(--border);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--orange-2); }

h1 {
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 1.5rem;
  text-align: center;
  letter-spacing: 0.2px;
}
h1::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: var(--orange);
  border-radius: 2px;
  margin: 0.7rem auto 0;
}

h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  font-weight: 800;
  line-height: 1.25;
  margin: 2rem 0 1rem;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 1.5rem 0 0.6rem;
}

.article-body section {
  margin-bottom: 2rem;
  clear: both;
}

.article-body p { margin: 0 0 1rem; }

.article-body .lede {
  font-size: 1.05rem;
  color: #e6eefb;
  margin-bottom: 1.5rem;
}

.article-body ul {
  margin: 0 0 1.2rem;
  padding-left: 1.5rem;
}
.article-body li { margin-bottom: 0.4rem; }

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

/* ---------- Tables ---------- */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1rem 0 1.5rem;
  background: var(--surface);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.data-table th, .data-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.data-table th {
  background: var(--surface-2);
  font-weight: 700;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:nth-child(even) { background: rgba(255, 255, 255, 0.03); }

/* ---------- Hero gallery (centered) ---------- */
.hero-gallery {
  max-width: 800px;
  margin: 1.5rem auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero-gallery img { width: 100%; }

/* ---------- Floated section images ---------- */
.float-left, .float-right {
  width: 38%;
  max-width: 449px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 0.3rem 0 1rem;
}
.float-left  { float: left;  margin-right: 1.5rem; }
.float-right { float: right; margin-left: 1.5rem; }

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

/* ---------- Quick categories pill row ---------- */
.quick-cats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin: 1.5rem 0;
}
.qc-tile {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0 1rem;
  height: 65px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: 30px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.qc-tile:hover {
  transform: translateY(-2px);
  border-color: var(--orange);
  box-shadow: 0 6px 18px rgba(255, 122, 24, 0.2);
  text-decoration: none;
  color: var(--text);
}
.qc-tile img { width: 36px; height: 36px; object-fit: contain; }
.qc-tile span { letter-spacing: 0.4px; }

@media (max-width: 720px) {
  .quick-cats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Game grid ---------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
  margin: 1.5rem 0;
}
.game-tile {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.game-tile:hover {
  transform: translateY(-3px);
  border-color: var(--orange);
  box-shadow: 0 8px 22px rgba(255, 122, 24, 0.25);
  color: var(--text);
  text-decoration: none;
}
.game-tile img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.game-tile span {
  display: block;
  padding: 0.55rem 0.7rem;
  font-weight: 700;
  font-size: 0.9rem;
  text-align: center;
}

/* ---------- Sport grid ---------- */
.sport-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.7rem;
  margin: 1.5rem 0;
}
.sport-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.9rem 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.sport-tile:hover {
  transform: translateY(-2px);
  border-color: var(--orange);
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}
.sport-tile img { width: 44px; height: 44px; object-fit: contain; }

@media (max-width: 991px) { .sport-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 480px) { .sport-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Promo banner ---------- */
.promo-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: center;
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 2rem 0;
  padding: 0;
  box-shadow: var(--shadow);
}
.promo-banner img {
  width: 100%;
  height: 100%;
  max-height: 280px;
  object-fit: cover;
}
.promo-text { padding: 1.5rem 2rem; }
.promo-text h2 {
  margin: 0 0 0.7rem;
  text-transform: none;
  font-size: 1.5rem;
}
.promo-text p { margin: 0 0 1.2rem; }

@media (max-width: 720px) {
  .promo-banner { grid-template-columns: 1fr; }
  .promo-banner img { max-height: 180px; }
}

/* ---------- FAQ accordion ---------- */
.faq h2 { text-align: center; }
.faq {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem 1rem;
  align-items: start;
  margin-top: 1.5rem;
}
.faq h2 { grid-column: 1 / -1; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0;
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 0.85rem 1.1rem;
  font-weight: 700;
  position: relative;
  padding-right: 2.5rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--orange);
  font-weight: 600;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-answer {
  padding: 0 1.1rem 1.1rem;
  color: #d6e1f3;
  border-top: 1px solid var(--border);
  padding-top: 0.85rem;
}
.faq-item .faq-answer p { margin: 0 0 0.6rem; }
.faq-item .faq-answer p:last-child { margin: 0; }

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

/* ---------- Placeholder card (for unwritten pages) ---------- */
.placeholder-card {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 2rem 0;
  box-shadow: var(--shadow);
}
.placeholder-card p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0 0 1.5rem;
}

/* ---------- 404 ---------- */
.error-404 {
  text-align: center;
  padding: 3rem 1rem;
}
.error-404 h1 { margin-bottom: 1rem; }
.error-404 ul {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.error-404 ul a {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-3);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-logo img { max-height: 38px; width: auto; margin-bottom: 0.8rem; }
.footer-tagline { color: var(--text-muted); font-size: 0.9rem; max-width: 360px; }

.footer-nav h3, .footer-support h3 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 0 0 0.8rem;
  color: var(--orange-2);
}
.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-nav li { margin-bottom: 0.4rem; }
.footer-nav a { color: var(--text-muted); font-size: 0.9rem; }
.footer-nav a:hover { color: var(--orange-2); }
.footer-support p { color: var(--text-muted); font-size: 0.85rem; margin: 0 0 0.5rem; }

.social-row {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0.8rem 0 0;
}
.social-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.social-row a:hover {
  background: var(--orange);
  color: #fff;
  transform: translateY(-2px);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.2rem 1.5rem;
  padding: 1.2rem 0;
  border-top: 1px solid var(--border);
}
.footer-row img { object-fit: contain; opacity: 0.85; transition: opacity 0.15s; }
.footer-row img:hover { opacity: 1; }

.sport-partners img { max-height: 50px; max-width: 90px; }
.payment-methods img { max-height: 19px; max-width: 75px; }
.partner-badges img { max-height: 28px; max-width: 90px; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.3px;
}

@media (max-width: 991px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .footer-top { grid-template-columns: 1fr; }
}

/* ---------- Mobile header collapse ---------- */
@media (max-width: 991px) {
  .primary-nav { display: none; }
  .header-actions .btn { padding: 0.5rem 0.85rem; font-size: 0.82rem; }
  .hamburger { display: inline-block; }
}
@media (max-width: 600px) {
  .header-actions .btn-ghost { display: none; }
  .lang-toggle span { display: none; }
}

/* =============================================================================
   MOBILE FIXES — burger X cue, lang dropdown scroll, equal CTA size
   ========================================================================= */
@media (max-width: 991px) {
  .hamburger {
    flex-shrink: 0;
  }
  .hamburger span {
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .hamburger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  .hamburger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }
  .hamburger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }
  /* Lang dropdown max-height + scroll on mobile */
  .lang-menu {
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    overscroll-behavior: contain;
    right: 0;
    left: auto;
  }
}

/* Equal-sized header CTAs (same size in header) */
.header-actions .btn-ghost,
.header-actions .btn-primary {
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
  line-height: 1.2;
  min-height: 38px;
  align-items: center;
  justify-content: center;
}

/* Push header-actions to the right edge on mobile */
@media (max-width: 991px) {
  .header-actions {
    margin-left: auto;
  }
}

/* Mobile: shrink right padding so the burger sits flush to the edge */
@media (max-width: 991px) {
  .site-header .container.header-inner {
    padding-right: 0.5rem;
  }
  .hamburger {
    margin-right: 0;
  }
}
