/* ============================================================
   style.css – NonAAMS Casino Guide
   Architecture: Mobile-First (min-width breakpoints)
   Design: iGaming portal – clean, professional, light background
   Accent colors: Italian flag green (#1a7a3c) and red (#c8102e)
   ============================================================ */

/* ============================================================
   1. CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  --color-bg:          #f8f9fa;
  --color-surface:     #ffffff;
  --color-border:      #e2e8e2;
  --color-text:        #1a1a2e;
  --color-text-muted:  #5c6670;
  --color-green:       #1a7a3c;
  --color-green-dark:  #0f5728;
  --color-green-light: #e8f4ec;
  --color-red:         #c8102e;
  --color-red-dark:    #a50d26;
  --color-gold:        #f59e0b;
  --color-rank:        #1a2a1a;

  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 4px 12px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.05);
  --shadow-lg:  0 8px 24px rgba(0,0,0,.10), 0 4px 8px rgba(0,0,0,.06);

  --transition: .18s ease;
}

/* ============================================================
   2. TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-sans);
  line-height: 1.25;
  color: var(--color-text);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.25rem, 3.5vw, 1.75rem);
  margin: 2rem 0 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--color-border);
}

h3 {
  font-size: clamp(1.05rem, 2.5vw, 1.2rem);
  margin: 1.5rem 0 .6rem;
  color: var(--color-green-dark);
}

p {
  margin-bottom: 1rem;
  max-width: 72ch;
  color: var(--color-text);
}

a {
  color: var(--color-green);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

strong {
  font-weight: 700;
  color: var(--color-text);
}

em {
  font-style: italic;
  color: var(--color-text-muted);
}

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

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

.listing-title {
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  font-weight: 800;
  color: var(--color-text);
  margin: 0 0 24px;
  padding-bottom: .5rem;
  border-bottom: 3px solid var(--color-green);
  border-top: none;
}

/* Casino card list */
.casino-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ============================================================
   5. CASINO CARD
   ============================================================ */
.casino-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  position: relative;
  transition: box-shadow var(--transition);
}

.casino-card:hover {
  box-shadow: var(--shadow-md);
}

.casino-card--featured {
  border-color: var(--color-green);
  border-width: 2px;
  box-shadow: 0 0 0 3px rgba(26,122,60,.08), var(--shadow-md);
}

.casino-card--featured::before {
  content: '★ Top Pick';
  position: absolute;
  top: 0;
  right: 0;
  background: var(--color-green);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 0 var(--radius-lg) 0 var(--radius-sm);
  letter-spacing: .02em;
}

/* Rank badge */
.casino-card__rank {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--color-rank);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

/* Brand block */
.casino-card__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 50px 16px 12px 16px;
  border-bottom: 1px solid var(--color-border);
}

.casino-card__brand img {
  max-width: 140px;
  height: 50px;
  width: auto;
  object-fit: contain;
  aspect-ratio: 140 / 50;
}

.casino-card__name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-text);
}

.casino-card__stars {
  display: flex;
  align-items: center;
  gap: 2px;
}

.casino-card__stars svg {
  width: 16px;
  height: 16px;
}

.rating-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-left: 4px;
}

/* Bonus block */
.casino-card__bonus {
  padding: 12px 16px;
  background: var(--color-green-light);
  border-bottom: 1px solid var(--color-border);
}

.bonus-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: var(--color-green-dark);
  background: rgba(26,122,60,.12);
  padding: 2px 8px;
  border-radius: 20px;
  margin-bottom: 4px;
  letter-spacing: .04em;
}

.bonus-text {
  font-size: .95rem;
  color: var(--color-text);
  line-height: 1.4;
  margin-bottom: 4px;
}

.bonus-text strong {
  color: var(--color-green-dark);
  font-size: 1.05rem;
}

.bonus-details {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* Features list */
.casino-card__features {
  list-style: none;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.casino-card__features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .875rem;
  color: var(--color-text);
  line-height: 1.45;
}

.casino-card__features li svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* CTA block */
.casino-card__cta {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.btn-play {
  display: inline-block;
  background: var(--color-red);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  padding: 11px 28px;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
  white-space: nowrap;
}

.btn-play:hover {
  background: var(--color-red-dark);
  color: #fff;
  transform: translateY(-1px);
}

.casino-card__tc {
  font-size: 11px;
  color: var(--color-text-muted);
  line-height: 1.4;
  max-width: 100%;
  margin: 0;
}

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

.content-wrap {
  max-width: 860px;
}

.article-body {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  box-shadow: var(--shadow-sm);
}

.article-body ul,
.article-body ol {
  padding-left: 1.4rem;
  margin-bottom: 1rem;
}

.article-body li {
  margin-bottom: .4rem;
  color: var(--color-text);
  font-size: .95rem;
  line-height: 1.6;
}

/* ============================================================
   7. TABLES
   ============================================================ */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.25rem 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: .875rem;
  background: var(--color-surface);
}

thead {
  background: var(--color-rank);
  color: #fff;
}

thead th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .02em;
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition);
}

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

tbody tr:nth-child(even) {
  background: var(--color-bg);
}

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

tbody td {
  padding: 9px 12px;
  color: var(--color-text);
  line-height: 1.4;
  vertical-align: top;
}

tbody td:first-child {
  font-weight: 700;
  color: var(--color-green-dark);
  white-space: nowrap;
}

/* ============================================================
   8. PROS & CONS BLOCK
   ============================================================ */
.pros_and_cons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 1.25rem 0;
}

.pros,
.cons {
  border-radius: var(--radius-md);
  padding: 16px;
}

.pros {
  background: #f0faf4;
  border: 1px solid #b8e6cc;
}

.cons {
  background: #fff5f5;
  border: 1px solid #fccdd4;
}

.pros .title,
.cons .title {
  font-weight: 700;
  font-size: .9rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pros .title {
  color: var(--color-green-dark);
}

.pros .title::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='9' fill='%2316a34a'/%3E%3Cpath d='M5.5 10.5l3 3 6-6' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") center/contain no-repeat;
}

.cons .title {
  color: var(--color-red-dark);
}

.cons .title::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='9' fill='%23c8102e'/%3E%3Cpath d='M6.5 6.5l7 7M13.5 6.5l-7 7' stroke='%23fff' stroke-width='2' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") center/contain no-repeat;
}

.pros ul,
.cons ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pros li,
.cons li {
  font-size: .875rem;
  padding: 4px 0;
  padding-left: 1.1rem;
  position: relative;
  color: var(--color-text);
  line-height: 1.5;
}

.pros li::before {
  content: '+';
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--color-green);
}

.cons li::before {
  content: '−';
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--color-red);
}

/* ============================================================
   9. FAQ SECTION
   ============================================================ */
.faq-section {
  margin-top: 2rem;
}

.faq-section h2 {
  border-bottom-color: var(--color-green);
}

.faq {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq__item {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.faq__item:last-child {
  border-bottom: none;
}

.faq__question {
  font-size: .95rem;
  font-weight: 700;
  color: var(--color-text);
  padding: 16px 16px 0;
  margin: 0 0 6px;
  cursor: default;
  border: none;
  line-height: 1.35;
}

.faq__answer {
  font-size: .9rem;
  color: var(--color-text-muted);
  padding: 0 16px 16px;
  margin: 0;
  max-width: 100%;
  line-height: 1.6;
}

/* ============================================================
   10. AUTHOR SECTION
   ============================================================ */
.author-section {
  padding: 24px 0;
  background: #f0f7f2;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

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

.author-avatar {
  flex-shrink: 0;
}

.author-avatar svg {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: block;
}

.author-info {
  flex: 1;
  min-width: 0;
}

.author-name {
  font-weight: 800;
  font-size: 1rem;
  color: var(--color-text);
  margin-bottom: 2px;
}

.author-role {
  font-size: .8rem;
  color: var(--color-green-dark);
  font-weight: 600;
  margin-bottom: 8px;
}

.author-bio {
  font-size: .875rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin: 0;
  max-width: 100%;
}

/* ============================================================
   11. LEGAL / TECHNICAL BLOCK
   ============================================================ */
.legal-section {
  padding: 32px 0;
  background: var(--color-bg);
}

.legal-section__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: .5rem;
  margin-bottom: 20px;
}

.legal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.legal-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.legal-item h3 {
  font-size: .85rem;
  color: var(--color-text);
  margin: 0 0 6px;
  padding: 0;
  border: none;
  font-weight: 700;
}

.legal-item p {
  font-size: .8rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin: 0;
  max-width: 100%;
}

.legal-item a {
  color: var(--color-green);
  font-weight: 600;
}

/* ============================================================
   12. FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-rank);
  color: #c0ccc0;
  padding: 28px 0;
}

.footer-responsible {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.adm-logo svg {
  height: 44px;
  width: auto;
}

.footer-warning {
  font-size: .8rem;
  color: #b0c0b0;
  line-height: 1.55;
  max-width: 100%;
  margin: 0;
}

.footer-warning a {
  color: #FFD700;
  font-weight: 600;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 16px;
}

.footer-links a {
  font-size: .75rem;
  color: #8a9e8a;
  text-decoration: none;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: #fff;
}

.footer-copy {
  font-size: .72rem;
  color: #6a7e6a;
  line-height: 1.5;
  margin: 0;
  max-width: 100%;
}

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

  /* Card layout: side-by-side on tablet */
  .casino-card {
    grid-template-columns: 200px 1fr;
    grid-template-rows: auto auto auto;
  }

  .casino-card__brand {
    grid-column: 1;
    grid-row: 1 / 3;
    border-bottom: none;
    border-right: 1px solid var(--color-border);
    padding: 48px 16px 16px;
    justify-content: center;
    align-items: center;
  }

  .casino-card__rank {
    top: 10px;
    left: 10px;
  }

  .casino-card__bonus {
    grid-column: 2;
    grid-row: 1;
    border-bottom: 1px solid var(--color-border);
  }

  .casino-card__features {
    grid-column: 2;
    grid-row: 2;
    border-bottom: 1px solid var(--color-border);
  }

  .casino-card__cta {
    grid-column: 1 / 3;
    grid-row: 3;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    padding: 12px 16px;
    border-top: 1px solid var(--color-border);
  }

  .casino-card__tc {
    max-width: 400px;
  }

  /* Pros/Cons 2-col */
  .pros_and_cons {
    grid-template-columns: 1fr 1fr;
  }

  /* Author card */
  .author-avatar svg {
    width: 80px;
    height: 80px;
  }

  /* Legal grid 2-col */
  .legal-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Footer responsible row */
  .footer-responsible {
    flex-direction: row;
    align-items: flex-start;
  }
}

/* ============================================================
   14. DESKTOP BREAKPOINTS (min-width: 768px)
   ============================================================ */
@media (min-width: 768px) {
  .article-body {
    padding: 32px 36px;
  }

  .listing-section {
    padding: 40px 0 24px;
  }

  .listing-title {
    font-size: 1.5rem;
  }

  .main-content {
    padding: 32px 0 56px;
  }

  .content-wrap {
    margin: 0 auto;
  }

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

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

  /* Card layout: 4-col on wide desktop */
  .casino-card {
    grid-template-columns: 220px 1fr 1fr auto;
    grid-template-rows: 1fr;
    align-items: stretch;
  }

  .casino-card__brand {
    grid-column: 1;
    grid-row: 1;
    border-right: 1px solid var(--color-border);
    border-bottom: none;
    padding: 48px 20px 20px;
    justify-content: center;
    align-items: center;
    min-height: 120px;
  }

  .casino-card__bonus {
    grid-column: 2;
    grid-row: 1;
    border-right: 1px solid var(--color-border);
    border-bottom: none;
    padding: 20px;
    background: var(--color-green-light);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .casino-card__features {
    grid-column: 3;
    grid-row: 1;
    border-right: 1px solid var(--color-border);
    border-bottom: none;
    padding: 20px;
    justify-content: center;
  }

  .casino-card__cta {
    grid-column: 4;
    grid-row: 1;
    border-top: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 20px;
    min-width: 160px;
  }

  .btn-play {
    width: 100%;
    text-align: center;
    padding: 12px 20px;
  }

  .casino-card__tc {
    text-align: center;
  }

  /* Legal: 4-col on wide */
  .legal-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .legal-grid .legal-item:last-child {
    grid-column: span 1;
  }
}

/* ============================================================
   16. PRINT MEDIA
   ============================================================ */
@media print {
  .site-header,
  .casino-card__cta,
  .footer-links,
  .header-cta { display: none; }
  body { font-size: 12pt; }
  a { text-decoration: none; color: inherit; }
}

/* ============================================================
   17. ACCESSIBILITY – REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* ============================================================
   18. FOCUS STYLES (keyboard navigation)
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--color-green);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============================================================
   19. SELECTION
   ============================================================ */
::selection {
  background: rgba(26,122,60,.18);
  color: var(--color-text);
}
