/* =========================
   RESET & GLOBAL
========================= */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px; /* Prevents content from being hidden under fixed navbar */
}

body {
  font-family: 'Montserrat', sans-serif;
  background: #f6f7fb;
  color: #000;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: auto;
}

/* Header height variable */
:root {
  --header-height: 80px; /* Adjust based on actual header height */
}

/* =========================
   NAVBAR
========================= */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #ffffff;
  padding: 20px 80px;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: all 0.3s;
}

header.scrolled {
  background: #f6f7fb;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo img {
  max-height: 45px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
}

.nav-links a {
  color: #253d7f;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: #09061f;
}

/* Dropdown (Services) */
.nav-links .dropdown {
  position: relative;
}

.nav-links .dropdown-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.nav-links .caret {
  font-size: 0.7em;
  line-height: 1;
  transition: transform 0.18s ease;
}

.nav-links .dropdown-menu {
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  min-width: 200px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(8, 30, 80, 0.08);
  padding: 8px 0;
  display: none;
  z-index: 1200;
}

.nav-links .dropdown-menu li a {
  display: block;
  padding: 0.6rem 1rem;
  color: #2c2e5f;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links .dropdown-menu li a:hover {
  background: rgba(11, 100, 198, 0.06);
  color: #0b64c6;
}

/* Desktop: Hover to open dropdown */
@media (hover: hover) and (min-width: 769px) {
  .nav-links .dropdown:hover > .dropdown-menu {
    display: block;
  }
  .nav-links .dropdown:hover > .dropdown-link .caret {
    transform: rotate(180deg);
  }
}

/* Buttons */
.btn {
  background: #290fab;
  color: #fff;
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s;
  display: inline-block;
}

.btn:hover {
  background: #3c4870;
}

.menu-toggle {
  display: none;
  font-size: 24px;
  color: #253d7f;
  cursor: pointer;
  background: none;
  border: none;
}

/* =========================
   HERO / PAGE TITLE SECTION
========================= */
.about-section {
  padding: 140px 20px 60px;
  background: #4644d8;
  text-align: center;
}

.about-section h1 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: #ffffff;
}

.about-section .intro {
  max-width: 700px;
  margin: auto;
  font-size: 1rem;
  color: #fcfcfc;
  line-height: 1.6;
}

/* =========================
   TEAM SECTION
========================= */
.team-section {
  padding: 80px 20px;
  background: #f6f7fb;
}

.team-section h2 {
  text-align: center;
  color: #253d7f;
  margin-bottom: 40px;
  font-size: 2rem;
}

.team-member {
  display: flex;
  align-items: center;
  background: #fff;
  margin-bottom: 25px;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.team-member img {
  width: 130px;
  height: 130px;
  object-fit: cover;
  border-radius: 50%;
  margin-right: 25px;
  flex-shrink: 0;
}

.member-info h3 {
  margin: 0 0 5px;
  color: #253d7f;
  font-size: 1.3rem;
}

.member-info p {
  margin: 5px 0;
  color: #444;
}

/* CEO special styling */
.ceo img {
  width: 160px;
  height: 160px;
}

.ceo .member-info h3 {
  font-size: 1.6rem;
}

/* =========================
   TEAM GALLERY
========================= */
.team-gallery {
  margin-top: 60px;
  padding: 40px 0;
  border-top: 1px solid #e0e0e0;
}

.team-gallery h3 {
  text-align: center;
  font-size: 1.8rem;
  color: #253d7f;
  margin-bottom: 40px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.12);
  transition: all 0.4s ease;
  background: #fff;
}

.gallery-item:hover {
  transform: translateY(-12px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.2);
}

.gallery-item img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

/* Optional caption overlay */
.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff;
  padding: 30px 20px 20px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-caption {
  opacity: 1;
}

.gallery-caption h4 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.gallery-caption p {
  font-size: 0.95rem;
  opacity: 0.9;
}

/* =========================
   DARK FOOTER
========================= */
.dark-footer {
  background: #0d0d0d;
  color: #fff;
  padding: 70px 40px 30px;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-logo {
  font-size: 1.8rem;
  color: #f3c522;
  margin-bottom: 15px;
}

.footer-col h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: #f3c522;
}

.footer-col p {
  font-size: 0.95rem;
  color: #ccc;
  line-height: 1.6;
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
  color: #ccc;
  font-size: 0.95rem;
}

.footer-col ul li i {
  color: #f3c522;
  margin-right: 10px;
}

/* Social Icons */
.social-links a {
  display: inline-block;
  color: #fff;
  background: #1a1a1a;
  border: 1px solid #333;
  margin-right: 8px;
  width: 35px;
  height: 35px;
  line-height: 35px;
  text-align: center;
  border-radius: 50%;
  transition: 0.3s;
}

.social-links a:hover {
  background: #f3c522;
  color: #000;
}

/* Subscribe Form */
.subscribe-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.subscribe-form input {
  flex: 1;
  padding: 10px 15px;
  border-radius: 30px;
  border: none;
  outline: none;
  font-size: 0.95rem;
}

.subscribe-form button {
  background: #f3c522;
  color: #000;
  border: none;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.subscribe-form button:hover {
  background: #dcb30f;
}

/* Footer Bottom */
.footer-bottom {
  border-top: 1px solid #222;
  text-align: center;
  padding-top: 20px;
  margin-top: 40px;
  color: #aaa;
  font-size: 0.9rem;
}

/* =========================
   RESPONSIVE (Mobile Menu + Dropdown Fix)
========================= */
@media (max-width: 768px) {
  header {
    padding: 15px 20px;
  }

  .desktop-only {
    display: none !important;
  }

  .menu-toggle {
    display: block;
  }

  /* Mobile side panel */
  .nav-links {
    position: fixed;
    top: var(--header-height);
    right: 0;
    background: #ffffff;
    width: 280px;
    height: calc(100vh - var(--header-height));
    flex-direction: column;
    padding: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.25);
    z-index: 999;
    overflow-y: auto;
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .nav-links > li {
    width: 100%;
    border-bottom: 1px solid #e0e0e0;
  }

  .nav-links a {
    padding: 1rem 0;
    font-size: 1.15rem;
    display: block;
    width: 100%;
    color: #253d7f;
  }

  /* Mobile dropdown - indented to the side */
  .nav-links .dropdown {
    position: static;
  }

  .nav-links .dropdown > .dropdown-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    font-size: 1.15rem;
    font-weight: 600;
  }

  .nav-links .dropdown-menu {
    position: static;
    display: none;
    width: 100%;
    background: transparent;
    box-shadow: none;
    padding: 0.5rem 0 1rem 1.5rem; /* Indented to the side */
    border-radius: 0;
  }

  .nav-links .dropdown.open .dropdown-menu {
    display: block;
  }

  .nav-links .dropdown-menu li a {
    padding: 0.8rem 1rem;
    background: #f0f4ff;
    color: #253d7f;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  }

  .nav-links .dropdown-menu li a:hover {
    background: #dbe5ff;
  }

  .nav-links .dropdown.open .caret {
    transform: rotate(180deg);
  }

  /* Team & Gallery mobile adjustments */
  .team-member {
    flex-direction: column;
    text-align: center;
  }

  .team-member img {
    margin: 0 auto 15px;
  }

  .about-section h1 {
    font-size: 2rem;
  }

  .team-section h2 {
    font-size: 1.8rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .gallery-item img {
    height: 280px;
  }

  .team-gallery h3 {
    font-size: 1.6rem;
  }

  /* Footer responsive */
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .social-links a {
    margin: 5px;
  }

  .subscribe-form {
    flex-direction: column;
  }

  .subscribe-form input,
  .subscribe-form button {
    width: 100%;
  }
}