/* Critical CSS - Hide Get A Quote button by default, show on desktop to prevent flash */
.elementor-element-46740d1 {
  display: none !important;
}
@media (min-width: 768px) {
  .elementor-element-46740d1 {
    display: flex !important;
  }
}



/* <-- Sticky Quote FAB Styles --> */
.sticky-quote-fab {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s ease;
  line-height: 0;
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0;
  margin: 0;
  color: transparent;
  box-shadow: none !important;
}

.sticky-quote-fab:hover {
  transform: scale(1.1);
  color: transparent;
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.sticky-quote-fab svg {
  display: block;
  width: 64px;
  height: 64px;
  color: transparent;
}

.sticky-quote-fab:hover svg {
  color: transparent;
}

@media (max-width: 767px) {
  .sticky-quote-fab {
    display: block;
  }
}



/* --------------------------------------------- */ 
/* <-- Quote Modal Styles --> */
/* --------------------------------------------- */

/* Hide modal by default (prevents flash) */ 
#quote-modal-overlay { 
  position: fixed; 
  inset: 0; 
  background-color: rgba(0, 0, 0, 0.75); 
  backdrop-filter: blur(4px); 
  z-index: 10000; 
  opacity: 0; 
  visibility: hidden; 
  transition: opacity 0.3s ease, visibility 0.3s ease; 
}

/* Show overlay when open */
#quote-modal-overlay.quote-modal-open {
  opacity: 1;
  visibility: visible;
}

/* Modal container (centered desktop layout) */
#quote-modal-container {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 10001;

/* Start hidden */ 
  opacity: 0; 
  visibility: hidden; 
  transform: translate(-50%, -50%) scale(0.95);

  display: flex; 
  flex-direction: column; 
  transition: opacity 0.3s ease, 
  visibility 0.3s ease, 
  transform 0.3s ease;
}

/* Modal visible state */
#quote-modal-container.quote-modal-open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

/* Modal header */
#quote-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e5e5;
  flex-shrink: 0;
  border-radius: 16px 16px 0 0;
  background-color: #f8f9fa;
}

/* Title */
#quote-modal-title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #333;
}

/* Close button */
#quote-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  transition: background-color 0.2s ease, color 0.2s ease;
}

#quote-modal-close:hover,
#quote-modal-close:focus {
  background-color: #e0e0e0;
  color: #000;
}

/* Modal body */
#quote-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

/* Ensure form content is visible */
#quote-modal-body .gform_wrapper,
#quote-modal-body .gform_body,
#quote-modal-body form {
  display: block;
  visibility: visible;
  opacity: 1;
}

/* Quote modal submit button styles */
#quote-modal-body .gform_button,
#quote-modal-body input[type="submit"],
#quote-modal-body button[type="submit"] {
  color: #ffffff !important;
  background-color: #104377 !important;
  border: none !important;
  padding: 14px 28px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  width: 100% !important;
}

/* Modal form input styles */
#quote-modal-body input[type="text"],
#quote-modal-body input[type="email"],
#quote-modal-body input[type="tel"],
#quote-modal-body input[type="number"],
#quote-modal-body select,
#quote-modal-body textarea {
  border-radius: 8px !important;
  border: 2px solid #e0e0e0 !important;
  padding: 12px 14px !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

#quote-modal-body input[type="text"]:focus,
#quote-modal-body input[type="email"]:focus,
#quote-modal-body input[type="tel"]:focus,
#quote-modal-body input[type="number"]:focus,
#quote-modal-body select:focus,
#quote-modal-body textarea:focus {
  border-color: #104377 !important;
  box-shadow: 0 0 0 3px rgba(16, 67, 119, 0.1) !important;
  outline: none !important;
}

#quote-modal-body .gform_button:hover,
#quote-modal-body input[type="submit"]:hover,
#quote-modal-body button[type="submit"]:hover {
  color: #ffffff !important;
  background-color: #02B100 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(2, 177, 0, 0.3) !important;
}

#quote-modal-body .gform_button:focus,
#quote-modal-body input[type="submit"]:focus,
#quote-modal-body button[type="submit"]:focus {
  color: #ffffff !important;
  background-color: #005a87 !important;
  outline: 2px solid #009A44 !important;
  outline-offset: 2px !important;
}

/* --------------------------------------------- */ 
/* <-- Mobile Optimizations for Quote Modal --> */ 
/* --------------------------------------------- */

@media (max-width: 767px) {
  #quote-modal-container {
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;

    /* Slide up animation for mobile */
    top: auto;
    top: 0;
    left: 0;
    transform: translate(0, 100%);
  }

  #quote-modal-container.quote-modal-open {
    transform: translateY(0);
  }
}


/* <-- Screen reader only class --> */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Scroll to top button - position on left */
#ast-scroll-top.ast-scroll-to-top-left {
  right: auto !important;
  left: 20px !important;
  z-index: 9998 !important; /* Below FAB (9999) and modal (10000+) */
}

/* Hero title styling */
.elementor-element-b18655a .elementor-heading-title {
  line-height: 1.0 !important;
}

/* Uppercase hero title only on desktop */
@media (min-width: 768px) {
  .elementor-element-b18655a .elementor-heading-title {
    text-transform: uppercase !important;
  }
}

/* Title case hero title on mobile */
@media (max-width: 767px) {
  .elementor-element-b18655a .elementor-heading-title {
    text-transform: capitalize !important;
  }
}

/* Mobile-specific component visibility */
@media (max-width: 767px) {
  #ast-scroll-top.ast-scroll-to-top-left {
    left: 20px !important;
    right: auto !important;
  }
  
  #quote {
    display: none !important;
  }
  
  /* Increase hero title size on mobile */
  .elementor-element-b18655a .elementor-heading-title {
    font-size: 4.0em !important;
  }
  
  /* Hide Get A Quote button from nav bar on mobile */
  .elementor-element-46740d1 {
    display: none !important;
  }
  
  /* Hide top header section (logo section) on mobile */
  .elementor-1713 .elementor-element.elementor-element-4d38094a {
    display: none !important;
  }
}

/* Hide mobile logo on desktop and tablet */
@media (min-width: 768px) {
  .elementor-1713 .elementor-element.elementor-element-mobile-logo-nav {
    display: none !important;
  }
}


/* Gutter Services Card Section - Responsive Fixes */
/* Target only the specific gutter services card section using unique classes */

/* Tablet and below: Allow cards to wrap */
@media (max-width: 1024px) {
  .gutter-services-cards-section .gutter-services-cards-container {
    flex-wrap: wrap !important;
  }
  
  .gutter-services-cards-section .gutter-services-card {
    width: 48% !important;
    flex: 0 0 calc(48% - 10px) !important;
    max-width: 48% !important;
    margin-bottom: 20px;
  }
}

/* Tablet: Two columns or single column */
@media (max-width: 768px) {
  .gutter-services-cards-section .gutter-services-cards-container {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 20px !important;
  }
  
  .gutter-services-cards-section .gutter-services-card {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    margin-bottom: 10px;
  }
  
  /* Ensure card content doesn't overflow on tablet */
  .gutter-services-cards-section .gutter-services-card-inner {
    aspect-ratio: auto !important;
  }
}

/* Mobile: Full width cards with adjusted spacing */
@media (max-width: 480px) {
  /* Reduce top and bottom padding of the section on mobile */
  .gutter-services-cards-section {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
  }
  
  .gutter-services-cards-section .gutter-services-cards-container {
    padding: 0 60px !important;
    gap: 15px !important;
  }
  
  /* Reduce margin on first and last cards */
  .gutter-services-cards-section .gutter-services-card:first-child {
    margin-top: 0 !important;
  }
  
  .gutter-services-cards-section .gutter-services-card:last-child {
    margin-bottom: 0 !important;
  }
  
  .gutter-services-cards-section .gutter-services-card-inner {
    padding: 40px 35px !important;
    min-height: 300px !important;
  }
}

/* Hide "The Complete Gutter Ecosystem" section on mobile */
@media (max-width: 767px) {
  .gutter-ecosystem-section {
    display: none !important;
  }
}

/* Remove unwanted ::before pseudo-element from header and nav */
header[data-elementor-id="1713"]::before,
.elementor-1713::before,
.elementor-element-641ca33::before,
nav.elementor-element-641ca33::before {
  content: none !important;
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}