/* ===========================
   RESET & BASE
=========================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 18px;
}

body {
  font-family: 'Lato', sans-serif;
  color: #2c2c2c;
  background-color: #fafaf8;
  line-height: 1.7;
}

h1, h2, h3 {
  font-family: 'Merriweather', serif;
  line-height: 1.3;
}

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

/* ===========================
   LAYOUT
=========================== */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 1.5rem;
}

.section h2 {
  font-size: 1.9rem;
  margin-bottom: 1.5rem;
  color: #2c5f4a;
}

/* ===========================
   NAVBAR
=========================== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: #2c5f4a;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.navbar {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Merriweather', serif;
  font-size: 1.1rem;
  color: #fff;
  font-weight: 700;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  color: #e8f5ef;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}

.nav-links a:hover {
  border-bottom-color: #a8d5be;
}

.nav-cta {
  background-color: #e07b3a;
  color: #fff !important;
  padding: 0.4rem 1rem !important;
  border-radius: 4px;
  border-bottom: none !important;
  transition: background-color 0.2s !important;
}

.nav-cta:hover {
  background-color: #c96929 !important;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}

/* ===========================
   HERO
=========================== */
.hero {
  position: relative;
  color: #fff;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 1.5rem;
  overflow: hidden;
}

/* Greyscale background photo */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('photos/eldercare.jpg');
  background-size: cover;
  background-position: center;
  filter: grayscale(100%);
  z-index: 0;
}

/* Green tint overlay on top of the photo */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(44,95,74,0.82) 0%, rgba(61,122,98,0.75) 60%, rgba(90,158,128,0.65) 100%);
  z-index: 1;
}

/* Keep text above both layers */
.hero-content {
  position: relative;
  z-index: 2;
}

.hero-content h1 {
  font-size: 2.8rem;
  margin-bottom: 0.75rem;
  color: #fff;
}

.tagline {
  font-size: 1.35rem;
  font-family: 'Merriweather', serif;
  font-style: italic;
  color: #d4ede2;
  margin-bottom: 0.4rem;
}

.sub-tagline {
  font-size: 1rem;
  color: #a8d5be;
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  background-color: #e07b3a;
  color: #fff;
  padding: 0.75rem 2rem;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 700;
  transition: background-color 0.2s;
}

.btn:hover {
  background-color: #c96929;
}

/* ===========================
   ABOUT
=========================== */
.about {
  background-color: #fff;
}

.about-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 3rem;
  align-items: center;
  max-width: 960px;
}

.about-text h2 {
  font-size: 1.9rem;
  margin-bottom: 1.25rem;
  color: #2c5f4a;
}

.about-text p {
  font-size: 1.05rem;
  margin-bottom: 1rem;
  color: #3a3a3a;
}

/* Slideshow */
.slideshow {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.slide-track {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  aspect-ratio: 3 / 4;
  background-color: #e0e0e0;
}

.slide {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.slide.active {
  display: block;
}

.slide-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(44, 95, 74, 0.85);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 2.25rem;
  height: 2.25rem;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 10;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-arrow:hover {
  background-color: #1a3d2e;
}

.slide-prev {
  left: 0.5rem;
}

.slide-next {
  right: 0.5rem;
}

.slide-dots {
  display: flex;
  gap: 0.4rem;
}

.slide-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #ccc;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.2s;
}

.slide-dot.active {
  background-color: #2c5f4a;
}

/* ===========================
   SERVICES
=========================== */
.services {
  background-color: #f0f7f3;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.service-card {
  background-color: #fff;
  border-left: 4px solid #2c5f4a;
  border-radius: 4px;
  padding: 1.25rem 1.25rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.service-card h3 {
  font-size: 1rem;
  color: #2c5f4a;
  margin-bottom: 0.4rem;
}

.service-card p {
  font-size: 0.9rem;
  color: #555;
}

/* ===========================
   CREDENTIALS
=========================== */
.credentials {
  background-color: #fff;
}

.credentials-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.credential-item {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 0.75rem;
}

.credential-title {
  font-weight: 700;
  color: #2c5f4a;
  font-size: 1rem;
}

.credential-detail {
  font-size: 0.9rem;
  color: #666;
}

.cert-heading {
  font-size: 1.2rem;
  color: #2c5f4a;
  margin-bottom: 0.75rem;
}

.cert-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cert-list li {
  font-size: 0.95rem;
  color: #444;
  padding-left: 1rem;
  border-left: 3px solid #a8d5be;
}

/* ===========================
   TESTIMONIALS
=========================== */
.testimonials {
  background-color: #f0f7f3;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.testimonial-card {
  background-color: #fff;
  border-radius: 6px;
  padding: 1.5rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.t-title {
  font-size: 1rem;
  color: #2c5f4a;
}

.t-preview {
  font-size: 0.9rem;
  color: #aaa;
  flex-grow: 1;
}

.t-read-btn {
  align-self: flex-start;
  background-color: #2c5f4a;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s;
}

.t-read-btn:hover {
  background-color: #1a3d2e;
}

/* ===========================
   CONTACT
=========================== */
.contact {
  background-color: #2c5f4a;
  color: #fff;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 960px;
  align-items: start;
}

.contact-col h2 {
  color: #fff;
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}

.contact-col p {
  color: #d4ede2;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
}

.contact-btn {
  display: inline-block;
  background-color: #fff;
  color: #2c5f4a;
  padding: 0.65rem 1.5rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background-color 0.2s, color 0.2s;
}

.contact-btn:hover {
  background-color: #a8d5be;
  color: #1a3d2e;
}

/* Resources column */
.resources-col {
  border-left: 1px solid rgba(255,255,255,0.15);
  padding-left: 3rem;
}

.resource-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.25rem;
}

.resource-list li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.resource-list a {
  color: #a8d5be;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.2s, color 0.2s;
}

.resource-list a:hover {
  color: #fff;
  text-decoration-color: #fff;
}

.resource-author {
  color: #7ab99a;
  font-size: 0.8rem;
}

/* ===========================
   TESTIMONIAL MODAL
=========================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1.5rem;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-box {
  background-color: #fff;
  border-radius: 8px;
  padding: 2rem;
  max-width: 560px;
  width: 100%;
  position: relative;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #888;
  line-height: 1;
}

.modal-close:hover {
  color: #2c2c2c;
}

.modal-title {
  font-family: 'Merriweather', serif;
  font-size: 1.15rem;
  color: #2c5f4a;
  margin-bottom: 1rem;
  padding-right: 1.5rem;
}

.modal-body {
  font-size: 1rem;
  color: #3a3a3a;
  line-height: 1.75;
}

.modal-body p {
  margin-bottom: 0.85rem;
}

.modal-body p:last-child {
  margin-bottom: 0;
}

/* ===========================
   FOOTER
=========================== */
footer {
  background-color: #1a3d2e;
  color: #a8d5be;
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.85rem;
  line-height: 1.8;
}

/* ===========================
   PLACEHOLDER NOTE
=========================== */
.placeholder-note {
  color: #888;
  font-size: 0.9rem;
  font-style: italic;
}

/* ===========================
   MOBILE
=========================== */
@media (max-width: 640px) {
  html {
    font-size: 16px;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    background-color: #2c5f4a;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    padding: 1rem 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }

  .nav-cta {
    margin: 0.5rem auto;
    width: fit-content;
  }

  .nav-toggle {
    display: block;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .about-layout {
    grid-template-columns: 1fr;
  }

  .slide-track {
    aspect-ratio: 4 / 3;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .resources-col {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 2rem;
  }
}
