/* =====================================================================
   Cuatro Sotas — Shared Stylesheet
   Mobile-first. Breakpoints: 480px / 768px / 1024px
   Fonts: Merriweather (headings) · Open Sans (body) — Brand Guidelines
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@700;900&family=Open+Sans:wght@400;600;700&display=swap');

/* -------------------------------------------------------
   Custom properties (Brand palette)
   ------------------------------------------------------- */
:root {
  --green:      #1A472A;
  --green-dark: #0D2818;
  --gold:       #FFD700;
  --gold-dark:  #B8860B;
  --red:        #C8102E;
  --blue:       #1E3A5F;
  --cream:      #F5F5DC;
  --white:      #FFFFFF;
  --text:       #1A1A1A;
  --text-muted: #555555;
  --border:     #E0E0D0;
  --card-bg:    #FFFFFF;
  --bg-light:   #F9F9F0;

  --radius:    10px;
  --radius-sm: 6px;
  --shadow:    0 2px 12px rgba(0,0,0,.09);
  --shadow-lg: 0 6px 28px rgba(0,0,0,.14);
  --transition: 0.2s ease;

  --max-width: 900px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Open Sans', 'Segoe UI', Tahoma, sans-serif;
  background-color: var(--cream);
  color: var(--text);
  line-height: 1.7;
  font-size: 1rem;
}

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

a { color: var(--blue); }
a:hover { color: var(--green); }

/* -------------------------------------------------------
   Accessibility
   ------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -50px;
  left: 0;
  background: var(--green);
  color: var(--white);
  padding: 10px 18px;
  z-index: 200;
  text-decoration: none;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
  transition: top var(--transition);
}
.skip-link:focus { top: 0; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* -------------------------------------------------------
   Typography
   ------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: 'Merriweather', Georgia, serif;
  line-height: 1.25;
  color: var(--green);
}

h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.9rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1rem, 2.5vw, 1.3rem); margin-bottom: .5rem; }

p { margin-bottom: 1rem; color: var(--text-muted); }
p:last-child { margin-bottom: 0; }

ul { margin-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: .4rem; }

strong { color: var(--text); }

/* -------------------------------------------------------
   Header
   ------------------------------------------------------- */
header {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: var(--white);
  padding: 1.5rem 2rem;
  text-align: center;
}

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

.logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
  flex-shrink: 0;
}

.header-text h1 {
  color: var(--white);
  font-size: clamp(1.4rem, 4vw, 2rem);
}

.header-text p {
  color: rgba(255,255,255,.80);
  font-size: .95rem;
  margin: 0;
}

/* -------------------------------------------------------
   Navigation
   ------------------------------------------------------- */
nav {
  background-color: var(--green-dark);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .2rem .1rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: .4rem 1rem;
}

nav a {
  color: rgba(255,255,255,.82);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 600;
  padding: .45rem .75rem;
  border-radius: var(--radius-sm);
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--white);
  border-bottom-color: var(--gold);
}

nav a[aria-current="page"] {
  background: rgba(255,255,255,.06);
}

/* Language toggle */
#lang-toggle {
  margin-left: auto;
  background: transparent;
  border: 1.5px solid rgba(255,255,255,.45);
  color: var(--white);
  font-size: .8rem;
  font-weight: 700;
  padding: .3rem .7rem;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: .06em;
  transition: background var(--transition), border-color var(--transition);
  font-family: 'Open Sans', sans-serif;
}
#lang-toggle:hover {
  background: rgba(255,255,255,.12);
  border-color: var(--gold);
}

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

.section {
  padding: 3rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: .75rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
}

.bg-light { background-color: var(--bg-light); }
.bg-green {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: var(--white);
}
.bg-green h2, .bg-green h3, .bg-green p { color: var(--white); }

/* -------------------------------------------------------
   Card
   ------------------------------------------------------- */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.card h2 {
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--gold);
  margin-bottom: 1.1rem;
}

/* -------------------------------------------------------
   Hero section (index)
   ------------------------------------------------------- */
.hero {
  background: linear-gradient(160deg, var(--green) 0%, #0f3520 100%);
  color: var(--white);
  padding: 4rem 1.25rem;
  text-align: center;
}

.hero h2 {
  color: var(--white);
  font-size: clamp(1.5rem, 4.5vw, 2.5rem);
  margin-bottom: 1rem;
}

.hero p {
  color: rgba(255,255,255,.85);
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  max-width: 620px;
  margin: 0 auto 1.5rem;
}

.hero .tagline {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: var(--gold);
  font-family: 'Merriweather', serif;
  margin-bottom: 1rem;
}

.app-badges {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.badge-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255,255,255,.1);
  color: var(--white);
  padding: .75rem 1.4rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 600;
  border: 1.5px solid rgba(255,255,255,.3);
  transition: background var(--transition), border-color var(--transition);
}
.badge-btn:hover { background: rgba(255,255,255,.2); border-color: var(--gold); color: var(--white); }
.badge-btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* -------------------------------------------------------
   Feature / Mechanic highlight
   ------------------------------------------------------- */
.highlight-box {
  background: linear-gradient(135deg, #fff9e0 0%, #fffdf5 100%);
  border-left: 5px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.5rem 1.75rem;
  margin: 1.5rem 0;
}

.highlight-box p { color: var(--text); font-size: 1.05rem; }

.instant-win {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--green);
  color: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-top: 1.5rem;
}

.instant-win .win-icon { font-size: 2.5rem; flex-shrink: 0; }
.instant-win p { color: rgba(255,255,255,.9); margin: 0; font-size: .95rem; }
.instant-win strong { color: var(--gold); }

/* -------------------------------------------------------
   Suits grid
   ------------------------------------------------------- */
.suits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
  margin: 1.5rem 0;
}

.suit-card {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 1rem .75rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.suit-card .suit-icon { font-size: 1.8rem; display: block; margin-bottom: .4rem; }
.suit-card .suit-name { font-weight: 700; font-size: .9rem; color: var(--text); display: block; }
.suit-card .suit-name-en { font-size: .78rem; color: var(--text-muted); display: block; }

/* -------------------------------------------------------
   Game modes
   ------------------------------------------------------- */
.modes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.mode-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: transform var(--transition), box-shadow var(--transition);
}

.mode-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.mode-icon {
  font-size: 2.2rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: .15rem;
}

.mode-card h3 { margin-bottom: .35rem; }
.mode-card p  { margin: 0; font-size: .92rem; }

/* -------------------------------------------------------
   How to play — steps
   ------------------------------------------------------- */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  counter-reset: steps;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  counter-increment: steps;
}

.step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--green);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Merriweather', serif;
  font-weight: 700;
  font-size: .95rem;
}

.step p { margin: 0; font-size: .93rem; }
.step strong { color: var(--green); }

/* -------------------------------------------------------
   Card values table
   ------------------------------------------------------- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: .9rem;
}

th {
  background: var(--green);
  color: var(--white);
  padding: .7rem 1rem;
  text-align: left;
  font-family: 'Merriweather', serif;
  font-size: .85rem;
}

td { padding: .6rem 1rem; border-bottom: 1px solid var(--border); }
tr:hover td { background: #faf9f0; }
tr:last-child td { border-bottom: none; }

.val-zero { color: var(--green); font-weight: 700; }
.val-high { color: var(--red); font-weight: 700; }

/* -------------------------------------------------------
   Premium tiers
   ------------------------------------------------------- */
.premium-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.tier {
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.tier:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.tier::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}

.tier-bronze  { background: #fdf6ee; }
.tier-bronze::before  { background: #CD7F32; }

.tier-silver  { background: #f5f7fa; }
.tier-silver::before  { background: linear-gradient(90deg, #A8A9AD, #C0C0C0); }

.tier-gold    { background: #fffdf0; }
.tier-gold::before    { background: linear-gradient(90deg, var(--gold), var(--gold-dark)); }

.tier-legend  { background: #f8f0ff; }
.tier-legend::before  { background: linear-gradient(90deg, #7B2FBE, #C77DFF); }

.tier-name {
  font-family: 'Merriweather', serif;
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .35rem;
}

.tier-price {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.tier ul { margin-left: 1.25rem; }
.tier li { font-size: .88rem; }

/* -------------------------------------------------------
   Info links grid (footer cards)
   ------------------------------------------------------- */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.link-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: transform var(--transition), box-shadow var(--transition);
}

.link-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  color: var(--text);
}

.link-card .icon { font-size: 2.2rem; display: block; margin-bottom: .75rem; }
.link-card h3 { border-bottom: none; font-size: 1.05rem; margin-bottom: .35rem; color: var(--green); }
.link-card p  { font-size: .85rem; margin: 0; }

/* -------------------------------------------------------
   Support / FAQ
   ------------------------------------------------------- */
.faq-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--gold);
}

.faq-item h3 { margin-top: 0; font-size: 1rem; }
.faq-item p  { margin: .5rem 0 0; font-size: .92rem; }

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

.contact-item {
  background: var(--bg-light);
  padding: 1.25rem;
  border-radius: var(--radius);
  text-align: center;
}

.contact-item .icon { font-size: 1.8rem; margin-bottom: .5rem; }
.contact-item a { color: var(--blue); text-decoration: none; font-weight: 600; font-size: .9rem; }
.contact-item a:hover { text-decoration: underline; }

/* -------------------------------------------------------
   Buttons & CTAs
   ------------------------------------------------------- */
.button {
  display: inline-block;
  background: var(--green);
  color: var(--white);
  padding: .75rem 1.5rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 700;
  font-size: .93rem;
  transition: background var(--transition);
}
.button:hover { background: var(--green-dark); color: var(--white); }
.button + .button { margin-left: .75rem; }

.button-outline {
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
}
.button-outline:hover { background: rgba(255,255,255,.1); color: var(--white); }

/* -------------------------------------------------------
   Contact info block
   ------------------------------------------------------- */
.contact-info {
  background: var(--green);
  color: var(--white);
  padding: 1.75rem;
  border-radius: var(--radius);
  text-align: center;
}

.contact-info a      { color: var(--gold); }
.contact-info h2     { color: var(--white); border-bottom-color: rgba(255,255,255,.25); }
.contact-info p      { color: rgba(255,255,255,.85); }
.contact-info strong { color: var(--white); }

/* -------------------------------------------------------
   Page intro banner (inner pages)
   ------------------------------------------------------- */
.page-intro {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: var(--white);
  padding: 2.5rem 1.25rem;
  text-align: center;
}

.page-intro h2 {
  color: var(--white);
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  margin-bottom: .5rem;
}

.page-intro .page-date {
  display: inline-block;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.85);
  font-size: .82rem;
  padding: .3rem .9rem;
  border-radius: 20px;
  margin-top: .6rem;
}

/* Contact channels in green section */
.contact-channel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  background: rgba(255,255,255,.10);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
}

.contact-channel .icon   { font-size: 2rem; }
.contact-channel strong  { color: var(--white); font-size: 1rem; }
.contact-channel a       { color: var(--gold); font-weight: 600; font-size: .9rem; text-decoration: none; }
.contact-channel a:hover { text-decoration: underline; }

.contact-channels-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (max-width: 480px) {
  .contact-channels-grid { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------
   Legal pages highlights
   ------------------------------------------------------- */
.highlight {
  background: #FFF9E6;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--gold);
  margin: 1rem 0;
}
.highlight p { color: var(--text); margin: 0; }

.warning {
  background: #FFF3CD;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  border-left: 4px solid #FFC107;
  margin: 1rem 0;
}
.warning p { color: var(--text); margin: 0; }

.success {
  background: #D4EDDA;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  border-left: 4px solid #28A745;
  margin: 1rem 0;
}
.success p { color: var(--text); margin: 0; }

.danger {
  background: #F8D7DA;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  border-left: 4px solid #DC3545;
  margin: 1rem 0;
}
.danger p { color: var(--text); margin: 0; }

/* -------------------------------------------------------
   404 page
   ------------------------------------------------------- */
.error-page { text-align: center; padding: 4rem 1.25rem; }
.error-page .error-code {
  font-size: clamp(5rem, 20vw, 8rem);
  font-weight: 900;
  color: var(--green);
  font-family: 'Merriweather', serif;
  line-height: 1;
}
.error-page h2  { border-bottom: none; font-size: 1.5rem; margin: .75rem 0; }
.error-page p   { color: var(--text-muted); }

/* -------------------------------------------------------
   Footer
   ------------------------------------------------------- */
footer {
  background: var(--green-dark);
  color: var(--white);
  text-align: center;
  padding: 2rem 1.25rem;
  margin-top: 0;
}
footer p          { color: rgba(255,255,255,.8); font-size: .875rem; }
footer p + p      { margin-top: .4rem; opacity: .7; }
footer a          { color: var(--gold); }

/* -------------------------------------------------------
   Responsive — 480px+
   ------------------------------------------------------- */
@media (min-width: 480px) {
  .suits-grid { grid-template-columns: repeat(4, 1fr); }
  .steps-grid { grid-template-columns: 1fr 1fr; }
}

/* -------------------------------------------------------
   Responsive — 640px+
   ------------------------------------------------------- */
@media (min-width: 640px) {
  .modes-grid    { grid-template-columns: 1fr 1fr; }
  .premium-grid  { grid-template-columns: 1fr 1fr; }
}

/* -------------------------------------------------------
   Responsive — 768px+
   ------------------------------------------------------- */
@media (min-width: 768px) {
  .section { padding: 4rem 0; }

  .modes-grid   { grid-template-columns: repeat(3, 1fr); }
  .steps-grid   { grid-template-columns: repeat(3, 1fr); }

  .nav-inner { justify-content: flex-start; }
  #lang-toggle { margin-left: auto; }
}

/* -------------------------------------------------------
   Responsive — 1024px+
   ------------------------------------------------------- */
@media (min-width: 1024px) {
  :root { --max-width: 960px; }
  .premium-grid { grid-template-columns: repeat(4, 1fr); }
  .steps-grid   { grid-template-columns: repeat(4, 1fr); }
}

/* -------------------------------------------------------
   Reduced motion
   ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* -------------------------------------------------------
   Print
   ------------------------------------------------------- */
@media print {
  nav, .app-badges, #lang-toggle, .skip-link { display: none; }
  body { background: white; }
  .card, .tier, .faq-item { box-shadow: none; border: 1px solid #ccc; }
}
