#footer {
  padding: 1rem 2rem;
  background: #003292;
  color: white;
}

#footer .container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 4rem;
  padding: 3rem 3rem 0 3rem;
}

#footer .image {
  flex: 1;
  display: flex;
  justify-content: flex-start;
}

#footer .footer-links {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  flex: 1;
  justify-content: space-between;
}

#footer .link-column {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  flex: 1;
  color: #ffffffae;
}

#footer .link-column h4 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: inherit;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#footer .link-column a {
  font-size: 14px;
  font-weight: 400;
  line-height: normal !important;
  text-decoration: none;
  transition: color 0.3s ease;
}

#footer .link-column a:hover {
  text-decoration: none;
  opacity: 0.8;
}

#footer .data {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 1;
}

#footer h3 {
  font-size: 24px;
  font-weight: 400;
  line-height: normal !important;
  margin: 0;
}

#footer .address {
  font-family: "Open Sans", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 18px;
  line-height: 27px;
  letter-spacing: 0%;
  margin: 0;
  color: inherit;
}

#footer .address br {
  display: block;
  content: "";
  margin-top: 0.5rem;
}

/* Ensure all text in address has same styling */
#footer .address,
#footer .address * {
  font-family: "Open Sans", sans-serif !important;
  font-weight: 400 !important;
  font-style: normal !important;
  font-size: 18px !important;
  line-height: 27px !important;
  letter-spacing: 0% !important;
}

/* Override any header-like styling */
#footer .data h1,
#footer .data h2,
#footer .data h3,
#footer .data h4,
#footer .data h5,
#footer .data h6 {
  font-family: "Open Sans", sans-serif !important;
  font-weight: 400 !important;
  font-style: normal !important;
  font-size: 18px !important;
  line-height: 27px !important;
  letter-spacing: 0% !important;
  margin: 0 !important;
  padding: 0 !important;
}

#footer .data a {
  font-size: 18px;
  font-weight: 400;
  line-height: normal !important;
  text-decoration: underline;
  transition: opacity 0.3s ease;
}

#footer .data a:hover {
  text-decoration: underline;
  opacity: 0.8;
}

#footer .phone {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

#footer .center {
  display: flex;
  justify-content: center;
  align-self: center;
  align-items: center;
  margin-top: 2rem;
  padding-top: 2rem;
  color: #ffffffae;
}

#footer .center p {
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 20px;
  letter-spacing: 0%;
  margin: 0;
}

@media (max-width: 768px) {
  #footer .container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
    padding: 2rem;
  }

  #footer .footer-links {
    width: auto;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
  }

  #footer .image {
    width: auto;
  }

  #footer .data {
    width: auto;
    align-items: center;
  }

  #footer .link-column h4 {
    font-size: 18px;
  }

  #footer .link-column a {
    font-size: 16px;
  }

  #footer .data {
    width: auto;
    gap: 1rem;
  }

  #footer .data a {
    font-size: 16px;
  }

  #footer .address {
    font-size: 16px;
    line-height: 24px;
  }

  #footer .center p {
    font-size: 16px;
    text-align: center;
  }

  #footer .image {
    width: auto;
  }
}

/* Medium tablet breakpoint */
@media (max-width: 900px) and (min-width: 769px) {
  #footer .container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2.5rem;
    padding: 2.5rem;
  }

  #footer .footer-links {
    width: 100%;
    max-width: 600px;
    justify-content: center;
  }

  #footer .data {
    align-items: center;
  }

  #footer .image {
    justify-content: center;
  }
}

/* Tablet breakpoint */
@media (max-width: 1024px) and (min-width: 769px) {
  #footer .container {
    gap: 2rem;
    padding: 2rem;
  }

  #footer .footer-links {
    gap: 2rem;
  }

  #footer .link-column {
    gap: 0.6rem;
  }

  #footer .link-column h4 {
    font-size: 14px;
    margin-bottom: 0.8rem;
  }

  #footer .link-column a {
    font-size: 14px;
  }

  #footer .data a {
    font-size: 17px;
  }

  #footer .address {
    font-size: 16px;
    line-height: 24px;
  }

  #footer .center p {
    font-size: 11px;
  }
}

/* Default header styles (black) */
#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: transparent;
  transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  transition: all 0.3s ease-in-out;
}

/* Logo styles */
.logo {
  position: relative;
  height: 60px;
  width: auto;
}

@media (max-width: 1024px) {
  #header {
    padding: 0;
  }

  #header.scrolled {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }

  .logo {
    height: 45px;
  }

  .logo a {
    display: block;
    height: 45px;
  }
}

.logo img {
  height: 100%;
  width: auto;
  transition: opacity 0.3s ease-in-out;
}
@media (min-width: 1024px) {
  /* Scrolled header state */
  #header.scrolled {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }

  /* Text colors when scrolled or when force-black-text is active */
  #header.scrolled .content a,
  #header.scrolled .dropdown-toggle,
  #header.scrolled .mobile-toggle,
  #header.force-black-text .content a,
  #header.force-black-text .dropdown-toggle,
  #header.force-black-text .mobile-toggle {
    color: #000 !important;
  }

  /* Ensure dropdown menu text remains black when scrolled */
  #header.scrolled .dropdown-menu a,
  #header.force-black-text .dropdown-menu a {
    color: #000 !important;
  }

  /* Mobile menu toggle color when scrolled */
  #header.scrolled .mobile-toggle,
  #header.force-black-text .mobile-toggle {
    color: #000 !important;
  }

  /* Home page specific styles */
  .home #header:not(.scrolled) .content a,
  .home #header:not(.scrolled) .dropdown-toggle,
  .home #header:not(.scrolled) .mobile-toggle {
    color: #fff !important;
  }

  /* White header for home and whatwedo pages */
  .home #header {
    color: #fff;
  }

  /* Dropdown icon styles */
  .dropdown-icon {
    transition: filter 0.3s ease-in-out;
    margin-left: 4px;
  }

  /* Text colors for dark header */
  #header .content a,
  #header .dropdown-toggle,
  #header .mobile-toggle,
  .page-template-whatwedo #header .content a,
  .page-template-whatwedo #header .dropdown-toggle,
  .page-template-whatwedo #header .mobile-toggle {
    color: #000;
  }

  /* Text colors for light header */
  .home #header:not(.scrolled) .content a,
  .home #header:not(.scrolled) .dropdown-toggle,
  .home #header:not(.scrolled) .mobile-toggle,
  .page-template-whatwedo #header:not(.scrolled) .content a,
  .page-template-whatwedo #header:not(.scrolled) .dropdown-toggle,
  .page-template-whatwedo #header:not(.scrolled) .mobile-toggle {
    color: #fff;
  }

  /* Dropdown menu items always black on white */
  .dropdown-menu a,
  #header .dropdown-menu a,
  #header.scrolled .dropdown-menu a,
  .home #header .dropdown-menu a,
  .home #header:not(.scrolled) .dropdown-menu a,
  .page-template-whatwedo #header .dropdown-menu a,
  .page-template-whatwedo #header:not(.scrolled) .dropdown-menu a {
    color: #000 !important;
  }

  /* Dropdown icon colors */
  .home #header:not(.scrolled) .dropdown-icon,
  .page-template-whatwedo #header:not(.scrolled) .dropdown-icon {
    filter: invert(100%);
  }

  #header.scrolled .dropdown-icon,
  #header.force-black-text .dropdown-icon {
    filter: none;
  }
}

#header.hide {
  transform: translateY(-100%);
}

/* Scroll to Top Button */
#scrollToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: white;
  border: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease-in-out;
  z-index: 999;
}

#scrollToTop.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#scrollToTop:hover {
  background: #f5f5f5;
}

#scrollToTop .nav-arrow {
  width: 24px;
  height: 24px;
}

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

#header .content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

#header .dropdown {
  position: relative;
  display: inline-block;
}

#header .dropdown-menu {
  display: none;
  position: absolute;
  left: -10%;
  min-width: 160px;
  z-index: 1000;
  padding-top: 1rem;
}
#header .bg {
  display: flex;
  background-color: white;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  flex-direction: column;
  border-radius: 16px;
  padding: 0.5rem 0;
}

#header .dropdown-menu a {
  display: block;
  padding: 0.5rem;
  color: #333;
  text-decoration: none;
  transition: 0.3s;
  padding: 0.5rem 1rem;
}

#header .dropdown-menu a:not(:nth-last-child()) {
  border-bottom: 1px solid #4343438a;
}

#header .dropdown-menu a:hover {
  transform: translateX(6px);
  text-decoration: underline;
}

#header .dropdown:hover .dropdown-menu {
  display: block;
}

#header button {
  background: transparent;
  border-radius: 50px;
  color: white;
  cursor: pointer;
  transition: 0.3s;
  font-size: x-large;
}

#header button:hover {
  color: #003292;
}

#header .mobile-toggle {
  display: none;
}

#header .content a {
  cursor: pointer;
}

#header .content a:hover {
  text-decoration: underline;
}

.dropdown-toggle {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  cursor: pointer;
}

#header .content p,
#header .content p {
  font-size: 16px;
}

@media (max-width: 928px) {
  #header .container {
    flex-wrap: wrap;
    align-items: center;
  }

  #header .dropdown {
    width: 100%;
  }

  #header .mobile-toggle {
    display: flex;
  }

  #menuToggle {
    position: relative;
    z-index: 2000;
  }

  .mobile-toggle {
    position: relative;
    z-index: 1001; /* higher than header/content */
    cursor: pointer;
    touch-action: manipulation; /* ensures tap works properly */
  }

  #header.mobile-active .content {
    display: flex; /* or block depending on layout */
  }

  #header .content {
    display: none;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    padding: 1rem 0;
    align-items: start;
  }

  #header .content a,
  #header .dropdown .dropdown-toggle {
    width: 100%;
  }

  #header .dropdown-menu {
    position: static;
    padding-left: 1rem;
  }

  #header .dropdown:hover .dropdown-menu {
    display: none; /* disable hover on mobile */
  }

  #header .dropdown.open .dropdown-menu {
    display: block;
  }

  #header .cta {
    display: none;
  }

  #header .dropdown-menu {
    padding: 0;
  }

  #header.mobile-active .content {
    display: flex;
  }
}

/* ===== MOBILE MENU ONLY ===== */
@media (max-width: 900px) {
  #header {
    max-width: 100vw;
  }

  /* Hide desktop layout */
  #header .content,
  #header .cta {
    display: none;
  }

  /* Show toggle button */
  #header .mobile-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 29px;
    height: 17px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
  }

  #header .mobile-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: #003366;
    border-radius: 10px;
    transition: 0.3s;
  }

  .home #header .mobile-toggle span {
    background: #fff;
  }

  .home #header.mobile-active .mobile-toggle span,
  #header.scrolled .mobile-toggle span {
    background: #003366;
  }

  /* Mobile menu container */
  #header.mobile-active .content {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    padding-top: 5rem;
    padding-left: 2rem;
    padding-right: 2rem;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    align-items: flex-start;
    justify-content: flex-start;
    gap: 1.25rem;
    z-index: 1000;
    overflow-y: auto;
    animation: slideDown 0.3s ease forwards;
    width: 85%;
  }

  /* Animate toggle into X */
  #header.mobile-active .mobile-toggle span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
  }
  #header.mobile-active .mobile-toggle span:nth-child(2) {
    opacity: 0;
  }
  #header.mobile-active .mobile-toggle span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
  }

  /* Mobile: flatten dropdowns into normal links */
  #header .dropdown {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  #header .dropdown-icon {
    display: none; /* hide arrow on mobile */
  }

  #header .dropdown-toggle {
    width: 100%;
  }

  #header .dropdown .dropdown-menu {
    display: flex !important; /* always show submenu links */
    position: static;
    flex-direction: column;
    gap: 0.5rem;
    padding-left: 1rem;
  }

  #header .bg {
    box-shadow: none;
    background: transparent;
    padding: 0;
  }

  #header .bg a {
    color: #003366;
  }

  #header .dropdown a,
  #header .content > a {
    font-size: 1rem;
    font-weight: 500;
    color: #003366;
    text-decoration: none;
  }

  /* Animation */
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
