/* Reset and base styling */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
  font-family: 'Poppins', sans-serif;
  background-color: #f9fafb;
  color: #1f2937;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  margin: 0;
  padding: 0;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}
/* Loading Screen */
.loader-bg {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #1E3A8A, #2548b4, #2f5ce1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  font-weight: 700;
  font-size: 1.3rem;
  z-index: 9999;
  transition: opacity 0.6s ease;
}
.loader-bg.fade-out {
  opacity: 0;
  pointer-events: none;
}
.loader {
  border: 4px solid rgba(255, 255, 255, 0.15);
  border-top-color: #D4AF37;
  border-radius: 50%;
  width: 54px;
  height: 54px;
  animation: spin 1.1s linear infinite;
  margin-bottom: 1rem;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
/* Background floating circles */
.bg-animated {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}
.bg-animated .circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.08);
  animation: floatUp 20s infinite ease-in-out;
}
.bg-animated .circle.delay {
  animation-delay: 10s;
  background: rgba(30, 58, 138, 0.05);
}
.bg-animated .circle.small {
  width: 80px;
  height: 80px;
  bottom: 5vh;
  left: 20vw;
  opacity: 0.15;
  animation: floatUp 25s infinite ease-in-out reverse;
}
.bg-animated .circle:nth-child(1) {
  width: 150px;
  height: 150px;
  top: 70vh;
  left: 10vw;
  opacity: 0.12;
}
.bg-animated .circle:nth-child(2) {
  width: 200px;
  height: 200px;
  top: 20vh;
  left: 70vw;
  opacity: 0.1;
}
@keyframes floatUp {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-30px) translateX(20px); }
}
/* Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: #D4AF37;
  width: 0%;
  z-index: 9999;
  transition: width 0.2s ease-out;
}
/* Header and Navbar */
header {
  background: #1E3A8A;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.navbar {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
.logo span {
  color: #D4AF37;
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  user-select: none;
}
/* Menu Button */
.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1100;
}
.menu-btn span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #D4AF37;
  border-radius: 2px;
  transition: all 0.3s ease;
}
/* Navigation Links */
#nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
  position: relative;
}
#nav-links a {
  color: #D4AF37;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.02em;
  position: relative;
  transition: color 0.3s ease;
}
#nav-links a:hover,
#nav-links a.active {
  color: #FFDB00;
}
#nav-links a::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  background: #FFDB00;
  left: 0;
  bottom: -6px;
  border-radius: 2px;
  transition: width 0.3s ease;
}
#nav-links a:hover::after,
#nav-links a.active::after {
  width: 100%;
}
/* Navigation background for mobile dropdown */
.nav-bg {
  display: none;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 6rem 2rem 4rem;
  background: linear-gradient(135deg, #1E3A8A 0%, #2548b4 40%, #2f5ce1 100%);
  color: white;
  position: relative;
  overflow: hidden;
  z-index: 0;
}
.hero h1 {
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 3.2rem);
  margin-bottom: 1rem;
  min-height: 3.2rem; /* reserve space for the typing effect */
  font-feature-settings: "liga" 0;
}
.hero-sub {
  font-weight: 400;
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  opacity: 0.9;
  margin-bottom: 2rem;
}
/* Button styles */
.btn {
  background-color: #D4AF37;
  color: #1E3A8A;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 1.125rem;
  box-shadow: 0 6px 15px rgba(212,175,55,0.35);
  transition: all 0.3s ease;
  display: inline-block;
  cursor: pointer;
  user-select: none;
  will-change: transform, box-shadow;
  position: relative;
  overflow: hidden;
}
.btn:hover,
.btn:focus {
  background-color: #ffdb00;
  color: #1a237e;
  box-shadow: 0 10px 25px rgba(255, 219, 0, 0.6);
  transform: translateY(-3px);
}
/* Pulse animation for CTA button */
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.5); }
  50% { box-shadow: 0 0 12px 8px rgba(212, 175, 55, 0.2); }
}
.anim-pulse {
  animation: pulse 2.5s infinite ease-in-out;
}
/* Section styling */
section {
  max-width: 1100px;
  margin: 4rem auto;
  padding: 0 2rem;
  text-align: center;
}
section h2 {
  color: #1E3A8A;
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 1rem;
  position: relative;
}
section h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: #D4AF37;
  margin: 0.25rem auto 0;
  border-radius: 3px;
}
/* Card grid for services and team */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
/* Cards */
.service-card, .team-card {
  background: rgba(255 255 255 / 0.95);
  border-radius: 12px;
  padding: 1.75rem 2rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.07);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
  user-select: none;
  will-change: transform;
}
.service-card:hover, .team-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 40px rgba(0,0,0,0.12);
  cursor: pointer;
}
/* Animations for entrance using classes triggered by JS */
.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: opacity, transform;
}
.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* Animations for staggered slide-in */
.anim-up {
  opacity: 0;
  transform: translateY(40px);
  animation-fill-mode: forwards;
  animation-name: slideUpVisible;
  animation-duration: 0.7s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.anim-delay-1 {
  animation-delay: 0.15s;
}
.anim-delay-2 {
  animation-delay: 0.3s;
}
/* Slide in from left for team cards */
.anim-left {
  opacity: 0;
  transform: translateX(-40px);
  animation-fill-mode: forwards;
  animation-name: slideLeftVisible;
  animation-duration: 0.7s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.anim-delay-3 {
  animation-delay: 0.45s;
}
.anim-delay-4 {
  animation-delay: 0.6s;
}
@keyframes slideUpVisible {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes slideLeftVisible {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
/* Responsive typography */
@media (max-width: 600px) {
  .btn {
    padding: 12px 24px;
    font-size: 1rem;
  }
  section {
    padding: 2rem 1rem;
  }
}
/* Typing animation for hero headline */
.typing {
  border-right: 3px solid #D4AF37;
  white-space: nowrap;
  overflow: hidden;
  width: 0;
  animation: typing 3.5s steps(30, end) forwards, blink-caret 0.75s step-end infinite;
  margin: 0 auto 1rem;
  max-width: 90vw;
  font-weight: 700;
}
@keyframes typing {
  to {
    width: 100%;
  }
}
@keyframes blink-caret {
  50% {
    border-color: transparent;
  }
}

/* Footer */
footer {
  background: #1E3A8A;
  color: #D4AF37;
  text-align: center;
  padding: 1.5rem 2rem;
  margin-top: 4rem;
  font-weight: 500;
}

/* ============================================
   MOBILE NAVIGATION - WORKING VERSION
   ============================================ */

@media (max-width: 768px) {
  /* Show hamburger button */
  .menu-btn {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    width: 30px !important;
    height: 22px !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    z-index: 2001 !important;
    position: relative !important;
  }
  
  .menu-btn span {
    display: block !important;
    width: 100% !important;
    height: 3px !important;
    background: #D4AF37 !important;
    transition: all 0.3s ease !important;
    border-radius: 2px !important;
  }
  
  /* Hamburger animation */
  .menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px) !important;
    background: #fff !important;
  }
  
  .menu-btn.active span:nth-child(2) {
    opacity: 0 !important;
  }
  
  .menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px) !important;
    background: #fff !important;
  }
  
  /* ============================================
   MOBILE NAVIGATION + TEXT FIXES
   ============================================ */

@media (max-width: 768px) {
  /* Show hamburger button */
  .menu-btn {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    width: 30px !important;
    height: 22px !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    z-index: 2001 !important;
    position: relative !important;
  }
  
  .menu-btn span {
    display: block !important;
    width: 100% !important;
    height: 3px !important;
    background: #D4AF37 !important;
    transition: all 0.3s ease !important;
    border-radius: 2px !important;
  }
  
  /* Hamburger animation */
  .menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px) !important;
    background: #fff !important;
  }
  
  .menu-btn.active span:nth-child(2) {
    opacity: 0 !important;
  }
  
  .menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px) !important;
    background: #fff !important;
  }
  
  /* Mobile navigation */
  #nav-links {
    position: fixed !important;
    top: 0 !important;
    right: -100% !important;
    width: 100% !important;
    height: 100vh !important;
    background: rgba(30, 58, 138, 0.98) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    transition: right 0.4s ease !important;
    z-index: 2000 !important;
    transform: none !important;
    gap: 0 !important;
  }
  
  #nav-links.open {
    right: 0 !important;
  }
  
  #nav-links a {
    color: #D4AF37 !important;
    font-size: 1.8rem !important;
    margin: 1.5rem 0 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    padding: 0 !important;
    transition: color 0.3s ease !important;
  }
  
  #nav-links a:hover,
  #nav-links a.active {
    color: #fff !important;
  }
  
  #nav-links a::after {
    display: none !important;
  }
  
  /* Prevent body scroll */
  body.menu-open {
    overflow: hidden !important;
  }
  
  /* Hide nav-bg */
  .nav-bg {
    display: none !important;
  }
  
  /* Ensure navbar layout */
  .navbar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
  
  /* MOBILE TEXT FIXES */
  
  /* Fix hero section text */
  .hero {
    padding: 4rem 1rem 3rem !important;
  }
  
  .hero h1 {
    font-size: clamp(1.5rem, 8vw, 2.5rem) !important;
    line-height: 1.2 !important;
    white-space: normal !important;
    width: auto !important;
    border-right: none !important;
    animation: none !important;
    min-height: auto !important;
  }
  
  .hero-sub {
    font-size: clamp(1rem, 4vw, 1.25rem) !important;
    margin-bottom: 1.5rem !important;
    line-height: 1.4 !important;
  }
  
  /* Fix section headings */
  section h2 {
    font-size: clamp(1.25rem, 6vw, 1.75rem) !important;
    line-height: 1.3 !important;
  }
  
  /* Fix section padding */
  section {
    padding: 0 1rem !important;
    margin: 2rem auto !important;
  }
  
  /* Fix card text */
  .service-card, .team-card {
    padding: 1.25rem !important;
  }
  
  .service-card h3, .team-card h3 {
    font-size: 1rem !important;
    line-height: 1.3 !important;
  }
  
  .service-card p, .team-card p {
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
  }
  
  /* Fix button text */
  .btn {
    padding: 12px 24px !important;
    font-size: 1rem !important;
  }
  
  /* Responsive cards */
  .card-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
  
  /* Fix logo text */
  .logo span {
    font-size: 1.2rem !important;
  }
  
  /* Fix contact section */
  .contact p {
    font-size: 0.95rem !important;
    margin: 0.5rem 0 !important;
  }
  
  /* Fix about section */
  .about p {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    text-align: justify !important;
  }
}

/* Extra small screens */
@media (max-width: 400px) {
  .hero h1 {
    font-size: clamp(1.25rem, 9vw, 2rem) !important;
  }
  
  .hero-sub {
    font-size: clamp(0.9rem, 5vw, 1.1rem) !important;
  }
  
  .hero {
    padding: 3rem 0.75rem 2.5rem !important;
  }
  
  section {
    padding: 0 0.75rem !important;
  }
  
  .service-card, .team-card {
    padding: 1rem !important;
  }
  
  .btn {
    padding: 10px 20px !important;
    font-size: 0.95rem !important;
  }
}

/* Hide hamburger on desktop */
@media (min-width: 769px) {
  .menu-btn {
    display: none !important;
  }
  
  #nav-links {
    position: relative !important;
    display: flex !important;
    flex-direction: row !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    gap: 2rem !important;
  }
}

