/* ============ GLOBAL RESET ============ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Open Sans', sans-serif;
  line-height: 1.6;
  background-color: #ffffff;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* ======= Navbar Slide In Animation ======= */
.transparent-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 2rem;
  background-color: rgba(255, 255, 255, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 999;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: background-color .3s ease, box-shadow .3s ease;
}

.nav-container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* logo left, toggle/nav right */
}

.logo {
  height: 60px;
  width: auto;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 35px;
  align-items: center;
}

.nav-links li a {
  position: relative;
  text-decoration: none;
  font-size: 16px;
  color: #0d1c3f;
  transition: color .3s ease;
}

.nav-links li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background-color: #00aaff;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .3s ease-in-out;
}

.nav-links li a:hover::after {
  transform: scaleX(1);
}

.nav-links li a:hover {
  color: #00aaff;
}

.nav-links li a.active {
  color: #00cfff;
}

/* ===== HAMBURGER (hidden on desktop) ===== */
.menu-toggle {
  display: none;
  font-size: 2rem;
  color: #003C8B;
  cursor: pointer;
  z-index: 1001;
  position: absolute;
  top: 50%;
  right: 10%;
  /* distance from right edge */
  transform: translateY(-50%);
  /* vertical center */
}


/* ===== MOBILE STYLES ===== */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
    font-size: 2rem;
    color: #003C8B;
    cursor: pointer;
    z-index: 1001;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    /* full height drawer */
    width: 100%;
    /* not full screen */
    max-width: 280px;
    /* limit width */
    flex-direction: column;
    /* <<< force vertical */
    /* align to left */
    justify-content: flex-start;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    box-shadow: -8px 0 25px rgba(0, 0, 0, 0.3);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
  }

  .nav-links.active {
    transform: translateX(0);
    margin-top: 70vw;
    padding-top: 70%;
    height: 70%;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    transition: transform 0.6s ease-in-out;
  }

  .nav-container {
    height: 10vh;

  }

  .nav-links li {
    width: 100%;
    /* make each link full width */
  }

  .nav-links li a {
    display: block;
    width: 100%;
    padding: 0.5rem 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #003C8B;
  }

}

/* ============ HERO SECTION ============ */
.hero-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  color: #ffffff;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 1s ease-out forwards;
  animation-delay: 0.5s;
}

.hero-subtitle {
  font-family: 'Marcellus', serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: #f0f0f0;
  max-width: 800px;
  margin: 0 auto;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 1s ease-out forwards;
  animation-delay: 1s;
}

.hero-content {
  text-align: center;
  padding-top: 10rem;
  padding-bottom: 4rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.hero p {
  font-family: 'Marcellus', serif;
  font-size: 1.2rem;
  font-weight: 500;
  color: #ffffff;
}

.wave-lines {
  position: absolute;
  top: 30px;
  left: 0;
  width: 100%;
  height: 80px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.2;
}

.section-wave {
  display: block;
  width: 100%;
  height: auto;
}

.wave-lines svg {
  width: 50%;
  height: 50%;
}

/* === Decorative Curved SVG Overlay === */
.hero::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 160px;
  background: url("/assets/img/curves/wave-transition.svg") no-repeat center bottom;
  background-size: cover;
  z-index: 2;
  pointer-events: none;
}

/* ============ SUBSIDIARIES SECTION ============ */
.subsidiaries-section {
  background: #ffffff;
  padding: 5rem 2rem;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.subsidiaries-section h2 {
  font-size: 3rem;
  color: #003C8B;
  margin-bottom: 3rem;
  font-family: 'Barlow Condensed', sans-serif;
}

.subsidiary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.subsidiary-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  /* center full and incomplete rows */
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

.subsidiary-card {
  width: 320px;
  max-width: 100%;
  transition: transform 0.3s ease;
}

/* Bring hovered card to front */
.subsidiary-card:hover {
  transform: scale(1.25);
  z-index: 10;
}

.subsidiary-card:hover {
  transform: scale(1.1);
  z-index: 10;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

.subsidiary-slider {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.subsidiary-slider img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 1s ease;
  opacity: 0;
}

.subsidiary-slider img.active {
  opacity: 1;
}

.subsidiary-desc {
  padding: 1.5rem;
  font-size: 1rem;
  color: #333;
  transition: max-height 0.5s ease, opacity 0.5s ease;
  max-height: 80px;
  overflow: hidden;
}

.subsidiary-card:hover .subsidiary-desc {
  max-height: 500px;
}

.subsidiaries-deck {
  position: relative;
  height: 500px;
  /* adjust as needed */
  width: 340px;
  margin: 0 auto;
}

/* === Subsidiary Card Image Height Fix === */
.image-carousel {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-carousel img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
}

/* === Description Clamp === */
.card-text .desc {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
  max-height: 6.8em;
}

/* Reveal full paragraph on hover */
.subsidiary-card:hover .card-text .desc {
  -webkit-line-clamp: unset;
  max-height: 500px;
}

/* ============ CLIENTS SECTION ============ */
.clients-section {
  background: #f1f4f8;
  padding: 5rem 2rem;
  text-align: center;
}

.scroll-item img {
  pointer-events: none;
  user-drag: none;
  -webkit-user-drag: none;
}

.clients-section h2 {
  font-size: 2.5rem;
  color: #003C8B;
  font-family: 'Barlow Condensed', sans-serif;
  margin-bottom: 1rem;
}

.clients-section p {
  font-size: 1.1rem;
  color: #444;
  margin-bottom: 2rem;
  font-family: 'Marcellus', serif;
}

.client-scrollbar {
  overflow-x: auto;
  white-space: nowrap;
  cursor: grab;
  scroll-behavior: smooth;
  user-select: none;
  padding: 20px;
}

/* === AUTO SCROLL ANIMATION === */
@keyframes autoScroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* Wrap logos in inner flex container to allow infinite scroll illusion */
.client-scroll-wrapper {
  display: flex;
  gap: 2rem;
  animation: autoScroll 60s linear infinite;
}

/* Pause animation on hover */
.client-scrollbar:hover .client-scroll-wrapper {
  animation-play-state: paused;
}

.client-scrollbar::-webkit-scrollbar {
  display: none;
}

.client-logo {
  flex: 0 0 auto;
  width: 120px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.client-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.client-logo:hover {
  transform: scale(1.5);
  z-index: 3;
}

/* ============ DARK MODE ============ */
.dark-mode body {
  background-color: #1b1b1b;
  color: #eee;
}

.dark-mode .subsidiaries-section {
  background: #2a2a2a;
}

.dark-mode .subsidiary-card {
  background: #333;
  color: #eee;
}

.dark-mode .clients-section {
  background: #1e1e1e;
}

.dark-mode .subsidiary-desc {
  color: #ddd;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 2.5rem;
  }

  .subsidiary-card:hover {
    transform: scale(1.05);
  }

  .client-logo:hover {
    transform: scale(1.2);
  }
}