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

/* === TOKENS === */
:root {
  --green:       #2d7a22;
  --green-dark:  #235f1a;
  --green-light: #e6f4e3;
  --red:         #c0392b;
  --red-light:   #fdf0ee;
  --white:       #ffffff;
  --bg:          #f8f9fa;
  --bg-card:     #ffffff;
  --border:      #e8eaed;
  --border-card: #dde8da;
  --text:        #1a1a2e;
  --text-muted:  #6b7280;
  --text-light:  #9ca3af;
  --radius-sm:   6px;
  --radius:      10px;
  --radius-lg:   14px;
  --shadow-sm:   0 1px 4px rgba(0,0,0,0.06);
  --shadow:      0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.12);
  --font-body:   'Inter', sans-serif;
  --font-head:   'Sora', sans-serif;
  --transition:  0.2s ease;
}

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

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

.listing-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;
}

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

/* === CASINO CARD === */
.casino-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 1fr;
  grid-template-rows: auto auto auto auto;
  gap: 14px 16px;
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}

.casino-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--green);
  border-radius: 4px 0 0 4px;
}

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

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

.rank-num {
  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 */
.card-brand {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.card-brand img {
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: #f9f9f9;
  border: 1px solid var(--border);
  padding: 4px;
}

.brand-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-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 */
.card-bonus {
  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;
}

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

.bonus-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

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

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

.card-features 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 */
.card-cta {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.btn-play {
  display: block;
  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);
}

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

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

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

.main-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);
}

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

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

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

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

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

/* Tables */
.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 === */
.faq-section {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 2px solid var(--green-light);
}

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

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

.faq-item:hover {
  border-color: #c6e0c1;
}

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

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

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

.author-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);
}

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

.author-info {
  flex: 1;
}

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

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

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

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

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

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

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

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

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

.footer-disclaimer a {
  color: #d1d5db;
}

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

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

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

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

.footer-copy {
  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) {
  .casino-card {
    grid-template-columns: 44px 1fr auto;
    grid-template-rows: auto auto auto;
    padding: 20px 24px;
  }

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

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

  .card-bonus {
    grid-column: 3;
    grid-row: 1;
    max-width: 240px;
    min-width: 200px;
  }

  .card-features {
    grid-column: 2;
    grid-row: 2;
  }

  .card-cta {
    grid-column: 3;
    grid-row: 2 / 4;
    align-items: stretch;
    justify-content: center;
    min-width: 160px;
  }

  .btn-play {
    padding: 13px 20px;
  }

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

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

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

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

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

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

  .footer-logo-block { max-width: 320px; }
}

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

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

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

  .card-bonus {
    max-width: 280px;
  }

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

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

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  .casino-card,
  .btn-play,
  .header-cta {
    transition: none;
  }
  .casino-card:hover,
  .btn-play:hover {
    transform: none;
  }
}
