/* ============================================================================
   HDL THEME - CUSTOM STYLESHEET
   CSS Properties, Base Typography, Utilities, Prose, Blocks, & Responsive
   ============================================================================ */

/* === CSS CUSTOM PROPERTIES FROM design.json === */
:root {
  /* Primary Colors */
  --cro-red: #C41E3A;
  --cro-red-hover: #A01830;
  --cro-red-light: #FEF2F4;

  /* Secondary Colors */
  --navy: #1A365D;
  --navy-dark: #0E1C31;

  /* Accent Colors */
  --olive: #2D6A4F;
  --olive-light: #F0FDF4;

  /* Neutral Colors */
  --cream: #FFFEF5;
  --white: #FFFFFF;
  --gray-50: #F7FAFC;
  --gray-100: #EDF2F7;
  --gray-200: #E2E8F0;
  --gray-400: #CBD5E0;
  --gray-600: #718096;
  --gray-700: #4A5568;
  --gray-800: #2D3748;
  --gray-900: #1A202C;

  /* Semantic Colors */
  --text-heading: #1A365D;
  --text-body: #2D3748;
  --text-muted: #718096;
  --text-inverse: #FFFFFF;
  --text-link: #C41E3A;
  --text-link-hover: #A01830;

  --bg-primary: #FFFEF5;
  --bg-secondary: #F7FAFC;
  --bg-tertiary: #F0F4F8;
  --bg-card: #FFFFFF;
  --bg-overlay: rgba(26, 54, 93, 0.9);
  --bg-inverse: #1A365D;

  /* Border Colors */
  --border-default: #E2E8F0;
  --border-muted: #EDF2F7;
  --border-focus: #C41E3A;

  /* Typography */
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  --font-accent: 'Cormorant Garamond', serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 0.75rem;
  --spacing-lg: 1rem;
  --spacing-xl: 1.5rem;
  --spacing-2xl: 2rem;
  --spacing-3xl: 3rem;
  --spacing-4xl: 4rem;
  --spacing-6xl: 6rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-red: 0 10px 30px -5px rgba(196, 30, 58, 0.1);
  --shadow-red-hover: 0 10px 30px -5px rgba(196, 30, 58, 0.2);

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-Index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-tooltip: 1070;
  --z-scroll-progress: 100;
}

/* ============================================================================
   BASE TYPOGRAPHY
   ============================================================================ */

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-body);
  line-height: 1.625;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--text-heading);
  letter-spacing: -0.025em;
  margin: 0;
  padding: 0;
}

h1 {
  font-size: 4.5rem;
  line-height: 1.1;
}

h2 {
  font-size: 2.25rem;
  line-height: 1.2;
  margin-top: var(--spacing-2xl);
  margin-bottom: var(--spacing-lg);
}

h3 {
  font-size: 1.5rem;
  line-height: 1.3;
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
}

h4 {
  font-size: 1.25rem;
  line-height: 1.4;
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-sm);
}

h5 {
  font-size: 1.125rem;
  font-weight: 600;
}

h6 {
  font-size: 1rem;
  font-weight: 600;
}

p {
  margin: 0;
  padding: 0;
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--text-link-hover);
}

/* Let Tailwind utilities control header/footer link colours (matches index.html). */
.site-header a,
.site-footer a {
  color: inherit;
}

.site-footer h4 {
  margin-top: 0;
}


.site-footer ul {
  list-style: none;
  padding-left: 0;
  margin-top: 0;
  margin-bottom: 0;
}

.site-footer li {
  list-style: none;
}

/* Primary CTA anchors: white text in all states (must follow .site-header a so it is not overridden). */
a.hdl-btn-primary,
a.hdl-btn-primary:link,
a.hdl-btn-primary:visited,
a.hdl-btn-primary:hover,
a.hdl-btn-primary:active,
a.hdl-btn-primary:focus {
  color: #ffffff;
}

strong, .font-semibold {
  font-weight: 600;
}

em, .font-italic {
  font-style: italic;
}

.font-accent {
  font-family: var(--font-accent);
}

.font-mono {
  font-family: var(--font-mono);
}

/* Font Sizes */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }

/* Font Weights */
.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Text Colors */
.text-heading { color: var(--text-heading); }
.text-body { color: var(--text-body); }
.text-muted { color: var(--text-muted); }
.text-inverse { color: var(--text-inverse); }
.text-link { color: var(--text-link); }
.text-red { color: var(--cro-red); }
.text-navy { color: var(--navy); }
.text-olive { color: var(--olive); }

/* ============================================================================
   SCROLL PROGRESS INDICATOR
   ============================================================================ */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, var(--cro-red), var(--olive));
  transform-origin: left;
  transform: scaleX(0);
  z-index: var(--z-scroll-progress);
  pointer-events: none;
  will-change: transform;
}

/* ============================================================================
   ŠAHOVNICA CHECKERED PATTERN
   ============================================================================ */

.bg-pattern-checkers {
  position: relative;
  background-image:
    linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
    linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
    linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
  background-size: 60px 60px;
  background-position: 0 0, 0 30px, 30px -30px, -30px 0px;
  opacity: 0.4;
  z-index: 0;
}

/* #onama: full-bleed image; right-side stack fades image for text legibility */
#onama {
  background-image: url('../images/whitebg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

@media (max-width: 768px) {
  #onama {
    background-position: -1241px top;
  }
}

.onama-pattern-stack {
  isolation: isolate;
}

.onama-pattern-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* #put section: Croatian flag photograph background */
.hdl-flag-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 75% center;
  opacity: 0.42;
  pointer-events: none;
  mask-image: linear-gradient(
    to right,
    #000 0%,
    #000 38%,
    rgba(0, 0, 0, 0.55) 72%,
    rgba(0, 0, 0, 0.2) 100%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    #000 0%,
    #000 38%,
    rgba(0, 0, 0, 0.55) 72%,
    rgba(0, 0, 0, 0.2) 100%
  );
}

/* ============================================================================
   CROATIAN PLETER (INTERLACE) BORDER PATTERN
   Tileable SVG-based decorative border in red / navy / white.
   ============================================================================ */

/* ── Horizontal divider ──────────────────────────────────────────────────── */
.hdl-pleter {
  display: block;
  width: 100%;
  height: 36px;
  background: url('../img/pleter-border.svg') repeat-x center;
  background-size: 80px 36px;
  flex-shrink: 0;
}

/* Light variant for dark backgrounds */
.hdl-pleter--light {
  background-image: url('../img/pleter-border-light.svg');
}

/* Sizing variants */
.hdl-pleter--sm {
  height: 24px;
  background-size: 54px 24px;
}

.hdl-pleter--lg {
  height: 48px;
  background-size: 106px 48px;
}

/* ── Pseudo-element borders (add to any element) ─────────────────────────── */
.hdl-pleter-top {
  position: relative;
}

.hdl-pleter-top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 36px;
  background: url('../img/pleter-border.svg') repeat-x center;
  background-size: 80px 36px;
  pointer-events: none;
  z-index: 1;
}

.hdl-pleter-bottom {
  position: relative;
}

.hdl-pleter-bottom::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 36px;
  background: url('../img/pleter-border.svg') repeat-x center;
  background-size: 80px 36px;
  pointer-events: none;
  z-index: 1;
}

/* Light pseudo-element variants */
.hdl-pleter-top--light::before {
  background-image: url('../img/pleter-border-light.svg');
}

.hdl-pleter-bottom--light::after {
  background-image: url('../img/pleter-border-light.svg');
}

/* ============================================================================
   HIDE SCROLLBAR UTILITY
   ============================================================================ */

.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

/* ============================================================================
   PROSE / CONTENT STYLING (for Gutenberg & Classic Editor)
   ============================================================================ */

.prose-hdl,
.entry-content {
  margin: 0 auto;
}

/* Paragraphs */
.prose-hdl p,
.entry-content p {
  margin-bottom: 1.5em;
  line-height: 1.625;
  font-weight: 300;
  color: var(--text-body);
}

/* Headings within content */
.prose-hdl h1,
.entry-content h1 {
  font-size: 2.25rem;
  margin-top: 1.25em;
  margin-bottom: 0.4em;
}

.prose-hdl h2,
.entry-content h2 {
  font-size: 1.875rem;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  color: var(--text-heading);
  font-weight: 500;
}

.prose-hdl h3,
.entry-content h3 {
  font-size: 1.5rem;
  margin-top: 1.25em;
  margin-bottom: 0.4em;
  color: var(--text-heading);
  font-weight: 500;
}

.prose-hdl h4,
.entry-content h4 {
  font-size: 1.25rem;
  margin-top: 1em;
  margin-bottom: 0.35em;
  color: var(--text-heading);
  font-weight: 500;
}

/* Links */
.prose-hdl a,
.entry-content a {
  color: var(--text-link);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: all var(--transition-fast);
}

.prose-hdl a:hover,
.entry-content a:hover {
  color: var(--text-link-hover);
  text-decoration-thickness: 2px;
}

/* Lists */
.prose-hdl ul,
.entry-content ul,
.prose-hdl ol,
.entry-content ol {
  margin: 1.5em 0;
  padding-left: 1.5em;
  color: var(--text-body);
}

.prose-hdl li,
.entry-content li {
  margin-bottom: 0.5em;
  line-height: 1.625;
}

.prose-hdl ul li::marker,
.entry-content ul li::marker {
  color: var(--cro-red);
  font-weight: 600;
}

.prose-hdl ol li::marker,
.entry-content ol li::marker {
  color: var(--text-heading);
  font-weight: 600;
}

/* Images */
.prose-hdl img,
.entry-content img {
  border-radius: var(--radius-2xl);
  margin: 2em 0;
  max-width: 100%;
  height: auto;
  display: block;
  box-shadow: var(--shadow-lg);
}

/* Figures & Captions */
.prose-hdl figure,
.entry-content figure {
  margin: 2em 0;
  padding: 0;
}

.prose-hdl figcaption,
.entry-content figcaption {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  font-weight: 400;
}

/* Blockquotes */
.prose-hdl blockquote,
.entry-content blockquote {
  border-left: 3px solid var(--cro-red);
  padding: 1.5rem;
  margin: 2em 0;
  background: var(--cream);
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--text-body);
  box-shadow: var(--shadow-sm);
}

.prose-hdl blockquote p,
.entry-content blockquote p {
  margin-bottom: 0;
  color: inherit;
}

.prose-hdl blockquote cite,
.entry-content blockquote cite {
  display: block;
  font-style: normal;
  font-size: 0.875em;
  color: var(--text-muted);
  margin-top: 1em;
}

/* Code */
.prose-hdl code,
.entry-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--gray-100);
  padding: 0.125em 0.375em;
  border-radius: var(--radius-sm);
  color: var(--cro-red);
}

.prose-hdl pre,
.entry-content pre {
  background: var(--gray-900);
  color: #E2E8F0;
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  overflow-x: auto;
  margin: 2em 0;
  box-shadow: var(--shadow-xl);
}

.prose-hdl pre code,
.entry-content pre code {
  background: none;
  color: #E2E8F0;
  padding: 0;
  border-radius: 0;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Tables */
.prose-hdl table,
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.prose-hdl th,
.entry-content th {
  background: var(--text-heading);
  color: white;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.prose-hdl td,
.entry-content td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-default);
  color: var(--text-body);
}

.prose-hdl tbody tr:last-child td,
.entry-content tbody tr:last-child td {
  border-bottom: none;
}

.prose-hdl tbody tr:nth-child(even),
.entry-content tbody tr:nth-child(even) {
  background: var(--gray-50);
}

.prose-hdl tbody tr:hover,
.entry-content tbody tr:hover {
  background: var(--gray-100);
}

/* Horizontal Rule */
.prose-hdl hr,
.entry-content hr {
  border: none;
  border-top: 1px solid var(--border-default);
  margin: 3em 0;
}

/* Definition Lists */
.prose-hdl dt,
.entry-content dt {
  font-weight: 600;
  margin-top: 1em;
  color: var(--text-heading);
}

.prose-hdl dd,
.entry-content dd {
  margin-left: 1.5em;
  margin-bottom: 1em;
  color: var(--text-body);
}

/* ============================================================================
   WORDPRESS ALIGNMENT CLASSES
   ============================================================================ */

.alignleft {
  float: left;
  margin: 0.5em 1.5em 1em 0;
  max-width: 50%;
}

.alignright {
  float: right;
  margin: 0.5em 0 1em 1.5em;
  max-width: 50%;
}

.aligncenter {
  display: block;
  margin: 2em auto;
  text-align: center;
}

.alignwide {
  margin-left: -2rem;
  margin-right: -2rem;
  max-width: calc(100% + 4rem);
}

.alignfull {
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  max-width: 100vw;
  width: 100vw;
}

/* ============================================================================
   WORDPRESS BLOCK STYLES (Gutenberg)
   ============================================================================ */

/* Image Block */
.wp-block-image {
  margin: 2em 0;
}

.wp-block-image img {
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
  max-width: 100%;
  height: auto;
}

.wp-block-image figcaption {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* Quote Block */
.wp-block-quote {
  border-left: 3px solid var(--cro-red);
  padding: 1.5rem;
  margin: 2em 0;
  background: var(--cream);
  color: var(--text-body);
}

.wp-block-quote p {
  margin: 0;
  font-size: 1.125rem;
  font-style: italic;
  font-family: var(--font-accent);
}

.wp-block-quote cite,
.wp-block-quote footer {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 1rem;
  font-style: normal;
}

/* Pullquote Block */
.wp-block-pullquote {
  text-align: center;
  font-family: var(--font-accent);
  font-size: 1.5rem;
  font-style: italic;
  margin: 2em 0;
  border-top: 1px solid var(--border-default);
  border-bottom: 1px solid var(--border-default);
  padding: 2em 0;
}

.wp-block-pullquote p {
  margin: 0;
  color: var(--text-heading);
}

/* Separator Block */
.wp-block-separator {
  border: none;
  border-top: 1px solid var(--border-default);
  margin: 3em 0;
  opacity: 0.4;
}

.wp-block-separator.is-style-wide {
  border-width: 2px;
  opacity: 0.6;
}

.wp-block-separator.is-style-dots {
  border: none;
  text-align: center;
  color: var(--cro-red);
  font-size: 1.5rem;
  opacity: 1;
}

/* Button Block */
.wp-block-button {
  margin: 2em 0;
}

.wp-block-button__link {
  background: var(--cro-red);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
  display: inline-block;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-red);
}

.wp-block-button__link:hover {
  background: var(--cro-red-hover);
  box-shadow: var(--shadow-red-hover);
  transform: translateY(-2px);
}

.wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  border: 2px solid var(--text-heading);
  color: var(--text-heading);
  box-shadow: none;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: var(--gray-50);
  border-color: var(--cro-red);
  color: var(--cro-red);
}

/* Heading Block */
.wp-block-heading {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--text-heading);
  letter-spacing: -0.025em;
  margin: 0;
}

.wp-block-heading.wp-block-heading-1 { font-size: 3.5rem; }
.wp-block-heading.wp-block-heading-2 { font-size: 2.25rem; }
.wp-block-heading.wp-block-heading-3 { font-size: 1.5rem; }
.wp-block-heading.wp-block-heading-4 { font-size: 1.25rem; }
.wp-block-heading.wp-block-heading-5 { font-size: 1.125rem; }
.wp-block-heading.wp-block-heading-6 { font-size: 1rem; }

/* Paragraph Block */
.wp-block-paragraph {
  margin: 0 0 1.5em 0;
  line-height: 1.625;
  font-weight: 300;
  color: var(--text-body);
}

/* List Block */
.wp-block-list {
  margin: 1.5em 0;
  padding-left: 1.5em;
}

.wp-block-list li {
  margin-bottom: 0.5em;
}

.wp-block-list li::marker {
  color: var(--cro-red);
  font-weight: 600;
}

/* Cover Block */
.wp-block-cover {
  border-radius: var(--radius-2xl);
  overflow: hidden;
  min-height: 300px;
}

/* Gallery Block */
.wp-block-gallery {
  display: grid;
  gap: 1rem;
  margin: 2em 0;
}

.wp-block-gallery .wp-block-image img {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

/* Columns Block */
.wp-block-columns {
  display: grid;
  gap: 2rem;
  grid-auto-flow: column;
}

.wp-block-column {
  flex: 1;
}

/* Embed Block */
.wp-block-embed {
  margin: 2em 0;
}

.wp-block-embed iframe {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  max-width: 100%;
}

/* Group Block */
.wp-block-group {
  padding: 2rem;
}

/* Social Links Block */
.wp-block-social-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 2em 0;
}

.wp-block-social-link a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--cro-red);
  color: white;
  transition: all var(--transition-fast);
}

.wp-block-social-link a:hover {
  background: var(--cro-red-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-red-hover);
}

/* Latest Posts Block */
.wp-block-latest-posts {
  list-style: none;
  padding: 0;
  margin: 0;
}

.wp-block-latest-posts li {
  margin-bottom: 1.5em;
  padding-bottom: 1.5em;
  border-bottom: 1px solid var(--border-default);
}

.wp-block-latest-posts li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* ============================================================================
   SITE HEADER — WordPress primary menu + dropdowns (prototype-aligned)
   ============================================================================ */

#hdl-primary-menu li.menu-item-has-children {
  position: relative;
}

/* Rotate chevron when parent item is hovered */
#hdl-primary-menu li.menu-item-has-children:hover > a .hdl-menu-chevron,
#hdl-primary-menu li.menu-item-has-children:focus-within > a .hdl-menu-chevron {
  transform: rotate(180deg);
}

#hdl-primary-menu ul.sub-menu {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-default);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
  z-index: 60;
}

#hdl-primary-menu li.menu-item-has-children:hover > ul.sub-menu,
#hdl-primary-menu li.menu-item-has-children:focus-within > ul.sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#hdl-primary-menu ul.sub-menu a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-body);
}

#hdl-primary-menu ul.sub-menu a:hover {
  color: var(--cro-red);
  background: var(--gray-50);
}

/* Mobile submenu */
#hdl-primary-menu-mobile ul.sub-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

#hdl-primary-menu-mobile ul.sub-menu a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--gray-700);
  padding: 0.375rem 0;
  display: block;
  transition: color var(--transition-fast);
}

#hdl-primary-menu-mobile ul.sub-menu a:hover {
  color: var(--cro-red);
}

/* ============================================================================
   NAVIGATION MENU STYLES
   ============================================================================ */

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2rem;
}

.nav-menu li {
  position: relative;
}

.nav-menu li a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-body);
  text-decoration: none;
  transition: color var(--transition-fast);
  padding: 0.5rem 0;
  display: block;
}

.nav-menu li a:hover,
.nav-menu li a.active {
  color: var(--cro-red);
}

.nav-menu li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--cro-red);
  transition: width var(--transition-fast);
}

.nav-menu li a:hover::after,
.nav-menu li a.active::after {
  width: 100%;
}

/* Submenu */
.nav-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  margin-top: 0.5rem;
  z-index: var(--z-dropdown);
}

.nav-menu li:hover > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-menu ul li a {
  padding: 0.75rem 1.5rem;
  white-space: nowrap;
}

/* ============================================================================
   MOBILE MENU
   ============================================================================ */

/* Slide-in panel (matches index.html; toggled with .open via JS). */
.mobile-menu {
  transform: translateX(-100%);
  transition: transform 0.3s ease-out;
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-menu-item {
  border-bottom: 1px solid var(--border-default);
}

.mobile-menu-item a {
  display: block;
  padding: 1rem 1.5rem;
  color: var(--text-body);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.mobile-menu-item a:hover {
  color: var(--cro-red);
  background: var(--gray-50);
}

/* ============================================================================
   SCROLL REVEAL ANIMATION
   ============================================================================ */

.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all var(--transition-slow);
}

.scroll-reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for grid/list items */
.scroll-reveal.stagger-1 { transition-delay: 0.1s; }
.scroll-reveal.stagger-2 { transition-delay: 0.2s; }
.scroll-reveal.stagger-3 { transition-delay: 0.3s; }
.scroll-reveal.stagger-4 { transition-delay: 0.4s; }
.scroll-reveal.stagger-5 { transition-delay: 0.5s; }

/* GSAP ScrollTrigger animations */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
}

[data-counter] {
  font-weight: 600;
  font-size: 2rem;
  color: var(--cro-red);
}

/* ============================================================================
   HERO CONTENT REVEAL
   ============================================================================ */

.hero-content {
  opacity: 0;
  transform: translateY(20px);
}

.hero-content.loaded {
  animation: fadeUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hero-content.loaded:nth-child(1) { animation-delay: 0.2s; }
.hero-content.loaded:nth-child(2) { animation-delay: 0.4s; }
.hero-content.loaded:nth-child(3) { animation-delay: 0.6s; }

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

/* ============================================================================
   SELECTION COLOR
   ============================================================================ */

::selection {
  background: var(--cro-red);
  color: white;
}

::-moz-selection {
  background: var(--cro-red);
  color: white;
}

/* ============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================ */

@media (max-width: 1024px) {
  .nav-menu {
    gap: 1.5rem;
  }

  .alignwide {
    margin-left: -1rem;
    margin-right: -1rem;
    max-width: calc(100% + 2rem);
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.875rem; }
  h3 { font-size: 1.25rem; }
  h4 { font-size: 1.125rem; }

  .prose-hdl h1,
  .entry-content h1 { font-size: 1.875rem; }

  .prose-hdl h2,
  .entry-content h2 { font-size: 1.5rem; }

  /* Navigation goes to mobile layout */
  .nav-menu {
    display: none;
  }

  /* Alignment classes on mobile */
  .alignleft,
  .alignright {
    float: none;
    margin: 1.5em 0;
    max-width: 100%;
  }

  .alignwide {
    margin-left: -1rem;
    margin-right: -1rem;
    max-width: calc(100% + 2rem);
  }

  /* Block grid responsive */
  .wp-block-columns {
    grid-auto-flow: row;
  }

  .wp-block-gallery {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 640px) {
  :root {
    --spacing-4xl: 2rem;
    --spacing-6xl: 3rem;
  }

  h1 { font-size: 1.875rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .prose-hdl,
  .entry-content {
    padding: 0 1rem;
  }

  .alignwide,
  .alignfull {
    margin-left: -1rem;
    margin-right: -1rem;
    max-width: calc(100% + 2rem);
  }

  .wp-block-button__link {
    width: 100%;
    text-align: center;
  }

  table {
    font-size: 0.75rem;
  }

  .prose-hdl table th,
  .entry-content table th {
    padding: 0.5rem 0.75rem;
  }

  .prose-hdl table td,
  .entry-content table td {
    padding: 0.5rem 0.75rem;
  }
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-full { border-radius: var(--radius-full); }

.border { border: 1px solid var(--border-default); }
.border-t { border-top: 1px solid var(--border-default); }
.border-b { border-bottom: 1px solid var(--border-default); }
.border-l { border-left: 1px solid var(--border-default); }
.border-r { border-right: 1px solid var(--border-default); }

.gap-1 { gap: var(--spacing-lg); }
.gap-2 { gap: var(--spacing-xl); }
.gap-3 { gap: var(--spacing-2xl); }
.gap-4 { gap: var(--spacing-3xl); }

.p-1 { padding: var(--spacing-lg); }
.p-2 { padding: var(--spacing-xl); }
.p-3 { padding: var(--spacing-2xl); }
.p-4 { padding: var(--spacing-3xl); }

.m-0 { margin: 0; }
.mt-1 { margin-top: var(--spacing-lg); }
.mt-2 { margin-top: var(--spacing-xl); }
.mt-3 { margin-top: var(--spacing-2xl); }
.mb-1 { margin-bottom: var(--spacing-lg); }
.mb-2 { margin-bottom: var(--spacing-xl); }
.mb-3 { margin-bottom: var(--spacing-2xl); }

/* ============================================================================
   WORDPRESS CAPTION
   ============================================================================ */

.wp-caption {
  max-width: 100%;
  margin: 2em 0;
}

.wp-caption-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.5rem;
  font-weight: 400;
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
  body {
    background: white;
    color: black;
  }

  a {
    text-decoration: underline;
  }

  .no-print {
    display: none;
  }

  h1, h2, h3, h4 {
    page-break-after: avoid;
  }

  img {
    max-width: 100%;
    page-break-inside: avoid;
  }

  table {
    page-break-inside: avoid;
  }
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Focus visible for keyboard navigation */
*:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--cro-red);
  color: white;
  padding: 0.5rem 1rem;
  text-decoration: none;
  z-index: var(--z-modal);
}

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

/* ============================================================================
   CF7 NEWSLETTER FORM — mirrors the fallback #membership-form (#clanstvo) layout
   ============================================================================ */

.hdl-cf7-inline .wpcf7-form {
  max-width: 28rem;
  margin: 0 auto;
}

.hdl-cf7-inline .wpcf7-form .hdl-newsletter-form {
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  max-width: 28rem;
  margin: 0 auto;
}

.hdl-cf7-inline .wpcf7-form .hdl-newsletter-form p {
  margin: 0;
}

.hdl-cf7-inline .wpcf7-form .hdl-newsletter-form p:first-child {
  flex: 1;
}

.hdl-cf7-inline .wpcf7-form input[type="email"],
.hdl-cf7-inline .wpcf7-form .wpcf7-email {
  width: 100%;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-default, #E2E8F0);
  font-size: 0.875rem;
  line-height: 1.25rem;
  outline: none;
  background: #fff;
  color: var(--text-body, #2D3748);
  transition: all var(--transition-fast, 150ms);
  box-sizing: border-box;
}

.hdl-cf7-inline .wpcf7-form input[type="email"]:focus,
.hdl-cf7-inline .wpcf7-form .wpcf7-email:focus {
  border-color: var(--cro-red, #C41E3A);
  box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.12);
}

.hdl-cf7-inline .wpcf7-form input[type="submit"],
.hdl-cf7-inline .wpcf7-form .wpcf7-submit {
  display: inline-block;
  background: var(--cro-red, #C41E3A);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1.25rem;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: all var(--transition-fast, 150ms);
  transform: translateY(0);
}

.hdl-cf7-inline .wpcf7-form input[type="submit"]:hover,
.hdl-cf7-inline .wpcf7-form .wpcf7-submit:hover {
  background: var(--cro-red-hover, #A01830);
  transform: translateY(-2px);
}

.hdl-cf7-inline .wpcf7-response-output {
  margin: 0.75rem 0 0 !important;
  padding: 0.5rem 1rem !important;
  border-radius: 0.5rem !important;
  border-color: var(--border-default, #E2E8F0) !important;
  font-size: 0.875rem;
  text-align: center;
}

.hdl-cf7-inline .wpcf7-not-valid-tip {
  font-size: 0.75rem;
  color: var(--cro-red);
}

.hdl-cf7-inline .wpcf7-spinner {
  display: none;
}

@media (max-width: 640px) {
  .hdl-cf7-inline .wpcf7-form .hdl-newsletter-form {
    flex-direction: column;
  }
}

/* ============================================================================
   PATTERN DECORATIVE ELEMENT (.pat)
   Repeating Croatian interlace border with optional end-caps and rotation.
   Unit = 70×56 px (normal) or 35×28 px (scaled).
   ============================================================================ */

.pat {
  --pat-unit: 70;
  --pat-h: 56;
  --pat-end-w: 63;
  --pat-overlap: 35;

  position: relative;
  display: block;
  width: 100%;
  height: calc(var(--pat-h) * 1px);
  background: url('../pattern/pattern.png') repeat-x left center;
  background-size: calc(var(--pat-unit) * 1px) calc(var(--pat-h) * 1px);
  pointer-events: none;
  flex-shrink: 0;
  box-sizing: border-box;
}

/* Center in parent after width is set (JS modular width or .pa-*). Avoids
   transform-based centering, which conflicts with .hero-content fadeUp. */
.pat:not(.pat-vertical) {
  margin-left: auto;
  margin-right: auto;
  align-self: center;
}

.pat.pat-scaled {
  --pat-unit: 35;
  --pat-h: 28;
  --pat-end-w: 31.5;
  --pat-overlap: 17.5;
}

/* ── End-caps (left / right) ────────────────────────────────────────────── */

.pat.pat-endings::before,
.pat.pat-endings::after {
  content: '';
  position: absolute;
  top: 0;
  width: calc(var(--pat-end-w) * 1px);
  height: calc(var(--pat-h) * 1px);
  background-repeat: no-repeat;
  background-size: calc(var(--pat-end-w) * 1px) calc(var(--pat-h) * 1px);
  z-index: 1;
  pointer-events: none;
}

.pat.pat-endings::before {
  left: calc((var(--pat-overlap) - var(--pat-end-w)) * 1px);
  background-image: url('../pattern/left.png');
}

.pat.pat-endings::after {
  right: calc((var(--pat-overlap) - var(--pat-end-w)) * 1px);
  background-image: url('../pattern/right.png');
}

/* ── Vertical orientation ───────────────────────────────────────────────── */

.pat.pat-vertical {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
}

/* ── Fixed-length classes  (pa-1 … pa-12) ───────────────────────────────── */

.pat.pa-1  { width: calc(var(--pat-unit) *  1 * 1px); }
.pat.pa-2  { width: calc(var(--pat-unit) *  2 * 1px); }
.pat.pa-3  { width: calc(var(--pat-unit) *  3 * 1px); }
.pat.pa-4  { width: calc(var(--pat-unit) *  4 * 1px); }
.pat.pa-5  { width: calc(var(--pat-unit) *  5 * 1px); }
.pat.pa-6  { width: calc(var(--pat-unit) *  6 * 1px); }
.pat.pa-7  { width: calc(var(--pat-unit) *  7 * 1px); }
.pat.pa-8  { width: calc(var(--pat-unit) *  8 * 1px); }
.pat.pa-9  { width: calc(var(--pat-unit) *  9 * 1px); }
.pat.pa-10 { width: calc(var(--pat-unit) * 10 * 1px); }
.pat.pa-11 { width: calc(var(--pat-unit) * 11 * 1px); }
.pat.pa-12 { width: calc(var(--pat-unit) * 12 * 1px); }

/* Breadcrumb (single / page) */
.hdl-breadcrumb a:focus-visible {
  outline: 2px solid #1a365d;
  outline-offset: 2px;
}

/* ============================================================================
   GALLERIES (ACF gallery_images / gallery_groups) + LIGHTBOX
   ============================================================================ */

.hdl-post-gallery,
.hdl-gallery-groups {
  margin-top: 2.5rem;
  margin-left: auto;
  margin-right: auto;
  max-width: 80rem;
}

.hdl-gallery-group {
  margin-bottom: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-default);
}

.hdl-gallery-group:first-child {
  border-top: 0;
  padding-top: 0;
}

.hdl-gallery-group__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 500;
  color: var(--text-heading);
  margin: 0 0 0.75rem;
}

.hdl-gallery-group__link {
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
}

.hdl-gallery-group__link a {
  color: var(--cro-red);
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
  transition: color 200ms ease, border-color 200ms ease;
}

.hdl-gallery-group__link a:hover {
  color: var(--cro-red-hover);
  border-bottom-style: solid;
}

/* Overview: compact preview mosaic per gallery */
.hdl-gallery-group--overview {
  margin-bottom: 3.5rem;
}

.hdl-gallery-group--overview .hdl-gallery-group__title a {
  color: inherit;
  text-decoration: none;
  transition: color 200ms ease;
}

.hdl-gallery-group--overview .hdl-gallery-group__title a:hover {
  color: var(--cro-red);
}

.hdl-gallery-group__meta {
  margin: -0.25rem 0 1rem;
  font-size: 0.9rem;
  color: var(--text-muted, #64748b);
}

.hdl-gallery-preview {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--bg-secondary);
  box-shadow: 0 4px 24px -6px rgba(15, 23, 42, 0.12);
  transition: transform 280ms ease, box-shadow 280ms ease;
}

.hdl-gallery-preview:hover,
.hdl-gallery-preview:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px -12px rgba(15, 23, 42, 0.2);
  outline: none;
}

.hdl-gallery-preview:focus-visible {
  outline: 2px solid var(--cro-red);
  outline-offset: 4px;
}

/* 4×3 bento: one 2×2 hero + seven 1×1 tiles — fills the block with no gaps */
.hdl-gallery-preview__mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  grid-auto-flow: dense;
  gap: 5px;
  padding: 5px;
  height: clamp(300px, 34vw, 420px);
  min-height: 300px;
  background: #e2e8f0;
}

.hdl-gallery-preview__cell {
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  background: #cbd5e1;
}

.hdl-gallery-preview__mosaic > :nth-child(1) {
  grid-column: 1 / span 2;
  grid-row: 1 / span 2;
}

.hdl-gallery-preview__mosaic > :nth-child(2) {
  grid-column: 3;
  grid-row: 1;
}

.hdl-gallery-preview__mosaic > :nth-child(3) {
  grid-column: 4;
  grid-row: 1 / span 2;
}

.hdl-gallery-preview__mosaic > :nth-child(4) {
  grid-column: 3;
  grid-row: 2;
}

.hdl-gallery-preview__mosaic > :nth-child(5) {
  grid-column: 1;
  grid-row: 3;
}

.hdl-gallery-preview__mosaic > :nth-child(6) {
  grid-column: 2;
  grid-row: 3;
}

.hdl-gallery-preview__mosaic > :nth-child(7) {
  grid-column: 3;
  grid-row: 3;
}

.hdl-gallery-preview__mosaic > :nth-child(8) {
  grid-column: 4;
  grid-row: 3;
}

.hdl-gallery-preview__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hdl-gallery-preview:hover .hdl-gallery-preview__img {
  transform: scale(1.04);
}

.hdl-gallery-preview__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--cro-red);
  background: #fff;
  border-top: 1px solid var(--border-default);
}

.hdl-gallery-preview__cta-icon {
  width: 1rem;
  height: 1rem;
  transition: transform 200ms ease;
}

.hdl-gallery-preview:hover .hdl-gallery-preview__cta-icon {
  transform: translateX(3px);
}

.hdl-gallery-group--single {
  border-top: 0;
  padding-top: 0;
  margin-bottom: 0;
}

.hdl-gallery-groups--single {
  margin-top: 0;
}

.hdl-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .hdl-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
}

@media (min-width: 1024px) {
  .hdl-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.hdl-gallery__item {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 0.75rem;
  background: var(--bg-secondary);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: transform 250ms ease, box-shadow 250ms ease;
  cursor: zoom-in;
  outline: none;
}

.hdl-gallery__item:hover,
.hdl-gallery__item:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -8px rgba(15, 23, 42, 0.18);
}

.hdl-gallery__item:focus-visible {
  outline: 2px solid var(--cro-red);
  outline-offset: 3px;
}

.hdl-gallery__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hdl-gallery__item:hover .hdl-gallery__img,
.hdl-gallery__item:focus-visible .hdl-gallery__img {
  transform: scale(1.05);
}

.hdl-gallery__caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.3;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 100%);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 250ms ease, transform 250ms ease;
  pointer-events: none;
}

.hdl-gallery__item:hover .hdl-gallery__caption,
.hdl-gallery__item:focus-visible .hdl-gallery__caption {
  opacity: 1;
  transform: translateY(0);
}

/* --- Lightbox ------------------------------------------------------------ */

.hdl-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8, 12, 22, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 200ms ease;
}

.hdl-lightbox.is-open {
  display: flex;
  opacity: 1;
}

.hdl-lightbox__stage {
  position: relative;
  max-width: min(96vw, 1400px);
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hdl-lightbox__img {
  max-width: 96vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6);
  background: #0f172a;
  user-select: none;
  -webkit-user-drag: none;
}

.hdl-lightbox__caption {
  position: absolute;
  left: 50%;
  bottom: -2.25rem;
  transform: translateX(-50%);
  color: #e5e7eb;
  font-size: 0.875rem;
  text-align: center;
  max-width: 90vw;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.hdl-lightbox__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
  appearance: none;
  outline: none;
}

.hdl-lightbox__btn:hover,
.hdl-lightbox__btn:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-50%) scale(1.05);
}

.hdl-lightbox__btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.hdl-lightbox__btn--prev { left: 1.25rem; }
.hdl-lightbox__btn--next { right: 1.25rem; }

.hdl-lightbox__btn--close {
  top: 1.25rem;
  right: 1.25rem;
  transform: none;
  width: 2.5rem;
  height: 2.5rem;
}

.hdl-lightbox__btn--close:hover,
.hdl-lightbox__btn--close:focus-visible {
  transform: scale(1.05);
}

.hdl-lightbox__btn svg { width: 1.5rem; height: 1.5rem; }
.hdl-lightbox__btn--close svg { width: 1.25rem; height: 1.25rem; }

.hdl-lightbox__counter {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

@media (max-width: 640px) {
  .hdl-lightbox__btn--prev { left: 0.5rem; }
  .hdl-lightbox__btn--next { right: 0.5rem; }
  .hdl-lightbox__btn--close { top: 0.5rem; right: 0.5rem; }
  .hdl-lightbox__counter { top: 0.75rem; left: 0.75rem; }
}

body.hdl-lightbox-open {
  overflow: hidden;
}

/* ============================================================================
   Archive / search pagination (the_posts_pagination, paginate_links)
   ============================================================================ */

.hdl-pagination {
  width: 100%;
  padding-block: 2.5rem;
  display: flex;
  justify-content: center;
}

.hdl-pagination .navigation.pagination,
.hdl-pagination nav[aria-label] {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hdl-pagination .navigation .screen-reader-text,
.hdl-pagination nav .screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  word-wrap: normal !important;
}

.hdl-pagination .nav-links {
  display: flex;
  justify-content: center;
  width: 100%;
}

.hdl-pagination ul.page-numbers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
}

.hdl-pagination ul.page-numbers li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hdl-pagination ul.page-numbers a,
.hdl-pagination ul.page-numbers span.page-numbers {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  color: var(--gray-800);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 0.5rem;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.hdl-pagination ul.page-numbers a:hover {
  border-color: var(--cro-red);
  color: var(--cro-red);
  background: var(--cro-red-light);
}

.hdl-pagination ul.page-numbers a:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.hdl-pagination ul.page-numbers span.page-numbers.current,
.hdl-pagination ul.page-numbers span.current {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--text-inverse);
  font-weight: 600;
  cursor: default;
}

.hdl-pagination ul.page-numbers span.page-numbers.dots,
.hdl-pagination ul.page-numbers span.dots {
  min-width: 1.75rem;
  padding: 0 0.125rem;
  border: none;
  background: transparent;
  color: var(--gray-600);
  font-weight: 400;
  cursor: default;
}

.hdl-pagination ul.page-numbers a.next,
.hdl-pagination ul.page-numbers a.prev {
  min-width: auto;
  padding: 0 1rem;
  font-weight: 600;
  color: var(--navy);
  border-color: var(--gray-200);
}

.hdl-pagination ul.page-numbers a.next:hover,
.hdl-pagination ul.page-numbers a.prev:hover {
  color: var(--cro-red);
  border-color: var(--cro-red);
  background: var(--cro-red-light);
}

@media (max-width: 480px) {
  .hdl-pagination ul.page-numbers {
    gap: 0.25rem;
  }

  .hdl-pagination ul.page-numbers a,
  .hdl-pagination ul.page-numbers span.page-numbers {
    min-width: 2.25rem;
    min-height: 2.25rem;
    font-size: 0.8125rem;
  }

  .hdl-pagination ul.page-numbers a.next,
  .hdl-pagination ul.page-numbers a.prev {
    padding: 0 0.75rem;
    font-size: 0.8125rem;
  }
}
