/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Helvetica Neue', sans-serif;
  background-color: #fff;
  color: #222;
  line-height: 1.6;
}

a {
  color: #005577;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
header {
  position: sticky; /* Magic line! */
  top: 0;           /* Required for sticky to work */
  z-index: 1000;    /* Ensures header stays above other content */
  /* Your existing styles below */
  background: #f8f8f8;
  padding: 3px 0;
  border-bottom: 1px solid #ddd;
  /* position: relative; */
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 80px;
  width: auto;
  transition: height 0.3s ease; /* Add this line */
}

.logo img:hover {
  transform: scale(1.03); /* Optional subtle hover */
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
}

.nav-links li a {
  font-weight: 500;
  padding: 5px 0;
  transition: all 0.3s ease;
}

.nav-links li a:hover {
  color: #003344;
}

/* ✅ Hide menu toggle by default (for desktop) */
.menu-toggle {
  display: none;
}

/* Hero Image - Desktop (original 1600x700) */
.hero {
  padding: 0;
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
}

/* Hero Text */
.hero-text {
  background: #005577;
  color: #fff;
  text-align: center;
  padding: 40px 20px;
}

.hero-text h1 {
  font-size: 2.8rem;
  margin-bottom: 20px;
}

.hero-text p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.cta-button {
  padding: 12px 24px;
  background-color: #003344;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}

.cta-button:hover {
  background-color: #001f2a;
}

/* Section */
.section {
  padding: 40px 20px;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  text-align: center;
}

/* Grid Layouts */
.service-grid,
.who-grid,
.case-grid,
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.service-box,
.client-box,
.case-box,
.testimonial-box {
  background: #f9f9f9;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}

.service-box:hover,
.client-box:hover,
.case-box:hover,
.testimonial-box:hover {
  transform: translateY(-5px);
}

/* Footer */
footer {
  background: #222;
  color: #eee;
  padding: 30px 20px 15px;
  font-size: 0.9rem;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.footer-links a {
  color: #ccc;
}

.footer-links a:hover {
  color: #fff;
}

.footer-social {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.footer-social a {
  color: #ccc;
}

.footer-social a:hover {
  color: #fff;
}

.footer-bottom {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 20px;
  color: #999;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: #005577 url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M7 14l5-5 5 5z"/></svg>') center no-repeat;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 999;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  transform: translateY(10px);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: #003344;
  transform: translateY(-3px);
}

/* Mobile Styles */
@media (max-width: 767px) {
  .menu-toggle {
    display: block;
    cursor: pointer;
    font-size: 1.8rem;
    background: none;
    border: none;
    color: #222;
    padding: 5px 10px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #f8f8f8;
    flex-direction: column;
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
    z-index: 1000;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    margin: 5px 0;
    border-bottom: 1px solid #eee;
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links a {
    padding: 12px 0;
    display: block;
    color: #222;
  }

  .nav-links a:hover {
    background: #eee;
    padding-left: 10px;
  }

  /* Mobile Hero - Square Version */
  .hero {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* Square aspect ratio */
    overflow: hidden;
  }

  .hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .hero-text {
    padding: 25px 15px;
  }
  
  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text p {
    font-size: 1rem;
  }

  .footer-links ul,
  .footer-social {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
}

/* Hero Slideshow */
.hero-slideshow {
  position: relative;
  height: 700px;
  overflow: hidden;
}

.hero-slideshow .slide {
  position: absolute;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: slideShow 20s infinite;
  animation-timing-function: ease-in-out;
  animation-fill-mode: both;
}

.hero-slideshow .slide1 {
  background-image: url('image/hero1.png');
  animation-delay: 0s;
}

.hero-slideshow .slide2 {
  background-image: url('image/hero2.png');
  animation-delay: 5s;
}

.hero-slideshow .slide3 {
  background-image: url('image/hero3.png');
  animation-delay: 10s;
}

.hero-slideshow .slide4 {
  background-image: url('image/hero4.png');
  animation-delay: 15s;
}

@keyframes slideShow {
  0% { opacity: 0; }
  5% { opacity: 1; }
  25% { opacity: 1; }
  30% { opacity: 0; }
  100% { opacity: 0; }

}

/* ===== Scroll-Shrink Header ===== */
header {
  transition: all 0.3s ease; /* Smooth resizing */
}

header.shrink {
  padding: 5px 0 !important; /* Force override */
}

header.shrink .logo img {
  height: 50px !important; /* Smaller logo */
}

/* Mobile-specific shrink */
@media (max-width: 767px) {
  header.shrink {
    padding: 2px 0 !important; /* Ultra-thin on mobile */
  }
  header.shrink .logo img {
    height: 40px !important;
  }
}

/* ======================
   Dropdown Menu Styles
   ====================== */
.nav-links li {
  position: relative;
}

/* Hide submenus by default */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  list-style: none;
  padding: 0;
  margin: 0;
  z-index: 2000;
}

/* Submenu items */
.dropdown-menu li a {
  display: block;
  padding: 10px 15px;
  color: #222;
  white-space: nowrap;
}

.dropdown-menu li a:hover {
  background: #f5f5f5;
}

/* Show submenu on desktop hover */
.dropdown:hover > .dropdown-menu {
  display: block;
}

/* Mobile behavior */
@media (max-width: 767px) {
  .dropdown-menu {
    position: static;
    border: none;
    box-shadow: none;
  }
  .dropdown.show > .dropdown-menu {
    display: block;
  }
}


/* Arrows inside dropdown links */
.dropdown-toggle .arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}

/* Desktop hover rotates arrow */
.dropdown:hover > a .arrow {
  transform: rotate(180deg);
}

/* Mobile expand rotates arrow */
.dropdown.show > a .arrow {
  transform: rotate(180deg);
}
