:root {
  --soft-navy: #2C3E50;
  --dusty-slate: #6C91A3;
  --powder-blue: #C9E4E7;
  --muted-gold: #EFD9A3;
  --soft-charcoal: #444444;
  --misty-gray: #F6F8F9;
  --white: #FFFFFF;
  --transition: all 0.3s ease;
}

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--misty-gray);
  color: var(--soft-charcoal);
  line-height: 1.6;
  font-size: 16px;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Header Styles */
header {
  background-color: var(--soft-navy);
  color: var(--white);
  padding: 1.25rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0;
}

nav {
  display: flex;
  gap: 2rem;
}

nav a {
  color: var(--white);
  font-weight: 500;
  position: relative;
  padding-bottom: 0.25rem;
  transition: var(--transition);
}

nav a:hover {
  color: var(--muted-gold);
}

nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--muted-gold);
  transition: var(--transition);
}

nav a:hover::after {
  width: 100%;
}

/* Hero Section */
.hero {
  background-color: var(--powder-blue);
  padding: 5rem 5%;
  text-align: center;
  background-image: linear-gradient(135deg, rgba(201, 228, 231, 0.9) 0%, rgba(44, 62, 80, 0.8) 100%);
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 -5px 10px rgba(0, 0, 0, 0.05);
}

.hero h1 {
  color: var(--soft-navy);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin-bottom: 1.5rem;
  font-weight: 700;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.hero p {
  color: var(--soft-charcoal);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  max-width: 800px;
  margin: 0 auto 2rem auto;
  line-height: 1.6;
}

.hero button {
  background-color: var(--muted-gold);
  color: var(--soft-charcoal);
  border: none;
  padding: 0.85rem 2rem;
  font-size: 1.1rem;
  cursor: pointer;
  border-radius: 5px;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hero button:hover {
  background-color: #e5c580;
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* Who Can Apply Section */
.section {
  padding: 4rem 5%;
  background-color: var(--white);
}

.whocanapply {
  text-align: center;
  color: var(--soft-navy);
  font-size: clamp(1.8rem, 4vw, 2.2rem);
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.whocanapply::after {
  content: '';
  position: absolute;
  width: 80px;
  height: 3px;
  background-color: var(--dusty-slate);
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

.container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.items {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background-color: var(--powder-blue);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.items:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.items h3 {
  color: var(--soft-navy);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.items h3::after {
  content: '';
  position: absolute;
  width: 50px;
  height: 2px;
  background-color: var(--muted-gold);
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.items p {
  margin-bottom: 2rem;
  flex-grow: 1;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--soft-charcoal);
}

.items button {
  background-color: var(--muted-gold);
  color: var(--soft-charcoal);
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  cursor: pointer;
  border-radius: 5px;
  font-weight: 600;
  transition: var(--transition);
  width: auto;
  min-width: 140px;
  align-self: center;
  margin-top: auto;
}

.items button:hover {
  background-color: #e5c580;
  transform: scale(1.05);
}

/* Content Pages Styles */
.content {
  background-color: var(--white);
  padding: 3rem 5%;
  max-width: 1400px;
  margin: 0 auto;
}

.content h2 {
  color: var(--soft-navy);
  font-size: clamp(1.6rem, 3vw, 2rem);
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.content h2::after {
  content: '';
  position: absolute;
  width: 60px;
  height: 2px;
  background-color: var(--dusty-slate);
  bottom: 0;
  left: 0;
}

.content h3 {
  color: var(--soft-navy);
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.content h4 {
  color: var(--soft-navy);
  font-size: 1.1rem;
  margin: 1.5rem 0 0.75rem 0;
}

.content p {
  margin-bottom: 1.25rem;
  line-height: 1.6;
  color: var(--soft-charcoal);
}

.content ul {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.content ul li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.content section {
  margin-bottom: 3rem;
}

.content .example {
  background-color: var(--powder-blue);
  padding: 1.5rem;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.content .example p {
  margin-bottom: 0.75rem;
}

.content .example p:last-child {
  margin-bottom: 0;
}

.about, .contact-intro {
  margin-bottom: 3rem;
}

.eligibility {
  margin-bottom: 4rem;
}

.contact-info {
  background-color: var(--powder-blue);
  padding: 2rem;
  border-radius: 10px;
  margin-bottom: 2rem;
}

.contact-info p {
  margin-bottom: 0.5rem;
}

.contact-info a {
  color: var(--soft-navy);
  transition: var(--transition);
}

.contact-info a:hover {
  color: var(--dusty-slate);
  text-decoration: underline;
}

.consultation {
  background-color: var(--powder-blue);
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  margin-top: 4rem;
}

.consultation h2 {
  text-align: center;
}

.consultation h2::after {
  left: 50%;
  transform: translateX(-50%);
}

.consultation button {
  background-color: var(--muted-gold);
  color: var(--soft-charcoal);
  border: none;
  padding: 0.85rem 2rem;
  font-size: 1.1rem;
  cursor: pointer;
  border-radius: 5px;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-top: 1rem;
}

.consultation button:hover {
  background-color: #e5c580;
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.support ul {
  margin-bottom: 1.5rem;
}

.support ul ul {
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.support strong {
  color: var(--soft-navy);
}

/* Footer */
footer {
  background-color: var(--soft-navy);
  color: var(--white);
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 992px) {
  .container {
    gap: 1.5rem;
  }
  
  .items {
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 5%;
  }
  
  nav {
    gap: 1.5rem;
  }
  
  .hero {
    padding: 3rem 5%;
  }
  
  .section {
    padding: 3rem 5%;
  }
}

@media (max-width: 480px) {
  nav {
    gap: 1rem;
    width: 100%;
    justify-content: space-between;
  }
  
  .items {
    min-width: 100%;
  }
  
  .whocanapply {
    font-size: 1.5rem;
  }
  
  .items h3 {
    font-size: 1.3rem;
  }
  
  .content {
    padding: 2rem 5%;
  }
  
  .content h2 {
    font-size: 1.4rem;
  }
  
  .content h3 {
    font-size: 1.2rem;
  }
  
  .consultation {
    padding: 1.5rem;
  }
}

/* Update container layout to support 4-wide, 2-wide, or 1-wide layouts */
.container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.items {
  flex: 1 1 calc(25% - 2rem); /* For 4-wide layout */
  max-width: calc(25% - 2rem); /* Force 4 items per row */
  min-width: 200px; /* Reduced minimum width to allow 4-wide layout on smaller screens */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background-color: var(--powder-blue);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

/* Add example styling for primary victims page */
.direct-victim .example,
.Child-Witnesses .example,
.Aiding-a-Victim .example,
.Crime-Intervention .example,
.content .example {
  background-color: var(--powder-blue);
  padding: 1.5rem;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.direct-victim .example p,
.Child-Witnesses .example p,
.Aiding-a-Victim .example p,
.Crime-Intervention .example p,
.content .example p {
  margin-bottom: 0.75rem;
}

.direct-victim .example p:last-child,
.Child-Witnesses .example p:last-child,
.Aiding-a-Victim .example p:last-child,
.Crime-Intervention .example p:last-child,
.content .example p:last-child {
  margin-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 1199px) {
  .items {
    flex: 1 1 calc(50% - 2rem); /* For 2-wide layout */
    max-width: calc(50% - 2rem); /* Force 2 items per row */
  }
}

@media (max-width: 768px) {
  .items {
    flex: 1 1 100%; /* For 1-wide layout */
  }
}
