*,
::after,
::before {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  list-style-type: none;
  text-decoration: none;
}

:root {
  --color-dodger: #1e90ff;
  --color-dodger-deep: #187bcd;
  --color-darkblue: #00008b;
  --color-navy: #0d1b3a;
  --color-navy-soft: #152a52;
  --color-surface: #fafafa;
  --color-surface-alt: #ffffff;
  --color-text: #1a2744;
  --color-text-muted: #4a5d7a;
  --color-border: rgba(30, 144, 255, 0.22);
  --shadow-sm: 0 1px 3px rgba(13, 27, 58, 0.08);
  --shadow-md: 0 8px 24px rgba(13, 27, 58, 0.1);
  --highlight: rgba(21, 42, 82, 0.25);
  --overlay: rgba(13, 27, 58, 0.6);

  --header-height: 3rem;
  --sidebar-width: 16.5rem;
  --sidebar-minimized-width: 5rem;
  --max-site-width: 1440px;
  --max-main-content-container-width: calc(var(--max-site-width) - var(--sidebar-width));

  --radius-sm: 5px;
  --radius-md: 10px;

  --font-sans: "Source Sans 3", system-ui, -apple-system, sans-serif;
  --font-serif: "Source Serif 4", Georgia, serif;

  --title-lg: 1.75rem;
  --title-md: 1.5rem;
  --title-sm: 1.2rem;

  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

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

input,
button,
textarea {
  font: inherit;
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--color-text);
  background: linear-gradient(180deg, #e8f2fc 0%, #d2e6f9 32%);
}

/* Reusable CSS Classes */
.container {
  max-width: var(--max-main-content-container-width);
  margin: 1rem auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;

  padding: 3rem 2rem;
  border-radius: var(--radius-md);
}

.section-title-lg {
  font-family: var(--font-serif);
  color: var(--color-navy);
  font-size: var(--title-lg);
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-title-lg::after {
  content: "";
  display: block;
  width: 50px;
  height: 2px;
  background: var(--color-dodger);
  margin-top: 0.5rem;
}

.section-title-md {
  font-size: var(--title-md);
}

.section-title-sm {
  font-size: var(--title-sm);
  color: var(--color-dodger);
}

.site-wrapper {
  width: 100%;
  max-width: var(--max-site-width);
  margin: 0 auto;

  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: var(--header-height) auto 1fr auto;
  grid-template-areas:
    "sidebar header"
    "sidebar hero"
    "sidebar content"
    "sidebar footer";
}

.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--overlay);
  z-index: 9;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-overlay.active {
  display: block;
  opacity: 1;
}

.header {
  grid-area: header;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);

  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobileMenu-toggle {
  border: none;
  font-size: 1.5rem;
  background: none;
  color: var(--color-text);
  cursor: pointer;

  display: none;
  transition: all 0.3s ease;
  transition-behavior: allow-discrete;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-right .mobile-title {
  font-size: 1rem;
  text-transform: uppercase;
  color: var(--color-darkblue);
  display: none;
}

.header-right i {
  color: var(--color-darkblue);
}

.header-right .quick-contact {
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* The Hero */
.hero {
  grid-area: hero;
  position: relative;
  min-height: 100vh;
  background: var(--color-navy);
  overflow: hidden;
}

.hero-slides {
  position: absolute;
  inset: 0;
  object-fit: cover;
}

.hero-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.5s ease-in-out;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: 1;
  z-index: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem 1.25rem 2.75rem;
  background: linear-gradient(transparent, rgba(13, 27, 58, 0.88));
  color: #e8f4ff;
  font-size: 0.95rem;
  z-index: 2;
}

.hero-caption strong {
  color: #fff;
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}

.hero-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 3;
}

.hero-dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.65);
  background: transparent;
  transition: background 1s ease;
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--color-dodger);
  border-color: var(--color-dodger);
  transform: scale(1.1);
}

/* The Sidebar */
.sidebar {
  min-height: 100vh;
  grid-area: sidebar;
  width: var(--sidebar-width);
  position: fixed;
  top: 0;

  background: linear-gradient(180deg,
      var(--color-dodger-deep),
      var(--color-dodger));
  color: white;
  z-index: 99;
}

.date {
  margin-top: auto;
  padding: 0 1rem;
  font-size: 0.75rem;
}

.logo {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.25rem 1rem;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo img {
  width: 50px;
  border: 1px solid var(--color-dodger-deep);
  border-radius: 3px;
}

.logo h1 {
  font-size: 1.25rem;
}

.sidebar-nav {
  padding: 1rem 1rem 1.5rem;
}

.nav-link {
  color: #fff;
  font-weight: 600;
  font-size: 1.125rem;
  display: flex;
  justify-content: start;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem;
  border-radius: 0.3rem;
  transition: background 0.3s ease;
}

.nav-link.active {
  background: rgba(21, 42, 82, 0.25);
  border-left: 2px solid #00ffff;
}

.nav-disclosure {
  width: 100%;
  border: none;
  background: transparent;
  color: #fff;
  font-weight: 700;
  font-size: 1.125rem;
  font-family: inherit;
  border-radius: 0.3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.nav-group {
  position: relative;
}

.nav-group .active {
  background: rgba(21, 42, 82, 0.25);
  border-left: 2px solid #00ffff;
}

.nav-disclosure>span {
  display: flex;
  justify-content: start;
  align-items: center;
  gap: 0.55rem;
}

.nav-disclosure-icon {
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg);
  transition: transform 0.3s ease;
}

.nav-list--nested {
  padding-left: 1rem;
  background: rgba(21, 42, 82, 0.95);
  padding: 0.5rem;
  border-radius: 0 0 0.3rem 0.3rem;
}

.nav-list--nested .nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: #c5daf0;
  transition: all 0.3s ease;
}

/* default positioning of the nested list */
.nav-group .nav-list--nested {
  display: none;
  background: rgba(21, 42, 82, 0.95);
  position: absolute;
  top: 0;
  left: 100%;
  /* right of the parent*/
  margin-left: 1rem;
  border-radius: 0 0.3rem 0.3rem 0;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}

/* For mobile click event */
.nav-group button[aria-expanded="true"]+.nav-list--nested {
  display: block;
}

/* Bridge the 1rem dead-zone */
.nav-group .nav-list--nested::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1rem;
  width: 1rem;
  background: transparent;
}

@media (hover: hover) {
  .hero-dot:hover {
    background: rgba(255, 255, 255, 0.45);
    outline: none;
  }

  .nav-link:hover {
    background: rgba(21, 42, 82, 0.25);
    color: #f5f5f5;
    outline: none;
  }

  .nav-disclosure:hover {
    background: rgba(21, 42, 82, 0.25);
    color: #fff;
    outline: none;
  }

  .nav-group:hover .nav-list--nested {
    display: block;
  }

  .nav-disclosure:hover .nav-disclosure-icon {
    transform: rotate(135deg);
  }
}

.nav-list--nested .nav-link:hover {
  color: #fff;
  background: rgba(21, 42, 82, 1);
}

/* Main */
.main-content-wrapper {
  grid-area: content;
  background: var(--color-surface-alt);

  width: 100%;
  max-width: var(--max-site-width);
  margin: 0 auto;
  padding: 1rem;
  overflow: hidden;
}

/* fade-in animation */
.main>div:not(div.testimonial-container) {
  opacity: 0;
  transform: translateY(40px) scale(0.9);
  transition:
    opacity 1s ease,
    transform 1s ease;
}

.main>div:not(div.testimonial-container).visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.welcome-container {
  background: var(--color-surface);
}

.welcome-msg p {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.welcome-img {
  max-width: 980px;
  max-height: 300px;
  overflow: hidden;
}

.welcome-img img {
  width: 100%;
  height: auto;
  border-radius: 3px;
  object-fit: cover;
  object-position: center;
}

.statement-container {
  display: grid;
  grid-template-columns: minmax(200px, 250px) 1fr;
  gap: 1.5rem;

  background: var(--color-surface-alt);
}

.statement-img {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto;
}

.statement-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.statement-body {
  padding: 0 2rem;
  max-width: 800px;
}

.statement-body .role {
  font-family: var(--font-serif);
  font-size: var(--title-sm);
  color: var(--color-navy);
}

.statement-body .name {
  margin-bottom: 0.85rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-dodger-deep);
}

.statement-body .quote {
  padding-left: 1rem;
  border-left: 4px solid var(--color-dodger);
}

.quote p {
  font-size: 0.98rem;
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* mission/vision */
.mission-container {
  background: var(--color-dodger-deep);
  padding: 1rem 2rem;
}

.mission-container .section-title {
  font-size: var(--title-md);
}

.mission-container p {
  text-align: justify;
}

.deputy-statement {
  background: var(--color-surface);
  grid-template-columns: 1fr minmax(200px, 250px);
  gap: unset;
}

.deputy-statement .statement-body {
  padding-left: initial;
}

/* About */
.about-container {
  background: var(--color-surface-alt);
}

.column p:not(p:last-of-type) {
  margin-bottom: 1rem;
}

.events-wrapper {
  max-width: var(--max-main-content-container-width);
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  padding: 3rem 2rem;
  border-radius: var(--radius-md);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.card {
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition:
    box-shadow var(--transition),
    border-color var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(30, 144, 255, 0.45);
}

.card-date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-dodger-deep);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-badge {
  background: linear-gradient(135deg,
      var(--color-darkblue),
      var(--color-navy-soft));
  color: #e8f2fc;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;

  display: inline-block;
  align-self: flex-start;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.35rem;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--color-navy);
  margin: 0.35rem 0 0.5rem;
  line-height: 1.25;
}

.card-body {
  margin-bottom: 1rem;
  flex-grow: 1;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.card-link {
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--color-dodger-deep);
}

.card-link:hover {
  text-decoration: underline;
  color: var(--color-darkblue);
}

.cbe-container {
  background: var(--color-surface-alt);
}

.cbe-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cbe-column .column-title {
  font-size: var(--title-sm);
  color: var(--color-navy);
  font-family: var(--font-serif);
}

.cbe-column .card {
  background: var(--color-surface);
  padding: 0.5rem 0.9rem;
  height: 100%;
}

.subjects-list {
  list-style-type: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.subjects-list li {
  background: var(--color-dodger-deep);
  color: #e8f2fc;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

.cbe-column .card p {
  flex-grow: 1;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-style: italic;
  padding: 0.5rem 0;
}

.cbe-column .card a {
  margin-top: auto;
  font-weight: 600;
  font-size: 0.85rem;
}

.cbe-column [aria-hidden="true"] {
  visibility: hidden;
}

.resources-container {
  background: var(--color-surface);
}

.downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.card.download-item {
  padding: 0.5rem;
  transition: transform 0.3s ease-in-out;
}

.card.download-item:hover {
  transform: translate(2px, -2px);
}

.download-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.download-icon {
  font-size: 1.2rem;
  color: var(--color-dodger-deep);
}

.external-links-list {
  list-style-type: none;
  display: flex;
  flex-direction: column;
  font-size: 1.1rem;
}

.external-links-list li {
  border-bottom: 1px solid #dbd6d6;
  padding: 1rem;
  transition: background 0.3s ease;
}

.external-links-list li a {
  display: block;
  width: 100%;
  color: var(--color-text);
}

.external-links-list li:hover {
  background: rgba(13, 27, 58, 0.09);
}

/* Contact */
.contact-container {
  background: rgba(255, 255, 255, 0.2);
  background-image:
    linear-gradient(var(--overlay), var(--overlay)),
    url(../images/background/cont_banner2.webp);
  background-position: center;
  background-size: cover;
  backdrop-filter: blur(10px);
}

.contact-container .section-title-lg {
  color: var(--color-surface);
}

.call-email,
.feedback {
  background: rgba(21, 42, 82, 0.75);
  color: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem;
}

.call-email {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.call-email .contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
}

.call-email a {
  font-weight: 600;
  color: var(--color-dodger);
  font-size: 1.1rem;
}

.bank-mpesa-details {
  padding-top: 1rem;
}

.bank-mpesa-details p {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feedback-form label {
  display: block;
  font-weight: 600;
}

.feedback-form input,
.feedback-form textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  outline: none;
  padding: 0.5rem;
}

.feedback-form textarea {
  resize: none;
}

.btn {
  display: inline-block;
  background: var(--color-dodger);
  color: var(--color-surface);
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--color-dodger-deep);
}

.feedback-form .form-field:valid {
  border-color: green;
}

/* Thankyou Modal */
dialog {
  margin: auto;
  max-width: 500px;
  background: var(--color-surface-alt);
  border: none;
  border-radius: var(--radius-md);
  padding: 1rem;
  line-height: 1.65;

  /* Base hidden state */
  opacity: 0;

  transition-property: translate, opacity, display, overlay;
  transition-duration: 1s;
  transition-behavior: allow-discrete;
}

/* Explicitly handles the exit animation path when closed */
dialog:not([open]) {
  opacity: 0;
  translate: 0 25vh;
  /* Falls down off the page */
}

dialog[open] {
  translate: 0 0;
  /* Centers perfectly */
  opacity: 1;

  @starting-style {
    opacity: 0;
    translate: 0 -25vh;
    /* Slides down from the top */
  }
}

dialog::backdrop {
  background-image: linear-gradient(45deg,
      var(--color-darkblue),
      var(--color-dodger-deep),
      var(--color-dodger),
      var(--color-navy),
      var(--color-navy-soft));
  opacity: 0;

  /* Smoothly fades out the backdrop on close */
  transition-property: opacity, display, overlay;
  transition-duration: 1s;
  transition-behavior: allow-discrete;
}

/* Ensure backdrop starts at 0 opacity when opening */
dialog[open]::backdrop {
  opacity: 0.7;

  @starting-style {
    opacity: 0;
  }
}

.thankyou-msg {
  position: relative;
}

.thankyou-msg i {
  position: absolute;
  right: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: rgb(246, 62, 62);
  cursor: pointer;
}

.thankyou-msg h1 {
  padding-top: 0.5rem;
  color: var(--color-dodger-deep);
  text-align: center;
}

.thankyou-msg p {
  padding: 0.5rem 0;
  color: var(--color-text-muted);
  font-weight: 600;
}

.thankyou-msg ul li {
  color: var(--color-dodger-deep);
  font-weight: 700;
}

/* Our location */
.main .location {
  background: var(--color-surface);
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  border-radius: var(--radius-md);
}

.main .location .section-title-lg {
  color: var(--color-navy);
  align-self: flex-start;
}

.main .location iframe {
  width: 100%;
  max-width: 980px;
  height: 450px;
  border: none;
  border-radius: var(--radius-md);
}

/* Testimonials */
.testimonials {
  background:
    linear-gradient(#0a1628, #152238), url(../images/gallery/agm-3.webp);
  background-size: cover;
  background-position: center;
  /* background-image:; */
  background-blend-mode: color;
  padding: 3rem 1rem;
}

/* Swiper-based testimonials container */
.swiper.testimonial-swiper {
  padding: 3rem 1rem;
}

.testimonial-card {
  position: relative;
  background: linear-gradient(135deg,
      var(--color-navy-soft),
      var(--color-dodger-deep),
      var(--color-dodger));
  padding: 1rem;
  gap: 1rem;
  border: none;
  border-radius: var(--radius-md);
  flex: 1;
  height: 300px;

  scale: 0;
  opacity: 0;
  transform: rotate(-180deg);
  transition:
    scale 1s ease,
    opacity 1s ease,
    transform 1s ease;
}

.testimonial-card.rotate {
  scale: 1;
  opacity: 1;
  transform: rotate(0);
}

.testimonial-profile .name {
  font-size: 1rem;
  text-align: right;
}

.profile-title {
  position: absolute;
  bottom: 0;
  right: 0;
  padding-right: 1rem;
}

.testimonial-body {
  padding: 3rem 0;
}

.testimonial-profile p {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--color-text-muted);
  text-align: right;
}

.testimonial-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;

  position: absolute;
  top: -15%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid var(--color-surface-alt);
}

/* Gallery */
.banner-container {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  width: 100%;
  overflow: hidden;
  padding: 2rem 0;
  display: flex;
}

.banner-track {
  display: flex;
  gap: 10px;
  width: max-content;
  animation: scroll-left 150s linear infinite;
}

.thumbnail {
  width: 140px;
  height: 90px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.thumbnail:hover {
  transform: scale(1.03);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (hover: hover) {
  .banner-container:hover .banner-track {
    animation-play-state: paused;
    cursor: pointer;
  }
}

/* banner animation */
@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(calc(-50% - (10px / 2)));
  }
}

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  touch-action: none;
  z-index: 9999;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-media-wrapper {
  position: relative;
  max-width: 90%;
  max-height: 75%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-content {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.75);
  transform: scale(0.9);
  opacity: 0;
  transition:
    transform 0.3s ease,
    opacity 0.2s ease;
  opacity: 0;
  /* Hidden initially until full render loads */
}

.lightbox.active .lightbox-content.loaded {
  transform: scale(1);
  opacity: 1;
}

.lightbox-caption {
  color: #fff;
  font-size: 1.2rem;
  margin-top: 15px;
  text-align: center;
  max-width: 80%;
  font-weight: 300;
  letter-spacing: 0.25rem;
  transform: translateY(10px);
  opacity: 0;
  transition:
    transform 0.3s ease 0.1s,
    opacity 0.3s ease 0.1s;
}

.lightbox.active .lightbox-caption {
  transform: translateY(0);
  opacity: 1;
}

/* The loading spinner */
.spinner {
  position: absolute;
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.1);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: none;
  z-index: 1000;
}

.lightbox.loading .spinner {
  display: block;
}

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

.lightbox-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 45px;
  height: 45px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 10;
  transition:
    background 0.3s,
    color 0.3s;
}

#next {
  right: 15px;
}

#prev {
  left: 15px;
}

.lightbox-nav-arrow:hover {
  background: rgba(255, 255, 255, 0.9);
  color: black;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 3rem;
  user-select: none;
  cursor: pointer;
}

.back-to-top {
  background: #00ffff;
  border: none;
  padding: 0.5rem 0.25rem;
  border-radius: var(--radius-sm);
  position: fixed;
  bottom: 60px;
  right: 5px;
  cursor: pointer;
  opacity: 0;
  display: none;
  transition:
    opacity 0.3s ease,
    display 0.3s ease allow-discrete;
}

.back-to-top i {
  color: white;
  font-size: 1.3rem;
  font-weight: bold;
}

/* Footer */
.footer {
  grid-area: footer;
  background: var(--color-dodger-deep);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
  text-align: center;
  padding: 1rem;
}

.footer .copywright {
  color: white;
}

.footer .author {
  color: var(--color-text);
}

.author i {
  color: rgb(246, 62, 62);
}

.author a {
  color: white;
  text-decoration: underline;
  cursor: pointer;
  transition: var(--transition);
}

.author a:hover {
  color: var(--color-darkblue);
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
  :root {
    --sidebar-width: var(--sidebar-minimized-width);
  }

  body {
    grid-template-columns: var(--sidebar-minimized-width) 1fr;
  }

  .header-right .quick-contact {
    gap: 0.5rem;
  }

  .logo h1 {
    display: none;
  }

  .sidebar {
    width: var(--sidebar-minimized-width);
  }

  .nav-link,
  .nav-group {
    margin-bottom: 1rem;
  }

  .nav-link-main,
  .nav-group {
    position: relative;
  }

  .nav-link-main .link-text {
    display: none;
    position: absolute;
    top: 50%;
    left: 100%;
    margin-left: 1rem;
    transform: translateY(-50%);
    white-space: nowrap;
    background: rgba(21, 42, 82, 0.95);
    color: #fff;
    padding: 0.35rem 0.8rem;
    border-radius: 0 0.3rem 0.3rem 0;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    z-index: 1000;
  }

  .nav-link-main:hover .link-text {
    display: block;
  }

  .nav-group .group-label {
    display: none;
  }

  .nav-disclosure-icon {
    opacity: 0;
  }

  .welcome-img {
    width: 100%;
    max-height: fit-content;
  }

  .testimonial-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile devices */
@media (max-width: 767px) {
  .site-wrapper {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "hero"
      "content"
      "footer";
  }

  .container {
    grid-template-columns: 1fr;
    padding: 2rem 1rem;
  }

  /* sticky header on page scroll */
  .header {
    position: sticky;
    top: 0;
    z-index: 4;
    padding: 0 0.5rem;
  }

  .header-right .quick-contact {
    display: none;
  }

  .sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    transition: left 0.3s ease;
  }

  .sidebar.open {
    left: 0;
  }

  .mobileMenu-toggle,
  .header-right .mobile-title {
    display: block;
  }

  /* submenu flows normally below the button */
  .nav-group .nav-list--nested {
    position: static;
    top: auto;
    left: auto;
    margin-left: 0;
    width: 100%;
    box-shadow: none;
    border-radius: 0 0 0.3rem 0.3rem;
  }

  .nav-disclosure[aria-expanded="true"] .nav-disclosure-icon {
    transform: rotate(135deg);
  }

  .nav-group .nav-list--nested::before {
    display: none;
  }

  .welcome-msg {
    min-height: fit-content;
  }

  .welcome-img {
    max-width: fit-content;
    max-height: fit-content;
  }

  .statement {
    grid-template-columns: 1fr;
  }

  .statement-body {
    padding: 0;
  }

  .statement-img {
    order: 1;
  }

  .deputy-statement {
    gap: 1.5rem;
  }

  .events-wrapper {
    padding: 2rem 1rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .cbe-column [aria-hidden="true"] {
    display: none;
  }

  #next {
    right: 8px;
  }

  #prev {
    left: 8px;
  }

  .lightbox-caption {
    max-width: 90%;
  }

  .testimonial-container {
    grid-template-columns: 1fr;
  }

  .footer {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 360px) {
  .header-right .mobile-title {
    font-size: 0.85rem;
  }

  .main-content-wrapper {
    padding-inline: 0.25rem;
  }

  .main .location iframe {
    max-width: 300px;
  }

  .container.contact-container {
    padding-inline: 0;
  }

  .call-email,
  .feedback {
    padding-inline: 0.15rem;
  }

  .testimonial-container {
    padding-inline: 0.5rem;
  }
}