/* ===== Fix 1: Sticky Header ===== */
.elementor-location-header,
header[data-elementor-type="header"] {
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
  width: 100% !important;
  background: #fff !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* Override frozen inline styles */
.elementor-sticky--active {
  position: sticky !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
}

/* Hide the duplicate spacer section */
.elementor-sticky__spacer {
  display: none !important;
}

/* ===== Logo shrink on scroll ===== */
#site-logo img {
  transition: width 0.3s ease;
}

#site-logo > .elementor-widget-container {
  transition: margin 0.3s ease;
}

/* Desktop: shrink logo + pull inside header */
.header-scrolled #site-logo img {
  width: 70px !important;
}

.header-scrolled #site-logo > .elementor-widget-container {
  margin-bottom: 0% !important;
}

.header-scrolled .elementor-element-235ac92f > .elementor-container {
  min-height: 60px !important;
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1024px) {
  .header-scrolled #site-logo img {
    width: 55px !important;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .header-scrolled #site-logo img {
    width: 45px !important;
  }

  .header-scrolled #site-logo > .elementor-widget-container {
    margin-bottom: 0% !important;
  }
}

/* ===== Dropdown caret arrows ===== */

/* Desktop: inline arrow next to parent items */
.elementor-nav-menu--main .menu-item-has-children > a .sub-arrow {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 4px;
  font-size: 0.65em;
  line-height: 1;
}

/* Desktop: nested flyout items — rotate caret to point right */
.elementor-nav-menu--main .sub-menu .menu-item-has-children > a .sub-arrow i {
  transform: rotate(-90deg);
  font-size: 12px;
}

/* Mobile: arrow styling */
@media (max-width: 1024px) {
  .elementor-nav-menu--dropdown .sub-arrow {
    display: inline-flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    margin-left: 6px !important;
    transition: transform 0.3s ease !important;
  }

  .elementor-nav-menu--dropdown .sub-arrow i {
    font-size: 12px !important;
  }

  /* Rotate caret up when sub-menu is open */
  .elementor-nav-menu--dropdown .menu-item-has-children.sub-menu-open > a .sub-arrow {
    transform: rotate(180deg) !important;
  }
}

/* ===== Fix: Media room article styling ===== */
.page-id-1180 .inside-article,
body[class*="media-room"] .inside-article {
  margin-left: 0 !important;
}

/* ===== Fix: Nav hover color — black instead of blue ===== */
.elementor-nav-menu--main .elementor-item:hover,
.elementor-nav-menu--main .elementor-item:focus,
.elementor-nav-menu--main .elementor-item.highlighted {
  color: #222 !important;
}

.elementor-nav-menu--main .sub-menu a:hover {
  color: #222 !important;
}

/* ===== Fix: Gallery lazyload — force all images visible ===== */
.e-gallery--lazyload .e-gallery-image {
  filter: none !important;
  transform: none !important;
  opacity: 1 !important;
}

/* ===== Fix 3: Navigation System ===== */

/* --- Desktop (1025px+): Hover dropdowns --- */
@media (min-width: 1025px) {
  .elementor-nav-menu--dropdown.elementor-nav-menu__container {
    display: none !important;
  }
  .elementor-menu-toggle {
    display: none !important;
  }

  .elementor-nav-menu--main .menu-item-has-children > .sub-menu {
    display: none !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    background: #fff !important;
    min-width: 220px !important;
    width: max-content !important;
    max-width: 320px !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14) !important;
    z-index: 10000 !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
  }

  .elementor-nav-menu--main .menu-item-has-children:hover > .sub-menu {
    display: block !important;
  }

  /* Nested flyout to the right */
  .elementor-nav-menu--main .sub-menu .menu-item-has-children > .sub-menu {
    position: absolute !important;
    top: 0 !important;
    left: 100% !important;
    background: #fff !important;
    z-index: 10001 !important;
  }

  .elementor-nav-menu--main .sub-menu li {
    display: block !important;
    width: 100% !important;
  }

  .elementor-nav-menu--main .sub-menu a {
    padding: 10px 20px !important;
    white-space: nowrap !important;
    display: block !important;
    color: #222 !important;
    text-decoration: none !important;
  }

  .elementor-nav-menu--main .sub-menu a:hover {
    background: #f5f5f5 !important;
    color: #1e73be !important;
  }
}

/* --- Tablet/Mobile (1024px and below) --- */
@media (max-width: 1024px) {
  .elementor-nav-menu--main {
    display: none !important;
  }

  /* Allow dropdown to escape narrow column */
  .elementor-location-header .elementor-column,
  .elementor-location-header .elementor-widget-wrap,
  .elementor-location-header .elementor-widget-container,
  .elementor-location-header .elementor-widget-nav-menu {
    overflow: visible !important;
  }

  .elementor-nav-menu--dropdown.elementor-nav-menu__container {
    display: none;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-height: calc(100vh - 80px) !important;
    height: auto !important;
    z-index: 99998 !important;
    background: #fff !important;
    overflow-y: auto !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
  }

  .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown.elementor-nav-menu__container {
    display: block !important;
    max-height: calc(100vh - 80px) !important;
    transform: scaleY(1) !important;
    overflow-y: auto !important;
  }

  .elementor-menu-toggle {
    z-index: 99999 !important;
  }

  .elementor-nav-menu--stretch .elementor-nav-menu__container.elementor-nav-menu--dropdown {
    position: fixed !important;
    width: 100vw !important;
    left: 0 !important;
  }

  /* Mobile sub-menus accordion */
  .elementor-nav-menu--dropdown .menu-item-has-children > .sub-menu {
    display: none !important;
    position: static !important;
    box-shadow: none !important;
    background: transparent !important;
    padding-left: 15px !important;
  }

  .elementor-nav-menu--dropdown .menu-item-has-children.sub-menu-open > .sub-menu {
    display: block !important;
  }
}

/* ===== Fix 4: Gallery Grid ===== */
.e-gallery-container.e-gallery-justified {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 10px !important;
  position: relative !important;
}

@media (max-width: 1024px) {
  .e-gallery-container.e-gallery-justified {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .e-gallery-container.e-gallery-justified {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Remove justified layout padding-bottom that creates gap above footer */
.e-gallery-container.e-gallery-justified {
  padding-bottom: 0 !important;
}

/* Reduce gallery section bottom padding */
.elementor-element-e08e2d2 {
  padding-bottom: 40px !important;
}

/* Reset gallery item positioning from Elementor justified layout */
.e-gallery-container.e-gallery-justified .e-gallery-item {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 4/3;
}

.e-gallery-container .e-gallery-image {
  width: 100% !important;
  height: 100% !important;
  background-size: cover !important;
  background-position: center !important;
}

.e-gallery-item:hover {
  transform: scale(1.02);
  transition: transform 0.3s ease;
}

/* ===== Fix 4: Lightbox ===== */
#lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  align-items: center;
  justify-content: center;
}

#lightbox-overlay.active {
  display: flex;
}

.lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
}

.lb-img-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 88vh;
}

.lb-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  transition: opacity 0.3s;
}

.lb-close {
  position: absolute;
  top: 16px;
  right: 20px;
  z-index: 2;
  background: none;
  border: none;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  line-height: 1;
}

.lb-prev, .lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 28px;
  padding: 12px 16px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
}

.lb-prev:hover, .lb-next:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lb-prev { left: 16px; }
.lb-next { right: 16px; }

.lb-spinner {
  display: none;
  position: absolute;
  z-index: 1;
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: lb-spin 0.8s linear infinite;
}

@keyframes lb-spin {
  to { transform: rotate(360deg); }
}


/* ===== Google Reviews Carousel ===== */
.google-reviews-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.google-reviews-header {
  display: none;
}

.google-reviews-carousel-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.google-reviews-carousel {
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.google-reviews-track {
  display: flex;
  gap: 20px;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Arrows — match screenshot: minimal, black, no background */
.google-reviews-arrow {
  flex-shrink: 0;
  background: none;
  border: 1px solid #ddd;
  color: #333;
  font-size: 28px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: opacity 0.2s, border-color 0.2s;
}

.google-reviews-arrow:hover {
  opacity: 1;
  border-color: #999;
  background: none;
}

/* Review card — light beige/gray background like screenshot */
.google-review-card {
  flex-shrink: 0;
  animation: gr-fadeSlideIn 0.5s ease both;
}

.gr-card-inner {
  background: #F0EEEB;
  border-radius: 12px;
  padding: 28px 24px 22px;
  text-align: center;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gr-card-inner:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Avatar circle with initial letter */
.gr-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  position: relative;
}

.gr-initial {
  color: #fff;
  font-family: Manrope, sans-serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}

/* Google badge on avatar */
.gr-google-badge {
  position: absolute;
  bottom: -2px;
  right: -4px;
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.gr-google-badge svg {
  width: 14px;
  height: 14px;
}

/* Name */
.gr-name {
  font-family: Manrope, sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: #222;
  margin-bottom: 2px;
}

/* Date */
.gr-date {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #888;
  margin-bottom: 8px;
}

/* Stars */
.gr-stars {
  margin-bottom: 10px;
  line-height: 1;
}

.gr-star {
  color: #F4B400;
  font-size: 18px;
  letter-spacing: 1px;
}

/* Review text */
.gr-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: #444;
  flex: 1;
}

/* Read more / Read less */
.gr-readmore {
  display: inline-block;
  margin-top: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #1e73be;
  text-decoration: none;
  font-weight: 500;
}

.gr-readmore:hover {
  text-decoration: underline;
  color: #1e73be;
}

/* Subtle entrance animation */
@keyframes gr-fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .google-reviews-section {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .google-reviews-arrow {
    width: 34px;
    height: 34px;
    font-size: 22px;
  }

  .gr-card-inner {
    padding: 22px 18px 18px;
  }

  .gr-avatar {
    width: 54px;
    height: 54px;
  }

  .gr-initial {
    font-size: 22px;
  }
}

/* ===== Fix 7: Smooth Scroll ===== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}
