:root {
  --page-bg: #d8d3c4;
  --site-bg: #f7f3e8;
  --module-bg: #fbf8f1;
  --header-blue: #2f4f77;
  --header-blue-dark: #1f3a59;
  --nav-bg: #d7dde5;
  --nav-hover: #eef2f7;
  --title-blue: #4f6f90;
  --title-blue-dark: #3f5f80;
  --line: #8f98a5;
  --line-dark: #65707c;
  --text: #232a32;
  --link: #173a62;
  --site-cursor-default: url("../assets/cursor.png") 0 0, auto;
  --site-cursor-hover: url("../assets/cursor_hover.png") 0 0, url("../assets/cursor.png") 0 0, pointer;
}

/* ===== Base ===== */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  cursor: var(--site-cursor-default);
}

body {
  background: var(--page-bg);
  background-image:
    linear-gradient(rgba(216, 211, 196, 0.6), rgba(216, 211, 196, 0.6)),
    url("../assets/Millfield_background.png");
  background-size: auto, cover;
  background-position: center, center;
  background-attachment: scroll, fixed;
  color: var(--text);
  font-family: Verdana, Arial, Tahoma, sans-serif;
  font-size: 12px;
  line-height: 1.4;
}

body * {
  cursor: var(--site-cursor-default);
}

a,
button,
summary,
select,
label[for],
input[type="button"],
input[type="submit"],
input[type="reset"],
input[type="checkbox"],
input[type="radio"],
[role="button"] {
  cursor: var(--site-cursor-hover);
}

input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]),
textarea {
  cursor: text;
}

a {
  color: var(--link);
  text-decoration: underline;
}

a:hover,
a:focus-visible {
  color: #0f2946;
}

.site-shell {
  width: 860px;
  margin: 10px auto 18px;
  border: 1px solid #5f6976;
  background: var(--site-bg);
  box-shadow: 0 0 0 1px #ccd4dd inset;
  zoom: 1.5;
}

.calendar-page .site-shell {
  zoom: 1.15;
}

/* ===== Header ===== */
.site-header {
  border-bottom: 2px solid #566273;
  background: #d8e0e9;
}

.brand-row {
  padding: 9px 11px 10px;
  background: linear-gradient(#36577f, #243f61);
  border-bottom: 1px solid #173654;
  box-shadow: inset 0 1px 0 rgba(242, 248, 255, 0.2);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #f0f5fb;
  text-decoration: none;
}

.brand-link:hover,
.brand-link:focus-visible {
  color: #ffffff;
}

.county-seal {
  width: 66px;
  height: 66px;
  border: 2px solid #d6e0ea;
  border-radius: 50%;
  object-fit: cover;
  background: #dde6f0;
}

.brand-copy h1 {
  margin: 0;
  color: #f6faff;
  font-family: Arial, Tahoma, Verdana, sans-serif;
  font-size: 27px;
  line-height: 1.1;
  letter-spacing: 0;
  text-shadow: 1px 1px 0 rgba(18, 38, 59, 0.55);
}

.brand-copy p {
  margin: 3px 0 0;
  color: #d6e0ec;
  font-size: 11px;
  letter-spacing: 0.2px;
}

.site-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  background: linear-gradient(#dce3ec, #c8d1dc);
  border-top: 1px solid #fbfdff;
  border-bottom: 1px solid #909dad;
}

.site-nav a {
  display: block;
  padding: 7px 11px 6px;
  color: #1f3651;
  border-right: 1px solid #9faaba;
  text-decoration: underline;
  font-size: 12px;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: var(--nav-hover);
  color: #172c45;
}

.site-nav a.active {
  background: #ffffff;
  color: #0f2946;
  font-weight: 700;
}

/* ===== Main Layout ===== */
.page-main {
  margin: 9px 10px 11px;
  display: grid;
  gap: 9px;
}

.panel {
  border: 1px solid #8d97a3;
  background: var(--module-bg);
  padding: 8px 9px 10px;
}

.panel h2 {
  margin: -8px -9px 8px;
  padding: 5px 8px;
  border-bottom: 1px solid #304e6c;
  background: linear-gradient(var(--title-blue), var(--title-blue-dark));
  color: #ffffff;
  font-family: Verdana, Arial, Tahoma, sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.section-intro {
  margin: 0 0 8px;
  color: #3a4552;
}

.welcome-panel p {
  max-width: none;
  margin: 0 0 7px;
  line-height: 1.42;
}

.quick-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.quick-links a,
.back-link {
  display: inline-block;
  padding: 3px 8px;
  color: #143456;
  text-decoration: underline;
  border: 1px solid #7a8694;
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  border-right-color: #6d7683;
  border-bottom-color: #6d7683;
  background: #e7ebf0;
  font-size: 11px;
}

.quick-links a:hover,
.quick-links a:focus-visible,
.back-link:hover,
.back-link:focus-visible {
  background: #f4f7fa;
}

/* ===== Homepage Rotator ===== */
.carousel {
  position: relative;
  padding: 0 30px;
}

.carousel-viewport {
  overflow: hidden;
  border: 1px solid #9aa4b1;
  background: #ffffff;
}

.carousel-track {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  transition: transform 380ms ease;
}

.news-slide {
  min-width: 100%;
  position: relative;
  opacity: 0.72;
  transition: opacity 180ms ease;
}

.news-slide.is-active {
  opacity: 1;
}

.news-slide img {
  display: block;
  width: 100%;
  height: 230px;
  object-fit: cover;
}


.slide-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 10px 10px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.62) 38%,
    rgba(0, 0, 0, 0.24) 68%,
    rgba(0, 0, 0, 0) 100%
  );
}

.slide-text h3 {
  margin: 0 0 4px;
  font-size: 13px;
  font-family: Verdana, Arial, Tahoma, sans-serif;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.slide-text h3 a {
  color: #ffffff;
}

.slide-text p {
  margin: 0;
  color: #f1f4f8;
  font-size: 12px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.carousel-control {
  position: absolute;
  top: 44%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: 1px solid #7d8693;
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  border-right-color: #626a76;
  border-bottom-color: #626a76;
  border-radius: 0;
  background: #d8dde4;
  color: #1f3854;
  cursor: var(--site-cursor-hover);
  font-size: 13px;
  line-height: 1;
}

.carousel-control:hover,
.carousel-control:focus-visible {
  background: #eef2f6;
}

.carousel-prev {
  left: 0;
}

.carousel-next {
  right: 0;
}

.carousel-dots {
  margin-top: 6px;
  display: flex;
  justify-content: center;
  gap: 4px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border: 1px solid #7d8794;
  border-radius: 0;
  background: #d5dce5;
  cursor: var(--site-cursor-hover);
}

.carousel-dot:hover,
.carousel-dot:focus-visible {
  background: #e8edf4;
}

.carousel-dot.is-active {
  background: #5b6f84;
}

/* ===== List / Directory Pages ===== */
.department-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.department-card,
.news-card,
.staff-card,
.contact-card {
  border: 1px solid #a3adba;
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  background: #ffffff;
  padding: 7px 8px;
}

.department-card h3,
.news-card h3,
.staff-card h3,
.contact-card h3 {
  margin: 0 0 3px;
  color: #1f3d5e;
  font-size: 13px;
  font-family: Verdana, Arial, Tahoma, sans-serif;
}

.department-card p,
.news-card p,
.staff-card p,
.contact-card p {
  margin: 0 0 4px;
}

.meta-line,
.news-date,
.staff-title,
.article-meta {
  color: #566474;
  font-size: 11px;
}

.news-list {
  display: grid;
  gap: 6px;
}

.staff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 198px));
  justify-content: center;
  gap: 20px;
}

.staff-grid .staff-card {
  padding: 0;
}

.staff-card-link {
  display: block;
  padding: 4px 5px;
  color: inherit;
  text-decoration: none;
}

.staff-card-link:hover,
.staff-card-link:focus-visible {
  background: #f4f7fb;
}

.staff-headshot {
  display: block;
  width: 170px;
  max-width: 100%;
  height: 220px;
  margin-bottom: 6px;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid #98a5b4;
  background: #dbe2eb;
  object-fit: cover;
}

.staff-grid .staff-headshot {
  width: 100%;
  max-width: none;
  height: 248px;
  margin: 0 0 5px;
}

.staff-card-link h3 {
  text-decoration: underline;
}

.profile-panel {
  max-width: 740px;
  margin: 0 auto;
}

.profile-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 9px;
}

.staff-headshot-large {
  width: 178px;
  height: 214px;
  margin: 0;
  flex: 0 0 auto;
}

.profile-meta p {
  margin: 0 0 5px;
}

.profile-meta .staff-title {
  margin-bottom: 7px;
  font-size: 12px;
}

.profile-bio {
  margin: 0 0 9px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

/* ===== Article Pages ===== */
.article-panel {
  max-width: 740px;
  margin: 0 auto;
}

.featured-media {
  margin: 0 0 9px;
  padding: 3px;
  border: 1px solid #8f98a5;
  background: #ffffff;
}

.featured-media img {
  display: block;
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.article-panel p {
  margin: 0 0 9px;
}

.article-quote {
  margin: 0 0 9px;
  padding: 0;
  border: none;
  background: transparent;
}

.article-quote p {
  margin: 0;
  color: #1e3652;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
}

.article-quote cite {
  display: block;
  margin-top: 5px;
  color: #425367;
  font-size: 11px;
  font-style: normal;
}

.article-followup {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.article-followup p {
  margin-bottom: 7px;
}

.article-link-wrap {
  margin: 0;
}

.back-link-wrap {
  margin-top: 10px;
}

/* ===== Calendar Page ===== */
.calendar-year-note {
  margin: 0 0 10px;
  color: #425165;
  font-size: 11px;
  line-height: 1.45;
}

.calendar-layout {
  display: block;
}

.calendar-frame {
  border: 1px solid #8f9aa8;
  background: #fdfbf6;
  padding: 7px;
}

.calendar-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}

.calendar-range-title {
  margin: 0;
  color: #1d3757;
  font-size: 13px;
  font-family: Verdana, Arial, Tahoma, sans-serif;
  text-align: center;
}

.calendar-nav-btn {
  min-width: 96px;
  padding: 3px 7px;
  border: 1px solid #7a8694;
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  border-right-color: #6d7683;
  border-bottom-color: #6d7683;
  background: #e4eaf2;
  color: #183554;
  font: 700 11px Verdana, Arial, Tahoma, sans-serif;
  cursor: var(--site-cursor-hover);
}

.calendar-nav-btn:hover,
.calendar-nav-btn:focus-visible {
  background: #f1f5fb;
}

.calendar-nav-btn[disabled] {
  color: #7b8796;
  background: #d5dbe3;
  cursor: var(--site-cursor-default);
}

.calendar-week-board {
  overflow: hidden;
  border: 1px solid #95a1af;
  background: #eef4fb;
}

.calendar-week-shell {
  min-width: 0;
}

.calendar-week-header {
  display: grid;
  grid-template-columns: 58px repeat(7, minmax(0, 1fr));
  border-bottom: 1px solid #95a1af;
}

.calendar-week-corner {
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #9ba8b6;
  background: linear-gradient(#d6dde6, #c6cfda);
  color: #334a66;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.calendar-week-day-heading {
  min-width: 0;
  padding: 4px 4px 5px;
  border-right: 1px solid #9ba8b6;
  background: linear-gradient(#dde5ee, #ced7e2);
  color: #203c5b;
  text-align: center;
}

.calendar-week-day-heading:last-child {
  border-right: 0;
}

.calendar-week-day-heading.is-outside-year {
  color: #738095;
  background: linear-gradient(#e7ebf0, #d8dfe7);
}

.calendar-week-day-name,
.calendar-week-day-date,
.calendar-week-day-count {
  display: block;
}

.calendar-week-day-name {
  font-size: 11px;
  font-weight: 700;
}

.calendar-week-day-date {
  margin-top: 1px;
  font-size: 10px;
}

.calendar-week-day-count {
  margin-top: 2px;
  color: #5a697c;
  font-size: 9px;
}

.calendar-week-body {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
}

.calendar-time-rail {
  border-right: 1px solid #9ba8b6;
  background: #eef2f6;
}

.calendar-time-rail-all-day {
  height: 76px;
  padding: 4px 3px;
  border-bottom: 1px solid #c7d1dc;
  color: #42556b;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.calendar-time-scale {
  position: relative;
  min-height: 640px;
  background: linear-gradient(#f4f7fa, #edf2f7);
}

.calendar-time-label {
  position: absolute;
  right: 5px;
  color: #5f7185;
  font-size: 9px;
  transform: translateY(-50%);
}

.calendar-time-label.is-start {
  top: 4px !important;
  transform: none;
}

.calendar-week-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-week-day {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #c8d2de;
  background: #ffffff;
}

.calendar-week-day:last-child {
  border-right: 0;
}

.calendar-week-day.has-events {
  background: linear-gradient(#ffffff, #f8fbff);
}

.calendar-week-day.is-outside-year {
  background: #edf1f5;
}

.calendar-week-all-day {
  height: 76px;
  padding: 4px;
  border-bottom: 1px solid #cfd8e2;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}

.calendar-week-lane {
  position: relative;
  min-height: 640px;
  background-color: #fbfdff;
  background-image: linear-gradient(
    to bottom,
    rgba(129, 148, 173, 0.18) 0,
    rgba(129, 148, 173, 0.18) 1px,
    transparent 1px,
    transparent 100%
  );
  background-size: 100% calc(100% / 13);
  background-repeat: repeat-y;
}

.calendar-all-day-pill,
.calendar-week-event {
  --event-bg: #e3edf9;
  --event-border: #7390b0;
  --event-ink: #1d3d60;
}

.calendar-all-day-pill,
.calendar-week-event {
  position: relative;
  border: 1px solid var(--event-border);
  background: var(--event-bg);
  color: var(--event-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  overflow: hidden;
}

.calendar-all-day-pill {
  max-width: 100%;
  padding: 2px 7px;
  border-radius: 999px;
  font: 700 10px/1.2 Verdana, Arial, Tahoma, sans-serif;
}

.calendar-week-event {
  position: absolute;
  min-height: 26px;
  padding: 4px 5px;
  border-radius: 3px;
  text-align: left;
  font: 700 10px/1.2 Verdana, Arial, Tahoma, sans-serif;
}

.calendar-all-day-pill:hover,
.calendar-all-day-pill:focus-visible,
.calendar-week-event:hover,
.calendar-week-event:focus-visible {
  filter: brightness(1.04);
  z-index: 3;
}

.calendar-event-title {
  display: block;
  width: 100%;
}

.calendar-all-day-pill .calendar-event-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.calendar-week-event .calendar-event-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.calendar-event-inline-time {
  display: block;
  margin-top: 2px;
  color: rgba(29, 61, 96, 0.88);
  font-size: 9px;
  font-weight: 400;
}

.calendar-all-day-pill[data-category="county-event"],
.calendar-week-event[data-category="county-event"] {
  --event-bg: #e2edf9;
  --event-border: #6f90b7;
  --event-ink: #1d3d62;
}

.calendar-all-day-pill[data-category="school-event"],
.calendar-week-event[data-category="school-event"] {
  --event-bg: #e6f2dc;
  --event-border: #7fa15f;
  --event-ink: #34511b;
}

.calendar-all-day-pill[data-category="community-event"],
.calendar-week-event[data-category="community-event"] {
  --event-bg: #f8e8d8;
  --event-border: #c48a5e;
  --event-ink: #6a3d1a;
}

.calendar-all-day-pill[data-category="staff-birthday"],
.calendar-week-event[data-category="staff-birthday"] {
  --event-bg: #f7e1eb;
  --event-border: #b77a95;
  --event-ink: #6a3750;
}

.calendar-all-day-pill[data-category="office-closure"],
.calendar-week-event[data-category="office-closure"] {
  --event-bg: #eceff3;
  --event-border: #8b949f;
  --event-ink: #3f4a56;
}

.calendar-all-day-pill[data-category="public-program"],
.calendar-week-event[data-category="public-program"] {
  --event-bg: #ebe3f8;
  --event-border: #8a76b7;
  --event-ink: #4b3f6a;
}

.calendar-hover-popup {
  position: fixed;
  z-index: 1200;
  width: 250px;
  padding: 6px 7px;
  border: 1px solid #6f7f93;
  border-top-color: #dce5ef;
  border-left-color: #dce5ef;
  border-right-color: #596777;
  border-bottom-color: #596777;
  background: #f7fafd;
  box-shadow: 1px 1px 0 rgba(43, 61, 81, 0.25);
  color: #24374d;
  font: 11px/1.35 Verdana, Arial, Tahoma, sans-serif;
  pointer-events: none;
  display: none;
}

.calendar-hover-popup.is-visible {
  display: block;
}

.calendar-hover-title {
  margin: 0 0 4px;
  color: #1c3757;
  font-size: 12px;
  font-weight: 700;
}

.calendar-hover-meta {
  margin: 0 0 3px;
  color: #4b5d72;
  font-size: 10px;
}

.calendar-hover-detail {
  margin: 4px 0 0;
}
/* ===== Footer ===== */
.site-footer {
  margin: 10px;
  margin-top: 0;
  padding: 8px 10px 9px;
  border: 1px solid #1f344b;
  border-top-color: #3a577b;
  background: linear-gradient(#2f4b6b, #243e5a);
  color: #e4edf7;
  font-size: 11px;
}

.footer-title {
  margin: 0 0 6px;
  font-weight: 700;
  font-size: 12px;
}

.site-footer p {
  margin: 0 0 4px;
}

.footer-links {
  margin: 5px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #d7e4f2;
  text-decoration: underline;
}

.footer-era-meta {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px dashed #7e90a4;
  color: #c5d3e4;
  font-size: 10px;
  line-height: 1.45;
  text-align: left;
}

.footer-era-meta a {
  color: #d7e4f2;
  text-decoration: underline;
}

/* ===== Responsive ===== */
@media (max-width: 920px) {
  .site-shell {
    width: 96%;
    min-width: 0;
  }

  .department-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-slide img {
    height: 200px;
  }

  .calendar-week-shell {
    min-width: 0;
  }
}

@media (max-width: 700px) {
  .site-nav a {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #c0c9d4;
  }

  .carousel {
    padding: 0;
  }

  .carousel-control {
    top: auto;
    bottom: -28px;
    transform: none;
  }

  .carousel-prev {
    left: calc(50% - 44px);
  }

  .carousel-next {
    right: calc(50% - 44px);
  }

  .carousel-dots {
    margin-top: 18px;
  }

  .staff-grid,
  .contact-grid,
  .department-grid {
    grid-template-columns: 1fr;
  }

  .profile-top {
    flex-direction: column;
  }

  .staff-headshot-large {
    width: 100%;
    height: 215px;
  }

  .featured-media img {
    height: 210px;
  }

  .calendar-nav-btn {
    min-width: 84px;
    padding-left: 5px;
    padding-right: 5px;
  }

  .calendar-controls {
    flex-wrap: wrap;
    justify-content: center;
  }

  .calendar-range-title {
    order: -1;
    width: 100%;
  }

  .calendar-week-shell {
    min-width: 0;
  }

  .calendar-time-scale,
  .calendar-week-lane {
    min-height: 540px;
  }

  .calendar-week-all-day,
  .calendar-time-rail-all-day {
    height: 64px;
  }

  .calendar-week-day-count {
    display: none;
  }

}

