/*
Theme Name: ŠD Pragersko
Text Domain: sd-pragersko
Version: 1.0.0
Requires PHP: 8.1
*/

/*
 * Self-hosted web fonts (Newsreader + Hanken Grotesk).
 * Files fetched from Google's font CDN (OFL-licensed) and served locally
 * for GDPR/EU compliance -- no runtime requests to fonts.googleapis.com
 * or fonts.gstatic.com.
 * Subsets: latin + latin-ext (covers Slovenian č, š, ž).
 */

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/newsreader-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/newsreader-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/newsreader-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/newsreader-italic-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/hanken-grotesk-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/hanken-grotesk-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/hanken-grotesk-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/hanken-grotesk-700.woff2') format('woff2');
}

/* ŠD Pragersko — design tokens from DesignUi/Športno društvo Pragersko.dc.html */

:root {
  --forest: #123c32;
  --deep-green: #184d3f;
  --cream: #f3eedf;
  --light-cream: #e8dfca;
  --burgundy: #4b171b;
  --rust: #9b4a2f;
  --rust-light: #d99a7f;
  --body: #16231f;
  --muted: #5c635c; /* Darkened from #6f766f for better contrast against --cream */
  --hairline: rgba(18, 60, 50, 0.12);
  --radius: 10px;
  --radius-lg: 12px;
  --shadow-card: 0 12px 26px -16px rgba(18, 60, 50, 0.35);
  --shadow-photo: 0 30px 50px -24px rgba(18, 60, 50, 0.5);
  --font-serif: 'Newsreader', Georgia, serif;
  --font-sans: 'Hanken Grotesk', 'Segoe UI', sans-serif;
  --container: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

[id] {
  scroll-margin-top: 90px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@keyframes heroDrift {
  from {
    transform: scale(1.02) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.04) translate3d(-1.5%, -1%, 0);
  }
}

@keyframes heroContentIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes patternFloat {
  0%, 100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -14px;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--forest);
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin: 0;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--rust);
}

:focus-visible {
  outline: 3px solid var(--rust);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--burgundy);
  color: var(--cream);
  padding: 12px 20px;
  border-radius: 0 0 var(--radius) 0;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px -14px rgba(18, 60, 50, 0.55);
}

.btn-rust {
  background: var(--rust);
  color: var(--cream);
}

.btn-rust:hover {
  background: #86401f;
}

.btn-forest {
  background: var(--forest);
  color: var(--cream);
}

.btn-forest:hover {
  background: var(--deep-green);
}

.btn-outline {
  background: transparent;
  color: var(--forest);
  border: 1.5px solid rgba(18, 60, 50, 0.45);
}

.btn-outline:hover {
  border-color: var(--forest);
}

.btn-outline-light {
  background: rgba(243, 238, 223, 0.12);
  color: var(--cream);
  border: 1.5px solid rgba(243, 238, 223, 0.55);
}

.btn-outline-light:hover {
  background: rgba(243, 238, 223, 0.22);
}

.btn-sm {
  font-size: 13px;
  padding: 10px 18px;
}

.text-link {
  font-weight: 600;
  font-size: 14px;
  color: var(--rust);
  text-decoration: none;
  white-space: nowrap;
}

.text-link:hover {
  text-decoration: underline;
}

/* ---------- Header / navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--forest);
  color: var(--cream);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 74px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--cream);
  text-decoration: none;
}

.brand-mark {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: contain;
  display: block;
}

.brand-name {
  line-height: 1.1;
}

.brand-name .brand-title {
  font-family: var(--font-serif);
  font-size: 18px;
}

.brand-name .brand-sub {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.75;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  position: relative;
  color: rgba(243, 238, 223, 0.8);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 2px;
  transition: color 0.15s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 0;
  height: 2px;
  background: var(--rust-light);
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.18s ease;
}

.site-nav a:hover {
  color: var(--cream);
}

.site-nav a:hover::after {
  transform: scaleX(1);
}

.site-nav a[aria-current="page"] {
  color: var(--cream);
  border-bottom: 2px solid var(--rust);
}

.site-nav a[aria-current="page"]::after {
  display: none;
}

.header-cta {
  flex-shrink: 0;
}

.site-nav .nav-cta {
  display: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--cream);
  padding: 10px;
  cursor: pointer;
}

/* Mobile menu */

@media (max-width: 900px) {
  .site-header .container {
    height: 60px;
  }

  .nav-toggle {
    display: flex;
  }

  .header-cta {
    display: none;
  }

  .site-nav {
    position: fixed;
    inset: 60px 0 0 0;
    background: var(--forest);
    padding: 24px;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    visibility: hidden;
    overflow-y: auto;
  }

  .site-nav.open {
    transform: translateX(0);
    visibility: visible;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav li {
    border-bottom: 1px solid rgba(243, 238, 223, 0.14);
  }

  .site-nav a {
    display: block;
    font-family: var(--font-serif);
    font-size: 22px;
    padding: 15px 4px;
  }

  .site-nav a[aria-current="page"] {
    border-bottom: none;
    color: var(--rust-light);
  }

  .site-nav .nav-cta {
    display: block;
    border-bottom: none;
    margin-top: 20px;
  }
}

/* ---------- Sections ---------- */

.section {
  padding: 72px 0;
}

.section-cream2 {
  background: var(--light-cream);
}

.section-forest {
  background: var(--forest);
  color: var(--cream);
}

.section-deep {
  background: var(--deep-green);
  color: var(--cream);
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--rust);
  font-weight: 700;
  margin: 0 0 14px;
}

.section-forest .eyebrow,
.section-deep .eyebrow {
  color: var(--rust-light);
}

.section-title {
  font-size: clamp(28px, 4vw, 38px);
  margin: 0 0 16px;
}

.section-forest .section-title,
.section-deep .section-title {
  color: var(--cream);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.section-head .section-title {
  margin-bottom: 0;
}

.lead {
  font-size: 17px;
  line-height: 1.75;
  max-width: 640px;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  transform-origin: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(18, 60, 50, 0.75) 0%, rgba(18, 60, 50, 0.42) 45%, rgba(18, 60, 50, 0.08) 80%);
}

.hero-content {
  position: relative;
  max-width: 680px;
  padding: 80px 0;
}

.hero-eyebrow {
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--cream);
  font-weight: 600;
  opacity: 0.92;
  margin: 0 0 18px;
}

.hero h1 {
  font-size: clamp(40px, 7vw, 68px);
  color: var(--cream);
  letter-spacing: -1px;
  line-height: 1.02;
}

.hero p {
  font-size: clamp(16px, 2.2vw, 19px);
  line-height: 1.6;
  color: rgba(243, 238, 223, 0.92);
  margin: 24px 0 32px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Page header (subpages) */

.page-header {
  background: var(--light-cream);
  padding: 56px 0;
  border-bottom: 1px solid var(--hairline);
}

.page-header h1 {
  font-size: clamp(34px, 5vw, 48px);
}

.page-header .lead {
  margin: 14px 0 0;
  color: var(--muted);
}

/* ---------- Intro / O društvu ---------- */

.sports-pattern-band {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--cream);
}

.sports-pattern-band .section {
  position: relative;
  z-index: 1;
}

.sports-pattern {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.pattern-icon {
  position: absolute;
  display: block;
  object-fit: contain;
  opacity: 0.11;
  mix-blend-mode: multiply;
  will-change: translate;
}

.pattern-badminton {
  width: clamp(82px, 7vw, 122px);
}

.pattern-basketball {
  width: clamp(118px, 9vw, 170px);
}

.pattern-rekreacija {
  width: clamp(130px, 10vw, 190px);
}

.pattern-badminton-left {
  left: max(28px, calc((100vw - var(--container)) / 2 - 120px));
  top: 18%;
  transform: rotate(-90deg);
}

.pattern-basketball-left {
  left: max(86px, calc((100vw - var(--container)) / 2 + 30px));
  top: 45%;
  transform: rotate(-12deg);
}

.pattern-rekreacija-left {
  left: max(40px, calc((100vw - var(--container)) / 2 - 140px));
  bottom: 13%;
  transform: rotate(-10deg);
}

.pattern-rekreacija-top {
  left: calc(40% + 30px);
  top: 20px;
  transform: rotate(6deg);
}

.pattern-badminton-right {
  right: max(34px, calc((100vw - var(--container)) / 2 - 110px));
  top: 24%;
  transform: rotate(2deg);
}

.pattern-basketball-right {
    right: max(34px, calc((100vw - var(--container)) / 2 - 60px));
    bottom: 25%;
    transform: rotate(13deg);
  }


.quick-links-section {
  padding-top: 0;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.intro-grid .photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-photo);
}

.intro-grid .photo img {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.intro-grid .photo:hover img,
.sekcije-grid .photo:hover img,
.map-card:hover img {
  transform: scale(1.025);
}

.intro-highlights {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 26px;
  padding: 0;
  list-style: none;
}

.intro-highlights li {
  border: 1px solid rgba(18, 60, 50, 0.25);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--forest);
}

/* ---------- Quick access cards ---------- */

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.quick-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  min-height: 170px;
  padding: 26px 24px;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--hairline);
  text-decoration: none;
  color: var(--body);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.quick-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
  border-color: rgba(18, 60, 50, 0.2);
}

.quick-card .icon {
  color: var(--rust);
  transition: transform 0.2s ease, color 0.2s ease;
}

.quick-card:hover .icon {
  transform: translateY(-2px) rotate(-3deg);
}

.quick-card h3 {
  font-size: 24px;
}

.quick-card p {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 0;
}

.quick-card.card-forest {
  background: var(--forest);
  border-color: var(--forest);
}

.quick-card.card-rust {
  background: var(--rust);
  border-color: var(--rust);
}

.quick-card.card-forest h3,
.quick-card.card-rust h3 {
  color: var(--cream);
}

.quick-card.card-forest p,
.quick-card.card-rust p {
  color: rgba(243, 238, 223, 0.8);
}

.quick-card.card-rust .icon {
  color: var(--cream);
}

/* ---------- News cards ---------- */

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.news-card {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.news-card:hover {
  transform: translateY(-4px);
  border-color: rgba(18, 60, 50, 0.2);
  box-shadow: 0 18px 34px -22px rgba(18, 60, 50, 0.48);
}

.news-card img {
  height: 180px;
  width: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.news-card:hover img {
  transform: scale(1.03);
}

.news-card .news-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--burgundy);
  padding: 3px 9px;
  border-radius: 5px;
}

.tag-green {
  background: var(--deep-green);
}

.tag-rust {
  background: var(--rust);
}

.news-meta time {
  font-size: 12px;
  color: var(--muted);
}

.news-card h3 {
  font-size: 22px;
  line-height: 1.25;
  margin-bottom: 8px;
}

.news-card h3 a {
  color: inherit;
  text-decoration: none;
}

.news-card h3 a:hover {
  text-decoration: underline;
}

.news-card p {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 14px;
  flex: 1;
}

.news-card .text-link {
  font-size: 13px;
}

/* ---------- Events ---------- */

.event-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.event-row {
  display: flex;
  align-items: center;
  gap: 24px;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 20px 26px;
  position: relative; /* Added for stretched link */
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.event-row.upcoming {
  cursor: pointer;
}

.event-row.upcoming:hover {
  transform: translateY(-2px);
  border-color: rgba(18, 60, 50, 0.24);
  box-shadow: var(--shadow-card);
}

.event-date {
  flex-shrink: 0;
  width: 76px;
  text-align: center;
  background: var(--forest);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 12px 0;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.event-row.upcoming:hover .event-date {
  transform: scale(1.03);
  background: var(--deep-green);
}

.event-date .day {
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1;
}

.event-date .month {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.8;
  margin-top: 2px;
}

.event-info {
  flex: 1;
  min-width: 200px;
}

.event-info h3 {
  font-size: 22px;
  margin-bottom: 5px;
}

.event-title-link {
  color: inherit;
  text-decoration: none;
}

.event-title-link::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
}

.event-title-link:hover {
  text-decoration: underline;
}

.event-info .event-details {
  font-size: 14px;
  color: var(--muted);
}

.event-place {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.event-place svg {
  color: var(--rust);
  flex-shrink: 0;
}

.event-row.upcoming .btn,
.event-row.upcoming .badge {
  position: relative;
  z-index: 1;
}

.event-row.past {
  opacity: 0.75;
}

.event-row.past .event-date {
  background: var(--light-cream);
  color: var(--forest);
}

@media (max-width: 720px) {
  .event-row {
    flex-wrap: wrap;
    gap: 14px;
  }

  .event-info {
    flex-basis: calc(100% - 100px);
  }

  .event-place {
    white-space: normal;
  }
}

/* ---------- Sekcije ---------- */

.sekcije-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 50px;
  align-items: center;
}

.sekcije-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.sekcija-card {
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(243, 238, 223, 0.22);
  border-radius: var(--radius);
  padding: 18px 22px;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.sekcija-card:hover {
  transform: translateX(4px);
  background: rgba(243, 238, 223, 0.05);
  border-color: rgba(243, 238, 223, 0.34);
}

.sekcija-card .icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  color: var(--rust-light);
}

.section-icon {
  display: block;
  width: 34px;
  height: 34px;
  background: currentColor;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

.section-icon-basketball {
  width: 38px;
  height: 30px;
  mask-image: url('assets/images/patterns/basketball-mask.png');
  -webkit-mask-image: url('assets/images/patterns/basketball-mask.png');
}

.section-icon-rekreacija {
  mask-image: url('assets/images/patterns/rekreacija-mask.png');
  -webkit-mask-image: url('assets/images/patterns/rekreacija-mask.png');
}

.section-icon-badminton {
  mask-image: url('assets/images/patterns/badminton-mask.png');
  -webkit-mask-image: url('assets/images/patterns/badminton-mask.png');
}

.sekcija-card h3 {
  font-size: 19px;
  color: var(--cream);
}

.sekcija-card p {
  font-size: 13px;
  color: rgba(243, 238, 223, 0.7);
  margin: 4px 0 0;
}

.sekcije-grid .photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.6);
}

.sekcije-grid .photo img {
  aspect-ratio: 3 / 4;
  width: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

/* ---------- Gallery ---------- */

.gallery-preview {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 180px 180px;
  gap: 14px;
}

.gallery-preview a {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 16px 28px -24px rgba(18, 60, 50, 0.5);
}

.gallery-preview a:first-child {
  grid-row: span 2;
}

.gallery-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.gallery-preview a:hover img {
  transform: scale(1.04);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery-item {
  border: none;
  padding: 0;
  background: none;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  display: block;
  width: 100%;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-item figcaption,
.gallery-caption {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
  text-align: left;
}

/* Lightbox */

.lightbox {
  border: none;
  padding: 0;
  background: rgba(18, 35, 31, 0.92);
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox[open] {
  display: flex;
}

.lightbox::backdrop {
  background: transparent;
}

.lightbox figure {
  margin: 0;
  max-width: min(1100px, 92vw);
}

.lightbox img {
  max-width: 100%;
  max-height: 78dvh;
  border-radius: var(--radius);
  object-fit: contain;
}

.lightbox figcaption {
  color: var(--cream);
  font-size: 14px;
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(243, 238, 223, 0.12);
  border: 1px solid rgba(243, 238, 223, 0.4);
  color: var(--cream);
  border-radius: 50%;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox-close {
  top: 20px;
  right: 20px;
}

.lightbox-prev {
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

/* ---------- Chips / filters ---------- */

.chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}

.chip {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--forest);
  background: transparent;
  border: 1px solid rgba(18, 60, 50, 0.35);
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.chip:hover {
  background: rgba(18, 60, 50, 0.08);
}

.chip[aria-pressed="true"] {
  background: var(--forest);
  color: var(--cream);
  border-color: var(--forest);
}

/* ---------- Sponsors ---------- */

.pokrovitelj-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  text-align: center;
}

.pokrovitelj-strip .pokrovitelj-name {
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--forest);
  opacity: 0.6;
}

.pokrovitelj-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.pokrovitelj-grid.supporters {
  grid-template-columns: repeat(4, 1fr);
}

.pokrovitelj-card {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 40px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 120px;
}

.pokrovitelj-card .pokrovitelj-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}

.pokrovitelj-card .pokrovitelj-name {
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--forest);
}

.pokrovitelj-card .pokrovitelj-logo {
  max-height: 90px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.pokrovitelj-grid.supporters .pokrovitelj-card {
  min-height: 90px;
  padding: 26px 20px;
}

.pokrovitelj-grid.supporters .pokrovitelj-name {
  font-size: 19px;
  opacity: 0.8;
}

.pokrovitelj-grid.supporters .pokrovitelj-logo {
  max-height: 60px;
}

.pokrovitelj-strip .pokrovitelj-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.pokrovitelj-strip .pokrovitelj-logo {
  max-height: 64px;
  max-width: 170px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.pokrovitelj-cta {
  background: var(--forest);
  color: var(--cream);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}

.pokrovitelj-cta h2 {
  color: var(--cream);
  font-size: 30px;
  margin-bottom: 10px;
}

.pokrovitelj-cta p {
  margin: 0;
  color: rgba(243, 238, 223, 0.85);
  max-width: 520px;
}

/* ---------- Documents ---------- */

.docs-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: 94px;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.docs-sidebar h2 {
  font-size: 18px;
  margin-bottom: 12px;
}

.docs-search {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 10px 14px;
  border: 1px solid rgba(18, 60, 50, 0.3);
  border-radius: 8px;
  background: var(--cream);
  margin-bottom: 16px;
}

.docs-cats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.docs-cats a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--body);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.docs-cats a:hover {
  background: var(--cream);
}

.docs-cats .count {
  color: var(--muted);
  font-size: 13px;
}

.doc-group {
  margin-bottom: 40px;
}

.doc-group h2 {
  font-size: 26px;
  margin-bottom: 16px;
}

.doc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doc-row {
  display: flex;
  align-items: center;
  gap: 18px;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
}

.file-type {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--cream);
  background: var(--burgundy);
  border-radius: 6px;
  padding: 8px 10px;
}

.file-type.docx {
  background: var(--deep-green);
}

.doc-row .doc-info {
  flex: 1;
  min-width: 180px;
}

.doc-row .doc-title {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--forest);
}

.doc-row .doc-meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

@media (max-width: 860px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
  }
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-list {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 15px;
}

.contact-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.contact-list svg {
  flex-shrink: 0;
  color: var(--rust);
  margin-top: 2px;
}

.section-deep .contact-list svg,
.section-forest .contact-list svg {
  color: var(--rust-light);
}

.contact-list a {
  color: inherit;
}

.map-card {
  position: relative;
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 240px;
}

.map-card img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.map-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 60, 50, 0.1), rgba(18, 60, 50, 0.5));
}

.map-card .map-label {
  position: absolute;
  left: 20px;
  bottom: 18px;
  z-index: 1;
  background: var(--cream);
  color: var(--forest);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

.contact-form {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.contact-form h2 {
  font-size: 26px;
  margin-bottom: 20px;
}

.form-field {
  margin-bottom: 18px;
}

.form-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--forest);
  margin-bottom: 6px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid rgba(18, 60, 50, 0.3);
  border-radius: 8px;
  background: var(--cream);
  color: var(--body);
}

.form-field textarea {
  min-height: 130px;
  resize: vertical;
}

.form-note {
  font-size: 13px;
  color: var(--muted);
  margin: 14px 0 0;
}

.form-status {
  margin: 14px 0 0;
  font-weight: 600;
  color: var(--deep-green);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--forest);
  color: rgba(243, 238, 223, 0.75);
  padding: 40px 0;
  font-size: 13px;
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.site-footer .brand-mark {
  width: 36px;
  height: 36px;
}

.footer-nav ul {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav a {
  color: rgba(243, 238, 223, 0.75);
  text-decoration: none;
}

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

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .quick-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

@media (max-width: 860px) {
  .section {
    padding: 52px 0;
  }

  .pattern-icon {
    opacity: 0.1;
  }

  .pattern-badminton-right,
  .pattern-basketball-left,
  .pattern-basketball-right {
    display: none;
  }

  .pattern-rekreacija-top {
    display: block;
    left: 20px;
    top: 600px;
    width: 72px;
    transform: rotate(-5deg);
  }
  
  .pattern-badminton-left {
    display: block;
    top: 10px;
    width: 72px;
    left: 200px;
    transform: rotate(-8deg);
  }

  .pattern-rekreacija-left {
    display: block;
    bottom: 458px;
    width: 102px;
  }

  .pattern-basketball-right {
    display: block;
    bottom: 950px;
    width: 96px;
    transform: rotate(12deg);
  }

  .intro-grid,
  .sekcije-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .sekcije-grid .photo {
    order: -1;
    max-width: 480px;
  }

  .sekcije-grid .photo img {
    aspect-ratio: 4 / 3;
  }

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

@media (max-width: 640px) {
  .news-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 480px;
  }

  .gallery-preview {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 160px 160px 160px;
  }

  .gallery-preview a:first-child {
    grid-column: span 2;
    grid-row: span 1;
  }

  .pokrovitelj-grid,
  .pokrovitelj-grid.supporters {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Article / detail pages (Astro) ---------- */

.article-header {
  background: var(--light-cream);
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--hairline);
}

.article-header h1 {
  font-size: clamp(30px, 5vw, 44px);
  max-width: 760px;
}

.article-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.article-meta time {
  font-size: 14px;
  color: var(--muted);
}

.article-cover {
  max-width: 860px;
  margin: -32px auto 0;
  padding: 0 24px;
}

.article-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-photo);
}

.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 72px;
}

/* Document-style pages (privacy policy and any page without its own template).
   `.article-body` centres a 720px column in the window, which on a wide screen
   leaves the text starting well to the right of the h1 in the page header
   above it. Here the column starts at the container's own left edge, so the
   heading and the text line up, and it is wider, because these are documents
   to be read through rather than articles. */
.page-body {
  max-width: var(--container);
  margin: 0 auto;
  padding: 48px 24px 72px;
}

.page-body .prose {
  max-width: 820px;
}

.prose {
  font-size: 17px;
  line-height: 1.75;
}

.prose h2 {
  font-size: 28px;
  margin: 1.4em 0 0.5em;
}

.prose h3 {
  font-size: 22px;
  margin: 1.3em 0 0.5em;
}

.prose ul,
.prose ol {
  padding-left: 24px;
  margin: 0 0 1em;
}

.prose li {
  margin-bottom: 6px;
}

.prose blockquote {
  border-left: 3px solid var(--rust);
  margin: 1.2em 0;
  padding: 4px 0 4px 18px;
  color: var(--muted);
  font-style: italic;
}

.prose img {
  border-radius: var(--radius);
  margin: 1.2em 0;
}

.prose a {
  color: var(--rust);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
}

/* Event detail */

.event-facts {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.event-facts li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--body);
}

.event-facts svg {
  color: var(--rust);
  flex-shrink: 0;
}

.event-location-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(155, 74, 47, 0.45);
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.event-location-link:hover,
.event-location-link:focus-visible {
  color: var(--rust);
  text-decoration-color: var(--rust);
}

.event-videos {
  background: var(--light-cream);
  padding: 48px 0;
  margin-bottom: 8px;
}

.event-videos .container {
  max-width: 860px;
}

.event-videos h2 {
  font-size: 24px;
  margin-bottom: 20px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.video-item h3 {
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--forest);
}

.video-item video {
  width: 100%;
  border-radius: var(--radius);
  background: #000;
  display: block;
}

.registration-box {
  max-width: 720px;
  margin: 30px auto 0;
  padding: 0 24px 56px;
}

.registration-box .box {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.registration-box h2 {
  font-size: 22px;
  margin-bottom: 6px;
}

.registration-box p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.registration-box .form-note {
  margin-top: 14px;
}

.registration-box .box-stacked {
  display: block;
}

.registration-intro {
  margin-bottom: 22px;
}

.registration-intro p strong {
  color: var(--forest);
}

.registration-form .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
}

.registration-form select {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid rgba(18, 60, 50, 0.3);
  border-radius: 8px;
  background: var(--cream);
  color: var(--body);
}

.form-field .req {
  color: var(--rust);
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
}

.form-check input {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--forest);
}

.form-check label {
  font-size: 14px;
  line-height: 1.5;
  color: var(--body);
}

/* Toggled by main.js; without JavaScript the field simply stays visible. */
[data-minor-hidden] {
  display: none;
}

/* A name is a short value: match the width of the two-column grid above rather
   than stretching it across the whole card. */
.registration-form [data-minor-field] {
  max-width: calc(50% - 9px);
}

.registration-form textarea {
  min-height: 96px;
}

.form-errors {
  margin-bottom: 22px;
  padding: 14px 16px;
  border: 1px solid rgba(155, 74, 47, 0.4);
  border-radius: var(--radius);
  background: rgba(155, 74, 47, 0.08);
  color: var(--burgundy);
  font-size: 14px;
}

.form-errors p {
  margin: 0 0 6px;
  color: inherit;
  font-size: inherit;
}

.form-errors ul {
  margin: 0;
  padding-left: 18px;
}

/* Honeypot: off-screen rather than display:none, which bots increasingly skip. */
.sd-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.registration-done h2 {
  margin-bottom: 10px;
}

.registration-done p + p {
  margin-top: 10px;
}

@media (max-width: 640px) {
  .registration-form .form-grid {
    grid-template-columns: 1fr;
  }

  .registration-form [data-minor-field] {
    max-width: none;
  }
}

/* Status badges */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 5px 12px;
  border-radius: 999px;
}

.badge-open {
  background: rgba(24, 77, 63, 0.12);
  color: var(--deep-green);
}

.badge-closed {
  background: rgba(75, 23, 27, 0.1);
  color: var(--burgundy);
}

.badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

/* Social links (contact) */

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-img {
    animation: heroDrift 3s ease-out both;
  }

  .hero-eyebrow,
  .hero h1,
  .hero p,
  .hero-actions {
    opacity: 0;
    animation: heroContentIn 0.7s ease forwards;
  }

  .hero h1 {
    animation-delay: 0.08s;
  }

  .hero p {
    animation-delay: 0.16s;
  }

  .hero-actions {
    animation-delay: 0.24s;
  }

  .pattern-icon {
    animation: patternFloat 8s ease-in-out infinite;
  }

  .pattern-basketball,
  .pattern-rekreacija {
    animation-duration: 10s;
  }

  .pattern-badminton-right,
  .pattern-basketball-right,
  .pattern-rekreacija-top {
    animation-delay: -3s;
  }

  @supports (animation-timeline: view()) {
    .section > .container,
    .quick-card,
    .news-card,
    .event-row,
    .sekcija-card,
    .gallery-preview a,
    .pokrovitelj-strip .pokrovitelj-name {
      animation: revealUp both;
      animation-timeline: view();
      animation-range: entry 0% cover 26%;
    }

    .quick-card:nth-child(2),
    .news-card:nth-child(2),
    .gallery-preview a:nth-child(2) {
      animation-range: entry 4% cover 30%;
    }

    .quick-card:nth-child(3),
    .news-card:nth-child(3),
    .gallery-preview a:nth-child(3) {
      animation-range: entry 8% cover 34%;
    }

    .quick-card:nth-child(4),
    .gallery-preview a:nth-child(4),
    .gallery-preview a:nth-child(5) {
      animation-range: entry 12% cover 38%;
    }
  }
}
