/*
 * Bridgewater Housing Stabilization Services Website
 *
 * This stylesheet provides the visual appearance and layout of the
 * Bridgewater HSS website.  The colour palette is inspired by the
 * generated hero illustration and uses calming shades of blue, teal
 * and beige to convey stability and support.  The design is
 * responsive – navigation collapses into a hamburger menu on
 * narrow screens and content stacks gracefully on mobile devices.
 */

/*
 * Updated colour palette to match the Bridgewater logo.  We define
 * CSS variables for primary and secondary colours, text and
 * backgrounds to ensure consistency across the site.  The primary
 * colour is a rich navy taken from the darker figure in the logo,
 * while the secondary colour is a soft sky blue sampled from the
 * lighter figure.  These variables are reused throughout the
 * stylesheet for backgrounds, text, buttons and highlights.
 */

/* CSS Reset */

/* Define colour variables for the site */
:root {
  --primary-color: #35408b; /* deep navy from logo */
  --secondary-color: #9bc3d8; /* light blue accent */
  --text-color: #231f20; /* near‑black text */
  --background-light: #f5faff; /* very light blue for page backgrounds */
  --button-hover: #28356e; /* darker shade for hover states */
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  /* Swap the system font for a modern, geometric sans serif.  Poppins has
   * excellent legibility at headings and body sizes and conveys a more
   * contemporary, premium feel.  The font is imported in each HTML file.
   */
  font-family: "Poppins", Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-light);
}

/* Shared utility classes */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* Navigation */
header {
  background-color: var(--primary-color);
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 999;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

.navbar .logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: bold;
}

.navbar .logo img {
  height: 40px;
  margin-right: 0.5rem;
}

.navbar nav {
  flex: 1;
  text-align: right;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
}

.nav-links li {
  margin-left: 1rem;
}

.nav-links li a {
  color: #ffffff;
  font-weight: 500;
  transition: color 0.2s ease-in-out;
}

.nav-links li a:hover {
  color: var(--secondary-color); /* soft blue highlight */
}

/* Hamburger Menu */
.hamburger {
  display: none;
  cursor: pointer;
  flex-direction: column;
  width: 24px;
  height: 18px;
  justify-content: space-between;
}

.hamburger span {
  background: #ffffff;
  height: 3px;
  width: 100%;
  border-radius: 3px;
}

/* Hero section */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  /* Use an abstract illustration as the hero background.  The image was generated to evoke housing, community and support with soft blues and geometric shapes. */
  background: url('../images/abstract_hero.png') center/cover no-repeat;
  color: #ffffff;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* apply a semi‑transparent overlay using the primary colour for better contrast */
  background: rgba(53, 64, 139, 0.55);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 700px;
  padding: 2rem;
}

.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  /* lighten the hero subtitle with the secondary colour */
  color: var(--secondary-color);
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary-color);
  color: #ffffff;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  transition: background-color 0.2s ease-in-out;
}

/* Secondary button styling for calls to action that use the accent colour */
.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--text-color);
}

.btn-secondary:hover {
  background-color: #7eaac7;
}

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

/* Sections */
section {
  padding: 4rem 0;
  background-color: var(--background-light);
}

section:nth-of-type(even) {
  background-color: #ffffff;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

.two-column {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.two-column > div {
  flex: 1 1 300px;
}

/* Card grid for services */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.card {
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
}

.card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
  color: var(--primary-color);
}

.card p {
  font-size: 0.95rem;
  color: #333333;
}

/* Icon styling used throughout the premium redesign */
.service-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

/* Two-column split for sections like "Who We Are" and "How We Help" */
.split-section {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
}

.split-section .text-content,
.split-section .image-content {
  flex: 1 1 300px;
}

/* Center icons or other content in the image column of split sections */
.split-section .image-content {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Increase the size of stand‑alone icons used as illustrations */
.split-section .image-content i {
  font-size: 4rem;
  color: var(--primary-color);
}

.split-section .text-content h3 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.split-section .text-content p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* How we help and eligibility lists */
.items-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.items-list .item {
  flex: 1 1 280px;
  display: flex;
  align-items: flex-start;
}

.items-list .item i {
  font-size: 1.5rem;
  color: var(--secondary-color);
  margin-right: 0.75rem;
  margin-top: 0.25rem;
}

.items-list .item p {
  font-size: 1rem;
  line-height: 1.6;
}

/* Call to action banner */
.cta {
  background-color: var(--primary-color);
  color: #ffffff;
  text-align: center;
  padding: 3rem 1rem;
  border-radius: 8px;
  margin-top: 3rem;
}

.cta h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.cta p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.cta .btn {
  background-color: #ffffff;
  color: var(--primary-color);
}

.cta .btn:hover {
  background-color: var(--secondary-color);
  color: var(--text-color);
}

/* Locations section styling */
.locations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.location-item {
  flex: 1 1 200px;
  text-align: center;
  padding: 1rem;
}

.location-item i {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.location-item h4 {
  font-size: 1.2rem;
  color: var(--primary-color);
}

/* Values section styling */
.values {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
}

.value-item {
  flex: 1 1 220px;
  background: #ffffff;
  border-radius: 6px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.value-item i {
  font-size: 2.5rem;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

.value-item h4 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.value-item p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #333333;
}

/* Page hero used on secondary pages */
.page-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  /* Use a simple gradient background for secondary pages to maintain design consistency */
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  position: relative;
  color: #ffffff;
  text-align: center;
}

.page-hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(53, 64, 139, 0.55);
}

.page-hero h1 {
  position: relative;
  z-index: 1;
  font-size: 2.5rem;
  margin: 0;
}

/* Center text utility */
.center-text {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.6;
  color: #333333;
}

/* Table styling */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

th, td {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 1px solid #ccc;
}

th {
  background-color: var(--primary-color);
  color: #ffffff;
}

/* Form */
form {
  max-width: 600px;
  margin: 0 auto;
  background: #ffffff;
  padding: 2rem;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

form .form-group {
  margin-bottom: 1rem;
}

form label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 600;
}

form input,
form select,
form textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}

form textarea {
  min-height: 120px;
}

.submit-btn {
  background-color: var(--primary-color);
  color: #ffffff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.submit-btn:hover {
  background-color: var(--button-hover);
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 2rem 0;
  text-align: center;
}

footer p {
  margin-bottom: 0.5rem;
}

footer .social {
  margin-top: 0.5rem;
}

footer .social a {
  color: var(--secondary-color);
  margin: 0 0.5rem;
  font-size: 1.2rem;
  transition: color 0.2s ease;
}

footer .social a:hover {
  color: #ffffff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 60px;
    right: 0;
    background-color: var(--primary-color);
    flex-direction: column;
    width: 200px;
    padding: 1rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links li {
    margin: 0.5rem 0;
  }

  .hamburger {
    display: flex;
  }
}
