/* Casino Online Slovenija — main stylesheet */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --color-bg: #0b1410;
  --color-surface: #132019;
  --color-surface-2: #1a2d24;
  --color-border: #2a4035;
  --color-text: #e8f0ec;
  --color-muted: #9bb5a8;
  --color-accent: #d4a843;
  --color-accent-hover: #e8be5a;
  --color-emerald: #1e6b4f;
  --color-emerald-light: #2a8f6a;
  --color-danger: #e05c5c;
  --header-h: 64px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-display: "Outfit", var(--font);
  --max-w: 1200px;
  --content-w: 720px;
  --toc-w: 260px;
  --gap: 1.5rem;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
  min-width: 0;
}

img, svg, video, iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.25;
  font-weight: 700;
  color: #fff;
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin: 0 0 1rem; }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); margin: 2.5rem 0 1rem; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.35rem); margin: 1.75rem 0 0.75rem; }
h4 { font-size: 1.05rem; margin: 1.25rem 0 0.5rem; }

p { margin: 0 0 1rem; }

ul, ol { margin: 0 0 1rem; padding-left: 1.35rem; }
li { margin-bottom: 0.4rem; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(11, 20, 16, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-h);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.site-logo__img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.site-logo__text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  color: #fff;
}

.site-nav { display: flex; align-items: center; gap: 0.25rem; }

.site-nav__list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.25rem;
}

.site-nav__link {
  display: block;
  padding: 0.5rem 0.85rem;
  color: var(--color-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}

.site-nav__link:hover,
.site-nav__link--active {
  color: #fff;
  background: var(--color-surface-2);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  margin: 0 auto;
  transition: transform 0.25s, opacity 0.25s;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero */
.hero {
  padding: clamp(2rem, 5vw, 3.5rem) 0 1.5rem;
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg) 100%);
  border-bottom: 1px solid var(--color-border);
}

.hero__lead {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--color-muted);
  max-width: 65ch;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  color: var(--color-muted);
}

.article-meta time {
  color: var(--color-muted);
}

.article-meta__sep {
  opacity: 0.45;
}

/* Casino mini-review */
.casino-review {
  margin: 2rem 0;
  padding: 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.casino-review > h3 {
  margin-top: 0;
}

.casino-review__figure {
  margin: 0 0 1.25rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  line-height: 0;
}

.casino-review__figure img {
  width: 100%;
  height: auto;
  display: block;
}

/* Author card */
.author-card {
  margin: 1.5rem 0 0;
  padding: 1.25rem;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.author-card__photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--color-emerald);
}

.author-card__name {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.author-card__role {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--color-accent);
  font-weight: 600;
}

.author-card__bio {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.5;
}

/* Casino widget */
.casino-widget-section {
  padding: 1rem 0;
  background: var(--color-bg);
}

.casino-widget-wrapper {
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

#casino-widget-iframe {
  width: 100%;
  border: none;
  display: block;
  overflow: hidden;
  min-height: 200px;
}

@media (max-width: 767px) {
  .casino-widget-wrapper--locked {
    position: sticky;
    top: 0;
    z-index: 150;
    border-radius: 0;
    margin-left: calc(-1 * clamp(1rem, 4vw, 2rem));
    margin-right: calc(-1 * clamp(1rem, 4vw, 2rem));
    width: calc(100% + 2 * clamp(1rem, 4vw, 2rem));
    max-width: 100vw;
  }

  .casino-widget-wrapper--locked #casino-widget-iframe {
    touch-action: manipulation;
  }
}

/* Page layout with TOC */
.page-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
  padding: 2rem 0 3rem;
}

@media (min-width: 1024px) {
  .page-layout {
    grid-template-columns: var(--toc-w) 1fr;
    align-items: start;
  }
}

/* TOC */
.toc {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

@media (min-width: 1024px) {
  .toc {
    position: sticky;
    top: calc(var(--header-h) + 1rem);
    max-height: calc(100vh - var(--header-h) - 2rem);
    overflow-y: auto;
  }
}

.toc__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
}

.toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc__item { margin: 0; }

.toc__link {
  display: block;
  padding: 0.4rem 0;
  color: var(--color-muted);
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1.35;
  border-left: 2px solid transparent;
  padding-left: 0.65rem;
  transition: color 0.2s, border-color 0.2s;
}

.toc__link:hover,
.toc__link--active {
  color: #fff;
  border-left-color: var(--color-accent);
}

.toc__link--h3 {
  padding-left: 1.25rem;
  font-size: 0.8125rem;
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.9rem;
  overflow-x: auto;
  display: block;
}

.data-table table {
  width: 100%;
  min-width: 280px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border: 1px solid var(--color-border);
}

.data-table th,
.data-table tr:first-child td {
  background: var(--color-surface-2);
  font-weight: 600;
  color: #fff;
}

.data-table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

/* FAQ */
.faq { margin-top: 1rem; }

.faq__item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  overflow: hidden;
  background: var(--color-surface);
}

.faq__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  background: none;
  border: none;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  line-height: 1.35;
}

.faq__question::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--color-accent);
  flex-shrink: 0;
  transition: transform 0.25s;
}

.faq__item--open .faq__question::after {
  transform: rotate(45deg);
}

.faq__answer {
  display: none;
  padding: 0 1.15rem 1rem;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.faq__item--open .faq__answer { display: block; }

/* Contact page */
.contact-grid {
  display: grid;
  gap: 2rem;
  padding: 2rem 0 3rem;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.contact-info {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.contact-info h2 {
  margin-top: 0;
  font-size: 1.35rem;
}

.contact-info__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-info__list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--color-border);
  margin: 0;
}

.contact-info__list li:last-child { border-bottom: none; }

.contact-info__label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  margin-bottom: 0.2rem;
}

.contact-info a { word-break: break-all; }

.contact-map {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  aspect-ratio: 4 / 3;
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  min-height: 280px;
  border: 0;
}

.page-title-section {
  padding: 2rem 0 1rem;
  border-bottom: 1px solid var(--color-border);
}

.page-title-section h1 { margin-bottom: 0.5rem; }

.page-title-section p {
  color: var(--color-muted);
  margin: 0;
  max-width: 60ch;
}

/* 404 */
.error-page {
  min-height: calc(100vh - var(--header-h) - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-page__code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 15vw, 8rem);
  font-weight: 800;
  color: var(--color-emerald);
  line-height: 1;
  margin: 0 0 0.5rem;
}

.error-page__title {
  margin: 0 0 1rem;
}

.error-page__text {
  color: var(--color-muted);
  max-width: 40ch;
  margin: 0 auto 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  background: var(--color-emerald);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  transition: background 0.2s;
}

.btn:hover {
  background: var(--color-emerald-light);
  color: #fff;
}

/* Redirect page */
.redirect-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background: var(--color-bg);
}

.redirect-page__inner { max-width: 400px; }

.redirect-page h1 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.redirect-page img {
  margin: 0 auto 1rem;
  max-width: 200px;
}

.redirect-page__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 1.5rem auto 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Footer */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 2rem 0 1.5rem;
  margin-top: auto;
}

.site-footer__grid {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
  }
}

.site-footer__heading {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-accent);
  font-weight: 700;
}

.site-footer__nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer__nav li { margin-bottom: 0.35rem; }

.site-footer__nav a {
  color: var(--color-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.site-footer__nav a:hover { color: #fff; }

.site-footer__contact p {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.site-footer__contact a {
  color: var(--color-text);
  text-decoration: none;
}

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

.footer-form { display: flex; flex-direction: column; gap: 0.5rem; }

.footer-form__input,
.footer-form__textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.9rem;
}

.footer-form__textarea {
  resize: vertical;
  min-height: 70px;
}

.footer-form__input:focus,
.footer-form__textarea:focus {
  outline: 2px solid var(--color-emerald);
  outline-offset: 1px;
}

.footer-form__btn {
  align-self: flex-start;
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
}

.site-footer__disclaimer {
  font-size: 0.8rem;
  color: var(--color-muted);
  line-height: 1.5;
  margin: 0 0 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.8rem;
  color: var(--color-muted);
}

.site-footer__bottom a {
  color: var(--color-muted);
  text-decoration: none;
}

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

.site-footer__tagline {
  margin: 0 0 1rem;
  font-weight: 600;
  color: var(--color-accent);
  font-size: 0.9rem;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-border);
  padding: 1rem;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
  transform: translateY(100%);
  transition: transform 0.35s ease;
}

.cookie-banner--visible { transform: translateY(0); }

.cookie-banner__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}

.cookie-banner__text {
  flex: 1 1 280px;
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-muted);
}

.cookie-banner__actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.cookie-banner__btn {
  padding: 0.55rem 1.1rem;
  font-size: 0.875rem;
}

.cookie-banner__btn--secondary {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-muted);
}

.cookie-banner__btn--secondary:hover {
  background: var(--color-surface);
  color: #fff;
}

/* Mobile nav */
@media (max-width: 767px) {
  .menu-toggle { display: flex; }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 0.5rem;
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
  }

  .site-nav--open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav__list {
    flex-direction: column;
    width: 100%;
  }

  .site-nav__link {
    padding: 0.85rem 1rem;
    width: 100%;
  }

  .author-card { flex-direction: column; align-items: center; text-align: center; }
}
