/* ───── Buttons ───── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  text-align: center;
  justify-content: center;
}
.btn .material-symbols-rounded { font-size: 18px; }
.btn--primary { background: var(--color-primary); color: #fff; }
.btn--primary:hover { background: var(--color-primary-dark); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(25,64,111,0.3); }
.btn--secondary { background: var(--color-surface); color: var(--color-primary); border: 1px solid var(--color-border); }
.btn--secondary:hover { background: var(--color-surface-alt); border-color: var(--color-primary); }
.btn--ghost { background: transparent; color: var(--color-primary); }
.btn--ghost:hover { background: var(--color-surface-alt); }
.btn--outline-white { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.5); }
.btn--outline-white:hover { background: rgba(255,255,255,0.1); border-color: #fff; }
.btn--white { background: #fff; color: var(--color-primary); }
.btn--white:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.2); }
.btn--block { width: 100%; }
.btn--sm { padding: 8px 14px; font-size: 13px; }

/* ───── Chips ───── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--color-surface-alt);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}
.chip .material-symbols-rounded { font-size: 16px; color: var(--color-primary); }
.chip:hover { background: var(--color-surface); border-color: var(--color-border); transform: translateY(-1px); }
.chip.is-active { background: var(--color-primary); color: #fff; }
.chip.is-active .material-symbols-rounded { color: #fff; }

/* ───── Cards ───── */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.news-card__img {
  height: 220px;
  background: var(--gradient-primary);
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  overflow: hidden;
}
.news-card__img::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.4) 100%);
}
.news-card__img > * { position: relative; z-index: 1; }
.news-card__img--variant-2 { background: var(--gradient-accent); }
.news-card__img--variant-3 { background: var(--gradient-deep); }

.news-card__badge {
  padding: 6px 12px;
  background: rgba(255,255,255,0.9);
  color: var(--color-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(8px);
}
.news-card__body {
  padding: 20px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.news-card__meta { font-size: 12px; color: var(--color-text-muted); display: flex; gap: 12px; }
.news-card__meta span { display: inline-flex; align-items: center; gap: 4px; }
.news-card__meta .material-symbols-rounded { font-size: 14px; }
.news-card__title { font-size: 18px; font-weight: 700; line-height: 1.3; color: var(--color-primary-dark); }
.news-card__excerpt { font-size: 14px; color: var(--color-text-muted); line-height: 1.55; flex: 1; }
.news-card__read {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  transition: gap var(--transition-fast);
}
.news-card__read:hover { gap: 12px; }
.news-card__read .material-symbols-rounded { font-size: 14px; }

/* ───── Profile card (Obrazovni profili) ───── */
.profile-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}
.profile-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}
.profile-card:hover {
  background: var(--color-surface);
  border-color: var(--color-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.profile-card:hover::before { transform: scaleX(1); }
.profile-card__icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--gradient-primary);
  display: inline-flex;
  align-items: center; justify-content: center;
  color: #fff;
}
.profile-card__icon .material-symbols-rounded { font-size: 28px; }

.profile-card--with-cover { padding: 0; gap: 0; }
.profile-card--with-cover .profile-card__body { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.profile-card__cover {
  position: relative;
  height: 180px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  background: var(--gradient-primary);
}
.profile-card--with-cover .profile-card__badge {
  position: absolute; top: 14px; right: 14px;
  z-index: 2;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
}
.profile-card__badge {
  position: absolute; top: 24px; right: 24px;
  padding: 4px 10px; border-radius: var(--radius-pill);
  background: rgba(76,131,186,0.15); color: var(--color-secondary);
  font-size: 11px; font-weight: 700;
}
.profile-card h3 { font-size: 20px; color: var(--color-primary-dark); }
.profile-card__desc { font-size: 14px; color: var(--color-text-muted); line-height: 1.55; }
.profile-card__meta {
  display: flex; gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border-soft);
  font-size: 12px; color: var(--color-text-muted);
}
.profile-card__meta span { display: inline-flex; align-items: center; gap: 4px; }
.profile-card__meta .material-symbols-rounded { font-size: 14px; }
.profile-card__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.profile-card__tag {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-surface-alt);
  font-size: 11px;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ───── Stat card ───── */
.stat-card {
  background: var(--color-surface);
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-card__value {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-primary);
  line-height: 1;
}
.stat-card__label {
  font-size: 13px;
  color: var(--color-text-muted);
  font-weight: 500;
}
.stat-card__sub {
  margin-top: 4px;
  font-size: 11px;
  color: var(--color-secondary);
  font-weight: 600;
}

/* ───── Person card (Nastavnici, Rukovodstvo) ───── */
.person-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}
.person-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.person-card__avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
}
.person-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.person-card__photo { width: 100%; height: 100%; border-radius: 50%; }
.person-card__photo img { border-radius: 50%; }
.person-card__name { font-size: 16px; font-weight: 700; color: var(--color-primary-dark); }
.person-card__role { font-size: 12px; color: var(--color-text-muted); }
.person-card__meta {
  width: 100%;
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border-soft);
  font-size: 12px; color: var(--color-text-muted);
}
.person-card__meta div { display: inline-flex; align-items: center; gap: 6px; justify-content: center; }
.person-card__meta .material-symbols-rounded { font-size: 14px; color: var(--color-secondary); }
.person-card__meta a:hover { color: var(--color-primary); }

/* ───── Tables ───── */
.table-wrap {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.t-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.t-table thead {
  background: var(--color-surface-alt);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.t-table th, .t-table td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border-soft);
}
.t-table tbody tr { transition: background var(--transition-fast); }
.t-table tbody tr:hover { background: var(--color-surface-alt); }
.t-table tbody tr:last-child td { border: none; }
.t-table td.is-strong { font-weight: 600; color: var(--color-text); }

.doc-row {
  display: flex; align-items: center; gap: 12px;
}
.doc-row__icon {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(197,59,59,0.1);
  color: var(--color-danger);
  border-radius: 8px;
  flex-shrink: 0;
}
.doc-row__name { font-weight: 600; color: var(--color-text); }
.doc-row__sub { font-size: 11px; color: var(--color-text-muted); margin-top: 2px; }

/* ───── Badge ───── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.badge--pdf { background: rgba(197,59,59,0.1); color: var(--color-danger); }
.badge--accent { background: rgba(97,182,202,0.15); color: var(--color-accent); }
.badge--success { background: rgba(46,139,87,0.15); color: var(--color-success); }
.badge--warning { background: rgba(224,161,42,0.15); color: var(--color-warning); }
.badge--info { background: rgba(76,131,186,0.15); color: var(--color-secondary); }
.badge--neutral { background: var(--color-surface-alt); color: var(--color-text-muted); }

/* ───── Filter bar ───── */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 0;
  border-bottom: 1px solid var(--color-border-soft);
}
.filter-bar__chips { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-bar__search {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  min-width: 280px;
  transition: all var(--transition-fast);
}
.filter-bar__search:focus-within { border-color: var(--color-primary); box-shadow: 0 0 0 4px rgba(25,64,111,0.1); }
.filter-bar__search input {
  border: none; outline: none; background: transparent;
  font-family: inherit; font-size: 13px; flex: 1;
  color: var(--color-text);
}
.filter-bar__search .material-symbols-rounded { font-size: 16px; color: var(--color-text-muted); }

/* ───── Pagination ───── */
.pagination {
  display: flex; justify-content: center; gap: 8px;
  padding: 24px 0;
}
.pagination button {
  width: 38px; height: 38px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--color-surface);
  color: var(--color-text);
  font-weight: 600;
  border: 1px solid var(--color-border);
  font-size: 13px;
  transition: all var(--transition-fast);
}
.pagination button:hover { border-color: var(--color-primary); color: var(--color-primary); }
.pagination button.is-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* ───── Tabs ───── */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--color-border-soft);
  flex-wrap: wrap;
}
.tabs__tab {
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
}
.tabs__tab:hover { color: var(--color-primary); }
.tabs__tab.is-active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* ───── Toast ───── */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 300;
  display: flex; flex-direction: column; gap: 12px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--color-surface);
  border-left: 4px solid var(--color-success);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  max-width: 380px;
  animation: slideInRight 300ms ease-out;
}
.toast.is-leaving { animation: slideOutRight 250ms ease-in forwards; }
.toast__icon {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(46,139,87,0.15);
  color: var(--color-success);
  border-radius: 8px;
}
.toast__title { font-size: 14px; font-weight: 700; color: var(--color-text); }
.toast__msg { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }

@keyframes slideInRight {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(120%); opacity: 0; }
}

/* ───── Form inputs ───── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 13px; font-weight: 600; color: var(--color-text); }
.field__control {
  font-family: inherit;
  font-size: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  transition: all var(--transition-fast);
  outline: none;
}
.field__control:focus { border-color: var(--color-primary); background: #fff; box-shadow: 0 0 0 4px rgba(25,64,111,0.1); }
textarea.field__control { resize: vertical; min-height: 110px; }
.field__row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--color-text-muted); }
.field__row input[type="checkbox"] { accent-color: var(--color-primary); width: 16px; height: 16px; }

/* ───── Skeleton ───── */
.skeleton {
  background: linear-gradient(90deg,
    var(--color-surface-alt) 0%,
    var(--color-border-soft) 50%,
    var(--color-surface-alt) 100%);
  background-size: 200% 100%;
  animation: skeleton 1.4s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-card { padding: 0; }
.skeleton-card .skeleton-img { height: 220px; border-radius: 0; }
.skeleton-card .skeleton-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.skeleton-card .skeleton-line { height: 12px; }
.skeleton-card .skeleton-line--lg { height: 18px; width: 80%; }
.skeleton-card .skeleton-line--sm { width: 40%; }

/* ───── Image / Lazy ───── */
.lazy-img {
  background: transparent;
  position: relative;
  overflow: hidden;
}
.lazy-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--transition-slow);
}
.lazy-img img.is-loaded { opacity: 1; }
.lazy-img.is-loading::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg,
    transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: skeleton 1.4s ease-in-out infinite;
}

/* ───── Reveal animation ───── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal[data-delay="100"] { transition-delay: 100ms; }
.reveal[data-delay="200"] { transition-delay: 200ms; }
.reveal[data-delay="300"] { transition-delay: 300ms; }
.reveal[data-delay="400"] { transition-delay: 400ms; }

/* ───── Counter pulse ───── */
.counter { font-variant-numeric: tabular-nums; }

/* ───── Misc utility ───── */
.section { padding: 64px 0; }
.section--alt { background: var(--color-surface); }
.section--dark { background: var(--color-primary-dark); color: #fff; }
.section__head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 32px; max-width: 720px; }
.section__head.is-row { flex-direction: row; justify-content: space-between; align-items: flex-end; max-width: 100%; gap: 24px; flex-wrap: wrap; }
.section__eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-secondary);
}
.section__title { font-size: 34px; letter-spacing: -0.02em; }
.section__hu { font-size: 15px; font-style: italic; color: var(--color-text-muted); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

@media (max-width: 1024px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .section__title { font-size: 28px; }
}
