/* =====================================================================
   FKKSS UNSA – International Mobility
   Profesionalni akademski dizajn
   Paleta: duboka institucionalna plava, čelično siva, akcentna zlatna
   ===================================================================== */

:root {
  --navy:        #0d2748;   /* primarna duboka plava */
  --navy-700:    #143a63;
  --navy-500:    #1e5288;   /* UNSA plava */
  --steel:       #4a6a8a;
  --gold:        #c8a04b;   /* akademski akcent */
  --gold-dark:   #a8843a;
  --ink:         #1b2733;
  --slate:       #56606b;
  --line:        #e2e6ea;
  --bg:          #ffffff;
  --bg-soft:     #f5f7f9;
  --bg-panel:    #eef2f5;
  --white:       #ffffff;
  --danger:      #b8402f;
  --ok:          #2f7a4d;

  --maxw: 1180px;
  --radius: 4px;
  --shadow-sm: 0 1px 3px rgba(13,39,72,.08);
  --shadow-md: 0 6px 22px rgba(13,39,72,.12);

  --ff-display: Georgia, 'Times New Roman', 'PT Serif', serif;
  --ff-body: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--ff-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16.5px;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--navy-500); text-decoration: none; }
a:hover { color: var(--gold-dark); text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

h1, h2, h3, h4 { font-family: var(--ff-display); color: var(--navy); line-height: 1.25; font-weight: 700; }
h1 { font-size: 2.1rem; margin: 0 0 .4em; }
h2 { font-size: 1.6rem; margin: 1.6em 0 .5em; }
h3 { font-size: 1.25rem; margin: 1.4em 0 .4em; color: var(--navy-700); }
h4 { font-size: 1.06rem; margin: 1.2em 0 .3em; color: var(--navy-500); font-weight: 700; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--navy);
  color: #cdd7e2;
  font-size: .82rem;
  border-bottom: 3px solid var(--gold);
}
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 40px; flex-wrap: wrap; }
.topbar a { color: #cdd7e2; }
.topbar a:hover { color: var(--white); text-decoration: none; }
.topbar .institution { letter-spacing: .02em; }
.lang-switch { display: flex; gap: 4px; align-items: center; }
.lang-switch a {
  padding: 3px 9px; border-radius: 3px; font-weight: 600; text-transform: uppercase; font-size: .75rem;
  border: 1px solid transparent;
}
.lang-switch a.active { background: var(--gold); color: var(--navy); }
.lang-switch a:not(.active):hover { border-color: #33517a; }

/* ---------- Header ---------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; box-shadow: var(--shadow-sm); }
.site-header .wrap { display: flex; align-items: center; gap: 18px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand .logos { display: flex; align-items: center; gap: 10px; }
.brand .logos img { height: 52px; width: auto; }
.brand .titles { line-height: 1.2; }
.brand .titles .u { font-size: .74rem; color: var(--slate); text-transform: uppercase; letter-spacing: .05em; }
.brand .titles .f { font-family: var(--ff-display); font-size: 1.02rem; color: var(--navy); font-weight: 700; max-width: 430px; }
.brand:hover { text-decoration: none; }

.nav-toggle { display: none; margin-left: auto; background: var(--navy); color: #fff; border: 0; padding: 9px 12px; border-radius: var(--radius); font-size: 1rem; cursor: pointer; }

/* ---------- Main nav ---------- */
.mainnav { background: var(--navy-500); }
.mainnav .wrap { display: flex; gap: 2px; flex-wrap: wrap; }
.mainnav a {
  color: #eaf1f8; padding: 13px 16px; font-weight: 600; font-size: .93rem;
  border-bottom: 3px solid transparent; letter-spacing: .01em;
}
.mainnav a:hover, .mainnav a.active {
  background: var(--navy-700); color: #fff; text-decoration: none; border-bottom-color: var(--gold);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    linear-gradient(180deg, rgba(9,26,48,.82), rgba(9,26,48,.9)),
    url('../img/hero.jpg') center 35% / cover no-repeat;
  color: #fff;
  padding: 74px 0 66px;
  border-bottom: 4px solid var(--gold);
}
.hero .eyebrow { text-transform: uppercase; letter-spacing: .22em; font-size: .8rem; color: var(--gold); margin-bottom: 14px; font-weight: 700; }
.hero h1 { color: #fff; font-size: 2.9rem; max-width: 20ch; margin-bottom: .35em; }
.hero p { font-size: 1.16rem; max-width: 60ch; color: #dbe4ee; margin: 0 0 26px; }
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 12px 22px; border-radius: var(--radius);
  font-weight: 700; font-size: .95rem; cursor: pointer; border: 2px solid transparent; transition: .16s;
}
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-dark); color: #fff; text-decoration: none; }
.btn-ghost { border-color: rgba(255,255,255,.6); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
.btn-navy { background: var(--navy-500); color: #fff; }
.btn-navy:hover { background: var(--navy); color: #fff; text-decoration: none; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section.soft { background: var(--bg-soft); }
.section-head { max-width: 62ch; margin-bottom: 30px; }
.section-head .kicker { text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; color: var(--gold-dark); font-weight: 700; }
.section-head h2 { margin-top: .2em; }
.section-head p { color: var(--slate); }

/* ---------- Audience split (student / staff) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.audience-card {
  background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--navy-500);
  border-radius: var(--radius); padding: 28px 26px; box-shadow: var(--shadow-sm);
}
.audience-card.staff { border-top-color: var(--gold); }
.audience-card h3 { margin-top: 0; }
.audience-card ul { padding-left: 20px; margin: 12px 0 20px; color: var(--slate); }
.audience-card ul li { margin-bottom: 7px; }

/* ---------- Program tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tile {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px; text-decoration: none; color: var(--ink); display: block;
  transition: .16s; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.tile::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--gold); transform: scaleY(0); transform-origin: top; transition: .18s; }
.tile:hover { text-decoration: none; box-shadow: var(--shadow-md); transform: translateY(-2px); }
.tile:hover::before { transform: scaleY(1); }
.tile .tag { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gold-dark); font-weight: 700; }
.tile h3 { margin: 8px 0 6px; font-size: 1.18rem; }
.tile p { margin: 0; font-size: .9rem; color: var(--slate); }

/* ---------- Calls (konkursi) ---------- */
.calls-controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
.calls-controls input[type=search], .calls-controls select {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); font-size: .95rem; font-family: inherit;
}
.calls-controls input[type=search] { min-width: 240px; flex: 1; }

.call-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.call-card {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--navy-500);
  border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
}
.call-card .program-badge {
  display: inline-block; align-self: flex-start; background: var(--bg-panel); color: var(--navy-700);
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 3px 9px; border-radius: 20px; margin-bottom: 10px;
}
.call-card h3 { margin: 0 0 4px; font-size: 1.12rem; }
.call-card .inst { color: var(--slate); font-size: .92rem; margin-bottom: 12px; }
.call-meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: .88rem; margin-bottom: 14px; }
.call-meta dt { color: var(--slate); font-weight: 600; }
.call-meta dd { margin: 0; color: var(--ink); }
.call-card .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.deadline-pill { font-size: .8rem; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.deadline-pill.ok { background: #e8f3ec; color: var(--ok); }
.deadline-pill.soon { background: #fbf1e0; color: var(--gold-dark); }
.deadline-pill.expired { background: #f7e9e6; color: var(--danger); }

/* ---------- News ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.news-card { background:#fff; border:1px solid var(--line); border-radius: var(--radius); overflow:hidden; box-shadow: var(--shadow-sm); display:flex; flex-direction:column; }
.news-card .thumb { aspect-ratio: 16/9; background: var(--bg-panel) center/cover no-repeat; }
.news-card .body { padding: 18px 20px; display:flex; flex-direction:column; flex:1; }
.news-card .date { font-size: .78rem; color: var(--slate); text-transform: uppercase; letter-spacing: .05em; }
.news-card h3 { margin: 6px 0 8px; font-size: 1.12rem; }
.news-card p { color: var(--slate); font-size: .92rem; margin: 0 0 14px; }
.news-card .more { margin-top:auto; font-weight:600; }

/* ---------- Article / page content ---------- */
.page-hero { background: var(--navy); color:#fff; padding: 40px 0; border-bottom: 4px solid var(--gold); }
.page-hero .crumbs { font-size: .82rem; color:#9fb3c9; margin-bottom: 8px; }
.page-hero .crumbs a { color:#9fb3c9; }
.page-hero h1 { color:#fff; margin:0; }

.content { max-width: 820px; }
.content p { margin: 0 0 1.05em; }
.content ul, .content ol { margin: 0 0 1.2em; padding-left: 24px; }
.content li { margin-bottom: .5em; }
.content h3 { border-left: 4px solid var(--gold); padding-left: 12px; }
.content h4 { color: var(--navy-700); }
.content a { text-decoration: underline; }

.layout-2 { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }
.sidebar { position: sticky; top: 90px; }
.sidebar .card { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.sidebar h4 { margin-top: 0; }
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar ul li { border-bottom: 1px solid var(--line); }
.sidebar ul li:last-child { border-bottom: 0; }
.sidebar ul li a { display: block; padding: 9px 0; font-weight: 600; font-size: .93rem; }
.sidebar ul li a.active { color: var(--gold-dark); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; }
.contact-info .row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.contact-info .row .lbl { min-width: 90px; color: var(--slate); font-weight: 600; }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .92rem; }
.form-field input, .form-field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius); font-family: inherit; font-size: .96rem;
}
.form-field textarea { min-height: 140px; resize: vertical; }
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 18px; font-size: .93rem; }
.alert.ok { background:#e8f3ec; color: var(--ok); border:1px solid #bfe0cc; }
.alert.err { background:#f7e9e6; color: var(--danger); border:1px solid #e6c3bc; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #c3d0de; padding: 44px 0 0; margin-top: 40px; }
.site-footer a { color: #c3d0de; }
.site-footer a:hover { color:#fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; padding-bottom: 30px; }
.site-footer h4 { color:#fff; font-family: var(--ff-body); font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: 8px; font-size: .92rem; }
.site-footer .contact-line { font-size: .92rem; margin-bottom: 6px; }
.footer-bottom { border-top: 1px solid #22405f; padding: 16px 0; font-size: .82rem; color: #8ea3ba; display:flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.social { display: flex; gap: 10px; margin-top: 12px; }
.social a { display:inline-flex; width:34px; height:34px; align-items:center; justify-content:center; background:#1a3557; border-radius:50%; font-size:.8rem; }
.social a:hover { background: var(--gold); color: var(--navy); text-decoration:none; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.muted { color: var(--slate); }
.divider { height:1px; background: var(--line); border:0; margin: 34px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .tiles { grid-template-columns: repeat(2,1fr); }
  .news-grid { grid-template-columns: repeat(2,1fr); }
  .layout-2 { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .hero h1 { font-size: 2.1rem; }
  .split, .call-grid, .contact-grid { grid-template-columns: 1fr; }
  .tiles, .news-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand .titles .f { font-size: .92rem; max-width: 220px; }
  .nav-toggle { display: block; }
  .mainnav .wrap { display: none; flex-direction: column; }
  .mainnav.open .wrap { display: flex; }
  .mainnav a { border-bottom: 1px solid #2a5583; }
}
