/* Reset and base */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Montserrat', sans-serif; color: #333; line-height: 1.6; }

/* Variables */
:root {
  --primary: #3448cb;
  --accent: #5b75ee;
  --light: #ffffff;
  --dark: #1e1e1e;
  --grey: #f7f7f7;
}

/* Container */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Links */
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* Navbar */
.navbar {
  background: var(--primary);
  position: fixed;
  width: 100%;
  z-index: 1000;
}
.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  /* position relative removed for standard nav layout */
}
.nav-links {
  display: flex;
  gap: 2rem;
}
.nav-links li { margin: 0; }
.nav-links a {
  color: var(--light);
  font-weight: 600;
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--accent); }
.mobile-menu-icon {
  display: none;
  color: var(--light);
  font-size: 1.5rem;
  cursor: pointer;
  /* static positioning within flex container */
}

/* Hero */
/* Hero section styling */
.hero {
  background: var(--primary);
  color: var(--light);
  padding: 4rem 0;
}

.hero .logo {
  margin: 4rem auto;
  display: block;
  width: 40%;
}

/* Hero two-column layout */
.hero-wrapper {
  display: flex;
  align-items: center;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.hero-content {
  flex: 1 1 400px;
}
.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.hero-content .lead {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.hero-content p {
  font-size: 1rem;
  margin-bottom: 1.5rem;
}
.hero-image {
  flex: 1 1 400px;
  text-align: right;
}
.hero-image img {
  max-width: 100%;
  border-radius: 8px;
}
.btn {
  background: var(--accent);
  color: var(--light);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  transition: opacity 0.3s;
  font-weight: 600;
}
.btn:hover { opacity: 0.8; }

/* Sections */
section { padding: 5rem 0; }
.about-section { background: var(--grey); }
.services-section { background: #fff; }

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.service-item {
  background: var(--light);
  padding: 2rem;
  text-align: center;
  border: 1px solid #eee;
  border-radius: 8px;
  transition: transform 0.3s;
}
.service-item i { color: var(--primary); margin-bottom: 1rem; }
.service-item h3 { margin: 1rem 0; }
.service-item p { font-size: 0.95rem; color: #555; }
.service-item:hover { transform: translateY(-5px); }

/* Why us */
.why-section .why-list { margin-top: 2rem; }
.why-list li { margin-bottom: 1rem; font-size: 1.1rem; }
.why-list i { color: var(--accent); margin-right: 0.5rem; }

/* CTA */
.cta-section {
  background: var(--primary);
  color: var(--light);
  text-align: center;
}
.cta-section h2 { font-size: 2.5rem; margin-bottom: 1rem; }
.cta-section p { font-size: 1.2rem; }

/* Contact */
.contact-section .contact-content {
  display: block;
  margin-top: 2rem;
}
/** Embed Google Map **/
.map-container {
  margin-top: 2rem;
  width: 100%;
}
.contact-info p {
  padding: 5px 0;
}
.contact-info p,
.contact-info .map { margin-bottom: 1rem; }
.contact-info i { color: var(--light); margin-right: 0.5rem; }
.contact-form form {
  display: flex;
  flex-direction: column;
}
.contact-form input,
.contact-form textarea {
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}
.contact-form button { align-self: flex-start; }

/* Flash message */
.flash {
  background: #d4edda;
  color: #155724;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}
/* Brand text in navbar */
.logo-text {
  color: var(--light);
  font-weight: 700;
  font-size: 1.25rem;
}

/* Services section bullet lists */
.services-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.services-col li {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
  color: var(--dark);
}
.services-col i {
  color: var(--primary);
  margin-right: 0.75rem;
}

/* Team section */
.team-section {
  background: var(--grey);
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  justify-items: center;
  margin-top: 2rem;
}
.team-member img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
}
.team-member h3 {
  margin-top: 1rem;
  font-size: 1.1rem;
  color: var(--dark);
}
.team-member p {
  font-size: 0.95rem;
  color: #555;
}

/* FAQ section */
section.faq-section {
  padding: 5rem 0 0;
}
.faq-item {
  margin-bottom: 1.5rem;
}
.faq-item h3 {
  font-size: 1.1rem;
  color: var(--dark);
  margin-bottom: 0.5rem;
}
.faq-item p {
  color: #555;
  line-height: 1.4;
}

/* Footer */
.footer {
  background: var(--dark);
  color: var(--light);
  text-align: center;
  padding: 1rem 0;
}

/* Responsive */
@media (max-width: 768px) {
  .navbar .container {
    gap: 1rem;
  }
  .logo-text {
    margin-right: auto;
  }
  .mobile-menu-icon {
    order: 2;
    margin-right: 1rem;
  }
  .lang-switcher {
    order: 3;
  }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--primary);
    width: 100%;
    flex-direction: column;
    align-items: center;
    max-height: 0;
    overflow-y: scroll;
    transition: max-height 0.3s ease-out;
    gap: 0;
  }
  .nav-links.open { max-height: 300px; }
  .nav-links li { margin: 0 0; padding: 10px 0; }
  .mobile-menu-icon { display: block; }
  .contact-section .contact-content {
    grid-template-columns: 1fr;
  }
}

/* Hero background image with overlay */
.hero {
  position: relative;
  background: var(--primary);
  color: var(--light);
  padding: 6rem 0;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
}

.hero .container {
  position: relative;
  z-index: 1;
}

/* Lazy loading hero background */
.hero.bg-loaded {
  background: url('../images/hero.png') center/cover no-repeat;
}

.hero-image {
  display: none;
}

/* Contact form full width */
.contact-form input,
.contact-form textarea,
.contact-form button.btn {
  width: 100%;
}
/* Scroll-triggered animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fade animations */
.fade-in {
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}
.fade-in.visible {
  opacity: 1;
}

.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-down {
  opacity: 0;
  transform: translateY(-30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in-down.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Slide animations */
.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Scale animations */
.scale-in {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* Staggered animations for lists */
.stagger-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.stagger-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero content animation */
.hero-content h1 {
  opacity: 0;
  transform: translateY(30px);
  animation: heroTitleFade 1s ease-out 0.3s forwards;
}

.hero-content .lead {
  opacity: 0;
  transform: translateY(30px);
  animation: heroTitleFade 1s ease-out 0.6s forwards;
}

.hero-content p {
  opacity: 0;
  transform: translateY(30px);
  animation: heroTitleFade 1s ease-out 0.9s forwards;
}

.hero-content .btn {
  opacity: 0;
  transform: translateY(30px);
  animation: heroTitleFade 1s ease-out 1.2s forwards;
}

@keyframes heroTitleFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Language Switcher */
.lang-switcher {
  position: relative;
}
.lang-switcher .lang-active {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.5rem;
}
.lang-switcher .lang-active .flag-icon {
  width: 1.5rem;
  height: 1rem;
}
.lang-switcher .lang-active i {
  font-size: 0.8rem;
  color: var(--light);
}
.lang-switcher .lang-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--primary);
  padding: 0.5rem;
  border-radius: 4px;
  display: none;
  flex-direction: column;
  z-index: 1000;
}
.lang-switcher:hover .lang-dropdown {
  display: flex;
}
.lang-switcher .lang-dropdown li {
  margin: 0.25rem 0;
}
.lang-switcher .lang-dropdown li .flag-icon {
  width: 1.5rem;
  height: 1rem;
}
.lang-switcher .lang-dropdown li a {
  display: block;
}