/* --- Global Font --- */

:root {
  /* Brand Colors */
  --sasc-darkblue: #002f67;
  --sasc-gold: #d4af37;
  --sasc-lightblue: #f0f6ff;

  /* UI Colors */
  --text-color: #333;
  --border-color: #ddd;
  --nav-bg: #f8f9fa;

  /* --- NEW: Plus Jakarta Sans --- */
  --main-font: "Plus Jakarta Sans", sans-serif;
}

body {
  font-family: var(--main-font); /* This applies it to the whole site! */
  color: var(--text-color);
  line-height: 1.6;
}
html {
  scroll-behavior: smooth;
}

body,
html {
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* Prevents horizontal scrolling */
}

/* --- Base Navbar Styles --- */
.custom-navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--nav-bg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  /* NEW: Smoothly animates the background and shadow changes */
  transition:
    background-color 0.3s ease,
    box-shadow 0.3s ease,
    backdrop-filter 0.3s ease;
}

.custom-navbar.scrolled {
  /* #333 is rgb(51, 51, 51). The 0.9 gives it 90% opacity for the glass effect! */
  background-color: rgba(51, 51, 51, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* --- Make text white when scrolled --- */
.custom-navbar.scrolled .nav-brand {
  color: #ffffff;
}

.custom-navbar.scrolled .nav-list a,
.custom-navbar.scrolled .social-icon {
  color: #e0e0e0; /* Off-white for normal links */
}

.custom-navbar.scrolled .nav-list a:hover,
.custom-navbar.scrolled .social-icon:hover {
  color: #ffffff; /* Bright white on hover */
}

/* --- Make the mobile hamburger menu white when scrolled --- */
.custom-navbar.scrolled .hamburger-icon,
.custom-navbar.scrolled .hamburger-icon::before,
.custom-navbar.scrolled .hamburger-icon::after {
  background-color: #ffffff;
}

/* --- Logo Swap Logic --- */

/* 1. Hide the white logo by default */
.logo-white {
  display: none;
}

/* 2. When scrolled, hide the original logo */
.custom-navbar.scrolled .logo-default {
  display: none;
}

/* 3. When scrolled, reveal the white logo */
.custom-navbar.scrolled .logo-white {
  display: block;
}
.nav-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* --- Logos --- */
.nav-logos {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #000;
  font-size: 1.25rem;
  font-weight: 500;
  gap: 0.5rem;
}

/* --- Menu & Lists --- */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-list,
.nav-social {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-list a {
  text-decoration: none;
  color: #555;
  transition: color 0.3s ease;
}

.nav-list a:hover {
  color: #000;
}

/* --- Social Icons --- */
.social-icon {
  display: inline-flex;
  align-items: center;
  color: #555;
  transition: color 0.3s ease;
}

.social-icon:hover {
  color: #1877f2; /* Facebook Brand Blue */
}

/* --- Dropdown Styles --- */
.nav-dropdown {
  position: relative;
}

.caret {
  font-size: 0.8rem;
  margin-left: 4px;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #fff;
  min-width: 250px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  list-style: none;
  padding: 0.5rem 0;
  margin: 0;
  border-radius: 4px;
  border: 1px solid #e5e5e5;
}

/* Show dropdown on hover (Desktop) */
.nav-dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu li a {
  display: block;
  padding: 0.5rem 1rem;
  color: #333;
}

.dropdown-menu li a:hover {
  background-color: #f8f9fa;
  color: #000;
}

.divider {
  height: 1px;
  background-color: #e5e5e5;
  margin: 0.5rem 0;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: transparent;
  border: none; /* 
  padding: 0.5rem; /* Slightly tweaked padding for a good touch target */
  cursor: pointer;
  outline: none; /* Prevents the blue highlight box when tapped on some mobile browsers */
}
.hamburger-icon {
  display: block;
  width: 1.5em;
  height: 2px;
  background-color: #555;
  position: relative;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: "";
  position: absolute;
  width: 1.5em;
  height: 2px;
  background-color: #555;
  left: 0;
}

.hamburger-icon::before {
  top: -6px;
}
.hamburger-icon::after {
  bottom: -6px;
}

/* Navbar Mobile Breakpoint */
@media (max-width: 991px) {
  .mobile-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    align-items: center; /* Centers the whole menu block */
    text-align: center; /* Centers the text inside */
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--nav-bg);
    padding: 1.5rem 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    gap: 1.5rem;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-list {
    flex-direction: column;
    width: 100%;
    gap: 1.5rem;
    align-items: center; /* Centers the list items */
  }

  .nav-dropdown {
    width: 100%;
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    background-color: transparent;
    padding: 0.5rem 0 0 0; /* Removed left padding, added a little top padding */
    display: none;
    text-align: center; /* Ensures the sub-links (Safeguarding, etc.) are also centered */
  }

  .nav-dropdown:hover .dropdown-menu,
  .nav-dropdown:focus-within .dropdown-menu {
    display: block;
  }

  .nav-social {
    width: 100%;
    justify-content: center; /* Centers the Facebook icon */
    padding-top: 1rem;
    border-top: 1px solid var(--border-color); /* Adds a nice subtle divider above the social icons */
  }

  /* --- NEW: Fix mobile menu text colors when scrolled --- */
  .custom-navbar.scrolled .nav-menu a,
  .custom-navbar.scrolled .nav-social .social-icon {
    color: #555; /* Forces the text back to dark grey */
  }

  .custom-navbar.scrolled .nav-menu a:hover,
  .custom-navbar.scrolled .nav-social .social-icon:hover {
    color: var(--sasc-darkblue); /* Returns the hover color to dark blue */
  }
}

/* ---  Hero Container --- */

.hero-section {
  display: flex;
  flex-direction: column;
  background-color: var(--sasc-darkblue); /* Provides the base blue layer */
  min-height: 90vh;
  position: relative;
}

/* --- Left Column: Text & Assets --- */
.hero-text-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem 2rem;
  background-color: var(--sasc-darkblue);
  z-index: 3; /* Keeps text above everything */
}

.hero-heading {
  color: white;
  font-family: "Roboto", sans-serif;
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 700;
  margin: 0 0 2rem 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

.hero-heading-sml {
  color: white;
  font-family: "Roboto", sans-serif;
  font-size: clamp(1rem, 2vw, 4rem);
  font-weight: 400;
  margin: 0 0 2rem 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

.hero-logo {
  height: 150px;
  width: auto;
  margin-bottom: 2rem;
}

.btn-join {
  background-color: var(--sasc-gold);
  color: var(--sasc-darkblue);
  font-family: "Roboto", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  padding: 0.75rem 3rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    transform 0.2s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.btn-join:hover {
  background-color: #ffd700;
  transform: translateY(-2px);
}

/* --- Right Column: Image --- */
.hero-image-col {
  flex: 1;
  display: flex;
  min-height: 40vh;
  position: relative;
  z-index: 1; /* Sits below the wave and text */
}

.hero-image-col img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* --- Fluid Ribbon Dividing Line --- */
.hero-wave-divider {
  display: none;
}

/* --- Desktop Layout --- */
@media (min-width: 992px) {
  .hero-section {
    flex-direction: row;
    height: 80vh;
  }

  .hero-text-col {
    flex: 0 0 50%; /* Locks text to exactly 50% width */
    max-width: 50%;
    background-color: transparent; /* Lets the section's blue base show through */
  }

  .hero-image-col {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    /* Pushes the image 50px past the center line so it sits UNDER the wave */
    width: calc(50% + 50px);
  }

  .hero-wave-divider {
    display: block;
    position: absolute;
    top: 0;
    /* Places the SVG exactly where the image's straight edge begins */
    left: calc(50% - 50px);
    bottom: 0;
    width: 100px;
    z-index: 2; /* Sits between the image and the text */

    /* This SVG has been upgraded! 
      The left side is solid blue (%23002f67) which seamlessly covers the image's straight edge.
      The right side is transparent, allowing the image to show through perfectly up to the gold line. 
    */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='200' viewBox='0 0 100 200' preserveAspectRatio='none'%3E%3Cpath d='M 0,0 L 50,0 C 90,60 10,140 50,200 L 0,200 Z' fill='%23002f67'/%3E%3Cpath d='M 50,0 C 90,60 10,140 50,200' fill='none' stroke='%23d4af37' stroke-width='6'/%3E%3C/svg%3E");
    background-repeat: repeat-y;
    background-size: 100% auto;
    pointer-events: none;
  }
}

/* --- Layout & Typography --- */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section-padding {
  padding: 2rem 0 4rem 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 400;
  margin-top: 0; /* <--- This kills the invisible browser gap! */
  margin-bottom: 2.5rem;
  color: var(--sasc-darkblue);
}

.text-center {
  text-align: center;
}
.mb-2 {
  margin-bottom: 2rem;
}
.bg-light-blue {
  background-color: var(--sasc-lightblue);
}

.responsive-img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.news-image-wrapper {
  max-height: 600px;
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.news-image-wrapper img {
  object-fit: contain;
}

/* --- CSS Grids --- */
.grid-3-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  text-align: left;
}

.grid-2-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

/* --- Profile Cards --- */
.profile-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.profile-card {
  width: 260px; /* Forces every card to be exactly this wide, no matter what */
  max-width: 100%; /* Ensures they can still shrink to fit tiny mobile screens */
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.profile-card img {
  display: block;
  width: 100%;
  height: 250px;
  object-fit: cover;
  object-position: top center; /* Assuming you went with Option 1! */
  margin: 0;

  /* --- New Shadow Magic --- */
  position: relative;
  z-index: 2; /* Forces the image to sit slightly "above" the text box */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5); /* Creates the soft downward shadow */
}
.profile-card .card-body {
  padding: 1.5rem;
}

.profile-card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
}

.profile-card p {
  margin: 0;
  color: #666;
}

/* --- Info Cards (Contact Section) --- */
.info-card {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* --- Iframes (Calendar & Maps) --- */
.iframe-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
}

.iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-top: 2rem;
}

.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-nav a {
  text-decoration: none;
  color: #666;
}

.footer-nav a:hover {
  color: var(--sasc-darkblue);
}

.copyright {
  margin: 0;
  text-align: center;
}
/* --- Native HTML5 Accordions --- */
.custom-accordion {
  border: 1px solid var(--border-color);
  border-radius: 4px;
  margin-bottom: 0.5rem;
  background: #fff;
}

.custom-accordion summary {
  padding: 1rem;
  font-weight: bold;
  cursor: pointer;
  background-color: #f8f9fa;
  list-style: none; /* Removes default arrow */
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Custom Accordion Arrows */
.custom-accordion summary::after {
  content: "\25BC"; /* Down arrow */
  font-size: 0.8rem;
  color: #666;
}

.custom-accordion[open] summary::after {
  content: "\25B2"; /* Up arrow */
}

.custom-accordion .accordion-body {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
}

/* --- Forms & Tables --- */
.custom-form .form-group {
  margin-bottom: 1rem;
}
.custom-form input,
.custom-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-sizing: border-box;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
}
.custom-table th,
.custom-table td {
  border: 1px solid var(--border-color);
  padding: 0.75rem;
  text-align: left;
}

/* --- Modals --- */
.custom-modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay */
  overflow: auto; /* Enable scrolling if needed */
}

.custom-modal.active {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 3rem;
}

.modal-content {
  background-color: #fefefe;
  margin: auto;
  border-radius: 8px;
  width: 90%;
  max-width: 600px; /* Default width */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  animation: modalFadeIn 0.3s;
}

.modal-content.modal-xl {
  max-width: 1140px; /* Wide modals for policies */
}

.modal-header {
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  border-radius: 8px 8px 0 0;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.close-modal {
  background: none;
  border: none;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  color: #aaa;
}

.close-modal:hover {
  color: #000;
}

.modal-body {
  padding: 1.5rem;
  max-height: 70vh;
  overflow-y: auto;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding-top: 1rem;
}

.btn-primary,
.btn-secondary {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.btn-primary {
  background: var(--sasc-darkblue);
  color: white;
}
.btn-secondary {
  background: #e0e0e0;
  color: #333;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
