/* === Base Layout === */
body {
  font-family: Arial, sans-serif;
  max-width: 1050px;
  margin: 40px auto;
  padding: 80px 20px 20px;
  line-height: 1.5;
  color: #222;
  scroll-behavior: smooth;
}

a {
  color: #0066cc;
  text-decoration: none;
}
a:hover { text-decoration: underline; }

ul { padding-left: 20px; }

/* === Header === */
header { text-align: center; margin-bottom: 35px; }

header p { margin: 6px 0; font-size: 1em; color: #222; }
header p a { margin: 0 5px; }

/* === Headings === */
h1 {
  font: bold 4em Arial, sans-serif;
  text-align: center;
  margin: 0 0 20px;
  color: #0c3761;
  letter-spacing: 1px;
}

h2 {
  margin: 50px 0 15px;
  padding-bottom: 4px;
  border-bottom: 2px solid #2c3e50;
  font-size: 3em;
  font-weight: bold;
}

h3 {
  margin: 40px 0 10px;
  padding: 10px 15px;
  background: #0c3761;
  color: #fff;
  border-radius: 5px;
  box-sizing: border-box;
  width: 100%;
}

h4 {
  margin: 12px 0 6px;
  padding-left: 8px;
  border-left: 4px solid #4b0b0b;
  color: #8B0000;
  font: bold 1.2em Arial, sans-serif;
}

h5 {
  margin: 8px 0 4px;
  padding-left: 8px;
  color: #2c3e50;
  font: bold 1.1em Arial, sans-serif;
}

/* === Entries === */
.entry {
  display: block;
  margin: 0 0 12px;

  line-height: 1.25;
  text-align: justify;
}

.entry .org { font-style: italic; }
.entry .year { margin-left: 8px; }
.entry a:last-child {
  margin-left: 6px;
  text-decoration: none;
  font-size: 1.1em;
}

/* === Navbar === */
#navbar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  background: #0d2e4f;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#navbar ul {
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

#navbar a {
  display: block;
  padding: 18px 40px;
  color: #fff;
  font-weight: bold;
  transition: background 0.5s;
}

#navbar a:hover {
  background: #4279ad;
  border-radius: 5px;
}

/* === Footer === */
#site-footer {
  margin-top: 100px;
  padding: 20px;
  text-align: center;
  font: 14px Arial, sans-serif;
  letter-spacing: 0.5px;
}

/* === Dropdown adjustments === */
.dropdown-section .dropdown-content {
  max-height: 0;                 
  overflow: hidden;              
  transition: max-height 0.5s ease, padding 0.5s ease; 
  padding: 0 15px;               
  box-sizing: border-box;
}

/* Expanded dropdown */
.dropdown-section.active .dropdown-content {
  max-height: 2000px;            
  padding: 10px 15px;            
}

/* Arrow on left of heading */
.dropdown-toggle::before {
  content: "▶";
  display: inline-block;
  margin-right: 8px;
  transition: transform 0.5s ease;
  vertical-align: middle;
}

/* Rotate arrow when active */
.dropdown-section.active .dropdown-toggle::before {
  transform: rotate(90deg);
}

/* List style */
.dropdown-content ul {
  list-style-type: disc;
  padding-left: 40px;
  margin: 0;
}


.dropdown-content li.entry {
  display: list-item;
  margin-bottom: 6px;
}

/* Specific style for h3 headings in dropdowns (Awards) */
.dropdown-section h3.dropdown-toggle {
  cursor: pointer;           
  margin: 0;                 
  padding: 10px 15px;
  background: #0c3761;
  color: #fff;
  border-radius: 5px;
  width: 100%;
  box-sizing: border-box;
}

/* === Keyword highlight effect === */
.keyword-highlight {
  background: #f9e270;              
  padding: 0 2px;
  border-radius: 3px;
  box-shadow: 0 0 10px #f9e270;
  transition: background 0.3s ease;
}

/* Optional: smooth expansion for mobile */
@media (max-width: 600px) {
  .dropdown-content {
    padding: 0 10px;
  }

  .dropdown-section.active .dropdown-content {
    max-height: 9999px;
    padding: 10px 15px;
  }
}

/* === Modal for media (PDF/certificates) === */
.cert-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

.cert-modal-content {
  width: 90vw;
  height: 90vh;
  margin: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.cert-modal-content iframe,
.cert-modal-content embed,
.cert-modal-content img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(0,0,0,0.85);
}

.cert-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

.cert-close:hover {
  opacity: 0.7;
}

.cert-prev,
.cert-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 50px;
  color: white;
  cursor: pointer;
  padding: 10px;
  user-select: none;
}

.cert-prev { left: 20px; }
.cert-next { right: 20px; }

.cert-prev:hover,
.cert-next:hover { opacity: 0.7; }

/* === Media rows and images === */
.media-row {
  display: none;   /* hidden by default for regular visitors */
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  transition: opacity 0.3s ease;
}

.media-img {
  height: 80px;
  width: auto;
  cursor: pointer;
  border: 3px solid #222;
  border-radius: 8px;
  padding: 2px;
  background: white;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.media-img:hover {
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.media-icon {
  display: none;            /* hidden by default */
  font-size: 1.2em;
  margin-left: 6px;          /* space after text */
  cursor: pointer;
  vertical-align: text-bottom; /* aligns nicely with year */
  line-height: 1;
  transition: transform 0.2s ease, color 0.3s ease;
}

.media-icon:hover {
  transform: scale(1.2);
  color: #0c3761;
}