:root {
  font-size: 16px;
}

/* ===== BASE ===== */
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Lato', sans-serif;
  box-sizing: border-box;
  background-color: #fff;
  color: #222;
}

body {
  padding: 1rem;
  max-width: 100%;
}

* {
  box-sizing: inherit;
}

h1, h2, h3, h4, a {
  color: rgba(7, 55, 99, 1);
}

a {
  font-weight: bold;
  transition: color 0.2s ease;
}

a:hover {
  color: rgba(7, 55, 99, 0.8);
  text-decoration: underline;
}

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

/* ===== PAGE CONTAINER ===== */
.pageContainer {
  max-width: 1200px;
  margin: 0 auto;          
  padding: 0 20px;         
  width: 100%;
  box-sizing: border-box;
}

#teamContent, #linksContent {
  margin-top: 60px;
}

/* ===== LOGO ===== */
#logo {
  max-width: 150px;
  height: auto;          
}

@media (max-width: 768px) {
  #logo {
    margin: auto;        
  }
}

/* ===== LAYOUT ===== */
.publicContent {
  display: flex;
  flex-direction: row;
  align-items: flex-start; 
  gap: 20px;
  position: relative; 
}

.pcContainer {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 40px;
  width: 100%;
}


.mainContent {
  flex: 1;
  min-width: 0;
}

.sidebar {
  width: 270px;
  flex-shrink: 0;
  background: #f7f7f7;
  border-radius: 2px;
  font-family: 'Lato', sans-serif;
  font-size: 12px;
  color: #222;
}

.sidebar-header {
  background: rgb(7, 55, 99);
  color: white;
  padding: 8px 10px;
  font-size: 14px;
  font-weight: bold;
  text-align: left;
  letter-spacing: 0.3px;
}

.sidebar-section {
  padding: 10px 12px;
  border-bottom: 1px solid #ddd;
}

.sidebar-section:last-child {
  border-bottom: none;
}

.sidebar-section h4 {
  margin: 0 0 6px;
  font-size: 14px;
  color: rgba(7, 55, 99, 1);
  font-weight: 600;
}

.sidebar-section p,
.sidebar-section a {
  margin: 2px 0;
  font-size: 12px;
  line-height: 1.4em;
  color: #222;
  text-decoration: none;
}

.sidebar-section a {
  color: rgba(7, 55, 99, 1);
  font-weight: 500;
}

.sidebar-section a:hover {
  text-decoration: underline;
  color: rgba(7, 55, 99, 0.8);
}

section.drive {
  border-bottom: 0 !important;
}

}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3 {
  font-size: 1.3rem;
  margin: 0.5rem 0;
}

p {
  margin: 0.5rem 0;
  font-size: 1.1rem;
}

.blockhead {
  font-size: 1.1rem;
  background-color: rgba(7, 55, 99, 1);
  color: white;
  padding: 6px 10px;
  font-weight: 600;
  margin: 0 0 10px 0;
}

/* ===== TEAM TITLE ===== */
#pageTitle {
  font-size: 1.6rem;
  margin: 0 0 0.5rem 0; /* tightened spacing */
  font-weight: 600;
}

/* ===== QUICK LINKS ===== */
.quickLinks {
  width: 100%;
  border-radius: 2px;
  border-bottom: 1px solid #ddd;
  background-color: #f8f8f8;
  font-size: 14px;
}

.quickLinks .qlHed {
  background-color: rgba(7, 55, 99, 1);
  color: #fff;
  font-weight: 600;
  padding: 6px 10px;
  font-size: 1.1rem;
  margin: 0;
}

.quickLinks .qlP {
  margin: 0;
  padding: 6px 10px;
  border-top: 1px solid #ddd;
}

.quickLinks .qlP a {
  color: rgba(7, 55, 99, 1);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.4;
}

.quickLinks .qlP a:hover {
  text-decoration: underline;
}

#teamLeadEmail {
  display: none;
}

#tlhead {
  margin-top: -10px !important;
}

.tlinfo {
  font-size: 12px;
}

ul.icon-list {
  padding-left: 0;
  margin-left: 0;
}

ul.icon-list li {
  list-style: none;
  position: relative;
  padding-left: 26px;
  line-height: 1.4em;
  margin-bottom: 5px;
}

/* USER icon */
ul li.icon-user::before {
  font-family: "Font Awesome 5 Free";
  content: "\f007";      /* user */
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 0;
  font-size: 14px;
}

/* ENVELOPE icon */
ul li.icon-envelope::before {
  font-family: "Font Awesome 5 Free";
  content: "\f0e0";      /* envelope */
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 0;
  font-size: 14px;
}

/* PDF icon */
ul li.icon-pdf::before {
  font-family: "Font Awesome 5 Free";          
  content: "\f1c1";          /* pdf */
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 0;
  font-size: 14px;
}

/* GROUP icon */
ul li.icon-group::before {
  font-family: "Font Awesome 5 Free";
  content: "\f0c0";      /* group */
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 0;
  font-size: 14px;
}

ul.icon-list li.icon-drive {
  padding-left:0;
}

/* DRIVE icon */

ul.icon-list li.icon-drive i {
  margin-right: 10px;
  font-size: 14px;
  vertical-align: middle;
}

/* MIP icon */

img.icon-mip {
  margin-right: 4px;
  vertical-align: middle;
  width: 14px;    /* match fa icon size */
  height: 14px;   /* optional, keep it square */
  display: inline;
}

.mip a {
  display: inline;
}

/* --- Mobile stacking fix --- */
@media (max-width: 768px) {
  .pcContainer {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    margin-top: 20px;
  }

  .quickLinks {
    margin-bottom: 20px;
  }
}

/* ===== BANNER ===== */
#bannerSection {
  display: none;
}

#banner {
  margin-bottom:10px;
}

img.bannerImg {
  width: 100%;          
  max-width: 850px;     
  height: 300px; 
  max-height: 300px;     
  object-fit: cover;   
  object-position: center center; 
  display: block;      
}

@media (max-width: 768px) {
  #banner {
    margin-top:-10px;
    margin-bottom:0px;
  }

  img.bannerImg {  
    height: 200px; 
    max-height: 200px;     
  }

  #bannerSection {
    padding-bottom: 10px;
  }
}

/* ===== ANNOUNCEMENTS ===== */
.announcements .cont {
  padding: 0 10px;
}

.announcement-item {
  padding: 8px 0 12px;
  border-bottom: 1px solid #ccc;
}

.announcement-item:last-child {
  border-bottom: none;
}

.announcement-item h4 {
  font-size: 1rem;
  margin: 0 0 4px 0;
  color: rgba(7, 55, 99, 1);
}

.announcement-item .date {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 4px;
}

.announcement-item .body {
  font-size: 0.9rem;
  color: #333;
  line-height: 1.4;
}

.announcement-admin.links {
  margin-top: 4px;
  display: flex;
  justify-content: flex-end;
}

.announcement-item .links a, #banner a {
  font-size: 0.8rem;
  font-weight: normal;
  color: rgba(7, 55, 99, 1);
  text-decoration: none;
  margin-right: 10px;
}

.announcement-item .links a:hover {
  text-decoration: underline;
}

.adminNote {
  font-style: italic;
  font-size: .9em;
  margin-right: 10px;
  color: #df683a;
}

/* ===== CALENDAR ===== */
.calendar .blockhead {
  background-color: rgba(7, 55, 99, 1);
  color: #fff;
  padding: 6px 10px;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.calendar-container {
  margin: 0 auto;
  padding: 0 10px;
  display: flex;
  justify-content: center;
}

.calendar-view {
  width: 100%;
  max-width: 800px;
  height: 300px;
  border: 0;
}

.calendar-mobile {
  display: none;
}

.edit-calendar {
  margin-right: 20px;
}

@media (max-width: 768px) {
  .calendar-desktop {
    display: none;
  }
  .calendar-mobile {
    display: block;
    height: 300px;
  }
}

@media (max-width: 480px) {
  .calendar-mobile {
    height: 400px;
  }
}

/* ===== ADMIN BUTTONS ===== */
#adminButtons {
  display: flex;
  flex-direction: column;
  align-items: center;       
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  padding: 15px 0;
}

#adminButtons button,
#adminButtons .responsiveLink,
#form_submit {
  background: rgba(7, 55, 99, 1);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 400;
  text-decoration: none;
  text-align: center;
  align-items: center;
  justify-content: center;
  height: 36px;
  line-height: 1;
  transition: background 0.2s ease, opacity 0.2s ease;
  width: 200px;  
  padding: 10px 0;
}

#adminButtons .responsiveLink {
  font-weight: 400;
  display: inline-block;
}

#adminButtons button:hover,
#adminButtons .responsiveLink:hover,
#form_submit:hover {
  background: rgba(7, 55, 99, 1);
}

#adminButtons button:disabled,
#form_submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

#loginBtn, #teamUpdateBtn {
  background-color: #df683a !important;
}

#userInfo {
  margin: 10px 0;
  font-size: 12px;
  text-align: center;
  border-bottom: 1px solid #ddd;
    padding-bottom: 20px;
}

/* Small spinner inside refresh button */
#refreshBtn[data-refreshing="true"]::after {
  content: '';
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-left: 0.5em;
  border: 2px solid #ccc;
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  vertical-align: middle;
}

/* ===== LOADING SPINNER ===== */
#loadingSpinner {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  z-index: 9999;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  transition: opacity 0.2s ease;
}


.spinner {
  width: 48px;
  height: 48px;
  border: 5px solid #ddd;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== ALERTS ===== */
.alert.success {
  background-color: #d4edda;
  border-left: 5px solid #28a745;
  padding: 1rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: #155724;
  border-radius: 4px;
}

/* ===== ANNOUNCEMENT BODY ===== */
.aBody {
  line-height: 1.5em;
  max-width: 600px;
}

/* ===== TEAM LINKS PAGE ===== */
#teamLinks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  justify-content: center;
  max-width: 1200px;
  margin: 2rem auto;
}

.teamLinkBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.2rem .2rem;
  height: auto;
  min-height: 30px;
  border: 1px solid #ccc;
  background-color: #ddd;
  font-weight: 400;
  border-radius: 4px;
  text-decoration: none;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  line-height: 1.2;
  transition: background-color 0.2s ease;
}

.teamLinkBtn:hover {
  background-color: #eee;
}

.teamLinkActive {
  background-color: rgba(223, 104, 58, .3);
}

/* PAGE UPDATE FORM */
 /* Center wrapper and constrain width */

 #updateForm {
  padding-top: 40px;

 }
  .form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
  }

  form p {
    font-size: 16px;
  }

  form > div,
  form section > div {
    margin-bottom: 1rem;
  }

  label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.25rem;
  }

  input[type="text"],
  input[type="email"],
  input[type="date"],
  input[type="file"],
  textarea,
  select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
    font-family: Lato, sans-serif;
  }

  textarea {
    min-height: 80px;
  }

  /* Radio group styling */
  .radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start; /* ensure left alignment in wrapper */
  }

  .radio-group label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    width: 100%;       /* full width so text wraps correctly */
    cursor: pointer;
  }

  .radio-group input[type="radio"] {
    flex-shrink: 0;    /* keep radio size fixed */
    margin-top: 0.25rem; /* align with first line of text */
  }

  .radio-group label span {
    display: inline;   /* normal wrapping text */
    word-break: break-word; /* wrap long text */
  }

  #section_post_announcement,
  #section_meeting_minutes,
  #section_operations_plan,
  #section_banner {
    display: none;
  }

  /* Add red asterisk to labels for required fields */
  label:has(+ input[required]),
  label:has(+ textarea[required]),
  label:has(+ select[required]) {
    position: relative;
  }

  label:has(+ input[required])::after,
  label:has(+ textarea[required])::after,
  label:has(+ select[required])::after {
    content: " *";
    color: red;
    margin-left: 2px;
    font-weight: bold;
  }

  p span[aria-label="Required"] {
    color: red;
    font-weight: bold;
    margin-left: 2px;
  }

  p.formSmall {
    font-size: .8em;
  }
/* responsive adjustments */
@media (max-width: 768px) {
  #teamLinks {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
  }
}

