/* ============================================
   CasinosPeru — Brutalist Dark Red + Gold
   Static Casino Review Site for Peru
   ============================================ */

/* --- Custom Properties --- */
:root {
  --bg: #0a0506;
  --bg-card: #120a0c;
  --bg-alt: #1a0f11;
  --primary: #c9362c;
  --primary-dark: #9e2a22;
  --secondary: #d4a853;
  --secondary-dark: #b8923e;
  --accent: #f5e6c8;
  --text: #e8e0d8;
  --text-muted: #7a6e65;
  --border: #2a1a1d;
  --border-thick: 3px solid var(--primary);
  --border-gold: 3px solid var(--secondary);
  --font-heading: 'Space Grotesk', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-body: 'Space Grotesk', sans-serif;
  --transition: 0.25s ease;
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--secondary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent);
}

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

ul, ol {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: var(--accent);
}

h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  margin-bottom: 1.5rem;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-bottom: 1.2rem;
}

h3 {
  font-size: clamp(1.3rem, 2.5vw, 2rem);
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1.2rem;
  color: var(--text);
}

/* --- Utility --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 5rem 0;
}

.section--alt {
  background-color: var(--bg-alt);
}

.text-gold {
  color: var(--secondary);
}

.text-red {
  color: var(--primary);
}

.text-muted {
  color: var(--text-muted);
}

.thick-rule {
  border: none;
  height: 4px;
  background: var(--primary);
  margin: 3rem 0;
}

.thick-rule--gold {
  background: var(--secondary);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--bg);
  border-bottom: 4px solid var(--primary);
}

.nav__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  height: 70px;
}

.nav__brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-decoration: none;
}

.nav__brand span {
  color: var(--primary);
}

.nav__links {
  display: flex;
  gap: 0;
}

.nav__links a {
  display: block;
  padding: 0 1.5rem;
  height: 70px;
  line-height: 70px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text);
  text-decoration: none;
  border-left: 1px solid var(--border);
  transition: background var(--transition), color var(--transition);
}

.nav__links a:hover {
  background: var(--primary);
  color: var(--accent);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.nav__toggle span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--accent);
  transition: var(--transition);
}

/* --- Hero --- */
.hero {
  padding: 10rem 0 6rem;
  border-bottom: 4px solid var(--primary);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: -10%;
  width: 60%;
  height: 100%;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 20px,
    rgba(201, 54, 44, 0.05) 20px,
    rgba(201, 54, 44, 0.05) 22px
  );
  pointer-events: none;
}

.hero__label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 1.5rem;
  padding: 0.4rem 1rem;
  border: 2px solid var(--secondary);
}

.hero h1 {
  max-width: 900px;
}

.hero h1 span {
  color: var(--primary);
}

.hero__sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.hero__cta {
  display: inline-flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 1rem 2.5rem;
  border: 3px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  text-align: center;
}

.btn--primary {
  background: var(--primary);
  color: var(--accent);
  border-color: var(--primary);
}

.btn--primary:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.btn--outline {
  background: transparent;
  color: var(--secondary);
  border-color: var(--secondary);
}

.btn--outline:hover {
  background: var(--secondary);
  color: var(--bg);
}

.btn--gold {
  background: var(--secondary);
  color: var(--bg);
  border-color: var(--secondary);
}

.btn--gold:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.btn--block {
  display: block;
  width: 100%;
}

/* --- Ranking --- */
.ranking {
  counter-reset: rank;
}

.ranking__item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
  background: var(--bg-card);
  border: 3px solid var(--border);
  margin-bottom: -3px;
  transition: border-color var(--transition), background var(--transition);
}

.ranking__item:hover {
  border-color: var(--primary);
  background: var(--bg-alt);
}

.ranking__number {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 700;
  color: var(--secondary);
  text-align: center;
  line-height: 1;
}

.ranking__info h3 {
  margin-bottom: 0.3rem;
  text-transform: uppercase;
}

.ranking__info p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.ranking__meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.ranking__tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.ranking__cta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 160px;
}

/* --- Comparison Table --- */
.table-wrap {
  overflow-x: auto;
  border: 3px solid var(--border);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.comparison-table thead {
  background: var(--primary);
}

.comparison-table th {
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 1rem 1.5rem;
  text-align: left;
  color: var(--accent);
  font-size: 0.8rem;
  border-right: 1px solid rgba(255,255,255,0.1);
}

.comparison-table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  color: var(--text);
}

.comparison-table tbody tr {
  background: var(--bg-card);
  transition: background var(--transition);
}

.comparison-table tbody tr:hover {
  background: var(--bg-alt);
}

.comparison-table tbody tr:nth-child(even) {
  background: var(--bg);
}

.comparison-table tbody tr:nth-child(even):hover {
  background: var(--bg-alt);
}

/* --- Trust / Why Us --- */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.trust-card {
  padding: 3rem 2rem;
  border: 3px solid var(--border);
  margin-right: -3px;
  margin-bottom: -3px;
  transition: border-color var(--transition);
}

.trust-card:hover {
  border-color: var(--secondary);
}

.trust-card__number {
  font-family: var(--font-mono);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 1rem;
}

.trust-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
}

.trust-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* --- Articles Grid --- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.article-card {
  border: 3px solid var(--border);
  margin-right: -3px;
  margin-bottom: -3px;
  transition: border-color var(--transition);
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  border-color: var(--primary);
}

.article-card__img {
  height: 200px;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 3px solid var(--border);
  overflow: hidden;
}

.article-card__img-placeholder {
  font-family: var(--font-mono);
  font-size: 3rem;
  color: var(--primary);
  opacity: 0.3;
}

.article-card__body {
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-card__tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--secondary);
  margin-bottom: 0.8rem;
}

.article-card__body h3 {
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
}

.article-card__body p {
  color: var(--text-muted);
  font-size: 0.85rem;
  flex: 1;
}

.article-card__link {
  display: block;
  margin-top: 1.5rem;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  transition: color var(--transition);
}

.article-card__link:hover {
  color: var(--secondary);
}

/* --- Footer --- */
.footer {
  background: var(--bg);
  border-top: 4px solid var(--primary);
  padding: 4rem 0 2rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer__brand {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.footer__brand span {
  color: var(--primary);
}

.footer__desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.8;
}

.footer h4 {
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: var(--secondary);
  margin-bottom: 1.5rem;
}

.footer__links li {
  margin-bottom: 0.8rem;
}

.footer__links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--accent);
}

.footer__bottom {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__bottom p {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 0;
}

.footer__disclaimer {
  max-width: 700px;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.7;
  border-left: 3px solid var(--secondary);
  padding-left: 1rem;
  margin-top: 2rem;
}

/* --- Article Page --- */
.article-hero {
  padding: 9rem 0 4rem;
  border-bottom: 4px solid var(--primary);
}

.article-hero__breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.article-hero__breadcrumb a {
  color: var(--text-muted);
}

.article-hero__breadcrumb a:hover {
  color: var(--secondary);
}

.article-hero__meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.article-content h2 {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}

.article-content h3 {
  margin-top: 2rem;
}

.article-content p {
  font-size: 1.05rem;
  line-height: 1.9;
}

.article-content ul,
.article-content ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.article-content ul {
  list-style: none;
}

.article-content ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.8rem;
  color: var(--text);
}

.article-content ul li::before {
  content: '//';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-family: var(--font-mono);
  font-weight: 700;
}

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

.article-content ol li {
  margin-bottom: 0.8rem;
  color: var(--text);
}

.article-content blockquote {
  border-left: 4px solid var(--secondary);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  background: var(--bg-alt);
  font-style: italic;
  color: var(--accent);
}

/* --- CTA Box (inline in articles) --- */
.cta-box {
  border: 3px solid var(--primary);
  padding: 2.5rem;
  margin: 3rem 0;
  background: var(--bg-card);
  position: relative;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.cta-box h3 {
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.cta-box p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.cta-box .btn {
  margin-right: 1rem;
  margin-bottom: 0.5rem;
}

/* --- FAQ --- */
.faq-item {
  border: 3px solid var(--border);
  margin-bottom: -3px;
}

.faq-item__question {
  width: 100%;
  background: var(--bg-card);
  border: none;
  padding: 1.5rem 2rem;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--transition);
}

.faq-item__question:hover {
  background: var(--bg-alt);
}

.faq-item__question::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--primary);
  transition: transform var(--transition);
}

.faq-item.active .faq-item__question::after {
  content: '-';
}

.faq-item__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  background: var(--bg);
}

.faq-item.active .faq-item__answer {
  max-height: 500px;
}

.faq-item__answer p {
  padding: 1.5rem 2rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* --- Section Headers --- */
.section-header {
  margin-bottom: 3rem;
}

.section-header__label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
}

/* --- Diagonal Decoration --- */
.diagonal-line {
  width: 60px;
  height: 4px;
  background: var(--secondary);
  transform: skewX(-20deg);
  margin-bottom: 1.5rem;
}

/* --- Table of Contents (articles) --- */
.toc {
  border: 3px solid var(--border);
  padding: 2rem;
  margin: 2rem 0 3rem;
  background: var(--bg-card);
}

.toc h4 {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.toc ol {
  list-style: decimal;
  padding-left: 1.5rem;
}

.toc li {
  margin-bottom: 0.5rem;
}

.toc a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.toc a:hover {
  color: var(--secondary);
}

/* --- Rating Stars (text-based) --- */
.rating {
  font-family: var(--font-mono);
  color: var(--secondary);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
}

/* --- Mobile Responsive --- */
@media (max-width: 1024px) {
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav__links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 4px solid var(--primary);
  }

  .nav__links.active {
    display: flex;
  }

  .nav__links a {
    height: auto;
    line-height: normal;
    padding: 1.2rem 2rem;
    border-left: none;
    border-bottom: 1px solid var(--border);
  }

  .nav__toggle {
    display: flex;
  }

  .hero {
    padding: 8rem 0 4rem;
  }

  .ranking__item {
    grid-template-columns: 50px 1fr;
    gap: 1rem;
  }

  .ranking__cta {
    grid-column: 1 / -1;
    flex-direction: row;
  }

  .trust-grid {
    grid-template-columns: 1fr;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .footer__grid {
    grid-template-columns: 1fr;
  }

  .comparison-table {
    font-size: 0.8rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 0.8rem 1rem;
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .section {
    padding: 3rem 0;
  }

  h1 {
    font-size: 2rem;
  }

  .hero {
    padding: 7rem 0 3rem;
  }

  .ranking__item {
    padding: 1.5rem;
  }

  .ranking__number {
    font-size: 2rem;
  }

  .cta-box {
    padding: 1.5rem;
  }

  .btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.8rem;
  }
}
