/* ==============================================================
   W3.CSS CUSTOM EQUIVALENTS (New Wave Psychology)
   ============================================================== */

/* Core Resets (Crucial for the grid system to work) */
html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}
*,
*:before,
*:after {
  box-sizing: inherit;
}
body {
  margin: 0;
  line-height: 1.7; /* Increased for modern readability */
  color: #334155; /* Soft slate grey instead of harsh black */
  background-color: #f8fafc;
  font-family: "Nunito", Arial, sans-serif;
}

/* Typography & Alignment */
a {
  color: #005c9a; /* Primary logo blue */
  text-decoration: underline; /* Makes links obviously clickable */
  text-underline-offset: 4px; /* Drops the line slightly for a modern look */
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(
    0,
    92,
    154,
    0.4
  ); /* Soft, semi-transparent underline */
  background-color: transparent;
  transition: all 0.2s ease;
}
a:hover {
  color: #003b66; /* Deep logo blue */
  text-decoration-color: #003b66; /* Underline darkens and solidifies on hover */
}
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 10px 0;
  font-family: "Montserrat", Arial, sans-serif;
  font-weight: 700;
  color: #003b66;
  letter-spacing: -0.5px;
}
.w3-large {
  font-size: 1.125rem !important;
}
.w3-xxlarge {
  font-size: 2.25rem !important;
}
.w3-center {
  text-align: center !important;
}
.w3-left-align {
  text-align: left !important;
}
.w3-right {
  float: right !important;
}

/* Layout & Containers */
.w3-top {
  position: fixed;
  width: 100%;
  z-index: 999;
  top: 0;
  left: 0;
}
.w3-content {
  max-width: 1000px;
  margin: auto;
}
.w3-container {
  padding: 0.01em 16px;
}

/* Clearfix for Grids & Navbars */
.w3-row:after,
.w3-row-padding:after,
.w3-bar:after,
.w3-content:after,
.w3-container:after {
  content: "";
  display: table;
  clear: both;
}

/* Responsive Grid System */
.w3-row-padding,
.w3-row-padding > .w3-half,
.w3-row-padding > .w3-third,
.w3-row-padding > .w3-twothird {
  padding-left: 12px;
  padding-right: 12px;
}

.w3-half,
.w3-third,
.w3-twothird {
  float: left;
  width: 100%;
}

@media (min-width: 601px) {
  .w3-half {
    width: 50%;
  }
  .w3-third {
    width: 33.33333%;
  }
  .w3-twothird {
    width: 66.66666%;
  }
}

/* Margins */
.w3-margin-top {
  margin-top: 24px !important;
}
.w3-margin-bottom {
  margin-bottom: 24px !important;
}
.w3-margin-right {
  margin-right: 16px !important;
}
.w3-margin-left {
  margin-left: 16px !important;
}

/* Padding */
.w3-padding-large {
  padding: 12px 24px !important;
}
.w3-padding-24 {
  padding-top: 24px !important;
  padding-bottom: 24px !important;
}
.w3-padding-32 {
  padding-top: 32px !important;
  padding-bottom: 32px !important;
}
.w3-padding-48 {
  padding-top: 48px !important;
  padding-bottom: 48px !important;
}

/* Navigation Bar */
.w3-bar {
  width: 100%;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 59, 102, 0.15) !important;
}
.w3-bar-item {
  padding: 12px 20px;
  float: left;
  width: auto;
  border: none;
  display: block;
  outline: 0;
  text-decoration: none; /* Prevents underlines on navbar items */
  transition:
    color 0.3s ease,
    background-color 0.3s ease,
    opacity 0.3s ease;
}
.w3-bar-block .w3-bar-item {
  width: 100%;
  display: block;
  padding: 12px 20px;
  text-align: left;
  border: none;
  white-space: normal;
  float: none;
  outline: 0;
}

/* Buttons */
.w3-button {
  border: none;
  display: inline-block;
  padding: 8px 16px;
  vertical-align: middle;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background-color: inherit;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
  transition:
    color 0.3s ease,
    background-color 0.3s ease,
    opacity 0.3s ease;
}
.w3-button:hover {
  color: #003b66 !important;
  background-color: #e6f4fa !important;
}

/* Visual Elements */
.w3-image {
  max-width: 100%;
  height: auto;
}
.w3-card {
  box-shadow: 0 8px 24px -6px rgba(0, 59, 102, 0.12) !important;
  border: 1px solid rgba(0, 92, 154, 0.05);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
/* Card Hover Effect (Excludes the navbar to prevent bouncing) */
div.w3-card:not(.w3-bar):hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px -8px rgba(0, 59, 102, 0.2) !important;
}
.w3-round {
  border-radius: 12px !important;
}
.w3-border-bottom {
  border-bottom: 1px solid #e2e8f0 !important;
}

/* Responsive Visibility Toggles */
.w3-hide {
  display: none !important;
}
.w3-show {
  display: block !important;
}

@media (max-width: 600px) {
  .w3-hide-small {
    display: none !important;
  }
}
@media (min-width: 601px) and (max-width: 992px) {
  .w3-hide-medium {
    display: none !important;
  }
}
@media (min-width: 993px) {
  .w3-hide-large {
    display: none !important;
  }
}

/* Animations & Hover States */
.w3-hover-opacity:hover {
  opacity: 0.75;
}
.w3-animate-opacity {
  animation: opac 0.8s;
}
@keyframes opac {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Theme Colors (Mapped to New Wave Logo) */
.w3-theme-d5 {
  color: #ffffff !important;
  background-color: #003b66 !important;
}
.w3-theme-d1 {
  color: #ffffff !important;
  background-color: #005c9a !important;
}
.w3-theme-l2 {
  color: #334155 !important;
  background-color: #e6f4fa !important;
}
.w3-theme-l3 {
  color: #334155 !important;
  background-color: #f5f8fa !important;
}
.w3-theme-l4 {
  color: #334155 !important;
  background-color: #ffffff !important;
}

/* Notice Bar Text Fix (Forces headings inside dark themes to be white & centered) */
.w3-theme-d5 h1,
.w3-theme-d5 h2,
.w3-theme-d5 h3,
.w3-theme-d5 h4,
.w3-theme-d5 h5,
.w3-theme-d5 h6,
.w3-theme-d1 h1,
.w3-theme-d1 h2,
.w3-theme-d1 h3,
.w3-theme-d1 h4,
.w3-theme-d1 h5,
.w3-theme-d1 h6 {
  color: #ffffff !important;
  margin: 0 !important;
  padding-top: 16px;
  padding-bottom: 16px;
}

/* ==============================================================
   ORIGINAL CUSTOM STYLES
   ============================================================== */

/* Navbar Utilities */
.nav-logo {
  max-height: 50px;
  width: auto;
}

.nav-links-container a {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  color: #ffffff;
  text-decoration: none; /* Prevents underlines on desktop links */
}
.nav-links-container a:hover {
  color: #003b66 !important;
}

/* Enhanced Hero Splash Styling (Homepage) */
.bgimg-1 {
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.5)),
    /* Reverted to neutral charcoal overlay */
    var(--hero-bg, url("images/wave_06.jpg"));
  min-height: 80vh;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 100px 20px 50px 20px;
}

/* Subpage Hero Styling */
.bgimg-subpage {
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.5)),
    /* Reverted to neutral charcoal overlay */
    var(--hero-bg, url("images/wave_06.jpg"));
  min-height: 38vh;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 80px 20px 40px 20px;
}

.hero-overlay-content {
  max-width: 850px;
  margin: 0 auto;
}

.hero-logo-container {
  width: 440px;
  margin: 0 auto 24px auto;
}

.hero-logo-container img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-main-title {
  font-weight: 800;
  font-size: 3rem;
  color: #ffffff;
  margin-bottom: 16px;
  line-height: 1.2;
}

.hero-sub-title {
  font-size: 1.35rem;
  font-weight: 400;
  color: #e6f4fa;
  margin-bottom: 40px;
}

/* Unified Hero Buttons Styling */
.hero-cta-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-btn {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 16px 28px;
  border-radius: 50px;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.hero-btn:hover {
  background-color: #ffc425;
  color: #003b66 !important;
  border-color: #ffc425;
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(255, 196, 37, 0.3);
}

/* Extracted Layout & Component Classes */
.section-heading-primary {
  font-weight: 800;
  color: #005c9a;
}

.content-padded {
  padding: 0px 24px 24px;
}

.content-padded-all {
  padding: 24px;
}

.map-container {
  padding: 12px;
}

.map-iframe {
  border: 0;
  width: 100%;
  min-height: 350px;
  border-radius: 12px;
}

.img-about {
  max-height: 300px;
}

.img-team {
  max-height: 200px;
  object-fit: cover;
}

/* Anchor offset for fixed navbar jump links */
.anchor {
  display: block;
  position: relative;
  top: -64px;
  visibility: hidden;
}

/* FAQ Accordion Styling */
.collapsible {
  background-color: #f8fafc;
  color: #003b66;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  cursor: pointer;
  padding: 20px;
  width: 100%;
  border: 1px solid #e2e8f0;
  text-align: left;
  outline: none;
  font-size: 1.1rem;
  margin-top: 12px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.collapsible:after {
  content: "\f067"; /* FontAwesome Plus */
  font-family: "FontAwesome";
  font-size: 1rem;
  float: right;
  color: #005c9a;
}

.active:after {
  content: "\f068"; /* FontAwesome Minus */
}

.active,
.collapsible:hover {
  background-color: #e6f4fa;
  border-color: #90d3e8;
}

.content {
  padding: 0 20px;
  background-color: transparent;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-out;
}

.content p {
  padding-top: 20px;
  padding-bottom: 20px;
  margin: 0;
}

/* Responsive Mobile Adjustments */
@media only screen and (max-width: 768px) {
  .bgimg-1 {
    background-attachment: scroll;
    min-height: 100dvh; /* Forces the hero to perfectly fit the mobile screen height */
    padding-top: 80px; /* Reduced from 120px to pull content up */
    padding-bottom: 20px;
    box-sizing: border-box; /* Ensures padding is calculated inside the 100dvh */
  }

  .bgimg-subpage {
    background-attachment: scroll;
    min-height: 30vh;
    padding-top: 90px;
    padding-bottom: 30px;
  }

  .hero-logo-container {
    width: 180px; /* Shrunk slightly to save vertical space */
    margin-bottom: 12px;
  }

  .hero-main-title {
    font-size: 1.75rem; /* Shrunk slightly */
    margin-bottom: 8px;
    line-height: 1.15;
  }

  .hero-sub-title {
    font-size: 1rem;
    margin-bottom: 20px; /* Tightened gap above buttons */
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
    max-width: 100%;
    margin: 0 auto;
    gap: 10px; /* Tightened the gap between the stacked buttons */
  }

  .hero-btn {
    justify-content: center;
    padding: 12px 20px; /* Made the buttons slightly thinner */
    font-size: 0.95rem;
  }

  .w3-padding-48 {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
  }
}
