
/* === PERFECTED MOBILE-ONLY NAVBAR === */
@media (min-width: 992px) {
  .navbar-toggler, .menu-backdrop, #mobileMenu { display: none !important; }
}

@media (max-width: 991.98px) {
  header .header-wrap, header, .navbar { position: relative; min-height: 56px; }
  header .logo { position: absolute; left: 50%; transform: translateX(-50%); top: 8px; z-index: 1000; }
  header .logo img { max-height: 44px; }

  .navbar-toggler {
    position: absolute;
    right: 12px;
    top: 8px;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    font-size: 28px;
    z-index: 1001;
  }
  header .hamburger { display: none !important; }

  header nav > ul { display: none !important; }

  /* Animated slide-down green menu */
  #mobileMenu {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    background: #008000;
    color: #fff;
    transform: translateY(-100%);
    transition: transform 0.35s ease;
    padding: 80px 20px 20px;
    z-index: 10002;
  }
  #mobileMenu.open {
    transform: translateY(0);
  }
  #mobileMenu ul { list-style: none; padding: 0; margin: 0; }
  #mobileMenu li { margin: 0; }
  #mobileMenu a {
    display: block;
    padding: 14px 8px;
    text-decoration: none;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.2);
  }

  .menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 10001;
  }
  .menu-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
  }

  body.nav-open { overflow: hidden; }

  footer, .footer { background: #008000 !important; color: #fff !important; padding: 20px 0; }
  footer a, footer p, footer li { color: #fff !important; }

  .whatsapp-float, .call-float {
    position: fixed !important;
    bottom: 16px;
    z-index: 10000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px; height: 56px;
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
  }
  .whatsapp-float { right: 16px; background: #25d366; }
  .call-float { right: 88px; background: #007bff; }

  @media (max-width: 360px) {
    .call-float { right: 80px; }
  }
}

/* === Floating Action Buttons fix (Final Site) === */
@media (max-width: 991.98px) {
  .float-whatsapp, .float-call, .whatsapp-float, .call-float {
    position: fixed !important;
    bottom: calc(16px + env(safe-area-inset-bottom));
    right: 16px;
    width: 56px; height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
    z-index: 10050;
    background: #25d366; /* WhatsApp default */
    transform: translateZ(0);
  }
  .float-call, .call-float { 
    right: 88px; 
    background: #007bff; 
    color: #fff; 
    text-decoration: none;
    font-size: 22px;
    line-height: 1;
  }
  .float-whatsapp img, .whatsapp-float img {
    max-width: 28px; max-height: 28px;
  }
}

/* === Prevent horizontal scroll on mobile === */
html, body {
  overflow-x: hidden !important;
  width: 100% !important;
}

.container, .row, .col, .section, .wrapper {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

img, iframe, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* === Hamburger Dropdown Menu (Top-down) === */
@media (max-width: 991.98px) {
  .navbar-collapse {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: #28a745;
    padding: 0.5rem 1rem;
    border-top: 1px solid rgba(255,255,255,.2);
    animation: dropdownSlide .3s ease forwards;
    z-index: 9999;
  }
  @keyframes dropdownSlide {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

/* === Footer Links Stay in Green === */
footer, footer .container, footer .row, footer a, footer p {
  background-color: #28a745 !important;
  color: #fff !important;
}
footer a {
  color: #fff !important;
  text-decoration: none;
}

/* === Footer WhatsApp Center Position === */
footer .footer-whatsapp {
  display: block;
  text-align: center;
  margin-top: 1rem;
}

/* === Remove green highlight from credit === */
footer .credit, footer .credit a {
  background: none !important;
  color: #fff !important;
}

/* === Fix Footer Text and WhatsApp Overflow on Mobile (Final) === */
@media (max-width: 767.98px) {
  footer, footer * {
    max-width: 100% !important;
    overflow-x: hidden !important;
    text-align: center !important;
  }

  footer .footer-whatsapp {
    display: block;
    margin: 1rem auto 0 auto;
    text-align: center;
    width: fit-content;
  }

  footer .footer-whatsapp a {
    display: inline-block;
    padding: 10px 18px;
    background: #25d366;
    color: #fff !important;
    border-radius: 30px;
    font-weight: bold;
    text-decoration: none;
    font-size: 16px;
  }

  footer .footer-credit, footer .credit {
    background: none !important;
    color: #fff !important;
    margin-top: 1rem;
  }
}

/* === Hamburger Menu Fit Screen === */
@media (max-width: 991.98px) {
  .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #28a745;
    padding: 1rem;
    max-height: 90vh;
    overflow-y: auto;
    border-top: 1px solid rgba(255,255,255,.2);
    animation: dropdownSlide .3s ease forwards;
    z-index: 9999;
  }
  .navbar-nav .nav-link {
    padding: 0.75rem 0;
    text-align: center;
    font-size: 18px;
  }
}

/* === Footer Services Navigation Adjustments === */
@media (max-width: 767.98px) {
  footer .footer-services, footer .footer-nav, footer .footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    font-size: 14px;
  }
  footer .footer-services a, footer .footer-nav a, footer .footer-links a {
    font-size: 14px !important;
    white-space: normal !important;
    word-break: break-word;
    max-width: 90%;
  }
}
