* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  color: #333;
  line-height: 1.6;
  background: #fff;
  overflow-x: hidden;
}

.container {
  width: 90%;
  max-width: 2000px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: #fff;
  padding: 20px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s;
}

.header.scrolled {
  padding: 10px 0;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo img {
  height: 70px;
  width: 130px;
  transition: all 0.3s;
}

.nav ul {
  list-style: none;
  display: flex;
  gap: 40px;
  align-items: center;
}

.nav a {
  text-decoration: none;
  color: #262262;
  font-weight: 500;
  font-size: 16px;
  transition: color 0.3s;
  position: relative;
}

.nav a:hover,
.nav a.active {
  color: #27aae1;
}

.nav a.active::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 3px;
  background: #27aae1;
  border-radius: 2px;
}

.btn-primary {
  background: #262262;
  color: #fff !important;
  padding: 12px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(38, 34, 98, 0.3);
  display: inline-block;
}

.btn-primary:hover {
  background: #27aae1;
  transform: translateY(-3px);
  box-shadow: 0 4px 25px rgba(39, 170, 225, 0.4);
}

.btn-large {
  padding: 16px 40px;
  font-size: 18px;
}

.mobile-only-btn {
  display: none;
}
.desktop-btn {
  display: block;
}
.menu-toggle {
  display: none;
}

.btn-secondary {
  background: transparent;
  color: #262262;
  border: 2px solid #262262;
  padding: 14px 32px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary:hover {
  background: #262262;
  color: #fff;
  border-color: #262262;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 100px;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(38, 34, 98, 0.05);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: #333;
  margin-bottom: 16px;
  font-weight: 600;
  letter-spacing: 2px;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw + 1rem, 4rem);
  font-weight: 700;
  color: #262262;
  line-height: 1.2;
  margin-bottom: 30px;
}

.hero-title .highlight {
  font-size: clamp(3rem, 6vw + 1rem, 5.2rem);
  color: #262262;
  font-weight: 800;
  display: block;
  margin-top: 5px;
}

.hero-text {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: #555;
  line-height: 1.8;
  max-width: 1500px;
  margin: 0 auto 20px;
}

/* Our Services Section */
.services-section {
  padding: 80px 0;
  background: #f9fcff;
}

.section-heading {
  margin-bottom: 40px;
}

.main-heading {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: #262262;
  text-align: center;
  margin-bottom: 10px;
}

.sub-heading {
  font-size: 22px;
  color: #666;
  max-width: 800px;
  margin: 0 auto 40px;
  line-height: 1.7;
  text-align: center;
}

.services-wrapper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 30px;
}

.service-box {
  position: relative;
  height: 380px;
  perspective: 1000px;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.service-box.flipped {
  transform: rotateY(180deg);
}

.service-box .front,
.service-box .back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  transition:none;
  border-radius: 20px;
  padding: 50px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.service-box .front {
  background: #fff;
  transform: rotateY(0deg);
  z-index: 2;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.service-box .back {
  background: linear-gradient(135deg, #262262, #27aae1);
  color: #fff;
  transform: rotateY(180deg);
}

/* .service-box:hover .front {
  transform: rotateY(-180deg);
}

.service-box:hover .back {
  transform: rotateY(0deg);
} */

.service-box .icon {
  font-size: 60px;
  margin-bottom: 25px;
}

.service-box h3 {
  font-size: 26px;
  font-weight: 700;
  color: #262262;
  margin-bottom: 15px;
}

.service-box .front p {
  font-size: 18px;
  color: #27aae1;
  font-weight: 600;
}

.service-box .back p {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 25px;
}

.learn-more {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid #fff;
  padding-bottom: 5px;
  transition: all 0.3s;
}

.learn-more:hover {
  letter-spacing: 1px;
  border-color: transparent;
}

.services-cta {
  margin-top: 50px;
  text-align: center;
  padding: 20px 0;
}

.services-cta .btn-primary {
  display: inline-block;
  padding: 18px 45px;
  font-size: 19px;
  font-weight: 700;
  border-radius: 50px;
  box-shadow: 0 10px 30px rgba(38, 34, 98, 0.25);
  transition: all 0.4s ease;
}

.services-cta .btn-primary:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(39, 170, 225, 0.4);
  background: #27aae1;
}

/* Footer Styles */
.footer {
  background: linear-gradient(135deg, #1a1a3d 0%, #262262 100%);
  color: #e0e0ff;
  padding: 100px 0 40px;
  position: relative;
}

.footer .container {
  width: 90%;
  max-width: 2000px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #27aae1, #262262, #27aae1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr 1.3fr;
  gap: 50px;
  margin-bottom: 60px;
}

.footer-logo img {
  filter: brightness(0) invert(1);
  margin-bottom: 25px;
  transition: transform 0.3s;
}

.footer-logo img:hover {
  transform: scale(1.05);
}

.footer-desc {
  font-size: 15.5px;
  line-height: 1.8;
  color: #b8b8ff;
  margin-bottom: 30px;
}

.footer-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 28px;
  position: relative;
  padding-bottom: 12px;
}

.footer-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 90px;
  height: 4px;
  background: #27aae1;
  border-radius: 2px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 14px;
}

.footer-links a {
  color: #b8b8ff;
  text-decoration: none;
  font-size: 15px;
  transition: all 0.3s;
  display: inline-block;
}

.footer-links a:hover {
  color: #27aae1;
  transform: translateX(8px);
}

.contact-item {
  display: flex;
  gap: 16px;
  margin-bottom: 22px;
  font-size: 15px;
  align-items: flex-start;
}

.contact-item .material-icons-round {
  color: #27aae1;
  font-size: 22px;
  margin-top: 2px;
  flex-shrink: 0;
}

.contact-item a {
  color: #e0e0ff;
  text-decoration: none;
  transition: color 0.3s;
}

.contact-item a:hover {
  color: #27aae1;
}

/* Footer Bottom */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14.5px;
  color: #aaaaff;
}

.footer-bottom-links a {
  color: #aaaaff;
  text-decoration: none;
  margin: 0 12px;
  transition: color 0.3s;
}

.copyright {
  margin: 0 0 20px;
  font-size: 14px;
  opacity: 0.9;
}

/* Social Icons - Perfect & Clean */
.footer-social {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 19px;
  border-radius: 50%;
  transition: all 0.3s ease;
  text-decoration: none !important; /* Force remove underline */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.footer-social a:hover {
  background: #27aae1;
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(39, 170, 225, 0.3);
  text-decoration: none !important;
  color: #fff;
}

/* Bottom links */
.footer-bottom-links {
  margin-top: 20px;
  font-size: 14px;
}

.footer-bottom-links a:hover {
  color: #27aae1;
  text-decoration: underline;
}

.separator {
  margin: 0 10px;
  color: #666;
}

/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed;
  width: 80px;
  height: 80px;
  bottom: 30px;
  right: 30px;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  text-align: center;
  font-size: 35px;
  box-shadow: 0 8px 25px rgba(37, 197, 102, 0.4);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  text-decoration: none !important;
}

.whatsapp-float:hover {
  transform: scale(1.15);
  background: #1ebe57;
  box-shadow: 0 12px 35px rgba(37, 197, 102, 0.5);
  color: #fff;
}

/* Optional Tooltip */
.whatsapp-tooltip {
  position: absolute;
  right: 80px;
  top: 50%;
  transform: translateY(-50%);
  background: #262262;
  color: #fff;
  padding: 10px 18px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.whatsapp-tooltip::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 100%;
  margin-top: -8px;
  border: 8px solid transparent;
  border-left-color: #262262;
}

.whatsapp-float:hover .whatsapp-tooltip {
  opacity: 1;
  visibility: visible;
  right: 90px;
}

@media (max-height: 650px) {
  .header {
    padding: 10px 0; /* Slimmer header */
  }
  
  .nav {
    padding-top: 60px; /* Less top padding in menu */
  }

  .logo img {
    height: 50px; /* Smaller Logo */
    width: auto;
  }

  .hero {
    padding-top: 80px; /* Pull hero content up */
    min-height: auto; /* Allow content to dictate height if needed */
    padding-bottom: 50px;
  }
}

@media (max-width: 1080px) {
  /* Toggle Button Visible */
  .menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 28px;
    color: #262262;
    cursor: pointer;
    z-index: 1001;
  }

  /* Slide-out Navigation */
  .nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 300px;
    height: 100vh;
    background: #fff;
    padding: 80px 25px 30px;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.1);
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow-y: auto; /* Handles vertical scroll on short screens */
  }

  .nav.active {
    left: 0;
  }

  .nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
  }

  .nav a {
    font-size: 17px;
    display: block;
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
  }

  /* Overlay Background */
  .nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(38, 34, 98, 0.6); /* Darker overlay for better focus */
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(3px); /* Modern blur effect */
  }

  .nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* Hide Desktop Button, Show Mobile Button */
  .desktop-btn {
    display: none;
  }

  .mobile-only-btn {
    display: block;
    width: 100%;
    margin-top: 20px;
  }
  
  .mobile-only-btn .btn-primary {
    display: block;
    text-align: center;
    width: 100%;
  }

  /* Adjust Services Grid for Tablets */
  .services-wrapper {
    grid-template-columns: repeat(2, 1fr); /* 2 Columns for tablets */
    gap: 30px;
  }
}

@media (max-width: 1024px) {
  .services-wrapper {
    grid-template-columns: repeat(2, 1fr); /* 2 cols */
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 cols */
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 26px;
    color: #262262;
    cursor: pointer;
    z-index: 1001;
  }

  .nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: #fff;
    padding: 80px 20px 20px;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    transition: left 0.4s ease;
    z-index: 1000;
  }

  .nav.active {
    left: 0;
  }

  .nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .nav a {
    font-size: 18px;
    display: block;
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
  }

  .nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
  }

  .nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .desktop-btn {
    display: none;
  }

  .mobile-only-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
  }
  .mobile-only-btn .btn-primary {
    display: block;
    text-align: center;
    border-bottom: none;
  }

  .services-wrapper {
    grid-template-columns: 1fr; /* 1 col */
    max-width: 400px;
    margin: 0 auto;
  }

  .service-box {
    height: 340px;
  }
}

@media (max-width: 480px) {
  .hero-title .highlight {
    font-size: 2.8rem;
  }

  .footer-grid {
    grid-template-columns: 1fr; /* 1 col stack */
    text-align: center;
    gap: 30px;
  }

  .footer-title::after {
    margin: 8px auto 0;
  } /* Center underline */
  .contact-item {
    justify-content: center;
  }
  .footer-social {
    justify-content: center;
    margin-top: 10px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .logo img {
    height: 50px;
  }
}

@media (max-width: 840px) and (min-height: 1100px),
       (max-width: 1024px) and (min-height: 1300px) {
  .header .container {
    padding: 0 15px;
  }
  .nav ul {
    gap: 25px;
  }
  .nav a {
    font-size: 15px;
  }
  .btn-primary {
    padding: 10px 24px;
    font-size: 14.5px;
  }
}

@media (max-width: 1024px) and (min-height: 1300px) {
  .nav ul {
    gap: 30px;
  }
}

@media (max-width: 920px) and (orientation: portrait) {
  .header {
    padding: 15px 0;
  }
  .logo img {
    height: 60px;
    width: auto;
  }
  .nav a {
    font-size: 15px;
  }
  .desktop-btn .btn-primary {
    padding: 10px 22px;
    font-size: 14px;
  }
}

@media (max-width: 1024px) and (max-height: 650px) {
  .header {
    padding: 10px 0;
  }
  .logo img {
    height: 55px;
  }
  .nav ul {
    gap: 20px;
  }
  .nav a {
    font-size: 14.5px;
  }
  .btn-primary {
    padding: 9px 20px;
    font-size: 14px;
  }
}

@media (max-width: 360px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .footer-title {
    font-size: 20px;
  }
  .footer-title::after {
    left: 50% !important;
    transform: translateX(-50%);
    margin-left: 0 !important;
  }

  .footer-contact .contact-item {
    justify-content: center;
  }

  .footer-social a {
    width: 50px;
    height: 50px;
    font-size: 18px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .footer-bottom-links {
    margin-top: 10px;
  }
}

/* Small to medium phones: 360px – 428px (iPhone 12/13/14 Pro Max, Pixel 7, etc.) */
@media (min-width: 361px) and (max-width: 428px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 45px;
  }

  .footer-title::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .contact-item {
    justify-content: center;
  }

  .footer-desc {
    font-size: 14.5px;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 18px;
  }
}

/* Extra small height devices (e.g. 412×914 in landscape folded phones) */
@media (max-height: 800px) and (orientation: landscape) {
  .footer {
    padding: 70px 0 30px;
  }
  .footer-grid {
    gap: 30px;
  }
  .footer-title {
    margin-bottom: 20px;
  }
}

/* Final polish: ensure footer underline is always perfectly centered on mobile */
@media (max-width: 768px) {
  .footer-title::after {
    left: 22%;
    transform: translateX(-50%);
  }
}

@media (max-width: 550px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 35px;
  }

  /* Force Centering of Footer Titles */
  .footer-title {
    font-size: 20px;
    margin-bottom: 25px;
    position: relative; /* Essential for the ::after positioning */
    display: inline-block; /* Helps maintain width context */
    width: 100%;
  }

  /* The Centering Magic for the Underline */
  .footer-title::after {
    content: "";
    position: absolute;
    left: 50% !important;        /* Move to center */
    bottom: -10px;               /* Adjust vertical distance */
    transform: translateX(-50%); /* Pull back by half its own width */
    width: 80px !important;      /* Fixed width for consistency */
    height: 3px;
    background: #27aae1;
    border-radius: 2px;
    margin: 0 !important;        /* Reset any existing margins */
  }

  /* Center Contact Icons and Text */
  .contact-item {
    justify-content: center;
    text-align: center;
  }

  /* Center Social Icons */
  .footer-social {
    justify-content: center;
    width: 100%;
  }

  /* Stack Bottom Links */
  .footer-bottom {
    flex-direction: column;
    gap: 15px;
    padding-bottom: 80px; /* Extra space for WhatsApp button */
  }
}