/* ============================================================
   STYLE.CSS — casino affiliate guide
   Design: iGaming portal, modern clean, Italian flag accents
   Approach: Mobile-First (min-width breakpoints)
   ============================================================ */

/* === TOKENS === */
:root {
  --green:       #276b37;
  --green-dark:  #1d5129;
  --green-light: #e9f3eb;
  --red:         #c0392b;
  --red-light:   #fdf0ee;
  --white:       #ffffff;
  --bg:          #f6f7f5;
  --bg-card:     #ffffff;
  --border:      #e8eaed;
  --border-card: #d8e4da;
  --text:        #1a1a2e;
  --text-muted:  #6b7280;
  --text-light:  #9ca3af;
  --radius-sm:   6px;
  --radius:      11px;
  --radius-lg:   16px;
  --shadow-sm:   0 2px 8px rgba(17,24,39,0.05);
  --shadow:      0 7px 22px rgba(17,24,39,0.09);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.12);
  --font-body:   'Inter', Arial, sans-serif;
  --font-head:   'Sora', 'Inter', sans-serif;
  --transition:  0.2s ease;
}

/* === UTILITIES === */
.container {
  width: 100%;
  max-width: 1184px;
  margin: 0 auto;
  padding: 0 16px;
}

/* === LISTING SECTION === */
.offers-section {
  background: var(--bg);
  padding: 32px 0 40px;
}

.offers-title {
  font-family: var(--font-head);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  text-align: center;
}

.offers-lead {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 24px;
}

/* === CASINO CARD === */
.operator-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px 16px;
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto auto auto;
  gap: 14px 16px;
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}

.operator-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  width: 100%;
  height: 4px;
  background: var(--green);
}

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

/* Rank */
.operator-rank {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: flex-start;
  padding-top: 2px;
}

.rank-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--green);
  color: var(--white);
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Brand */
.operator-brand {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.operator-brand img {
  max-width: min(160px, 100%);
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: #f9f9f9;
  border: 1px solid var(--border);
  padding: 4px;
}

.operator-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.operator-name {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.stars {
  display: flex;
  gap: 2px;
}

.stars svg {
  width: 16px;
  height: 16px;
}

/* Bonus */
.offer-details {
  grid-column: 1 / -1;
  background: var(--green-light);
  border: 1px solid #c6e0c1;
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.offer-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green-dark);
}

.offer-value {
  overflow-wrap: anywhere;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.offer-terms {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Features */
.operator-points {
  grid-column: 1 / -1;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.operator-points li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text);
  font-weight: 500;
}

.check-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* CTA */
.operator-action {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.offer-action {
  display: block;
  max-width: 100%;
  width: 100%;
  text-align: center;
  background: var(--green);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  padding: 14px 24px;
  border-radius: var(--radius);
  letter-spacing: 0.01em;
  transition: background var(--transition), transform var(--transition);
}

.offer-action:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}

.action-note {
  font-size: 0.72rem;
  color: var(--text-light);
}


.offer-action:focus-visible,
.nav-offer:focus-visible,
.primary-nav a:focus-visible,
.footer-links a:focus-visible {
  outline: 3px solid rgba(39, 107, 55, 0.3);
  outline-offset: 3px;
}

/* === MAIN CONTENT === */
.guide-content {
  padding: 36px 0 40px;
}

.guide-content h2 {
  font-family: var(--font-head);
  font-size: clamp(1.2rem, 2.8vw, 1.6rem);
  font-weight: 700;
  color: var(--text);
  margin: 36px 0 14px;
  padding-top: 8px;
  border-top: 2px solid var(--green-light);
}

.guide-content h2:first-child {
  margin-top: 0;
  border-top: none;
}

.guide-content h3 {
  font-family: var(--font-head);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 600;
  color: var(--text);
  margin: 24px 0 10px;
}

.guide-content p {
  font-size: 0.975rem;
  color: #374151;
  margin-bottom: 14px;
  line-height: 1.75;
}

.guide-content ul,
.guide-content ol {
  margin: 0 0 16px 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.guide-content ul li,
.guide-content ol li {
  font-size: 0.975rem;
  color: #374151;
  line-height: 1.65;
}

/* Tables */
.data-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  min-width: 340px;
  border-collapse: collapse;
  font-size: 0.875rem;
}

table th,
table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  line-height: 1.5;
}

table th {
  background: var(--green-light);
  font-weight: 700;
  font-family: var(--font-head);
  font-size: 0.82rem;
  color: var(--green-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

table tbody tr:nth-child(even) td {
  background: #fafbfa;
}

table tbody tr:hover td {
  background: var(--green-light);
}

/* === FAQ === */
.questions-section {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 2px solid var(--green-light);
}

.questions-section h2 {
  border-top: none !important;
  margin-top: 0 !important;
}

.question-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 12px;
  background: var(--bg-card);
  transition: border-color var(--transition);
}

.question-card:hover {
  border-color: #c6e0c1;
}

.question-card h3 {
  margin: 0 0 8px;
  font-size: 0.975rem;
  color: var(--green-dark);
  font-weight: 600;
}

.question-card p {
  margin: 0;
  font-size: 0.9rem;
  color: #374151;
  line-height: 1.65;
}

/* === AUTHOR SECTION === */
.editor-section {
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
}

.editor-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.editor-card img {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--green-light);
}

.editor-info {
  flex: 1;
}

.editor-name {
  display: block;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-dark);
  text-decoration: none;
  margin-bottom: 2px;
}

.editor-name:hover {
  text-decoration: underline;
}

.editor-role {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-style: italic;
}

.editor-info p {
  font-size: 0.875rem;
  color: #374151;
  line-height: 1.65;
  margin: 0;
}

/* === FOOTER === */
.page-footer {
  background: #111827;
  color: #d1d5db;
  padding: 36px 0 24px;
}

.footer-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 28px;
}

.footer-about {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-about img:first-child {
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

.responsible-note {
  font-size: 0.8rem;
  line-height: 1.6;
  color: #9ca3af;
  max-width: 480px;
}

.responsible-note a {
  color: #d1d5db;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-link-group a {
  font-size: 0.85rem;
  color: #9ca3af;
  text-decoration: none;
  transition: color var(--transition);
}

.footer-link-group a:hover {
  color: var(--white);
}

.footer-legal {
  font-size: 0.78rem;
  color: #6b7280;
  border-top: 1px solid #1f2937;
  padding-top: 20px;
  text-align: center;
}

/* =====================================================
   DESKTOP BREAKPOINTS (min-width: 640px)
   ===================================================== */
@media (min-width: 640px) {
  .operator-card {
    grid-template-columns: 42px minmax(0, 1fr) minmax(180px, 245px);
    grid-template-rows: auto auto auto;
    padding: 20px 24px;
  }

  .operator-rank {
    grid-column: 1;
    grid-row: 1 / 3;
    align-items: center;
    padding-top: 0;
  }

  .operator-brand {
    grid-column: 2;
    grid-row: 1;
    flex-wrap: nowrap;
  }

  .offer-details {
    grid-column: 3;
    grid-row: 1;
    max-width: 245px;
    min-width: 0;
  }

  .operator-points {
    grid-column: 2;
    grid-row: 2;
  }

  .operator-action {
    grid-column: 3;
    grid-row: 2 / 4;
    align-items: stretch;
    justify-content: center;
    min-width: 0;
  }

  .offer-action {
    padding: 13px 20px;
  }

  .footer-links {
    flex-direction: row;
    gap: 32px;
  }
}

/* =====================================================
   DESKTOP BREAKPOINTS (min-width: 768px)
   ===================================================== */
@media (min-width: 768px) {
  .offers-section { padding: 40px 0 56px; }
  .guide-content { padding: 48px 0 56px; }

  .operator-card {
    gap: 16px 20px;
    padding: 24px 28px;
  }

  .operator-brand img {
    width: 160px;
    height: 60px;
  }

  .editor-card img {
    width: 80px;
    height: 80px;
  }

  .footer-layout {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  .footer-about { max-width: 320px; }
}

/* =====================================================
   DESKTOP BREAKPOINTS (min-width: 1024px)
   ===================================================== */
@media (min-width: 1024px) {
  .container { padding: 0 24px; }

  .offers-section { padding: 48px 0 64px; }

  .operator-card {
    padding: 26px 32px;
  }

  .offer-details {
    max-width: 280px;
  }

  .guide-content p { font-size: 1rem; }

  .footer-link-group {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px 20px;
  }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  .operator-card,
  .offer-action,
  .nav-offer {
    transition: none;
  }
  .operator-card:hover,
  .offer-action:hover {
    transform: none;
  }
}