/* SAC-HPC static site – inspired by WordPress Vantage theme */

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

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  background: #e8e8e8;
}

a {
  color: #248cc8;
  text-decoration: none;
}

a:hover {
  color: #1a6a96;
  text-decoration: underline;
}

#page-wrapper {
  max-width: 100%;
  background: #fff;
}

.full-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Header */
#masthead .hgroup {
  padding: 0;
  text-align: center;
  background: #e8e8e8;
}

.header-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  background: #e8e8e8;
}

/* Navigation */
.main-navigation {
  background: #343538;
  border-top: 3px solid #248cc8;
}

.main-navigation .full-container {
  padding: 0;
  max-width: none;
  width: 100%;
}

.menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
}

.menu > li {
  position: relative;
}

.menu > li > a {
  display: block;
  padding: 14px 20px;
  color: #fff;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  width: 100%;
  padding: 12px 20px;
  background: #343538;
  color: #fff;
  border: none;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.menu > li > a:hover,
.menu > li.active > a {
  background: #248cc8;
  color: #fff;
  text-decoration: none;
}

.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: #343538;
  list-style: none;
  margin: 0;
  padding: 0;
  z-index: 100;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.has-submenu:hover > .sub-menu,
.has-submenu.open > .sub-menu {
  display: block;
}

.sub-menu .sub-menu {
  top: 0;
  left: 100%;
}

.sub-menu a {
  display: block;
  padding: 10px 16px;
  color: #fff;
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}

.sub-menu a:hover,
.sub-menu li.active a {
  background: #248cc8;
  color: #fff;
}

.flag {
  width: 18px;
  height: 12px;
  vertical-align: middle;
  margin-right: 4px;
}

/* Slider */
#main-slider {
  max-width: 1080px;
  margin: 0 auto;
}

.slider {
  position: relative;
  overflow: hidden;
  background: #222;
}

.slides {
  position: relative;
  width: 100%;
  aspect-ratio: 1010 / 270;
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.slide.active {
  opacity: 1;
}

.slider-prev,
.slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  font-size: 18px;
  cursor: pointer;
  z-index: 2;
}

.slider-prev { left: 10px; }
.slider-next { right: 10px; }

.slider-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  padding: 0;
}

.slider-dot.active {
  background: #fff;
}

/* Main content layout */
#main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 30px 0 40px;
}

#main .full-container {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

#primary {
  flex: 1;
  min-width: 0;
}

#secondary {
  width: 260px;
  flex-shrink: 0;
}

.entry-title {
  font-size: 24px;
  font-weight: normal;
  margin: 0 0 20px;
  color: #333;
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
}

.entry-content {
  text-align: justify;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 13px;
}

.entry-content table,
.entry-content th,
.entry-content td {
  border: 1px solid #ccc;
}

.entry-content th,
.entry-content td {
  padding: 8px 10px;
  vertical-align: top;
}

.entry-content ol,
.entry-content ul {
  padding-left: 1.5em;
}

.entry-content ol li {
  margin-bottom: 0.75em;
}

.entry-content center,
.entry-content .logo-row {
  text-align: center;
  margin: 20px 0;
}

.entry-content img {
  max-width: 100%;
  height: auto;
}

/* Sidebar widgets */
.widget {
  background: #f5f5f5;
  border: 1px solid #ddd;
  margin-bottom: 20px;
  padding: 15px;
}

.widget-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: bold;
  color: #333;
  border-bottom: 2px solid #248cc8;
  padding-bottom: 6px;
}

.textwidget p {
  margin: 0;
  line-height: 1.8;
}

.textwidget a {
  color: #333;
  text-decoration: none;
}

.textwidget a:hover {
  color: #248cc8;
}

/* Footer */
#colophon {
  background: #343538;
  color: #aaa;
  text-align: center;
  padding: 20px;
  margin-top: 0;
}

#site-info p {
  margin: 4px 0;
  font-size: 13px;
}

/* Scroll to top */
#scroll-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: #248cc8;
  color: #fff;
  text-align: center;
  line-height: 40px;
  border-radius: 4px;
  display: none;
  text-decoration: none;
  font-size: 18px;
  z-index: 99;
}

#scroll-to-top.visible {
  display: block;
}

/* Staff profile pages */
.staff-layout {
  width: 100%;
}

.staff-profile-block {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.staff-photo {
  width: 140px;
  height: auto;
  flex-shrink: 0;
  border: 1px solid #ddd;
  background: #f9f9f9;
}

.staff-profile-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.staff-profile-table td {
  padding: 6px 10px;
  vertical-align: top;
  border: none;
}

.staff-profile-table td:first-child {
  font-weight: bold;
  width: 34%;
  color: #444;
}

.staff-tabs {
  margin-top: 10px;
}

.staff-tab-buttons {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #ddd;
  margin-bottom: 0;
}

.staff-tab-btn {
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-bottom: none;
  padding: 10px 20px;
  margin-right: 4px;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  border-radius: 4px 4px 0 0;
}

.staff-tab-btn:hover {
  background: #eee;
}

.staff-tab-btn.active {
  background: #248cc8;
  color: #fff;
  border-color: #248cc8;
}

.staff-tab-panel {
  display: none;
  padding: 16px 0;
  border-top: none;
}

.staff-tab-panel.active {
  display: block;
}

.staff-tab-panel ol,
.staff-tab-panel ul {
  padding-left: 1.5em;
}

.staff-tab-panel li {
  margin-bottom: 0.75em;
  font-size: 13px;
}

.staff-tab-panel .scroll-box {
  max-height: 500px;
  overflow-y: auto;
  padding-right: 8px;
}

@media (max-width: 768px) {
  .staff-profile-block {
    flex-direction: column;
  }

  .staff-photo {
    width: 120px;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .menu {
    display: none;
    flex-direction: column;
  }

  .menu.open {
    display: flex;
  }

  .sub-menu {
    position: static;
    box-shadow: none;
    background: #2a2b2d;
    display: none;
  }

  .has-submenu.sub-open > .sub-menu {
    display: block;
  }

  #main .full-container {
    flex-direction: column;
  }

  #secondary {
    width: 100%;
  }

  .menu > li > a {
    padding: 12px 20px;
  }
}
