/* =========================
   Base styles
   ========================= */
:root { --page-max: 1200px; }

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 10px; } /* reduced from 12px */

body {
  font-size: 1.5rem;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: 100%;
  width: 100%;
  height: 100%;
  margin: 0;
  text-align: justify;      /* justify all text by default */
  text-justify: inter-word; /* improve spacing */
}

h1 {
  font-size: 3rem;
  color: white;                  /* fill color */
  -webkit-text-stroke: 0.5px #373535; /* outline thickness + color */
  text-transform: uppercase;
}

h2 {
  font-size: 2.8rem;
  text-align: left;   /* do not justify */
}

p { margin-bottom: 2rem; }
a { color: #5b2121; }
a:hover { color: rgb(82, 42, 15); text-decoration: none; }

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

/* =========================
   Center page structure
   ========================= */
nav, header, main, footer {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  position: relative;
}

/* =========================
   Navigation
   ========================= */
nav {
  background-color: white;
  box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.1);
}
nav ul {
  width: 100%;
  list-style: none;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: 0px 10px 0px -60px;
}
nav li { height: 50px; }
nav a {
  height: 100%;
  padding: 0 30px;
  text-decoration: none;
  display: flex;
  align-items: center;
  color: black;
}
nav a:hover { background-color: #f0f0f0; }
nav li:first-child { margin-right: auto; }

.sidebar {
  position: fixed;
  top: 0; right: 0;
  height: 100vh; width: 250px;
  background-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  box-shadow: -10px 0 10px rgba(0, 0, 0, 0.1);
  list-style: none;
  display: none;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}
.sidebar li { width: 100%; }
.sidebar a { width: 100%; }
.menu-button { display: none; }

@media (max-width: 800px) {
  .hideOnMobile { display: none; }
  .menu-button { display: block; }
}
@media (max-width: 400px) {
  .sidebar { width: 100%; }
}

/* =========================
   Header
   ========================= */
header {
  background-color: #ffffff;
  color: #ffffff;
  padding: 2rem;
  background-image: url(../images/head-1.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: clamp(220px, 35vh, 420px);
}
@media (max-width: 800px) {
  header {
    padding: 1.2rem;
    min-height: clamp(180px, 40vh, 360px);
  }
}

/* =========================
   Main content
   ========================= */
main {
  padding-block: 1.5rem;
  padding-inline: 2rem;
  max-width: var(--page-max);
   background-color: #eaf2f7;                 /* very pale blue */
  border: 1px solid rgba(250, 226, 226, 0.3);  /* faded red border */
  padding: 2rem;
  margin-block: 2rem;
  border-radius: 6px;
  box-sizing: border-box;
}
main h1 {
  color: #5b2121;
  font-weight: bold;
}

intro {
 

}

main article {
  margin-bottom: 1.25rem;
  border-bottom: solid 1px #ccc;
  padding: 1.25rem 0;
  gap: 2rem;
  background-color: #cbdff8;                 /* very pale blue */
  border: 1px solid rgba(200, 50, 50, 0.3);  /* faded red border */
  padding: 2rem;
  margin-block: 2rem;
  border-radius: 6px;
  box-sizing: border-box;
 
}

figcaption {
  font: italic 1rem georgia, serif;
  color: #5b2121;
  text-align: justify;
}

/* =========================
   Responsive 4-column grid
   ========================= */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;  /* increased gap between columns */
  align-items: stretch;
}
.grid-4 .card {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  overflow: hidden;
  text-align: justify;
}
.grid-4 .card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin: 0;
}

/* Breakpoints for grid */
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .grid-4 { grid-template-columns: 1fr; }
}

.intro { grid-column: 1 / -1; 
   background-color: #f5faff;                 /* very pale blue */
  border: 1px solid rgba(200, 50, 50, 0.3);  /* faded red border */
  padding: 2rem;
  
  border-radius: 6px;
  box-sizing: border-box;
}
.form-section { grid-column: 1 / -1; }


/* =========================
   Centered 3-column section
   ========================= */
main section {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 300px));
  gap: 2rem;                 /* increased gap between columns */
  justify-content: center;
  margin-block: 1.25rem;
}
main section .card { overflow: hidden; text-align: justify; }
main section .card img,
main section > img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin: 0;
}

@media (max-width: 900px) {
  main section { grid-template-columns: repeat(2, minmax(0, 300px)); }
}
@media (max-width: 600px) {
  main section { grid-template-columns: 1fr; }
}

/* =========================
   Testimonials (full 1200px width, responsive)
   ========================= */
.testimonials {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 columns on desktop */
  gap: 2rem;
  background-color: #f5faff;                 /* very pale blue */
  border: 1px solid rgba(200, 50, 50, 0.3);  /* faded red border */
  padding: 2rem;
  margin-block: 2rem;
  border-radius: 6px;
  box-sizing: border-box;
}
.testimonials .testimonial {
  background: #ffffff;
  border-radius: 6px;
  padding: 1.5rem;
  text-align: justify;
  line-height: 1.6;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.testimonials .testimonial h3 {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
  color: #5b2121;
  text-align: left; /* keep headings aligned */
}
.testimonials .testimonial p { margin: 0; }

/* Responsive breakpoints for testimonials */
@media (max-width: 1200px) {
  .testimonials { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .testimonials { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .testimonials { grid-template-columns: 1fr; }
}

/* =========================
   Footer (3 responsive columns)
   ========================= */
footer {
  background-color: #5b2121;
  color: #fff;
  text-align: justify;
  padding: 2rem;                  /* a bit more space for columns */
  font-size: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));  /* 3 columns */
  gap: 2rem;                      /* space between footer columns */
  align-items: start;
}
footer h3, footer h4 {
  margin: 0 0 0.75rem 0;
  font-weight: 700;
  text-align: left;               /* keep footer headings left-aligned */
}
footer p, footer li, footer a {
  color: #fff;
  opacity: 0.95;
}
footer a:hover { opacity: 1; text-decoration: underline; }
footer ul { list-style: none; padding: 0; margin: 0; }
footer li + li { margin-top: 0.5rem; }



/* =========================
   Form
   ========================= */
form {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 24px;
  max-width: 1200px;                   /* room for 4 columns */
  margin: 0 auto;
  background: white;                   /* matches fieldset style */
  box-shadow: 0 1px 3px rgba(50,50,93,0.15),
              0 4px 6px rgba(112,157,199,0.15);
}

/* Title */
h2 {
  text-transform: uppercase;
  font-size: 15px;
  margin: 0 0 16px 0;
  color: #525f75;
}

/* Grid */
.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(200px, 1fr));
  gap: 16px;
}

/* Field */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  color: #8898aa;                      /* existing label color */
  font-size: 12px;
  letter-spacing: .02em;
}

/* Inputs */
input, select, textarea, button {
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  outline: none;
}

input:valid { border: 2px solid green; }
input:invalid { border: 2px solid red; }

textarea {
  resize: vertical;
  min-height: 40px;
}

/* Full-width items (spanning all columns) */
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: 1 / -1; }

/* Helper note link (GhanaPost GPS) */
.helper {
  font-size: 12px;
  color: #8898aa;
  margin-top: 4px;
}

/* Submit row */
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

button[type="submit"] {
  background: #525f75;                 /* from your palette */
  color: #fff;
  border: none;
  padding: 12px 18px;
  cursor: pointer;
  border-radius: 6px;
}
button[type="submit"]:hover {
  filter: brightness(1.05);
}

/* Responsive */
@media (max-width: 1100px) {
  .form-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 820px) {
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .span-3 { grid-column: span 2; }
}
@media (max-width: 560px) {
  body { padding: 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2, .span-3, .span-4 { grid-column: auto; }
  .actions { justify-content: stretch; }
  button[type="submit"] { width: 100%; }
}




/* Footer responsive behavior */
@media (max-width: 900px) {
  footer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  footer { grid-template-columns: 1fr; }
}
