/* ==========================================================================
   Utländska Casino — Stylesheet
   Modern, clean & mobile-first design for iGaming review site
   ========================================================================== */

/* CSS Variables */
:root {
  --color-primary: #0f766e;
  --color-primary-dark: #134e4a;
  --color-primary-light: #14b8a6;
  --color-accent: #f59e0b;
  --color-accent-dark: #d97706;
  --color-bg: #f8fafc;
  --color-bg-alt: #ffffff;
  --color-bg-dark: #0f172a;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-text-light: #94a3b8;
  --color-border: #e2e8f0;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container-max: 1200px;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  background-image:
    radial-gradient(at 0% 0%, rgba(20, 184, 166, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(245, 158, 11, 0.05) 0px, transparent 50%);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
header {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  color: #fff;
  padding: 1.25rem 2rem;
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

header nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  max-width: var(--container-max);
  margin: 0 auto;
}

header nav ul li a {
  color: #fff;
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  display: inline-block;
  position: relative;
}

header nav ul li a:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

header nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: var(--transition);
  transform: translateX(-50%);
}

header nav ul li a:hover::after {
  width: 60%;
}

/* ==========================================================================
   Main Container
   ========================================================================== */
main {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

/* ==========================================================================
   Date / Last Updated Block
   ========================================================================== */
.date {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  background: linear-gradient(135deg, #f0fdfa 0%, #ffffff 100%);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  animation: fadeInUp 0.6s ease-out;
}

.date:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-left-color: var(--color-primary);
}

.date img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
  animation: pulse 2.5s ease-in-out infinite;
  filter: drop-shadow(0 1px 2px rgba(15, 118, 110, 0.2));
  border-radius: 0;
  box-shadow: none;
  border: none;
  margin: 0;
  display: inline-block;
}

.date .updated {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.date .updated p {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.date .updated time {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  letter-spacing: -0.01em;
}

/* ==========================================================================
   Sections
   ========================================================================== */
section {
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  transition: var(--transition);
  animation: fadeInUp 0.6s ease-out;
}

section:hover {
  box-shadow: var(--shadow-lg);
}

/* Hero Section (first section with H1) */
section:first-of-type {
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 50%, #06b6d4 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: 4rem 2.5rem;
  border: none;
}

section:first-of-type::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

section:first-of-type::after {
  content: '🎰';
  position: absolute;
  bottom: -30px;
  right: -20px;
  font-size: 12rem;
  opacity: 0.08;
  transform: rotate(-15deg);
  pointer-events: none;
}

section:first-of-type h1 {
  color: #fff;
  border: none;
  padding: 0;
  position: relative;
  z-index: 1;
}

section:first-of-type p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.1rem;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Content Images
   ========================================================================== */
section img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 1.5rem auto 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  transition: var(--transition);
  object-fit: cover;
}

section img:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-xl);
}

/* Hero section image — на темному градієнтному фоні */
section:first-of-type img {
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 1;
  max-width: 720px;
}

section:first-of-type img:hover {
  border-color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #f0fdfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%) 1;
  position: relative;
  letter-spacing: -0.01em;
}

h2::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 28px;
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-accent) 100%);
  margin-right: 12px;
  vertical-align: middle;
  border-radius: 3px;
}

h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 1.75rem 0 1rem;
  letter-spacing: -0.01em;
}

p {
  margin-bottom: 1rem;
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.75;
}

/* ==========================================================================
   Lists
   ========================================================================== */
ul, ol {
  margin: 1rem 0 1.5rem 0;
  padding-left: 0;
  list-style: none;
}

section ul li, section ol li {
  position: relative;
  padding: 0.5rem 0 0.5rem 2rem;
  color: var(--color-text);
  line-height: 1.6;
}

section ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(15, 118, 110, 0.3);
}

section ol {
  counter-reset: item;
}

section ol li {
  counter-increment: item;
}

section ol li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: 0.4rem;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

/* ==========================================================================
   Table
   ========================================================================== */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.5rem 0;
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  font-size: 0.95rem;
}

thead {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
}

thead th {
  color: #fff;
  padding: 1rem 1.25rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

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

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

tbody tr:nth-child(even) {
  background: #f8fafc;
}

tbody tr:hover {
  background: linear-gradient(90deg, rgba(20, 184, 166, 0.05) 0%, rgba(245, 158, 11, 0.05) 100%);
  transform: scale(1.005);
}

tbody td {
  padding: 1rem 1.25rem;
  color: var(--color-text);
  vertical-align: middle;
}

tbody td:first-child {
  font-weight: 600;
  color: var(--color-primary-dark);
}

/* Table wrapper for horizontal scroll on mobile */
section > table {
  display: block;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 768px) {
  section > table {
    display: table;
    white-space: normal;
  }
}

/* ==========================================================================
   Links
   ========================================================================== */
a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

main a:not([class]) {
  border-bottom: 1px dashed var(--color-primary-light);
}

main a:not([class]):hover {
  color: var(--color-accent-dark);
  border-bottom-color: var(--color-accent);
}

/* ==========================================================================
   FAQ Articles
   ========================================================================== */
article {
  background: linear-gradient(135deg, #f0fdfa 0%, #ffffff 100%);
  border-left: 4px solid var(--color-primary);
  padding: 1.5rem 1.75rem;
  margin: 1rem 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

article:hover {
  border-left-color: var(--color-accent);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

article h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: var(--color-primary-dark);
  font-size: 1.15rem;
}

article h3::before {
  content: '❓ ';
  margin-right: 0.25rem;
}

article p {
  margin-bottom: 0;
  color: var(--color-text-muted);
  font-size: 0.98rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  background: linear-gradient(135deg, var(--color-bg-dark) 0%, #1e293b 100%);
  color: #cbd5e1;
  padding: 3rem 2rem 2rem;
  margin-top: 3rem;
  border-top: 4px solid var(--color-accent);
}

footer > p {
  max-width: var(--container-max);
  margin: 0 auto 2rem;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #94a3b8;
  padding: 1.5rem;
  background: rgba(245, 158, 11, 0.1);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-md);
}

footer nav {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  padding: 0;
  margin: 0;
}

footer nav ul li a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
  padding: 0.5rem 0;
  border: none;
}

footer nav ul li a:hover {
  color: var(--color-accent);
  border: none;
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

section {
  animation: fadeInUp 0.6s ease-out backwards;
}

section:nth-child(1) { animation-delay: 0.05s; }
section:nth-child(2) { animation-delay: 0.1s; }
section:nth-child(3) { animation-delay: 0.15s; }
section:nth-child(4) { animation-delay: 0.2s; }

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
  main {
    padding: 1.5rem 1rem;
  }

  section {
    padding: 1.5rem;
    border-radius: var(--radius-md);
  }

  section:first-of-type {
    padding: 2.5rem 1.5rem;
  }

  header {
    padding: 1rem;
  }

  header nav ul {
    gap: 0.25rem;
  }

  header nav ul li a {
    padding: 0.5rem 0.85rem;
    font-size: 0.85rem;
  }

  h2::before {
    height: 22px;
  }

  article {
    padding: 1.25rem;
  }

  thead th,
  tbody td {
    padding: 0.75rem 0.85rem;
    font-size: 0.85rem;
  }

  .date {
    padding: 0.65rem 1rem;
    gap: 0.65rem;
    width: 100%;
  }

  .date img {
    width: 24px;
    height: 24px;
  }

  .date .updated time {
    font-size: 0.95rem;
  }

  section img {
    border-radius: var(--radius-md);
    margin: 1rem auto 1.5rem;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  h2 {
    font-size: 1.4rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  section ul li,
  section ol li {
    padding-left: 1.75rem;
  }

  .date .updated p {
    font-size: 0.72rem;
  }

  .date .updated time {
    font-size: 0.9rem;
  }
}

/* ==========================================================================
   Selection & Focus States
   ========================================================================== */
::selection {
  background: var(--color-accent);
  color: #fff;
}

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

/* ==========================================================================
   Scrollbar
   ========================================================================== */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  border-radius: 6px;
  border: 2px solid var(--color-bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-dark);
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
  header, footer nav {
    display: none;
  }

  section {
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }

  body {
    background: #fff;
  }

  .date img {
    animation: none;
  }
}
