/*
=====================================
  COMPONENTS & ELEMENTS
  Map, Footer, Sticky Elements, Social Icons
=====================================
*/

/*---------------------------------------
  LONDON MAP SECTIONlondon-map-section {
-----------------------------------------*/
.london-map-section {
  background: transparent;
  padding: 40px;
  box-shadow: none;
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
}

/* Force transparent fill for region polygons */
.region-polygon {
  fill-opacity: 0 !important;
  fill: transparent !important;
}

.london-map-section::before {
  display: none; /* Remove background decoration to match Services section */
}

.london-map-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--dark-color);
  margin-bottom: 20px;
  text-align: center;
  position: relative;
}

.london-map-subtitle {
  font-size: 1.1rem;
  color: var(--p-color);
  text-align: center;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.london-map-container {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  background: white;
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  min-height: 500px;
}

/* Loading state */
.london-map-container.loading::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.london-map-container.loading::after {
  content: "Loading Map...";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 20px 40px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  font-size: 1.1rem;
  color: var(--dark-color);
  z-index: 1001;
  font-weight: 500;
}

#map-canvas {
  height: 500px;
  width: 100%;
}

/*---------------------------------------
  LONDON MAP LEGEND
-----------------------------------------*/
/* Base styles */
#map-legend {
  background: white;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  position: absolute;
  bottom: 70px;
  right: 20px;
  z-index: 1000;
  min-width: 180px;
  max-width: 200px;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: none;
}

#map-legend.visible {
  display: block;
}

#map-legend h5 {
  margin: 0 0 12px 0;
  color: var(--dark-color);
  font-size: 1rem;
  font-weight: 600;
}

.legend-item {
  display: flex;
  align-items: center;
  margin: 6px 0;
  font-size: 0.9rem;
}

.legend-color {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  margin-right: 8px;
}

/* Map legend toggle button specific position */
#map-legend-toggle {
  bottom: calc(var(--map-control-spacing) * 2);
  right: var(--map-control-spacing);
  z-index: calc(var(--map-button-zindex) + 1);
  border-radius: 50%;
}

#map-legend-toggle:hover {
  transform: scale(1.1);
}

#map-legend-toggle.active {
  background: var(--primary-color);
  color: white;
}

/* Custom Leaflet popup styles */
.leaflet-popup-content-wrapper {
  border-radius: 10px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content {
  margin: 15px;
  min-width: 200px;
}

.leaflet-popup-tip {
  background: white;
}

.leaflet-container {
  font-family: "League Spartan", sans-serif;
}

/* Custom Leaflet control styles to match our map buttons */
.leaflet-control-zoom {
  border: none !important;
  background: transparent !important;
  margin: 0 !important;
  padding: 0 !important;
}

.leaflet-control-zoom a {
  background: white !important;
  border: none !important;
  width: var(--map-button-size) !important;
  height: var(--map-button-size) !important;
  line-height: var(--map-button-size) !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
  color: var(--primary-color) !important;
  font-size: 20px !important;
  transition: all 0.3s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 5px !important;
}

.leaflet-control-zoom a:hover {
  background: var(--primary-color) !important;
  color: white !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.leaflet-control-zoom a:first-child {
  border-top-left-radius: 8px !important;
  border-top-right-radius: 8px !important;
}

.leaflet-control-zoom a:last-child {
  border-bottom-left-radius: 8px !important;
  border-bottom-right-radius: 8px !important;
  margin-bottom: 0 !important;
}

.map-info-panel {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px;
  margin-top: 20px;
  border-left: 4px solid var(--primary-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.map-info-panel:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Map layout wrapper for side-by-side design */
.london-map-layout {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.london-map-layout .london-map-container {
  flex: 1;
  min-height: 500px;
  margin-top: 0;
}

.london-map-layout .map-info-panel {
  flex: 0 0 300px;
  margin-top: 0;
  align-self: stretch;
}

/* Map control buttons base style */
.map-control-btn {
  position: absolute;
  background: white;
  border: none;
  width: var(--map-button-size);
  height: var(--map-button-size);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--primary-color);
  transition: all 0.3s ease;
  z-index: 1000;
}

.map-control-btn:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Map controls container for better organization */
.map-controls-container {
  position: absolute;
  top: var(--map-control-spacing);
  right: var(--map-control-spacing);
  left: auto;
  z-index: var(--map-button-zindex);
  display: flex;
  flex-direction: row;
  gap: var(--map-button-gap);
  align-items: center;
}

/* Map reset button - now positioned relative to container */
.map-reset-btn {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
}

/* Position Leaflet zoom controls to align with our controls container */
.leaflet-control-zoom {
  top: var(--map-control-spacing) !important;
  left: var(--map-control-spacing) !important;
}

.selected-area {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 6px;
  min-height: 24px;
  display: flex;
  align-items: center;
}

.selected-area i {
  font-size: 1rem;
  margin-right: 6px;
}

.area-description {
  font-size: 0.9rem;
  color: var(--p-color);
  line-height: 1.4;
  min-height: 38px;
}

/*---------------------------------------
  SITE FOOTER
-----------------------------------------*/
.site-footer {
  background: var(--site-footer-bg-color);
  padding-top: 0;
}

.site-footer h3 {
  line-height: normal;
}

.site-footer h3 .custom-link,
.site-footer .social-icon-link:hover {
  color: var(--footer-heading-color, var(--color-white, #ffffff));
}

.site-footer h3 .custom-link:hover {
  color: var(--footer-link-hover-color, var(--brand-primary, #ffd74f));
}

.copyright-text {
  color: var(
    --footer-copyright-color,
    var(--section-bg-color, rgba(255, 255, 255, 0.7))
  );
  font-size: var(--copyright-font-size);
  margin-top: 10px;
}

.site-footer .social-icon-link {
  margin-top: 10px;
}

/* Footer social buttons hover effects */
.footer-social .btn {
  transition: all 0.2s ease !important;
  opacity: 0.9;
}

.footer-social .btn:hover {
  opacity: 1;
  transform: translateY(-1px);
}

/* Footer section horizontal spacing */
.site-footer .full-width-content {
  padding-left: 40px;
  padding-right: 40px;
}

/*---------------------------------------
  SOCIAL ICONS
-----------------------------------------*/
.social-icon {
  margin: 0;
  padding: 0;
}

.social-icon-item {
  list-style: none;
  display: inline-block;
  vertical-align: top;
}

.social-icon-link {
  color: var(--social-icon-color, var(--text-secondary, #717275));
  font-size: var(--p-font-size);
  display: block;
  margin-right: 15px;
  text-align: center;
}

.social-icon-link:hover {
  color: var(--social-icon-hover-color, var(--brand-secondary, #f65129));
}

.social-icon-twitter {
  color: var(--twitter-color);
}

.social-icon-facebook {
  color: var(--facebook-color);
}

.social-icon-instagram {
  color: var(--instagram-color);
}

.social-icon-pinterest {
  color: var(--pinterest-color);
}

.social-icon-whatsapp {
  color: var(--whatsapp-color);
}

/*---------------------------------------
  STICKY CALL BUTTON
-----------------------------------------*/
/* Base styles - using ID selector for highest specificity */
a#sticky-call-btn.sticky-call-btn {
  position: fixed;
  bottom: var(--sticky-btn-bottom-desktop, 15px);
  left: 25px;
  transform: none;
  z-index: 1020;
  display: none; /* Initially hidden - will be shown on scroll */
  visibility: hidden; /* Double protection - invisible initially */
  opacity: 0; /* Triple protection - completely transparent initially */
  background: var(
    --sticky-call-bg,
    linear-gradient(
      135deg,
      var(--status-success, #00a05d),
      var(--status-success-dark, #008751)
    )
  );
  color: var(--sticky-call-text, var(--color-white, #ffffff));
  padding: 12px 16px;
  font-size: var(--sticky-btn-font-size-mobile, 16px);
  font-weight: 700;
  border-radius: 5px;
  box-shadow: var(
    --sticky-call-shadow,
    0 6px 25px rgba(0, 160, 93, 0.4),
    0 2px 10px rgba(0, 0, 0, 0.1)
  );
  min-width: 200px;
  text-align: center;
  text-decoration: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: inherit;
  cursor: pointer;
  border: 2px solid var(--sticky-call-border, rgba(255, 255, 255, 0.2));
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  white-space: nowrap;
}

/* Visible state - using higher specificity to override Bootstrap */
a#sticky-call-btn.sticky-call-btn.visible {
  display: flex; /* Shown when scroll condition is met */
  visibility: visible; /* Make visible */
  opacity: 1; /* Override initial opacity */
  animation: slideUpFade 0.5s ease-out forwards;
}

/* Animation for scroll-based appearance */
@keyframes slideUpFade {
  0% {
    display: flex;
    visibility: visible;
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    display: flex;
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }
}

#sticky-call-btn .bi {
  color: var(--sticky-call-icon, var(--color-white, #ffffff));
  font-size: 24px;
  margin-right: 12px;
  animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

#sticky-call-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #157347, #146c43);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
  border-radius: 60px;
}

#sticky-call-btn::after {
  content: "";
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  background: linear-gradient(135deg, #198754, #157347, #146c43);
  border-radius: 65px;
  z-index: -2;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#sticky-call-btn:hover {
  transform: translateY(-3px) scale(1.02) !important;
  box-shadow: var(
    --sticky-call-hover-shadow,
    0 12px 35px rgba(0, 160, 93, 0.5),
    0 4px 15px rgba(0, 0, 0, 0.15)
  );
  border-color: var(--sticky-call-hover-border, rgba(255, 255, 255, 0.3));
}

#sticky-call-btn:hover::before {
  opacity: 1;
}

#sticky-call-btn:hover::after {
  opacity: 0.6;
  transform: scale(1.05);
}

#sticky-call-btn:active {
  transform: translateY(-1px) scale(1.01) !important;
  box-shadow: var(
    --sticky-call-active-shadow,
    0 6px 20px rgba(0, 160, 93, 0.4)
  );
}

/*---------------------------------------
  MEGA MENU STYLES
-----------------------------------------*/
.dropdown-menu-mega {
  min-width: 800px;
  max-width: 900px;
  padding: 0;
  border: 1px solid var(--dropdown-border, var(--border-color));
  background: var(--dropdown-bg, var(--color-white));
  box-shadow: var(--dropdown-shadow, 0 0.5rem 1rem rgba(0, 0, 0, 0.15));
  border-radius: var(--border-radius-medium);
  margin-top: 0.5rem;
  left: auto;
  right: 0;
  transform: translateX(0) !important;
}

.dropdown-menu-mega .container {
  padding: 1.5rem;
}

.dropdown-menu-mega .row > div {
  padding: 0.5rem 1rem;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

.dropdown-menu-mega .dropdown-header {
  color: var(--dropdown-header-color, var(--brand-secondary));
  font-size: 1.1rem;
  font-weight: var(--font-weight-semibold);
  padding: 0.5rem 0;
  margin-bottom: 0.5rem;
  border-bottom: 2px solid var(--dropdown-border, var(--border-color));
}

.dropdown-menu-mega .dropdown-item {
  padding: 0.5rem 0.75rem;
  color: var(--dropdown-item-color, var(--text-primary));
  transition: all 0.3s ease;
  border-radius: var(--border-radius-small);
  white-space: normal;
  line-height: 1.3;
  font-size: 0.95rem;
}

.dropdown-menu-mega .dropdown-item:hover {
  background-color: var(--dropdown-item-hover-bg, var(--bg-secondary));
  color: var(--dropdown-item-hover-color, var(--brand-secondary));
  padding-left: 1rem;
  overflow: visible;
  white-space: normal;
  z-index: 10;
  position: relative;
}

.dropdown-menu-mega .dropdown-divider {
  margin: 1rem 0;
}

/*---------------------------------------
  ANIMATIONS
-----------------------------------------*/

/* Map breathing animation */
@keyframes mapBreathing {
  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.05);
  }
}

/* Sticky call button animations */
@keyframes slideUp {
  from {
    transform: translateX(-50%) translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

/* Pulse animation for sticky call button */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(25, 135, 84, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(25, 135, 84, 0);
  }
}

/* Fade out animation for sticky call button */
@keyframes fadeOut {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(20px) scale(0.8);
  }
}

/* Slide down fade out animation (natural falling effect) */
@keyframes slideDownFade {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(100px) scale(0.8);
  }
}

/* CTA Toolbar Call Button Animation */
@keyframes greenPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(25, 135, 84, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(25, 135, 84, 0);
  }
}

/* Pulse ring animation for Navy theme */
@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.6);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

/* Apply pulse animation to toolbar Call Now button */
#toolbar-call-btn {
  animation: greenPulse 2s infinite;
}

/* Pause animation on hover for better UX */
#toolbar-call-btn:hover {
  animation: none;
}

/* Hero section fade in animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/*=====================================
  FOOTER THEME SWITCHER STYLES
=====================================*/

/* Theme switcher button in footer */
.social-icon-theme {
  background: var(--brand-primary, #ffd74f) !important;
  color: var(--text-primary, #2c3e50) !important;
  border: none !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  font-size: 18px !important;
  width: 40px !important;
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
}

.social-icon-theme:hover {
  background: var(--brand-primary-hover, #e6c24a) !important;
  color: var(--text-primary, #2c3e50) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(255, 215, 79, 0.3) !important;
}


