/* CETRA Proceedings Archive – Shared Stylesheet */

@font-face {
  font-family: 'MetaPro';
  src: url('MetaPro/metapro-book.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'MetaPro';
  src: url('MetaPro/MetaPro-Normal.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: 'MetaPro';
  src: url('MetaPro/MetaPro-Medium.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
}
@font-face {
  font-family: 'MetaPro';
  src: url('MetaPro/MetaPro-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: 'MetaPro';
  src: url('MetaPro/metapro-black.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
}
@font-face {
  font-family: 'MetaPro';
  src: url('MetaPro/MetaPro-NormalItalic.otf') format('opentype');
  font-weight: 500;
  font-style: italic;
}
@font-face {
  font-family: 'MetaPro';
  src: url('MetaPro/MetaPro-BoldItalic.otf') format('opentype');
  font-weight: 700;
  font-style: italic;
}

:root {
  --primary: #1a3a5c;
  --primary-light: #2460a7;
  --accent: #c8860a;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --text: #1c1c2e;
  --text-muted: #5a6273;
  --border: #d0d7e2;
  --radius: 6px;
  --shadow-sm: 0 1px 4px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.12);
  --max-w: 1100px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: Helvetica, "Segoe UI", Verdana, Geneva, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg) url('pozadina.JPG') center/cover fixed;
}

a { color: var(--primary-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Site Header ───────────────────────────────────────────── */
.site-header {
  background: var(--primary);
  color: #fff;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--shadow-md);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 1rem;
}

.site-logo {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
}
.site-logo:hover { text-decoration: none; color: #fff; }
.site-logo span { color: #fff; }

/* ── Desktop nav ───────────────────────────────────────────── */
.site-nav {
  display: flex;
  align-items: center;
  gap: .1rem;
}

.nav-item {
  position: relative;
}

.nav-link {
  color: rgba(255,255,255,.82);
  font-size: .82rem;
  font-weight: 500;
  padding: .35rem .65rem;
  border-radius: var(--radius);
  transition: background .15s, color .15s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: .3rem;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  line-height: inherit;
}
.nav-link:hover, .nav-link.active {
  background: rgba(255,255,255,.15);
  color: #fff;
  text-decoration: none;
}

.nav-arrow {
  font-size: .6rem;
  opacity: .7;
  transition: transform .2s;
  display: inline-block;
}
.nav-item:hover .nav-arrow,
.nav-item.open .nav-arrow { transform: rotate(180deg); }

/* ── Dropdown submenu ──────────────────────────────────────── */
.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--primary);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  min-width: 140px;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  padding: .3rem 0;
  z-index: 300;
}
.nav-item:hover .nav-dropdown,
.nav-item.open .nav-dropdown { display: block; }

.nav-dropdown a {
  display: block;
  padding: .4rem 1rem;
  font-size: .82rem;
  color: rgba(255,255,255,.82);
  white-space: nowrap;
  transition: background .12s, color .12s;
}
.nav-dropdown a:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
  text-decoration: none;
}

/* ── Hamburger button ──────────────────────────────────────── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius);
  flex-shrink: 0;
}
.nav-toggle:hover { background: rgba(255,255,255,.12); }
.nav-toggle span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .25s, opacity .25s, width .25s;
  width: 100%;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; width: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

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

  .site-nav {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--primary);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .5rem 0 .75rem;
    border-top: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 6px 20px rgba(0,0,0,.25);
    z-index: 199;
  }
  .site-nav.open { display: flex; }

  .nav-item { width: 100%; }

  .nav-link {
    padding: .6rem 1.25rem;
    border-radius: 0;
    justify-content: space-between;
    width: 100%;
  }

  .nav-dropdown {
    display: none;
    position: static;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: rgba(0,0,0,.15);
    padding: 0;
    min-width: unset;
  }
  .nav-item.open .nav-dropdown { display: block; }

  .nav-dropdown a {
    padding: .45rem 1.25rem .45rem 2rem;
    font-size: .82rem;
  }
}

/* ── Hero / Landing ────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, rgba(26,58,92,.90) 0%, rgba(15,37,64,.96) 100%), url('pozadina.JPG') center/cover no-repeat;
  color: #fff;
  padding: 3.5rem 1.5rem 3rem;
  text-align: center;
  font-family: 'MetaPro', Helvetica, "Segoe UI", Arial, sans-serif;
}
.hero-logo { display: block; height: 90px; width: auto; margin: 0 auto 1.1rem; }
.hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 700; margin-bottom: .75rem; }
.hero p { font-size: 1.2rem; opacity: .92; max-width: 680px; margin: 0 auto .5rem; }
.hero-sub { font-size: 1rem; opacity: .78; margin-top: .35rem; }
.hero-meta { font-size: .95rem !important; opacity: .75 !important; margin-top: .6rem !important; letter-spacing: .02em; }
.hero-doi { color: inherit; text-decoration: underline; text-underline-offset: 3px; opacity: 1; }
.hero-doi:hover { opacity: .85; }
.hero--short { padding: 2rem 1.5rem 1.75rem; }
.hero--short h1 { font-size: clamp(1.35rem, 3vw, 1.9rem); margin-bottom: 0; }

/* ── Static content pages ──────────────────────────────────── */
.static-content { max-width: 780px; }
.static-content h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin: 2rem 0 .6rem;
  padding-bottom: .35rem;
  border-bottom: 2px solid var(--border);
}
.static-content h2:first-child { margin-top: 0; }
.static-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.25rem 0 .4rem;
  color: var(--text);
}
.static-content p { margin-bottom: .85rem; line-height: 1.7; }
.static-content ul { padding-left: 1.4rem; margin-bottom: .85rem; }
.static-content li { margin-bottom: .3rem; line-height: 1.65; }

/* ── Container ─────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 2rem 1.5rem; }
.container--white { background: #fff; box-shadow: 0 2px 16px rgba(0,0,0,.07); }

/* ── Conference Grid (index page) ──────────────────────────── */
.conf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.conf-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.conf-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.conf-card-cover {
  background: #e8edf4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem .9rem;
  border-bottom: 1px solid var(--border);
}
.conf-card-cover img {
  height: 195px;
  width: auto;
  display: block;
}

.conf-card-body {
  padding: 1.1rem 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.conf-card .edition {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .3rem;
}
.conf-card h2 { font-size: 1.25rem; font-weight: 700; color: var(--primary); margin-bottom: .2rem; }
.conf-card .location { font-size: .88rem; color: var(--text-muted); margin-bottom: .75rem; }

.conf-stats { display: flex; gap: 1rem; margin-bottom: 1rem; }
.stat { text-align: center; }
.stat-num { font-size: 1.3rem; font-weight: 700; color: var(--primary); display: block; }
.stat-lbl { font-size: .72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }

.conf-card .btn {
  margin-top: auto;
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: .45rem 1rem;
  border-radius: var(--radius);
  font-size: .85rem;
  font-weight: 600;
  text-align: center;
  transition: background .15s;
}
.conf-card .btn:hover { background: var(--primary-light); text-decoration: none; }

/* ── Breadcrumb ────────────────────────────────────────────── */
.breadcrumb {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(255,255,255,0.88);
  padding: .3rem .75rem;
  border-radius: 2rem;
  backdrop-filter: blur(4px);
}
.breadcrumb a { color: var(--primary-light); }
.breadcrumb-sep { color: var(--border); }

/* ── Conference Page Header ────────────────────────────────── */
.conf-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.conf-header-badge {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  padding: .6rem 1rem;
  text-align: center;
  min-width: 90px;
  flex-shrink: 0;
}
.conf-header-badge .year { font-size: 1.5rem; font-weight: 800; line-height: 1; }
.conf-header-badge .edition-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; opacity: .8; margin-top: .2rem; }

.conf-header-info { flex: 1; min-width: 200px; }
.conf-header-info h1 { font-size: 1.4rem; font-weight: 700; color: var(--primary); margin-bottom: .3rem; }
.conf-header-info .conf-desc { font-size: .9rem; color: var(--text-muted); margin-bottom: .6rem; }

.conf-meta { display: flex; flex-wrap: wrap; gap: .5rem .75rem; }
.meta-tag {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: .2rem .75rem;
  font-size: .8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: .3rem;
}
.meta-tag strong { color: var(--text); }

/* ── Search Bar ────────────────────────────────────────────── */
.search-bar-wrap {
  margin-bottom: 1.5rem;
  position: relative;
}
.search-bar-wrap input {
  width: 100%;
  padding: .65rem 1rem .65rem 2.5rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .95rem;
  background: var(--surface);
  transition: border-color .15s;
  outline: none;
}
.search-bar-wrap input:focus { border-color: var(--primary-light); }
.search-field {
  position: relative;
}
.search-field .search-icon {
  position: absolute;
  left: .75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--text-muted);
  pointer-events: none;
}
.search-count {
  font-size: .8rem;
  color: #FFFFFFD1;
  margin-top: .4rem;
}

/* ── TOC Panel ─────────────────────────────────────────────── */
.page-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 720px) {
  .page-layout { grid-template-columns: 1fr; }
  .toc-panel { display: none; }
}

.toc-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  position: sticky;
  top: 80px;
  box-shadow: var(--shadow-sm);
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.toc-panel h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: .6rem; padding-bottom: .4rem; border-bottom: 1px solid var(--border); }
.toc-panel ul { list-style: none; }
.toc-panel li a {
  font-size: .8rem;
  color: var(--text-muted);
  padding: .2rem .3rem;
  border-radius: 3px;
  display: block;
  transition: color .12s, background .12s;
}
.toc-panel li a:hover { color: var(--primary); background: var(--bg); text-decoration: none; }
.toc-count { float: right; font-size: .72rem; background: var(--bg); border-radius: 10px; padding: .05rem .35rem; }

/* ── Sections + Papers ─────────────────────────────────────── */
.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.section-header {
  padding: .9rem 1.25rem;
  background: #f0f4f9;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}
.section-header h3 { font-size: .98rem; font-weight: 700; color: var(--primary); }
.section-badge {
  background: var(--primary);
  color: #fff;
  border-radius: 12px;
  padding: .1rem .55rem;
  font-size: .72rem;
  font-weight: 600;
  flex-shrink: 0;
}

.papers-list {
  list-style: none;
  padding: .25rem 0;
}

.paper {
  padding: .65rem 1.25rem;
  border-bottom: 1px solid #edf0f5;
}
.paper:last-child { border-bottom: none; }
.paper:hover { background: #fafbfd; }


.paper-title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--primary-light);
  line-height: 1.4;
  display: block;
  margin-bottom: .15rem;
}
.paper-title:hover { color: var(--primary); }
.paper-title-text {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: block;
  margin-bottom: .15rem;
}

.pdf-btn {
  display: inline-block;
  background: var(--primary-light);
  color: #fff !important;
  padding: .15rem .55rem;
  border-radius: .25rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  margin-left: .4rem;
  white-space: nowrap;
  vertical-align: middle;
  transition: background .15s;
  text-decoration: none !important;
}
.pdf-btn:hover { background: var(--primary); color: #fff !important; }

.paper-authors {
  font-size: .8rem;
  color: var(--text-muted);
  display: block;
}

/* ── Footer ────────────────────────────────────────────────── */
footer {
  background: var(--primary);
  color: rgba(255,255,255,.75);
  text-align: center;
  padding: 1.25rem 1.5rem;
  font-size: .82rem;
  margin-top: 3rem;
}
footer a { color: rgba(255,255,255,.9); }
.footer-issn { margin-top: .35rem; opacity: .6; font-size: .78rem; letter-spacing: .02em; }

/* ── Utilities ─────────────────────────────────────────────── */
.hidden { display: none !important; }
.section-hidden { display: none !important; }

.no-results {
  text-align: center;
  color: #FFFFFFD1;
  padding: 2rem;
  display: none;
}

/* ── Search ─────────────────────────────────────────────────── */
.search-box {
  margin-bottom: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem 1rem;
  box-shadow: var(--shadow-sm);
}
.search-input-wrap {
  display: flex;
  align-items: center;
  gap: .6rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: .45rem .75rem;
  background: var(--bg);
  transition: border-color .15s;
}
.search-input-wrap:focus-within {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(36,96,167,.12);
}
.search-input-wrap .search-icon { width: 17px; height: 17px; color: var(--text-muted); flex-shrink: 0; position: static; }
.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: .95rem;
  font-family: inherit;
  color: var(--text);
  outline: none;
}
.search-input::placeholder { color: var(--text-muted); }
.search-clear {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 0 .1rem;
  line-height: 1;
  display: none;
}
.search-clear:hover { color: var(--text); }
.search-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .75rem;
}
.search-filter-label {
  font-size: .8rem;
  color: var(--text-muted);
  margin-right: .2rem;
}
.search-year-btn {
  font-size: .78rem;
  font-family: inherit;
  padding: .2rem .6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.search-year-btn:hover { border-color: var(--primary-light); color: var(--primary); }
.search-year-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.search-results { margin-bottom: 1.5rem; }
.search-results-meta {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: .75rem;
}
.search-results-meta strong { color: var(--text); }
.search-results-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.search-result-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  transition: border-color .15s;
}
.search-result-item:hover { border-color: var(--primary-light); }
.search-result-title {
  font-size: .92rem;
  font-weight: 600;
  color: var(--primary-light);
  text-decoration: none;
  display: block;
  margin-bottom: .2rem;
  line-height: 1.4;
}
.search-result-title:hover { text-decoration: underline; }
.search-result-title mark {
  background: #fff3b0;
  border-radius: 2px;
  padding: 0 1px;
  font-weight: 700;
  color: inherit;
}
.search-result-meta {
  font-size: .8rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .75rem;
  align-items: center;
}
.search-result-meta mark {
  background: #fff3b0;
  border-radius: 2px;
  padding: 0 1px;
  color: inherit;
}
.search-result-year {
  font-size: .75rem;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  padding: .1rem .55rem;
}
.search-no-results {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
  font-size: .95rem;
}
