/* ===== Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
  color: #1f2937;
  background: #ffffff;
}
a { color: #1e3a8a; text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: 92%; max-width: 1100px; margin: 0 auto; }
.muted { color: #6b7280; }
.small { font-size: 0.95rem; }
hr.sep { border: 0; border-top: 1px solid #e5e7eb; margin: 24px 0; }

/* ===== Navbar ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e5e7eb;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}
.brand-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #1e3a8a;
}
.brand a { font-weight: 700; color: #111827; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}
.nav-links a {
  padding: 6px 8px;
  border-radius: 8px;
  font-weight: 500;
  color: #111827;
}
.nav-links a.active {
  background: #eef2ff;
  color: #1e3a8a;
}
.lang {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding-left: 6px;
  border-left: 1px solid #e5e7eb;
}
.lang a { font-weight: 700; color: #1e3a8a; }
.hamburger {
  display: none;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 18px;
}

/* ===== Mobile menu ===== */
@media (max-width: 860px) {
  .hamburger { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    right: 4%;
    top: 58px;
    width: min(92vw, 340px);
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 10px; }
  .lang { border-left: 0; padding-left: 0; padding-top: 6px; border-top: 1px solid #e5e7eb; justify-content: flex-start; }
}

/* ===== Hero ===== */
.hero {
  background: url("../images/header-texture.jpg") center/cover no-repeat;
  position: relative;
  color: #ffffff;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.62), rgba(0,0,0,0.45));
}
.hero-inner {
  position: relative;
  padding: 64px 0;
  text-align: center;
}
.hero h1 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); margin-bottom: 8px; letter-spacing: 0.2px; }
.hero .line { font-size: 1.05rem; opacity: 0.95; }
.hero .mail { margin-top: 12px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.hero .mail a.mail-link { color: #ffffff; font-weight: 600; text-decoration: underline; }

/* Mail button */
.mail-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.12);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}
.mail-btn:hover { text-decoration: none; background: rgba(255,255,255,0.18); }
.mail-btn svg { width: 18px; height: 18px; fill: currentColor; }

/* ===== Sections ===== */
.section { padding: 44px 0; }
.section h2 { font-size: 1.45rem; margin-bottom: 14px; color: #111827; }
.lead { font-size: 1.05rem; max-width: 72ch; }

/* ===== Layout ===== */
.grid-2 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
  align-items: start;
}
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }

/* ===== Buttons ===== */
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #1e3a8a;
  background: #1e3a8a;
  color: #ffffff;
  font-weight: 700;
}
.btn.secondary {
  background: #ffffff;
  color: #1e3a8a;
}
.btn:hover { text-decoration: none; filter: brightness(0.98); }

/* ===== Lists / cards ===== */
.list { padding-left: 18px; }
.list li { margin: 8px 0; }

.card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(0,0,0,0.04);
}
.card + .card { margin-top: 14px; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  font-size: 0.85rem;
  color: #374151;
}

/* ===== Software cards only ===== */
.software-topnav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 0 4px;
}
.software-topnav a {
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}
.software-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 14px;
}
@media (max-width: 1020px) { .software-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .software-grid { grid-template-columns: 1fr; } }

.software-card h3 { margin-bottom: 8px; font-size: 1.1rem; }
.software-card p { margin-bottom: 10px; }
.software-card ul { padding-left: 18px; margin-bottom: 12px; }
.software-card .btn-row { margin-top: 10px; }

/* ===== Publications ===== */
.pub-item { padding: 12px 0; border-top: 1px solid #e5e7eb; }
.pub-item:first-child { border-top: 0; }
.pub-title { font-weight: 800; color: #111827; }
.pub-meta { color: #374151; }
.pub-links { margin-top: 6px; display: flex; gap: 12px; flex-wrap: wrap; }
.pub-links a { font-weight: 700; }

/* ===== Footer ===== */
footer {
  margin-top: 40px;
  border-top: 1px solid #e5e7eb;
  padding: 18px 0;
  text-align: center;
  font-size: 0.95rem;
  color: #374151;
}
footer a { color: #1e3a8a; font-weight: 700; }


/* Active language pill */
.lang a.active-lang {
  background: #1e3a8a;
  color: #ffffff !important;
  padding: 6px 10px;
  border-radius: 999px;
  text-decoration: none;
}


/* ===== Dropdown (Software) ===== */
.dropdown { position: relative; }
.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.caret { font-size: 0.9em; opacity: 0.8; }

.dropdown-menu {
  display: none;
  position: absolute;
  top: 40px;
  left: 0;
  min-width: 240px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  z-index: 2000;
}
.dropdown-menu a {
  display: block;
  padding: 10px 10px;
  border-radius: 10px;
  font-weight: 600;
}
.dropdown-menu a:hover { background: #f9fafb; text-decoration: none; }

.dropdown:hover .dropdown-menu { display: block; }

/* Mobile: dropdown works as accordion inside the hamburger menu */
@media (max-width: 860px) {
  .dropdown { position: static; }
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: 0;
    padding: 0 0 0 10px;
    min-width: 0;
    display: none; /* controlled by .open */
  }
  .dropdown.open .dropdown-menu { display: block; }
  .dropdown:hover .dropdown-menu { display: none; } /* disable hover on mobile */
  .dropdown-toggle { width: 100%; justify-content: space-between; padding: 10px 10px; border-radius: 10px; }
}


/* ===== Breadcrumb ===== */
.breadcrumb {
  font-size: 0.9rem;
  margin: 10px auto 20px auto;
  color: #6b7280;
}
.breadcrumb a {
  color: #1e3a8a;
  font-weight: 600;
}

/* Header contact lines */
.hero-contact {
  color: #ffffff;
  font-size: 1rem;
  margin-top: 6px;
}
.hero-contact a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
}

/* Software TOC chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
}
.chip:hover { text-decoration: none; background: rgba(255,255,255,0.16); }


/* Software screenshots */
.software-shot {
  width: 100%;
  max-width: 820px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.18);
  margin: 14px 0 10px 0;
  display: block;

  max-width: 100%;
  height: auto;
  box-sizing: border-box;
}
.software-shot-wrap {
  display: flex;
  justify-content: center;
}


/* Ensure images never overflow on small screens */
img {
  max-width: 100%;
  height: auto;
}

.grid-3{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:20px;
  margin-top:20px;
  align-items:start;   /* poravnanje kartica na vrh */
}

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

/* naslovi razina studija */
#kolegiji .card h3{
  font-size: 1.1rem;
  font-weight: 700;     /* bold naslovi */
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ikona uz razinu studija */
#kolegiji .card h3::before{
  content: "🎓";
  font-size: 1rem;
}

/* nazivi kolegija bez bolda */
#kolegiji .card ul li{
  font-weight: 400;
}

/* ===== Fix alignment for teaching cards ===== */
#kolegiji .card + .card{
  margin-top: 0;
}
