/*
Theme Name: HistaTerm - Visejezicni strucni rjecnik
Theme URI: https://github.com/histaterm
Description: Custom tema za visejezicni strucni rjecnik Veterinarskog fakulteta. WordPress + ACF, bez page buildera. Optimizirana za 300-5000+ pojmova.
Author: HistaTerm
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: histaterm
*/

/* ==================================
   CSS VARIABLES
   ================================== */
   :root {
    --blue:       #1b3f7a;
    --blue-dark:  #0e2249;
    --blue-mid:   #2456a4;
    --blue-light: #e8eef8;
    --blue-focus: rgba(36,86,164,0.10);
    
    --accent:        #e8b84b;
    --accent-dim:    rgba(232,184,75,0.15);
    --accent-pale:   rgba(232,184,75,0.08);
    --accent-border: rgba(232,184,75,0.3);
    --accent-strong: rgba(232,184,75,0.4);
    
    --white:      #ffffff;
    --off-white:  #f7f5f2;
    
    --white-03:   rgba(255,255,255,0.03);
    --white-04:   rgba(255,255,255,0.04);
    --white-05:   rgba(255,255,255,0.05);
    --white-06:   rgba(255,255,255,0.06);
    --white-07:   rgba(255,255,255,0.07);
    --white-08:   rgba(255,255,255,0.08);
    --white-15:   rgba(255,255,255,0.15);
    --white-20:   rgba(255,255,255,0.2);
    --white-55:   rgba(255,255,255,0.55);
    --white-82:   rgba(255,255,255,0.82);
    --white-84:   rgba(255,255,255,0.84);
    --white-88:   rgba(255,255,255,0.88);
    --white-90:   rgba(255,255,255,0.9);
    
    --text-dark:        #111827;
    --text-mid:         #374151;
    --text-light:       #6b7280;
    --text-placeholder: #9ca3af;
    
    --border:         rgba(0,0,0,0.09);
    --border-input:   #d1d5db;
    --border-light:   #e5e7eb;
    --border-lighter: #f0f0f0;
    
    --glass-nav:  rgba(13,30,65,0.96);
    
    --bg-overlay-start: rgba(255,252,248,0.74);
    --bg-overlay-end:   rgba(238,234,228,0.60);
    
    --success:      #22c55e;
    --success-bg:   rgba(34,197,94,0.08);
    --success-dark: #166534;
    
    --error:      #dc2626;
    --error-bg:   rgba(220,38,38,0.07);
    --error-dark: #991b1b;
    
    --shadow-sm:     0 1px 3px rgba(0,0,0,0.07);
    --shadow-md:     0 4px 20px rgba(0,0,0,0.11);
    --shadow-lg:     0 12px 48px rgba(0,0,0,0.17);
    --shadow-header: 0 2px 12px rgba(0,0,0,0.2);
    --shadow-flyout: -8px 0 40px rgba(0,0,0,0.3);
    
    --radius:    10px;
    --radius-sm: 6px;
  }
  
  
  /* ==================================
     RESET & BASE
     ================================== */
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html { font-size: 16px; }
  body {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem; line-height: 1.6;
    color: var(--text-dark);
    height: 100vh; overflow: hidden;
    display: flex; flex-direction: column;
    -webkit-font-smoothing: antialiased;
  }
  img { max-width: 100%; height: auto; display: block; }
  a { color: var(--blue); text-decoration: none; transition: color 0.2s; }
  a:hover { color: var(--blue-dark); }
  
  /* Inner pages: scrollable */
  body.page-inner {
    height: auto; overflow-y: auto; min-height: 100vh;
    background: var(--off-white);
  }
  body.page-inner 
  
  /* ==================================
     BACKGROUND
     ================================== */
  .bg { display: none; }
  
  .bg {
    position: fixed; inset: 0;
    background-size: cover; background-position: center 35%;
    z-index: 0;
  }
  .bg::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(155deg, var(--bg-overlay-start) 0%, var(--bg-overlay-end) 100%);
  }
  
  
  /* ==================================
     HEADER
     ================================== */
  .header {
    position: relative; z-index: 100;
    background: var(--glass-nav);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 28px; height: 82px; flex-shrink: 0;
    box-shadow: var(--shadow-header);
  }
  
  .nav-brand {
    display: flex; align-items: center; font-family: 'Crimson Pro', serif;
    font-size: 1.85rem; font-weight: 600; color: var(--white);
    text-decoration: none; white-space: nowrap; letter-spacing: 0.01em;
    flex-shrink: 0; justify-self: start;
  }
  .nav-brand .t { color: var(--accent); }
  .nav-logo { height: 50px; width: auto; display: inline-block; margin-right: 8px; }
  .nav-brand:hover { opacity: .7; color: var(--white) }
  
  .header-logos {
    display: flex; align-items: center; gap: 60px;
    justify-content: center;
  }
  .inst-logo {
    display: flex; align-items: center; gap: 8px;
    text-decoration: none; opacity: 0.88; transition: opacity 0.2s;
  }
  .inst-logo:hover { opacity: .7; }
  .inst-logo-text {
    font-size: 1.094rem; font-weight: 300; line-height: 1.3;
    color: var(--white-90); max-width: 120px;
  }
  .nav-logo-partner { width: 50px; height: 50px; flex-shrink: 0; }
  .h-sep { width: 1px; height: 28px; background: var(--white-15); flex-shrink: 0; }
  
  .project-chip {
    display: flex; align-items: center; gap: 6px;
    background: var(--accent-pale);
    border: 1px solid var(--accent-border);
    border-radius: 20px; padding: 3px 10px 3px 4px;
  }
  .project-chip-dot {
    width: 22px; height: 22px; border-radius: 50%;
    background: linear-gradient(135deg, var(--white-15), var(--white-05));
    border: 1px solid var(--white-20);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent); font-size: 7.5px; font-weight: 700;
    line-height: 1.2; text-align: center; flex-shrink: 0;
  }
  .project-chip-text { font-size: 0.85rem; font-weight: 600; color: var(--accent); white-space: nowrap; }
  
  .header-right {
    display: flex; align-items: center; justify-content: flex-end; gap: 20px; 
  }
  
  .hamburger {
    display: flex; flex-direction: column; justify-content: center;
    align-items: center; gap: 5px; 
    width: 40px; height: 40px; border-radius: var(--radius-sm);
    background: var(--white-08); border: none;
    cursor: pointer; transition: background 0.2s; flex-shrink: 0;
    position: relative; z-index: 1;
  }
  .hamburger:hover { background: var(--white-15); }
  .hamburger.open { background: var(--accent-dim); border-color: var(--accent-strong); }
  .bar {
    display: block; width: 20px; height: 1.75px;
    background: var(--white); border-radius: 2px;
    transition: transform 0.28s ease, opacity 0.2s ease;
    transform-origin: center;
  }
  .hamburger.open .bar:nth-child(1) { transform: translateY(6.75px) rotate(45deg); }
  .hamburger.open .bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .hamburger.open .bar:nth-child(3) { transform: translateY(-6.75px) rotate(-45deg); }
  
  
  /* ==================================
     FLYOUT NAV
     ================================== */
  .nav-flyout {
    position: fixed; top: 0; right: -25%; left: auto;
    width: 25%; height: 100%;
    background: var(--glass-nav);
    backdrop-filter: blur(12px);
    border-left: 2px solid var(--accent);
    z-index: 90;
    overflow-y: auto;
    transition: right 0.3s ease;
    box-shadow: var(--shadow-flyout);
  }
  .nav-flyout.open { right: 0; }
  
  .flyout-inner { display: flex; flex-direction: column; padding: 96px 0 12px; }
  body.admin-bar .nav-flyout { top: 32px; height: calc(100% - 32px); }
  .flyout-item { position: relative; border-right: none; border-bottom: none; }
  .flyout-item + .flyout-item { border-top: 1px solid var(--white-07); }
  
  .flyout-link {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 32px; font-weight: 600;
    color: var(--white-55); text-decoration: none;
    letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.75rem;
    cursor: default;
    background: none; border: none;
    width: 100%; text-align: left; font-family: inherit;
    pointer-events: none;
  }
  .flyout-link.no-sub {
    font-size: 1.0625rem; font-weight: 500;
    text-transform: none; letter-spacing: 0;
    color: var(--white-88);
    cursor: pointer; pointer-events: auto;
    padding: 15px 32px;
    transition: color 0.18s, background 0.18s, padding-left 0.2s;
  }
  .flyout-link.no-sub:hover { color: var(--white); padding-left: 38px; background: var(--white-03); }
  
  .flyout-sub { max-height: none; overflow: visible; background: transparent; }
  .flyout-sub a {
    display: block; padding: 11px 32px 11px 44px;
    font-size: 1.0625rem; font-weight: 400;
    color: var(--white-82);
    text-decoration: none; border-top: none;
    transition: color 0.15s, background 0.15s, padding-left 0.18s;
  }
  .flyout-sub a:hover { color: var(--white); background: var(--white-04); padding-left: 50px; }
  .flyout-sub a.active { color: var(--accent); font-weight: 600; }
  .flyout-sub a:last-child { padding-bottom: 14px; }
  
  /* -- Active states -- */
  .flyout-link.no-sub.active { color: var(--accent); }
  .flyout-item.active > .flyout-link { color: var(--accent); }
  .flyout-item.active { border-left: 3px solid var(--accent); }
  
  
  /* ==================================
     MAIN (HOMEPAGE)
     ================================== */
  main {
    position: relative; z-index: 10; flex: 1;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 20px 20px 80px;
  }
  
  .site-title {
    font-family: 'Crimson Pro', serif; font-weight: 600;
    font-size: clamp(2.6rem, 5vw, 4rem);
    color: var(--blue-dark); text-align: center; line-height: 1.05;
    margin-bottom: 10px; opacity: 0;
    animation: rise 0.45s 0.08s ease forwards;
    letter-spacing: -0.01em;
  }
  .site-title .t { color: var(--accent); }
  .site-subtitle {
    font-size: 1.0625rem; font-weight: 400; color: var(--text-mid);
    text-align: center; margin-bottom: 24px; opacity: 0;
    animation: rise 0.45s 0.18s ease forwards;
  }
  
  
  /* ==================================
     SEARCH CARD
     ================================== */
  .search-card {
    background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); border: 1px solid var(--border);
    padding: 28px 30px 22px; width: 100%; max-width: 750px;
    position: relative; z-index: 20; opacity: 0;
    animation: rise 0.45s 0.28s ease forwards;
  }
  .search-row {
    display: flex; border-radius: var(--radius-sm); overflow: visible; position: relative; z-index: 10;
    border: 1.5px solid var(--border-input);
    transition: border-color 0.2s, box-shadow 0.2s;
    margin-bottom: 12px;
  }
  .search-row:focus-within {
    border-color: var(--blue-mid);
    box-shadow: 0 0 0 3px var(--blue-focus);
  }
  .search-icon-row { display: flex; flex: 1; min-width: 0; }
  .search-icon {
    display: flex; align-items: center; justify-content: center;
    padding: 0 16px; background: var(--off-white);
    border-right: 1.5px solid var(--border-light);
    color: var(--text-light); flex-shrink: 0;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  }
  .search-icon svg { width: 21px; height: 21px; stroke-width: 1.75; }
  .search-input {
    flex: 1; border: none; padding: 16px 18px;
    font-size: 1rem; font-family: 'Outfit', sans-serif; font-weight: 300;
    color: var(--text-dark); outline: none; background: var(--white); min-width: 0;
  }
  .search-input::placeholder { color: var(--text-placeholder); }
  .search-btn {
    background: var(--blue); color: var(--white); border: none;
    padding: 16px 30px; font-family: 'Outfit', sans-serif;
    font-size: 1.125rem; font-weight: 600; cursor: pointer;
    transition: background 0.2s; white-space: nowrap;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    display: flex; align-items: center; gap: 7px;
  }
  .search-btn svg { width: 16px; height: 16px; stroke-width: 2; }
  .search-btn:hover { background: var(--blue-dark); }
  
  
  /* ==================================
     AUTOCOMPLETE
     ================================== */
  .autocomplete-box {
    display: none; position: absolute;
    top: calc(100% + 4px); left: 0; right: 0;
    background: var(--white); border: 1px solid var(--border-input);
    border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
    z-index: 100; overflow: hidden;
  }
  .autocomplete-box.open { display: block; }
  .ac-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 16px; cursor: pointer;
    border-bottom: 1px solid var(--off-white); transition: background 0.12s;
  }
  .ac-item:last-child { border-bottom: none; }
  .ac-item:hover, .ac-item.focused { background: var(--blue-light); }
  .ac-icon {
    width: 40px; height: 40px; border-radius: 6px;
    background: var(--off-white); border: 1px solid var(--border-light);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; color: var(--blue);
  }

  .ac-icon svg { width: 16px; height: 16px; stroke-width: 1.75; }
  .ac-text { flex: 1; min-width: 0; }
  .ac-term { font-size: 0.9375rem; font-weight: 500; color: var(--text-dark); }
  .ac-term mark { background: none; color: var(--blue-mid); font-weight: 700; }
  .ac-meta { font-size: 0.75rem; color: var(--text-light); margin-top: 1px; }
  .ac-lang {
    font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; display: none; 
    color: var(--text-light); background: var(--off-white);
    border: 1px solid var(--border-light); border-radius: 4px; padding: 2px 6px;
    white-space: nowrap; flex-shrink: 0;
  }
  .ac-footer { font-size: .875rem; padding: 10px; color: var(--text-placeholder); display: none }
  .ac-footer svg { margin-right: 3px;  }
  
  /* ==================================
     FOOTER
     ================================== */
  footer {
    padding: 8px 16px; background: var(--off-white);
    border-top: 1px solid var(--border-lighter);
    display: flex; align-items: center; gap: 6px;
    font-size: 0.75rem; color: var(--text-light);
  }
  .ac-footer svg { width: 13px; height: 13px; stroke-width: 1.75; }
  
  
  /* ==================================
     UPDATE LINE
     ================================== */
  .update-line {
    display: flex; align-items: center; justify-content: center;
    gap: 6px; margin-top: 9px; font-size: 0.75rem; color: var(--text-light);
    position: relative; z-index: 1;
    opacity: 0; animation: rise 0.45s 0.4s ease forwards;
  }
  .update-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); flex-shrink: 0; }
  
  .db-last-update {
    text-align: center;
    font-size: 0.85rem;
    color: inherit;
    opacity: 0.7;
    margin: 1rem 0;
  }
  .db-last-update .db-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
  }
  
  
  /* ==================================
     ADVANCED OPTIONS
     ================================== */
  .advanced-toggle {
    display: flex; align-items: center; gap: 8px;
    font-size: 1rem; font-weight: 500; color: var(--blue-mid);
    cursor: pointer; background: none; border: none;
    font-family: inherit; padding: 0; margin-top: 18px; margin-bottom: 12px; transition: color 0.2s;
  }
  .advanced-toggle:hover { color: var(--blue-dark); }
  .adv-arrow {
    width: 17px; height: 17px; border-radius: 50%;
    background: var(--accent-dim); display: flex;
    align-items: center; justify-content: center; transition: transform 0.22s;
  }
  .adv-arrow svg { width: 9px; height: 9px; stroke-width: 2.5; }
  .advanced-toggle.open .adv-arrow { transform: rotate(180deg); }
  .advanced-panel {
    display: flex; flex-direction: column; gap: 18px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-6px);
    padding-top: 0;
    margin-bottom: 0;
    border-top: 1px solid transparent;
    pointer-events: none;
    transition:
      max-height 0.42s cubic-bezier(0.33, 1, 0.68, 1),
      opacity 0.28s ease,
      transform 0.3s ease,
      padding-top 0.3s ease,
      margin-bottom 0.3s ease,
      border-color 0.25s ease;
  }
  .advanced-panel.open {
    max-height: min(88vh, 960px);
    opacity: 1;
    transform: translateY(0);
    padding-top: 18px;
    margin-bottom: 4px;
    border-top-color: var(--border-lighter);
    pointer-events: auto;
    overflow-x: hidden;
    overflow-y: auto;
  }
  @media (prefers-reduced-motion: reduce) {
    .advanced-panel {
      transition-duration: 0.01ms;
      transform: none;
    }
    .advanced-panel.open { transform: none; }
  }
  .adv-group-label {
    font-size: 0.8rem; font-weight: 700; letter-spacing: 0.11em;
    text-transform: uppercase; color: var(--text-light); margin-bottom: 9px;
  }
  .checkboxes { display: flex; flex-wrap: wrap; gap: 6px; }
  .check-pill {
    display: flex; align-items: center; gap: 5px;
    font-size: 1rem; color: var(--text-mid); cursor: pointer;
    background: var(--off-white); border: 1px solid var(--border-light);
    border-radius: 20px; padding: 7px 16px; transition: all 0.15s; user-select: none;
  }
  .check-pill input { display: none; }
  .check-pill.checked { background: var(--blue); color: var(--white); border-color: var(--blue); }
  .check-pill:hover:not(.checked) { border-color: var(--blue-mid); }
  .lang-row { display: flex; flex-wrap: wrap; gap: 6px; }
  
  
  /* ==================================
     QUICK LINKS
     ================================== */
  .quick-links {
    display: flex; gap: 10px; margin-top: 14px;
    flex-wrap: wrap; justify-content: center;
    position: relative; z-index: 1;
    opacity: 0; animation: rise 0.45s 0.5s ease forwards;
  }
  .quick-link {
    display: flex; align-items: center; gap: 7px;
    font-size: 0.875rem; font-weight: 500; color: var(--blue-dark);
    text-decoration: none; background: var(--white-84);
    border: 1px solid var(--border); border-radius: 24px;
    padding: 7px 16px; backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm);
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
  }
  .quick-link:hover { background: var(--white); border-color: var(--blue-mid); transform: translateY(-1px); box-shadow: var(--shadow-md); }
  .quick-link svg { width: 16px; height: 16px; stroke-width: 1.75; flex-shrink: 0; }
  
  
  /* ==================================
     BREADCRUMB
     ================================== */
  .breadcrumb {
    position: relative; z-index: 10;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 12px 40px;
    display: flex; align-items: center; gap: 8px;
    font-size: 0.82rem; color: var(--text-light);
  }
  .breadcrumb a { color: var(--text-light); text-decoration: none; transition: color 0.2s; }
  .breadcrumb a:hover { color: var(--blue); }
  .breadcrumb-sep { color: var(--border); font-size: 0.9rem; }
  .breadcrumb-current { color: var(--text-mid); font-weight: 500; }
  
  
  /* ==================================
     TERM PAGE
     ================================== */
  .term-page {
    position: relative; z-index: 10;
    max-width: 860px; margin: 0 auto;
    padding: 0px 40px 60px; flex: 1;
  }
  main
  .term-page { display: block; align-items: stretch; justify-content: flex-start; }
  
  .term-header { margin-bottom: 24px; padding-bottom: 0; position: relative; z-index: 1; }
  .term-label {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--blue-mid);
    margin-bottom: 6px;
    display: flex; align-items: center; gap: 8px;
  }
  .term-label::before {
    content: ''; display: block;
    width: 24px; height: 2px; background: var(--accent);
  }
  .term-title {
    font-family: 'Crimson Pro', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600; color: var(--blue-dark);
    line-height: 1.1; margin-bottom: 8px;
  }
  
  .term-fields { display: flex; flex-direction: column; gap: 0; }
  .field-row {
    display: grid; grid-template-columns: 200px 1fr;
    gap: 0; border-bottom: 1px solid var(--border);
  }
  .field-row:first-child { border-top: 1px solid var(--border); }
  .field-label {
    padding: 12px 16px 12px 0;
    font-size: 0.78rem; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--text-light);
    display: flex; align-items: flex-start; padding-top: 20px;
  }
  .field-value {
    padding: 12px 0 12px 20px;
    font-size: 1rem; color: var(--text-dark);
    line-height: 1.65; border-left: 1px solid var(--border);
  }
  .field-value.definition { font-size: 1.0625rem; color: var(--text-dark); }
  .field-value.lang-list { display: flex; flex-direction: column; gap: 4px; }
  .lang-entry { display: flex; align-items: baseline; gap: 10px; }
  .lang-tag {
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--blue-mid);
    background: var(--blue-light);
    border-radius: 3px; padding: 2px 7px;
    white-space: nowrap; flex-shrink: 0;
  }
  .lang-value { font-style: italic; color: var(--text-mid); }
  .field-value.note {
    font-size: 0.9375rem; color: var(--text-mid);
    font-style: italic;
    background: var(--accent-pale);
    border-left: 3px solid var(--accent);
    padding-left: 20px; margin: 0;
  }
  .field-value.empty, .field-value .empty {
    color: var(--text-light); font-style: italic; font-size: 0.875rem;
  }
  .field-value a { color: var(--blue); font-weight: 500; }
  .field-value a:hover { color: var(--blue-dark); text-decoration: underline; }
  
  .term-search-bar { position: relative; z-index: 20; background: var(--off-white); padding: 0; }
  .term-search-bar 
  .search-card {
    box-shadow: none; border-radius: 0; border: none;
    animation: none; opacity: 1;
    padding: 16px 0; background: transparent; max-width: 100%;
  }
  .term-search-bar .search-row { margin-bottom: 0; }
  
  .back-link {
    display: inline-flex; align-items: center; gap: 8px;
    margin-top: 40px;
    font-size: 0.875rem; font-weight: 500;
    color: var(--blue); text-decoration: none;
    padding: 10px 20px;
    border: 1px solid var(--blue-light);
    border-radius: var(--radius-sm);
    background: var(--white);
    transition: all 0.18s; box-shadow: var(--shadow-sm);
  }
  .back-link:hover { background: var(--blue-light); border-color: var(--blue-mid); }
  .back-link svg { width: 16px; height: 16px; stroke-width: 2; }
  
  .term-link { font-weight: 500; color: var(--blue); text-decoration: none; }
  .term-link:hover { color: var(--blue-dark); text-decoration: underline; }
  .term-lat { font-size: 0.8125rem; color: var(--text-light); font-style: italic; margin-left: 8px; }
  .results-meta { font-size: 0.875rem; color: var(--text-light); margin-bottom: 16px; }
  
  .alphabet-nav {
    display: flex; flex-wrap: wrap; gap: 4px;
    margin-bottom: 24px; padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
  }
  .alpha-pill {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 32px; padding: 0 8px;
    font-size: 0.8125rem; font-weight: 500;
    border: 1px solid var(--border-light); border-radius: 16px;
    background: var(--white); color: var(--text-mid);
    text-decoration: none; cursor: pointer;
    transition: all 0.15s;
  }
  .alpha-pill:hover { border-color: var(--blue-mid); color: var(--blue); }
  .alpha-pill.active { background: var(--blue); color: var(--white); border-color: var(--blue); }
  .alpha-pill.disabled {
    opacity: 0.35; cursor: default; pointer-events: none;
    background: var(--off-white);
  }
  
  .rjecnik-pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 12px; margin-top: 32px; padding-top: 20px;
    border-top: 1px solid var(--border);
  }
  .pagination-info { font-size: 0.875rem; color: var(--text-light); }
  
  
  /* ==================================
     STATIC PAGE
     ================================== */
  .static-page {
    position: relative; z-index: 10;
    max-width: 820px; margin: 0 auto;
    padding: 40px 40px 72px;
  }
  main
  .static-page { display: block; align-items: stretch; justify-content: flex-start; }
  
  .page-label {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--blue-mid);
    margin-bottom: 10px;
    display: flex; align-items: center; gap: 8px;
  }
  .page-label::before {
    content: ''; display: block;
    width: 24px; height: 2px; background: var(--accent);
  }
  .page-title {
    font-family: 'Crimson Pro', serif;
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 600; color: var(--blue-dark);
    line-height: 1.1; margin-bottom: 32px;
  }
  
  .content { display: flex; flex-direction: column; gap: 32px; }
  .content-section {
    background: var(--white); border-radius: var(--radius);
    border: 1px solid var(--border); overflow: hidden;
  }
  .section-head {
    display: flex; align-items: center; gap: 14px;
    padding: 20px 28px; border-bottom: 1px solid var(--border);
    background: var(--white);
  }
  .section-num {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--blue); color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.875rem; font-weight: 700; flex-shrink: 0;
  }
  .section-title {
    font-family: 'Crimson Pro', serif;
    font-size: 1.25rem; font-weight: 600; color: var(--blue-dark);
    margin: 0;
  }
  .section-title a { color: var(--blue-dark); }
  .section-title a:hover { color: var(--blue-mid); }
  .section-body {
    padding: 24px 28px;
    display: flex; flex-direction: column; gap: 14px;
  }
  .section-body p { font-size: 1rem; color: var(--text-mid); line-height: 1.75; margin: 0; }
  .section-body strong { color: var(--text-dark); font-weight: 600; }
  .section-body ul,
  .section-body ol {
    padding-left: 20px; color: var(--text-mid);
    font-size: 0.9375rem; line-height: 1.75;
  }
  .section-body li { margin-bottom: 6px; }
  
  .field-table { display: flex; flex-direction: column; }
  .ft-row {
    display: grid; grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid var(--border);
  }
  .ft-row:last-child { border-bottom: none; }
  .ft-key {
    padding: 12px 16px 12px 0;
    font-size: 0.9375rem; font-weight: 500; letter-spacing: 0.08em;
    color: var(--blue);
    border-right: 1px solid var(--border);
  }
  .ft-val {
    padding: 12px 0 12px 20px;
    font-size: 0.9375rem; color: var(--text-mid); line-height: 1.6;
  }
  .ft-val em { color: var(--text-dark); font-style: italic; }
  
  .tip {
    display: flex; gap: 14px; align-items: flex-start;
    background: var(--accent-pale);
    border: 1px solid var(--accent-border);
    border-left: 3px solid var(--accent);
    padding: 16px 20px; border-radius: 0 6px 6px 0;
  }
  .tip svg {
    width: 18px; height: 18px; flex-shrink: 0;
    stroke: var(--accent); stroke-width: 1.75; fill: none; margin-top: 2px;
  }
  .tip p,
  .tip-text { font-size: 0.9375rem; color: var(--text-mid); line-height: 1.7; margin: 0; }
  .tip p strong,
  .tip-text strong { color: var(--text-dark); }
  .tip-text em { font-style: italic; color: var(--blue-mid); }
  
  .step-list { display: flex; flex-direction: column; gap: 10px; }
  .step {
    display: flex; gap: 14px; align-items: flex-start;
  }
  .step-icon {
    width: 28px; height: 28px; border-radius: var(--radius-sm);
    background: var(--blue-light); color: var(--blue);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; margin-top: 2px;
  }
  .step-icon svg {
    width: 15px; height: 15px; stroke-width: 2; stroke: var(--blue); fill: none;
  }
  .step-text {
    font-size: 1rem; color: var(--text-mid); line-height: 1.7;
  }
  .step-text strong { color: var(--text-dark); }
  .step-text em { font-style: italic; color: var(--blue-mid); }
  
  .contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
  .form-group { display: flex; flex-direction: column; gap: 2px; margin-bottom: 16px; }
  .form-group .form-label { margin-bottom: 0; }
  .form-label {
    font-size: 0.82rem; font-weight: 600; color: var(--text-mid);
    letter-spacing: 0.05em; text-transform: uppercase;
  }
  .form-input,
  .form-textarea {
    border: 1.5px solid var(--border-input); border-radius: var(--radius-sm);
    padding: 12px 16px; font-family: 'Outfit', sans-serif;
    font-size: 1rem; color: var(--text-dark);
    outline: none; transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--white); width: 100%;
  }
  .form-input:focus,
  .form-textarea:focus {
    border-color: var(--blue-mid);
    box-shadow: 0 0 0 3px var(--blue-focus);
  }
  .form-textarea { resize: vertical; min-height: 130px; }
  .form-submit {
    background: var(--blue); color: var(--white); border: none;
    padding: 14px 28px; font-family: 'Outfit', sans-serif;
    font-size: 1rem; font-weight: 600; border-radius: var(--radius-sm);
    cursor: pointer; transition: background 0.2s; width: 100%;
  }
  .form-submit:hover { background: var(--blue-dark); }
  .contact-info {
    background: var(--blue-light);
    border-left: 3px solid var(--accent);
    border-radius: 0 6px 6px 0;
    padding: 24px 28px; font-size: 0.9375rem;
    color: var(--text-mid); line-height: 2;
  }
  .contact-info strong {
    color: var(--blue-dark); font-size: 1rem;
    display: block; margin-bottom: 8px;
  }
  
  .cf7-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
  .cf7-col-form { display: flex; flex-direction: column; }
  .cf7-col-info { display: flex; flex-direction: column; }
  .cf7-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .cf7-group { margin-bottom: 30px; }
  .cf7-group .form-label {
    display: block; font-size: 0.82rem; font-weight: 600;
    color: var(--text-mid); letter-spacing: 0.05em;
    text-transform: uppercase; margin-bottom: 2px;
  }
  .cf7-group input[type="text"],
  .cf7-group input[type="email"],
  .cf7-group textarea {
    border: 1.5px solid var(--border-input); border-radius: var(--radius-sm);
    padding: 12px 16px; font-family: 'Outfit', sans-serif;
    font-size: 1rem; color: var(--text-dark);
    outline: none; transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--white); width: 100%;
  }
  .cf7-group input:focus,
  .cf7-group textarea:focus {
    border-color: var(--blue-mid);
    box-shadow: 0 0 0 3px var(--blue-focus);
  }
  .cf7-group textarea { resize: vertical; min-height: 130px; }
  
  .contact-info-box {
    background: var(--blue-light);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 28px; height: 100%;
  }
  .info-heading {
    font-family: 'Crimson Pro', serif;
    font-size: 1.15rem; font-weight: 600;
    color: var(--blue-dark); margin-bottom: 20px;
  }
  .info-block { padding: 4px 0; }
  .info-label {
    font-size: 0.72rem; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--text-light); margin-bottom: 4px;
  }
  .info-value {
    font-size: 0.9375rem; color: var(--text-mid); line-height: 1.6;
  }
  .info-value strong { color: var(--text-dark); display: block; }
  .info-email {
    color: var(--blue-mid); text-decoration: none;
    transition: color 0.2s;
  }
  .info-email:hover { color: var(--blue-dark); }
  .contact-info-box .divider {
    height: 1px; background: var(--border);
    margin: 12px 0;
  }
  
  .section-icon {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--blue);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  
  .form-label,
  .cf7-group label,
  .wpcf7 label {
    font-size: 0.78rem; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--text-light); margin-bottom: 2px; display: block;
  }
  
  /* CF7: ukloni <br> izmeÃƒâ€žÃ¢â‚¬Ëœu labela i polja (inaÃƒâ€žÃ‚Âe dodaje ~jedan red visine) */
  .wpcf7-form label + br {
    display: none;
  }
  .wpcf7 .wpcf7-form-control-wrap {
    display: block;
    margin-top: 0;
  }
  
  .wpcf7 input[type="text"],
  .wpcf7 input[type="email"],
  .wpcf7 textarea {
    border: 1.5px solid var(--border-input); border-radius: var(--radius-sm);
    padding: 11px 14px; font-family: 'Outfit', sans-serif;
    font-size: 0.9375rem; color: var(--text-dark);
    background: var(--white); outline: none; width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
  }
  .wpcf7 input[type="text"]:focus,
  .wpcf7 input[type="email"]:focus,
  .wpcf7 textarea:focus {
    border-color: var(--blue-mid);
    box-shadow: 0 0 0 3px var(--blue-focus);
  }
  .wpcf7 input::placeholder,
  .wpcf7 textarea::placeholder { color: var(--text-placeholder); font-size: 0.875rem; }
  .wpcf7 textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
  
  .wpcf7 input[type="submit"],
  .wpcf7 .form-submit {
    width: 100%; background: var(--blue); color: var(--white);
    border: none; padding: 13px 28px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9375rem; font-weight: 600;
    border-radius: var(--radius-sm); cursor: pointer;
    transition: background 0.2s; margin-top: 20px; display: block;
  }
  .wpcf7 input[type="submit"]:hover,
  .wpcf7 .form-submit:hover { background: var(--blue-dark); }
  
  .wpcf7 .wpcf7-not-valid-tip { font-size: 0.75rem; color: var(--error); margin-top: 4px; }
  .wpcf7 input.wpcf7-not-valid,
  .wpcf7 textarea.wpcf7-not-valid { border-color: var(--error); }
  .wpcf7 .wpcf7-response-output {
    border-radius: var(--radius-sm); padding: 14px 18px;
    font-size: 0.9375rem; margin: 16px 0 0; border-left-width: 3px;
  }
  .wpcf7-mail-sent-ok {
    background: var(--success-bg); border-color: var(--success); color: var(--success-dark);
  }
  .wpcf7-mail-sent-ng,
  .wpcf7-spam-blocked {
    background: var(--error-bg); border-color: var(--error); color: var(--error-dark);
  }
  
  
  /* ==================================
     RESPONSIVE: TABLET (768px)
     ================================== */
  @media (max-width: 768px) {
    .cf7-grid { grid-template-columns: 1fr; gap: 28px; }
    .cf7-row { grid-template-columns: 1fr; }
  }
  
  footer {
    position: relative; z-index: 20; background: transparent;
    border-top: 1px solid var(--border);
    padding: 25px 28px;
    display: grid; grid-template-columns: 1fr 1fr 1fr 1fr;
    align-items: center; flex-shrink: 0; gap: 16px;
  }
  .footer-col { display: flex; align-items: center; }
  .footer-col:nth-child(1) { justify-content: flex-start; }
  .footer-col:nth-child(2) { justify-content: center; }
  .footer-col:nth-child(3) { justify-content: center; }
  .footer-col:nth-child(4) { justify-content: flex-end; }
  .footer-left { font-size: 0.8rem; color: var(--text-mid); line-height: 1.5; }
  .footer-left strong { color: var(--blue); font-weight: 600; }
  .copyright-text { white-space: nowrap; }
  .footer-cite-sep { color: var(--text-light); }
  .footer-cite-link {
    color: var(--blue-mid); text-decoration: none; white-space: nowrap;
    transition: color 0.2s;
  }
  .footer-cite-link:hover { color: var(--blue); text-decoration: underline; }
  .footer-center { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
  .eu-footer { display: flex; align-items: center; }
  .eu-footer img { display: block; width: 140px; height: auto; }
  .social-links { display: flex; align-items: center; gap: 7px; }
  .social-link {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 6px;
    border: 1px solid var(--border); color: var(--text-light);
    text-decoration: none; transition: color 0.2s, border-color 0.2s, background 0.2s;
  }
  .social-link:hover { color: var(--blue); border-color: var(--blue-mid); background: var(--blue-light); }
  .social-link svg { width: 21px; height: 21px; stroke-width: 1.75; }
  .footer-right { font-size: 0.75rem; color: var(--text-light); text-align: right; flex-shrink: 0; line-height: 1.7; }
  .bozooart-link {
    font-size: 0.875rem; font-weight: 500; color: var(--text-mid);
    text-decoration: none; opacity: 0.6; 
    transition: opacity 0.2s, color 0.2s;
  }
  .bozooart-link:hover { opacity: 1; color: var(--blue-mid); }
  
  .footer-citation {
    position: relative; z-index: 20;
    text-align: center; font-size: 0.72rem; color: var(--text-light);
    font-style: italic; padding: 12px 28px 20px;
    border-top: 1px solid var(--border);
  }
  
  
  /* ==================================
     ANIMATIONS
     ================================== */
  @keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  
  
  /* ==================================
     UTILITY
     ================================== */
  .visually-hidden {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); border: 0;
  }
  
  
  /* ==================================
     RESPONSIVE: TABLET (1024px)
     ================================== */
  @media (max-width: 1024px) {
    
  .header { padding: 0 20px; grid-template-columns: auto 1fr auto; }
    .inst-logo-text { display: none; }
    .project-chip-text { display: none; }
    .project-chip { padding: 3px 7px; }
    .nav-brand { font-size: 1.6875rem; }
    
  .search-card { max-width: 100%; }
    
  footer { padding: 25px 20px; }
  }
  
  @media (max-width: 768px) {
    body { height: auto; overflow-y: auto; min-height: 100vh; }
    
  .header { padding: 0 16px; height: 58px; grid-template-columns: auto 1fr auto; }
    .header-logos { gap: 10px; }
    .nav-brand { font-size: 1.5625rem; }
    .h-sep { display: none; }
    
  .nav-flyout { right: -75vw; width: 75vw; }
    .flyout-inner { flex-direction: column; padding-top: 70px; }
    .nav-flyout.open { right: 0; }
    .flyout-item { border-right: none; border-bottom: 1px solid var(--white-06); }
    .flyout-item:last-child { border-bottom: none; }
    .flyout-link { padding: 15px 20px; font-size: 1.0625rem; }
    .flyout-sub a { padding: 11px 28px; font-size: 1rem; }
    
  main { padding: 24px 16px 16px; justify-content: flex-start; }
    .site-title { font-size: clamp(2.2rem, 7vw, 3rem); margin-bottom: 8px; }
    .site-subtitle { font-size: 1rem; margin-bottom: 20px; }
    
  .search-card { padding: 22px 20px 16px; }
    
  footer { grid-template-columns: 1fr 1fr; padding: 20px 16px; gap: 16px; }
    .footer-col:nth-child(1) { grid-column: 1 / -1; justify-content: center !important; }
    .footer-col:nth-child(2) { justify-content: center; }
    .footer-col:nth-child(3) { justify-content: center; }
    .footer-col:nth-child(4) { grid-column: 1 / -1; justify-content: center !important; margin-top: 8px; }
    .footer-left { text-align: center; font-size: 0.8125rem; }
    .footer-right { text-align: center; }
    .eu-footer img { width: 160px; }
  
    /* Inner pages */
    
  .term-page { padding: 0 24px 40px; }
    
  .static-page { padding: 32px 24px 50px; }
    
  .breadcrumb { padding: 10px 24px; }
    .nav-logo, .nav-logo-partner { height: 38px; width: auto; }
    .nav-logo-partner { width: 38px; height: 38px; }
  
    /* Flyout label sizing fix */
    .flyout-link:not(.no-sub) { font-size: 0.7rem; letter-spacing: 0.04em; }
  }
  
  
  /* ==================================
     RESPONSIVE: MOBILE (480px)
     ================================== */
  @media (max-width: 480px) {
    
  .header { padding: 0 14px; height: 54px; grid-template-columns: auto 1fr auto; }
    .header-logos { gap: 8px; }
    .inst-logo:last-child { display: none; }
    .project-chip { display: none; }
    .nav-brand { font-size: 1.4375rem; margin-right: 0; }
    .header-right { gap: 10px; }
  
    
  .nav-flyout { right: -80vw; width: 80vw; }
    .nav-flyout.open { right: 0; }
    .flyout-inner { flex-direction: column; flex: 1; border-bottom: none; padding-top: 66px; }
    .flyout-item { border-right: none; border-bottom: 1px solid var(--white-07); }
    .flyout-link { padding: 12px 24px; }
    .flyout-link.no-sub { padding: 16px 24px; font-size: 1.125rem; }
    .flyout-sub a { padding: 12px 24px 12px 40px; font-size: 1.0625rem; }
  
    
  main { padding: 24px 14px 16px; }
    .site-title { font-size: 2.2rem; }
    .site-subtitle { font-size: 0.9375rem; margin-bottom: 18px; }
  
    
  .search-card { padding: 18px 14px 14px; }
    .search-row { flex-direction: column; border: none; gap: 0; margin-bottom: 10px; }
    .search-row:focus-within { box-shadow: none; border-color: transparent; }
    .search-icon-row {
      display: flex; flex: unset;
      border: 1.5px solid var(--border-input); border-bottom: none;
      border-radius: var(--radius-sm) var(--radius-sm) 0 0;
      overflow: hidden; background: var(--white); transition: border-color 0.2s;
    }
    .search-icon-row:focus-within { border-color: var(--blue-mid); }
    .search-icon { border-radius: 0; padding: 0 13px; border-right: 1.5px solid var(--border-light); }
    .search-input { border-radius: 0; border: none; padding: 15px 14px; font-size: 1rem; }
    .search-btn {
      border-radius: 0 0 var(--radius-sm) var(--radius-sm);
      width: 100%; justify-content: center;
      padding: 14px; font-size: 1.0625rem;
      border: 1.5px solid var(--blue); border-top: none;
    }
  
    
  .autocomplete-box { border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
    .ac-item { padding: 13px 14px; gap: 10px; }
    .ac-term { font-size: 1rem; }
    .ac-meta { font-size: 0.8125rem; }
    .ac-
  footer { display: none; }
  
    
  .advanced-toggle { font-size: 1rem; margin-top: 4px; }
    .check-pill { font-size: 0.9375rem; padding: 8px 14px; }
  
    
  .quick-links { flex-direction: row; align-items: stretch; margin-top: 12px; gap: 8px; }
    .quick-link { justify-content: center; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.9375rem; }
  
    
  .update-line { font-size: 0.8125rem; }
  
    
  footer { grid-template-columns: 1fr; padding: 24px 14px 20px; gap: 30px; text-align: center; }
    .footer-col { justify-content: center !important; }
    .footer-left { 
      font-size: 0.8125rem; 
      display: flex; 
      flex-direction: column; 
      gap: 20px; 
      align-items: center;
      text-align: center;
    }
    .footer-cite-sep { display: none; }
    .footer-cite-link { display: block; }
    .eu-footer img { width: 180px; }
    .social-links { justify-content: center; }
    .footer-right { text-align: center; align-self: center; order: 4; }
    .bozooart-link { font-size: 0.8125rem; }
  
    /* Inner pages */
    
  .term-page {padding: 28px 20px 60px; display: flex; align-items: flex-start; }
    
  .static-page { padding: 24px 14px 40px; }
    
  .breadcrumb { padding: 10px 14px; font-size: 0.75rem; }
    .page-title { font-size: 1.6rem; margin-bottom: 20px; }
    .nav-logo, .nav-logo-partner { height: 32px; width: auto; }
    .nav-logo-partner { width: 32px; height: 32px; }
  
    /* Alphabet nav */
    .alpha-pill { min-width: 30px; height: 28px; font-size: 0.75rem; padding: 0 6px; }
    .alphabet-nav { gap: 3px; }
  
    /* Step list */
    .step { gap: 10px; }
    .step-icon { width: 24px; height: 24px; }
    .step-icon svg { width: 13px; height: 13px; }
  
    /* Tip box */
    .tip { padding: 12px 14px; gap: 10px; }
    .tip svg { width: 16px; height: 16px; }
  }
  
  
  /* ==================================
     RESPONSIVE: VERY SMALL (360px)
     ================================== */
  @media (max-width: 360px) {
    .site-title { font-size: 1.9rem; }
    .search-input { font-size: 0.9375rem; }
    .check-pill { font-size: 0.875rem; padding: 7px 11px; }
    .flyout-link { font-size: 0.9375rem; }
  }
  
  
  /* ==================================
     RESPONSIVE: TERM & STATIC (640px)
     ================================== */
  @media (max-width: 640px) {
    
    .term-page {padding: 28px 20px 60px; display: flex; align-items: flex-start; }
    
  .breadcrumb { padding: 10px 20px; }
    .field-row { grid-template-columns: 1fr; }
    .field-label { padding-bottom: 4px; }
    .field-value { border-left: none; padding-left: 0; border-top: none; }
    
  .static-page { padding: 24px 18px 50px; }
    .section-head { padding: 16px 18px; }
    .section-body { padding: 18px; }
    .ft-row { grid-template-columns: 1fr; }
    .ft-key { border-right: none; border-bottom: 1px solid var(--border); padding-bottom: 4px; }
    .ft-val { padding-left: 0; }
    .contact-grid { grid-template-columns: 1fr; }
    .cf7-grid { grid-template-columns: 1fr; gap: 24px; }
    .cf7-row { grid-template-columns: 1fr; }
    .rjecnik-pagination { flex-direction: column; gap: 8px; }
    .term-search-bar 
  .search-card { padding: 12px 0; }
  }
  