/*
 * Lapisan tampilan portal prodi (meniru pola ugm-theme-dti pada s2math.fmipa.ugm.ac.id).
 * Dimuat setelah style.css: memetakan ulang palet dan menimpa header, navigasi, beranda, dan footer.
 */

:root {
  --uts-navy-dark: #121f33;
  --uts-navy: #1a2c43;
  --uts-blue: #073c64;
  --uts-blue-light: #149fc0;
  --uts-orange: #073c64;
  --uts-orange-hover: #149fc0;
  --uts-orange-light: #e8f4f8;
  --uts-gold: #fdcb2c;
  --uts-font: 'Open Sans', Helvetica, Arial, sans-serif;
  --uts-font-head: 'Montserrat', Helvetica, Arial, sans-serif;
  --uts-font-serif: 'Lora', Georgia, 'Times New Roman', serif;
  --uts-radius-sm: 0;
  --uts-radius-md: 0;
  --uts-radius-lg: 0;
  --uts-container: 1170px;
}

body {
  font-family: var(--uts-font);
  font-size: 14px;
  line-height: 1.7;
  color: #333;
  background: #fff;
}

a { color: #073c64; }
a:hover { color: #149fc0; }

h1, h2, h3, h4, h5, h6 { font-family: var(--uts-font-head); }

.container {
  max-width: var(--uts-container);
  margin: 0 auto;
  padding: 0 15px;
}

/* ---------- Header ---------- */
#header .topbar {
  background: #1a2c43;
  min-height: 40px;
}
#header .topbar .container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 40px;
}
#header .search-form {
  display: flex;
  margin: 0;
}
#header .search-form input {
  width: 200px;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 0;
  font: 12px var(--uts-font);
  background: #fff;
  color: #333;
}
#header .search-form button {
  height: 28px;
  width: 34px;
  border: 0;
  background: #fdcb2c;
  color: #1a2c43;
  cursor: pointer;
}
#header .search-form button:hover { background: #fff; }

#header .brand-bar {
  background: #fff;
  padding: 18px 0;
}
#header .brand-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#header .navbar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: #333;
  font: 700 18px/23px var(--uts-font-head);
}
#header .navbar-brand img { height: 64px; width: auto; display: block; }
#header .navbar-brand:hover { color: #073c64; }

#header .mobile-nav-toggle {
  display: none;
  background: #1a2c43;
  color: #fff;
  border: 0;
  padding: 9px 12px;
  font-size: 18px;
  cursor: pointer;
}

/* ---------- Navigasi ---------- */
#navbar.site-navigation-bar {
  background: #1a2c43;
  border: 0;
  box-shadow: none;
  position: relative;
  top: auto;
  z-index: 100;
  padding: 0;
}
#navbar .container { display: block; padding: 0 15px; }
#navbar .primary-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}
#navbar .primary-menu > li { position: relative; }
#navbar .primary-menu > li > a {
  display: block;
  min-width: 130px;
  padding: 15px 18px;
  text-align: center;
  color: #fff;
  font: 400 13px/20px var(--uts-font-head);
  border-right: 1px solid #1c3351;
  text-decoration: none;
  background: transparent;
}
#navbar .primary-menu > li:hover > a,
#navbar .primary-menu > li.current-menu-item > a,
#navbar .primary-menu > li.current-menu-ancestor > a {
  color: #fdcb2c;
  background: #121f33;
}
#navbar .sub-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 280px;
  background: #121f33;
  opacity: 0;
  visibility: hidden;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .3s ease, opacity .2s ease;
  box-shadow: 0 6px 12px rgba(0, 0, 0, .18);
  z-index: 1000;
}
#navbar li:hover > .sub-menu,
#navbar li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: scaleY(1);
}
#navbar .sub-menu li { position: relative; }
#navbar .sub-menu a {
  display: block;
  padding: 10px 18px;
  color: #fff;
  font: 400 12.5px/1.5 var(--uts-font-head);
  text-decoration: none;
  border-bottom: 1px solid #1c3351;
}
#navbar .sub-menu a:hover { color: #fdcb2c; background: #1a2c43; }
#navbar .sub-menu .sub-menu { left: 100%; top: 0; }

/* ---------- Beranda ---------- */
#content { padding-top: 40px; padding-bottom: 20px; }

.tpb-section { margin-bottom: 40px; }
.tpb-title {
  border-bottom: 1px solid #e6e6e6;
  margin-bottom: 24px;
}
.tpb-title h2 {
  margin: 0 0 10px;
  font: 700 22px/1.2 var(--uts-font-head);
  color: #073c64;
  text-transform: none;
}

.post-list { list-style: none; margin: 0; padding: 0; }
.post-list .post-content {
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}
.post-list .post-content:last-child { border-bottom: 0; }
.post-list h3 {
  margin: 0 0 4px;
  font: 600 16px/1.4 var(--uts-font-head);
}
.post-list h3 a { color: #222; text-decoration: none; }
.post-list h3 a:hover { color: #149fc0; }
.post-list time { font-size: 12px; color: #777; }
.post-list time i { margin-right: 4px; }

.view-all { margin: 18px 0 0; }
.btn-viewall {
  display: inline-block;
  padding: 7px 18px;
  background: #073c64;
  color: #fff;
  font: 600 12px/1.5 var(--uts-font-head);
  text-transform: uppercase;
  text-decoration: none;
}
.btn-viewall:hover { background: #149fc0; color: #fff; }
.empty-note { color: #777; font-style: italic; }

/* ---------- Footer ---------- */
#footer.site-footer { background: transparent; color: #fff; padding: 0; margin-top: 30px; }
#footer .footer-body { padding: 48px 0; background: #073c64; }
#footer .footer-brand { display: inline-block; margin-bottom: 15px; }
#footer .footer-brand img { height: 64px; width: auto; display: block; }
#footer p, #footer a { color: #fff; line-height: 1.71; margin: 0 0 12px; text-decoration: none; }
#footer a:hover { color: rgba(255, 255, 255, .6); }
#footer .footer-copyright { background: #121f33; padding: 14px 0; font-size: 12px; }
#footer .footer-copyright .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
#footer .footer-copyright p { margin: 0; }

/* ---------- Responsif ---------- */
@media (max-width: 768px) {
  #header .mobile-nav-toggle { display: block; }
  #header .navbar-brand { font-size: 14px; line-height: 19px; }
  #header .navbar-brand img { height: 48px; }
  #navbar .primary-menu { display: none; flex-direction: column; }
  #navbar .primary-menu.active { display: flex; }
  #navbar .primary-menu > li > a { text-align: left; min-width: 0; border-right: 0; border-bottom: 1px solid #1c3351; }
  #navbar .sub-menu {
    position: static;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    min-width: 0;
  }
  #navbar li.menu-open > .sub-menu { display: block; }
  #navbar li:hover > .sub-menu { transform: none; }
  #header .search-form input { width: 140px; }
}
