/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  scroll-behavior: smooth;
  background: #333;
}

header {
  position: fixed;
  width: 100%;
  background: #333;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  z-index: 1000;
  transition: box-shadow 0.3s;
  height:75px;
}

header.scrolled {
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.logo {
  font-size: 22px;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit; /* keep same color as surrounding header */
  text-decoration: none; /* remove underline for anchor */
  cursor: pointer;
  height:100%;
}

.logo:hover,
.logo:focus {
  text-decoration: none;
  color: inherit;
}

.logo-img {
  height: 100%;
  object-fit: cover;
  border-radius: 50px;
  display: inline-block;
}

nav {
  display: flex;
  gap: 20px;
  position: relative;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: normal;
  position: relative;
  padding: 5px 0;
  transition: font-weight 0.2s;
}

nav a.active {
  font-weight: bold;
}

/* Scroll spy underline */
nav::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: var(--underline-width, 0);
  height: 2px;
  background: #ffcc00;
  transition: left 0.3s, width 0.3s;
  left: var(--underline-left, 0);
}

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

.hamburger span {
  display: block;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Mobile */
@media (max-width: 768px) {
  nav {
    position: fixed;
    top: 60px;
    right: -250px;
    background: #333;
    flex-direction: column;
    width: 200px;
    transition: right 0.3s ease;
    padding: 20px;
    gap: 15px;
  }

  nav.show {
    right: 0;
  }

  .hamburger {
    display: flex;
  }

  nav::after {
    display: none; /* hide underline on mobile */
  }
  /* Make the home content box span the available width on small screens */
  #home .home-content {
    display: block; /* stack and allow width to be set */
    width: calc(100% - 40px); /* respect the section side padding */
    margin: 0 20px;
    padding: 24px 18px;
    border-radius: 6px;
  }
}

/* Life carousel */
.services-carousel {
  width: calc(100% - 40px);
  max-width: 1000px;
  margin: 30px auto 0;
  position: relative;
}

.slides-viewport {
  overflow: hidden;
  width: 100%;
}

.slides {
  display: flex;
  transition: transform 0.5s ease;
  will-change: transform;
}

.slide {
  display: flex;
  width: 100%;
  min-width: 100%;
  gap: 30px;
  align-items: center;
  height: auto;
  min-height: 0;
}

.slide .slide-image,
.slide .slide-text {
  flex: 1 1 50%;
}

.slide .slide-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide img {
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.slide .slide-text h2 {
  font-size: 1.6rem;
  margin-bottom: 12px;
  text-align: left;
}

.slide .slide-text p {
  font-size: 1.05rem;
  line-height: 1.6;
  text-align: left;
  max-width: 520px;
}

.slide.reverse {
  flex-direction: row-reverse;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.6);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20; /* ensure buttons sit above slides */
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.carousel-btn.prev { left: -60px; }
.carousel-btn.next { right: -60px; }

.carousel-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 18px;
}

.carousel-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: gray;
  cursor: pointer;
}

.carousel-dots button.active {
  background: white;
}

@media (max-width: 768px) {
  /* Stack slide content on mobile and remove reverse layout for better flow */
  .slide {
    flex-direction: column;
    gap: 14px;
    padding: 0;
    width: 100%;
    height: auto;
    min-height: auto;
  }

  .slide.reverse {
    flex-direction: column;
  }

  .slide .slide-image,
  .slide .slide-text {
    flex: 0 0 auto;
    width: 100%;
    padding: 0 15px;
    height: auto;
  }

  .slide .slide-text h2 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    width: 100%;
  }

  .slide .slide-text p {
    font-size: 1rem;
    line-height: 1.5;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
    width: 100%;
    max-width: none;
  }

  .carousel-btn.prev { left: 10px; }
  .carousel-btn.next { right: 10px; }
  .carousel-btn { 
    width: 40px; 
    height: 40px;
    background: rgba(0,0,0,0.5);
  }
}

/* Hamburger animation for X */
.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

section {
  min-height: 120vh;
  height: auto;
  padding: 60px 20px 20px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: background 0.5s;
  position: relative;
}

section:nth-child(odd):not(#home) {
  background: url(content/w-bg.jpg);
  background-size: cover;
}

section:nth-child(even):not(#home) {
  background: #ddd;
}

h1 {
  margin-bottom: 20px;
  font-size: 2.5rem;
}

p {
  font-size: 1.2rem;
  max-width: 600px;
  text-align: center;
}

/* Menu slide animation */
nav.show a {
  animation: slideIn 0.3s ease forwards;
}

@keyframes slideIn {
  0% {
    opacity: 0;
    transform: translateX(50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Video background for Home */
#home {
  position: relative;
  overflow: hidden;
  color: #fff;
  justify-content: center;
}

#home .bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  z-index: -1;
}

#home .bg-image {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transform: translate(-50%, -50%);
  z-index: -1;
}

#home .home-content {
  position: relative;
  z-index: 1;
  /* Make the content box size to its contents, not the full section */
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 36px 24px;
  background: rgba(0, 0, 0, 0.5); /* black at 50% opacity */
  border-radius: 8px;
  max-width: 900px;
  margin: 0 20px; /* small horizontal spacing on small screens */
}

/* Video background for Life */
#life {
  position: relative;
  overflow: hidden;
  color: #fff;
}

#life .bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  z-index: 0;
}

/* Ensure life content sits above the video and has a translucent backdrop */
.services-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 0;
  /* background: rgba(0,0,0,0.45); */
  border-radius: 8px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

#life .services-carousel {
  margin-top: 18px; /* slightly reduce gap from heading */
}

#home a {
    color:#fff;
    text-decoration: none;
}

/* About section: 50/50 split (image left, text right) on desktop;
   stacked with image on top on mobile */
#about .about-container {
  display: flex;
  width: 100%;
  max-width: 1000px;
  gap: 30px;
  align-items: center;
  justify-content: center;
  margin: 0 20px;
}

/* Make columns equal width (50/50) */
#about .about-image,
#about .about-text {
  flex: 1 1 50%;
}

/* Center the image inside its column and prevent it from filling the whole column */
#about .about-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

#about .about-image img {
  width: 100%;
  max-width: 420px; /* prevents image from taking full column width on large screens */
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

#about .about-text h1 {
  text-align: left;
  margin-bottom: 16px;
}

#about .about-text p {
  text-align: left;
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 600px;
}

@media (max-width: 768px) {
  /* Stack the about columns on mobile with image on top */
  #about .about-container {
    flex-direction: column;
    gap: 18px;
    align-items: center;
  }

  #about .about-image img {
    max-width: 90%;
  }
}

/* Footer - dark themed */
.site-footer {
  background: #333; /* deep, muted navy */
  color: #e6eef8; /* soft off-white for good contrast */
  padding: 40px 20px 20px;
  font-size: 0.95rem;
  position: relative;
  top: -100px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.footer-brand .footer-logo {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
}
.footer-brand .logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}
.footer-tag {
  margin-top: 8px;
  color: rgba(230,238,248,0.8);
  text-align: left;
}
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-nav a,
.footer-contact a,
.social-links a {
  color: #e6eef8;
  text-decoration: none;
  opacity: 0.95;
}
.footer-nav a:hover,
.footer-contact a:hover,
.social-links a:hover {
  color: #ffcc00;
  opacity: 1;
}
.footer-contact p {
  margin-bottom: 8px;
  text-align: right;
}
.social-links {
  display: flex;
  gap: 12px;
  justify-content: right;
}

.site-notice {
  background-color: #FF6B6B;
  color: #fff;
  padding: 16px 20px;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
  position: relative;
  z-index: 10;
  margin-bottom: 24px;
  /* border-left: 5px solid #FF4444; */
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.2);
}

.site-notice p {
  margin: 0;
}

.footer-bottom {
  margin-top: 24px;
  padding-top: 16px;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(230,238,248,0.7);
}

/* Focus styles for accessibility */
.footer-nav a:focus, .social-links a:focus {
  outline: 2px dashed #ffcc00;
  outline-offset: 3px;
}

@media (max-width: 860px) {
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-nav { flex-direction: row; justify-content: center; gap: 16px; }
  .footer-contact { margin-top: 8px; }
  .footer-contact p{ text-align: center; }
  /* Slightly larger negative offset on small screens to compensate for stacked layout */
  .site-footer { top: -135px; text-align: center;}
  .footer-tag { text-align: center; }
  .social-links { justify-content: center; }
}

