:root {
  --primary-color: #1b4b77;
  scroll-padding-top: 80px;
}

/* Ensure browsers use a scroll padding for fragment navigation as a fallback */
html { scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #fff;
  color: #000;
  line-height: 1.6;
}

/* Global mobile-friendly image behavior */
img { max-width: 100%; height: auto; }

/* HEADER */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #ccc;
  z-index: 1000;
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-container { position: relative; }

.nav-logo {
  height: 50px;
}

.nav-menu a {
  margin-left: 20px;
  text-decoration: none;
  color: var(--primary-color);
  font-weight: bold;
}

.nav-menu a:hover {
  color: #12858b;
}

/* Hamburger toggle (hidden on desktop) */
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle:focus { outline: 2px solid #12858b; outline-offset: 2px; }
.hamburger {
  position: relative;
  width: 24px;
  height: 2px;
  background: var(--primary-color);
  display: inline-block;
}
.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--primary-color);
}
.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }
.nav-toggle.open .hamburger { background: transparent; }
.nav-toggle.open .hamburger::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open .hamburger::after { transform: translateY(-7px) rotate(-45deg); }

/* HERO */
.hero-section {
  height: 100vh;
  background: url('hero.jpg') center center / cover no-repeat fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 60px;
  position: relative;
}

.hero-overlay {
  background-color: rgba(0,0,0,0.5);
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-text {
  text-align: center;
  color: white;
  max-width: 800px;
  padding: 2rem;
  font-family: 'Montserrat', sans-serif;
}

.hero-text h1 {
  font-size: clamp(1.4rem, 4vw + 1rem, 2.5rem);
  margin-bottom: 1rem;
}

.hero-text p {
  font-size: clamp(0.95rem, 1.8vw + 0.5rem, 1.1rem);
}

.triangle-divider {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 80px;
  overflow: hidden;
}

.triangle-divider svg {
  width: 100%;
  height: 100%;
}

/* FEATURES */
.features-section {
  background: #ffffff;
  padding: 6rem 2rem;
}

.features-inner {
  max-width: 1200px;
  margin: auto;
}

.centered-heading {
  text-align: center;
  margin-bottom: 3.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px,1fr));
  gap: 2rem;
}

.feature {
  background: #f0f0f0;
  padding: 1.5rem;
  border-left: 5px solid var(--primary-color);
}

/* WAVES */
.wave-container {
  position: relative;
  width: 100%;
  height: 120px;
  background: var(--primary-color);
  overflow: hidden;
}

.wave {
  position: absolute;
  width: 200%;
  height: 120px;
  left: 0;
  top: 0;
  background-repeat: repeat no-repeat;
  background-size: 50% 120px;
  will-change: transform;
}

.wave-top {
  background-image: url('data:image/svg+xml;utf8,<svg width="1200" height="120" xmlns="http://www.w3.org/2000/svg"><path fill="%23ffffff" d="M0 0 C300 90 900 90 1200 0 V120 H0 Z" /></svg>');
  animation: waveMove 9s linear infinite;
  opacity: 0.8;
}

.wave-bottom {
  background-image: url('data:image/svg+xml;utf8,<svg width="1200" height="120" xmlns="http://www.w3.org/2000/svg"><path fill="%23ffffff" d="M0 20 C300 100 900 100 1200 20 V120 H0 Z" /></svg>');
  animation: waveMove 12s linear infinite reverse;
  opacity: 0.5;
}

@keyframes waveMove {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* GUIDING PRINCIPLES */
.guiding-section {
  background: #fff;
  padding: 4rem 2rem;
  text-align: center;
}

.guiding-inner {
  max-width: 1000px;
  margin: auto;
}

.guiding-paragraph {
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.guiding-image img {
  max-width: 60%;
  height: auto;
  border-radius: 8px;
}

/* Unified grid for all principles */
.principles-list.unified-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem 2rem;
  justify-items: center;
  margin-top: 2rem;
}

@media (max-width: 600px) {
  .principles-list.unified-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
  }
}

/* When three columns fit, center the last two items offset from the first row */
@media (min-width: 992px) {
  .principles-list.unified-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .principles-list.unified-grid .principle-item:nth-child(1) { grid-column: 1 / 3; }
  .principles-list.unified-grid .principle-item:nth-child(2) { grid-column: 3 / 5; }
  .principles-list.unified-grid .principle-item:nth-child(3) { grid-column: 5 / 7; }
  .principles-list.unified-grid .principle-item:nth-child(4) { grid-column: 2 / 4; }
  .principles-list.unified-grid .principle-item:nth-child(5) { grid-column: 4 / 6; }
}

.principles-list.grid-two-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4rem;
  justify-items: center;
}

.principles-list.grid-two-row .principle-item:nth-child(4) {
  grid-column: 2 / 3;
}

.principles-list.grid-two-row .principle-item:nth-child(5) {
  grid-column: 3 / 4;
}

.principle-item {
  width: 100%;
  max-width: 300px;
  text-align: left;
}

.principle-icon {
  width: 300px;
  height: 300px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.principle-text {
  margin-top: 1rem;
  font-size: 1.05rem;
  line-height: 1.4;
}

/* Reveal-on-scroll animations (Animation Test v4.2) */
[data-reveal] {
  --reveal-duration: 0.6s;
  --reveal-delay: 0ms;
  --reveal-ease: cubic-bezier(.22,.61,.36,1);
  opacity: 0;
  transform: none;
  transition:
    opacity var(--reveal-duration) var(--reveal-ease) var(--reveal-delay),
    transform var(--reveal-duration) var(--reveal-ease) var(--reveal-delay);
  will-change: opacity, transform;
}

/* Variants */
[data-reveal="up"] { transform: translateY(16px); }
[data-reveal="down"] { transform: translateY(-16px); }
[data-reveal="left"] { transform: translateX(24px); }
[data-reveal="right"] { transform: translateX(-24px); }
[data-reveal="scale"] { transform: scale(0.96); }
[data-reveal="fade"] { transform: none; }

.in-view { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

@media (max-width: 992px) {
  .principles-list.grid-two-row {
    grid-template-columns: repeat(2,1fr);
  }
}

@media (max-width: 600px) {
  .principles-list.grid-two-row {
    grid-template-columns: 1fr;
  }
  .principle-text {
    text-align: center;
  }
  /* Keep icon and text aligned within same width on small screens */
  .principle-item { max-width: 200px; margin-left: auto; margin-right: auto; }
  .principle-icon { width: 200px; height: 200px; }

  /* Tighten spacing and improve tap targets on small screens */
  .container { padding: 0.75rem; }
  .nav-menu a { padding: 0.5rem 0.35rem; font-size: 0.95rem; display: inline-block; }
  .services-grid, .features-grid { gap: 1.5rem; }
  .section { padding: 4rem 1.25rem; }
}

/* SERVICES */
.section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: auto;
}

/* Avoid rendering offscreen heavy sections until needed (mobile perf) */
.features-section,
.guiding-section,
#services.section,
.plans-section,
.contact-section {
  content-visibility: auto;
  contain-intrinsic-size: 800px;
}

.alt-section {
  background: #f8f8f8;
}

#services h2 {
  text-align: center;
  margin-bottom: 4rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
}

.service-block h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.service-block ul {
  list-style: disc;
  padding-left: 1.5rem;
}

.service-block ul li {
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

/* ✅ CERTIFICATIONS BLOCK */
.certification-logos.horizontal {
  display: flex;
  flex-direction: row;
  justify-content: flex-start; /* <-- Aligns left */
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.certification-logos.horizontal img {
  max-width: 80px;
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.certification-logos.horizontal img:hover {
  transform: scale(1.05);
}


/* ABOUT SECTION */
.about-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  align-items: flex-start;
  position: relative;
}

.about-image img {
  width: 300px;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0,0,0,0.2);
}

.about-text {
  flex: 1;
  min-width: 280px;
  font-size: 1.1rem;
  line-height: 1.6;
  position: relative;
}

.about-text ul {
  padding-left: 1.25rem;
  margin-top: 0.5rem;
}

.about-text ul li {
  list-style-type: disc;
  margin-bottom: 0.5rem;
}

.cert-logo {
  position: absolute;
  bottom: 0;
  right: 0;
}

.cert-logo img {
  width: 120px;
  height: auto;
  border-radius: 6px;
}

/* PARALLAX */
.parallax-separator,
.parallax-separator-2 {
  position: relative;
  width: 100%;
  height: 60vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  z-index: 1;
}

/* Disable fixed background on small screens to avoid performance and rendering issues */
@media (max-width: 768px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    display: flex; /* keep in DOM for transitions */
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    width: 50vw; /* limit backdrop to 50% of screen */
    background: rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid #e6e6e6;
    border-left: 1px solid #e6e6e6;
    box-shadow: 0 6px 14px rgba(0,0,0,0.08);
    padding: 0.5rem 1rem 1rem;
    z-index: 1001;
    /* slide/collapse animation */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: max-height 0.3s ease, opacity 0.2s ease, transform 0.2s ease;
    align-items: flex-end; /* align items to the right */
    text-align: right;
  }
  .nav-menu.is-open {
    max-height: 70vh;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .nav-menu a {
    margin: 0;
    padding: 0.75rem 0.25rem;
    border-top: 1px solid #f1f1f1;
    text-align: right;
  }
  .nav-menu a:first-child { border-top: 0; }
  .hero-section,
  .parallax-separator,
  .parallax-separator-2,
  .parallax-separator-3 {
    background-attachment: scroll;
    background-position: center;
  }
  .wave { height: 90px; background-size: 50% 90px; }
}

/* Disable menu transition for reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .nav-menu { transition: none !important; }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .wave-top, .wave-bottom { animation: none !important; }
}

.parallax-separator {
  background-image: url('parallax-separator.jpg');
}

.parallax-separator-2 {
  background-image: url('parallax-separator-2.jpg');
}

.centered-subtext {
  text-align: center;
  font-size: 1.1rem;
  max-width: 800px;
  margin: 0 auto 2.5rem;
  color: #333;
}

.parallax-separator-3 {
  position: relative;
  width: 100%;
  height: 60vh;
  background-image: url("Success.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  z-index: 1;
}

/* PLANS SECTION */
.plans-section {
  padding: 6rem 2rem;
  background: #ffffff;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: auto;
}

.plan-card {
  background: #f9f9f9;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
}

.plan-card h3 {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.plan-subheading {
  font-style: italic;
  margin-bottom: 1rem;
  color: #333;
}

.plan-card ul {
  list-style-type: disc;
  padding-left: 1.2rem;
  margin-bottom: 1rem;
}

.plan-card ul li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.plan-outcome {
  margin-top: auto;
  font-weight: bold;
  color: #12858b;
}

/* FLIPPED WAVE CONTAINER */
.wave-container.wave-flipped {
  transform: scaleY(-1);
}

/* CONTACT SECTION */
.contact-section {
  background: #f0f8fb;
  padding: 6rem 2rem;
}

.contact-inner {
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 3rem;
  align-items: start;
}

.contact-text h2 {
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.contact-text .cta {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.contact-info p {
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.contact-info a {
  color: #12858b;
  text-decoration: none;
}

.contact-form {
  display: flex;
  flex-direction: column;
}

.contact-form label {
  margin-bottom: 0.25rem;
  font-weight: bold;
}

.contact-form input,
.contact-form textarea {
  padding: 0.75rem;
  margin-bottom: 1.2rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}

.contact-form button {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.9rem;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
  margin-bottom: 2.5rem; /* ⬅️ Adds space below button */
}

.contact-form button:hover {
  background: #12858b;
}

/* Social Media Icons */
.social-media-icons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.social-media-icons a {
  color: var(--primary-color);
  font-size: 1.8rem;
  transition: color 0.3s ease, transform 0.3s ease;
  display: inline-block;
}

.social-media-icons a:hover {
  color: #12858b;
  transform: translateY(-3px);
}

.contact-details-inline {
  text-align: center;
  margin-top: 2rem;
  font-size: 1rem;
}

.contact-details-inline a {
  color: #12858b;
  text-decoration: none;
}

/* Honeypot field (visually hidden, still accessible to bots) */
.hp-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp-field { position: absolute; left: -10000px; opacity: 0; }

.principles-list.first-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4rem;
  justify-items: center;
}

@media (max-width: 992px) {
  .principles-list.first-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 600px) {
  .principles-list.first-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.principles-list.second-row.centered-row {
  display: flex;
  justify-content: center;
  gap: 4rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

@media (max-width: 992px) {
  .principles-list.second-row.centered-row { gap: 2rem; }
}

@media (max-width: 600px) {
  .principles-list.second-row.centered-row { gap: 1.5rem; }
}
