/* === Fix Layout Overflow & Full Width === */
body, html {
  overflow-x: hidden; /* prevent horizontal scrolling */
  width: 100%;
}

.hero,
.purpose-section,
.mv-section,
.core-values {
  width: 100vw; /* ensure full viewport width */
  box-sizing: border-box;
}

.hero {
  position: relative;
  width: 100%;
  height: 103vh;
  overflow: visible;
  background: linear-gradient(135deg, #fff 0%, #f4f4f4 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;

  /* 👇 make hero go under header */
  margin-top: -120px; /* approximate combined height of top-bar + main-nav */
  z-index: 1;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
}

body {
  background: #000; /* or a dark tone that matches hero */
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55); /* adjust 0.55 to control darkness */
  z-index: 2;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 140px; /* matches header height */
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), transparent);
  z-index: 2;
}

.hero-bg,
.hero-overlay,
.hero-content {
  opacity: 0;
  transform: translateY(20px);
}

.hero .btn-primary {
  background-color: #e26b07;
  color: #fff;
  padding: 0.75em 1.5em;
  text-decoration: none;
  border-radius: 4px;
  margin-right: 1em;
}

.hero .btn-secondary {
  background: none;
  border: 2px solid #fff;
  color: #fff;
  padding: 0.75em 1.5em;
  border-radius: 4px;
}

.hero-content {
  position: relative;
  z-index: 3;
  color: #fff;
  max-width: 1400px;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 0.5em;
}

.hero h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5em;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 1.5em;
}

.hero-buttons .btn-primary,
.hero-buttons .btn-secondary {
  text-decoration: none;
  padding: 0.75em 1.5em;
  border-radius: 4px;
  font-weight: bold;
  margin-top: 0.5rem;
}

.btn-primary {
  background: #e26b07;
  color: #fff;
  margin-right: 1em;
}

.btn-secondary {
  border: 2px solid #e26b07;
  color: #e26b07;
  background: transparent;
}

/* Keyframes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Animate each hero element with delay */
.hero.animate .hero-bg {
  animation: fadeIn 1.5s ease-out forwards;
}

.hero.animate .hero-overlay {
  animation: fadeIn 1.5s ease-out forwards;
  animation-delay: 0.3s;
}

.hero.animate .hero-content {
  animation: fadeInUp 1s ease-out forwards;
  animation-delay: 0.6s;
}

/* ===== Purpose Section ===== */
.purpose-section {
  padding: 6em 2em;
  background: #fff;
}
.purpose-section .container {
  display: flex;
  align-items: center;
  gap: 3em;
  max-width: 1200px;
  margin: 0 auto;
}
.purpose-text {
  flex: 1;
}
.purpose-text h2 {
  font-size: 2.2rem;
  color: #e26b07;
  margin-bottom: 0.8em;
}
.purpose-text p {
  font-size: 1.1rem;
  color: #444;
  line-height: 1.7;
  margin-bottom: 1em;
  text-align: justify;
}
.purpose-image {
  flex: 1;
}
.purpose-image img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* ===== Mission & Vision Section ===== */
.mv-section {
  background: #f8f8f8;
  padding: 5em 2em;
  text-align: center;
}
.mv-section h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5em;
  color: #1a365d;
}
.mv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2em;
}
.mv-card {
  background: #fff;
  border-radius: 12px;
  padding: 2em;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.mv-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.mv-card i {
  font-size: 2rem;
  color: #e26b07;
  margin-bottom: 1em;
}
.mv-card h3 {
  font-size: 1.5rem;
  color: #1a365d;
  margin-bottom: 0.5em;
}
.mv-card p, .mv-card li {
  font-size: 1rem;
  color: #555;
  line-height: 1.6;
}
.mv-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.mv-card li::before {
  content: "✓ ";
  color: #e26b07;
}

/* ===== Reveal Animations ===== */
.reveal-left, .reveal-right {
  opacity: 0;
  transform: translateX(100px);
  transition: all 0.8s ease-out;
}
.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}
.reveal-right {
  transform: translateX(-100px);
}
.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

/* ===== Core Values Section ===== */
.core-values {
  padding: 6em 2em;
  background: #fff;
  text-align: center;
}

.core-values h2 {
  font-size: 2.5rem;
  color: #1a365d;
  margin-bottom: 0.5em;
}

.core-values .subtitle {
  color: #555;
  margin-bottom: 3em;
  font-size: 1.1rem;
}

/* Grid layout for cards */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 30px;
  justify-items: center;
}

/* Card container */
.value-card {
  width: 180px;
  height: 220px;
  perspective: 1000px;
}

/* Flip behavior */
.value-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.value-card:hover .value-card-inner {
  transform: rotateY(180deg);
}

/* Front & back */
.value-card-front,
.value-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1em;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

/* Front styling */
.value-card-front {
  background: #fff;
  color: #1a365d;
  border: 2px solid #e26b07;
}

.value-card-front i {
  font-size: 2rem;
  color: #e26b07;
  margin-bottom: 0.5em;
}

.value-card-front h4 {
  font-size: 1.1rem;
  margin: 0;
}

/* Back styling */
.value-card-back {
  background: #e26b07;
  color: #fff;
  transform: rotateY(180deg);
  padding: 1.2em;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
  .values-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

/* ===========================
   MOBILE RESPONSIVE ENHANCEMENTS
   (Hero untouched)
=========================== */
@media (max-width: 992px) {

  /* --- Purpose Section --- */
  .purpose-section {
    padding: 4em 1.5em;
  }

  .purpose-section .container {
    flex-direction: column;
    text-align: center;
    gap: 2em;
  }

  .purpose-text h2 {
    font-size: 1.8rem;
  }

  .purpose-text p {
    font-size: 1rem;
    text-align: justify;
  }

  .purpose-image img {
    width: 90%;
    max-width: 400px;
  }

  /* --- Mission & Vision --- */
  .mv-section {
    padding: 4em 1.5em;
  }

  .mv-section h2 {
    font-size: 2rem;
  }

  .mv-grid {
    grid-template-columns: 1fr;
    gap: 1.5em;
  }

  .mv-card {
    padding: 1.5em;
  }

  .mv-card h3 {
    font-size: 1.25rem;
  }

  .mv-card p {
    font-size: 0.95rem;
  }

  /* --- Core Values --- */
  .core-values {
    padding: 4em 1.5em;
  }

  .core-values h2 {
    font-size: 2rem;
  }

  .core-values .subtitle {
    font-size: 1rem;
    margin-bottom: 2em;
  }

  .values-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .value-card {
    width: 100%;
    max-width: 200px;
    height: 220px;
  }

  /* Reduce flip animation sensitivity on touch devices */

  .value-card-inner.flipped {
    transform: rotateY(180deg);
  } 

  .value-card-inner {
    transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.3, 1);
  }

  .value-card-front, .value-card-back {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }
}

/* --- Small Screens (Phones under 600px) --- */
@media (max-width: 600px) {
  .purpose-section {
    padding: 3em 1em;
  }

  .purpose-text h2 {
    font-size: 1.6rem;
  }

  .mv-section h2,
  .core-values h2 {
    font-size: 1.8rem;
  }

  .values-grid {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .value-card {
    width: 90%;
    max-width: 280px;
  }

  .mv-card p {
    font-size: 0.9rem;
  }
}
