/* Homepage base: match fam-contracting container and spacing */
body.page-template-homepage { margin: 0 !important; padding: 0 !important; overflow-x: hidden; }
.homepage { margin: 0 !important; padding: 0 !important; overflow-x: hidden; }
html { overflow-x: hidden; }
.homepage .container { max-width: 1600px; margin: 0 auto; padding: 0 clamp(1.5rem, 5vw, 5rem); box-sizing: border-box; }
.site-footer .footer-container, .site-header .header-container { max-width: 1600px; margin: 0 auto; padding-left: clamp(1.5rem, 5vw, 5rem); padding-right: clamp(1.5rem, 5vw, 5rem); }
.hp-section { display: flex; align-items: center; box-sizing: border-box; padding-top: 0; padding-bottom: 80px; margin: 0; }

/* Section 1: Hero */
.hp-hero { position: relative; min-height: 120vh; justify-content: center; text-align: center; margin-top: 0; padding-top: 0 !important; padding-bottom: 0 !important; }
.hp-hero .hp-hero-bg { position: absolute; inset: 0; background: url('../images/homepage_section_1.png') center/cover no-repeat; z-index: -2; }
.hp-hero .hp-hero-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.hp-hero-title { font-family: 'Aboreto', serif; font-weight: 400; font-size: 80px; line-height: 96px; text-shadow: 0px 10px 10px rgba(0,0,0,0.1); margin: 0; }
.hp-hero-title.primary { color: rgba(244,244,244,1); }
.hp-hero-title.secondary { color: rgba(167,167,167,1); }

/* Icon track copied style */
.icon-track-container { position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: rgba(244, 244, 244, 0.05); backdrop-filter: blur(8px); overflow: hidden; }
.icon-track { display: flex; position: absolute; height: 100%; width: max-content; align-items: center; }
.icon-container { display: flex; position: absolute; height: 100%; width: calc((200px + 120px) * 2); align-items: center; transition: transform 0.3s linear; backface-visibility: hidden; -webkit-backface-visibility: hidden; padding: 0; will-change: transform, opacity; }
.icon-container.repositioning { opacity: 0; visibility: hidden; z-index: -1; pointer-events: none; transition: none !important; display: none; }
.track-icon { flex: 0 0 auto; margin: 0 60px; opacity: 0.8; height: 76px; display: flex; align-items: center; justify-content: center; width: 200px; pointer-events: none; }
.track-icon img { height: 76px; width: auto; display: block; filter: brightness(1); max-width: 200px; object-fit: contain; }

/* Section 2: About */
.hp-about { position: relative; min-height: 100vh; height: 100vh; background: url('../images/homepage_section_2.png') center/cover no-repeat; background-size: cover; justify-content: center; text-align: center; }
.hp-about-inner { display: flex; flex-direction: column; align-items: center; gap: 32px; }
.hp-about-title { font-family: 'Aboreto', serif; font-weight: 400; font-size: 50px; line-height: 60px; text-transform: uppercase; color: rgba(244,244,244,1); margin: 0; }
.hp-about-desc { font-family: 'Reddit Sans', sans-serif; font-weight: 300; font-size: 16px; line-height: 24px; letter-spacing: 0.02em; color: rgba(244,244,244,1); margin: 0; max-width: 780px; text-align: center; }
.hp-about-cta { display: flex; justify-content: center; }

/* Section 3: Services */
.hp-services { position: relative; min-height: 100vh; height: 100vh; background: linear-gradient(180deg, rgba(32, 33, 38, 0) 75%, #202126 100%), url('../images/homepage_section_3.png') center/cover no-repeat; background-size: cover; }
.hp-services-inner { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.hp-section-label { display: flex; align-items: center; justify-content: center; gap: 24px; width: 100%; max-width: 1000px; }
.hp-section-label .line { flex: 0 0 60px; width: 60px; height: 1px; background: rgba(244,244,244,0.5); }
.hp-section-label .label { font-family: 'Reddit Sans', sans-serif; font-weight: 400; font-size: 20px; line-height: 30px; text-transform: uppercase; color: rgba(244,244,244,1); padding-bottom: 0; }
.hp-services-title { font-family: 'Aboreto', serif; font-weight: 400; font-size: 50px; line-height: 60px; text-transform: uppercase; color: rgba(244,244,244,1); margin: 0 0 32px 0; text-align: center; }
.hp-services-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; width: 100%; max-width: 1280px; }
.hp-service-card { position: relative; padding: clamp(24px, 3vw, 33px) clamp(20px, 2.5vw, 31px); min-height: clamp(280px, 25vw, 324px); background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.1); border-radius: 0; transition: all 300ms ease-out; color: rgba(244,244,244,0.1); border: 1px solid rgba(255,255,255,0.08); display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.hp-service-card .icon { position: absolute; top: 24px; left: 24px; width: 52px; height: 52px; background: rgba(217, 217, 217, 1); border-radius: 50%; background-size: 36px 36px; background-position: center; background-repeat: no-repeat; transition: all 300ms ease-out; }
.hp-service-card .icon-mechanical { background-image: url('../images/mech_home.png'); }
.hp-service-card .icon-electrical { background-image: url('../images/elec_home1.png'); }
.hp-service-card .icon-fire { background-image: url('../images/fire_home.png'); }
.hp-service-card .title { margin: 0; font-family: 'Reddit Sans', sans-serif; font-weight: 600; font-size: 18px; line-height: 28px; letter-spacing: 0.02em; text-transform: uppercase; color: rgba(244, 244, 244, 1); }
.hp-service-card .desc { opacity: 0; max-height: 0; transition: all 300ms ease-out; font-family: 'Reddit Sans', sans-serif; font-weight: 300; font-size: 16px; line-height: 24px; letter-spacing: 0.02em; color: #202126; }
.hp-service-card .discover { margin-top: 16px; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: #202126; font-family: 'Reddit Sans', sans-serif; font-weight: 500; font-size: 16px; line-height: 24px; letter-spacing: 0.02em; opacity: 0; transform: translateY(8px); transition: all 300ms ease-out; }
.hp-service-card:hover { background: rgba(244,244,244,1); color: #202126; }
.hp-service-card:hover .icon { background-color: transparent; }
.hp-service-card:hover .desc { opacity: 1; max-height: 200px; }
.hp-service-card:hover .title { margin-bottom: 8px; color: rgba(32, 33, 38, 1); }
.hp-service-card:hover .discover { opacity: 1; transform: translateY(0); }

/* Section 4: Projects */
.hp-projects { 
  min-height: 100vh; 
  background: #202126; 
  color: rgba(244,244,244,1); 
  position: relative; /* Set positioning context for arrows */
  padding-bottom: 0 !important; 
}
.hp-projects .container { 
  max-width: 1600px;
  padding-left: 0; 
  padding-right: 0; 
}
/* Ensure arrows are above all project content */
.hp-projects-scroll-container { isolation: isolate; }
.hp-projects-inner { 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  gap: 24px; 
  padding: 0 clamp(1.5rem, 5vw, 5rem);
}
.hp-projects-title { 
  font-family: 'Aboreto', serif; 
  font-weight: 400; 
  font-size: 50px; 
  line-height: 60px; 
  text-transform: uppercase; 
  margin: 0 0 48px 0; 
  text-align: center; 
}
.hp-projects-placeholder { 
  padding: 48px; 
  border: 1px dashed rgba(244,244,244,0.4); 
  border-radius: 8px; 
}

/* Projects Carousel - Completely Reworked */
.hp-projects-scroll-container {
  width: 100%;
  max-width: 1600px;
  position: relative;
  margin: 0 auto;
  padding: 0 0 80px 0; /* No left/right padding on the scroll container itself */
  overflow: visible;
  min-height: 100vh;
}

.hp-projects-carousel { 
  display: flex; 
  gap: 0;
  transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1); 
  padding-left: 0; /* Remove left padding to align with parent container's padding */
  padding-right: clamp(2.5rem, 7vw, 6rem);
}

/* Navigation Arrows - Using icon assets directly */
.hp-projects-arrow { 
  position: absolute; /* Changed to absolute to scroll with the parent section */
  top: 50%;
  transform: translateY(-50%); 
  width: 82px;
  height: 82px;
  border: none; 
  cursor: pointer; 
  z-index: 1000; /* High enough within section */
  background-color: transparent;
  background-repeat: no-repeat; 
  background-position: center; 
  background-size: contain;
  transition: all 0.3s ease;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6));
  pointer-events: auto;
}

.hp-projects-arrow:hover { 
  transform: translateY(-50%) scale(1.1);
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.8));
}

.hp-projects-arrow.prev { 
  left: clamp(1.5rem, 5vw, 5rem); /* Position relative to .hp-projects padding */
  background-image: url('../images/mepleftarrowsvg.svg'); 
}

.hp-projects-arrow.next { 
  right: clamp(1.5rem, 5vw, 5rem); /* Position relative to .hp-projects padding */
  background-image: url('../images/meprightarrowsvg.svg'); 
}

.hp-projects-arrow.disabled { 
  opacity: 0.3; 
  pointer-events: none; 
  cursor: not-allowed; 
}

/* Re-applying display none for mobile/tablet */
@media (max-width: 768px) {
  .hp-projects-arrow {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .hp-projects-arrow {
    display: none !important;
  }
}

/* Project Cards */
.hp-project-card { 
  flex: 0 0 clamp(280px, 30vw, 392px);
  width: clamp(280px, 30vw, 392px);
  height: 100vh;
  position: relative; 
  border-radius: 0; 
  overflow: hidden; 
  transition: all 300ms ease-out;
  z-index: 1;
}

.hp-project-bg { 
  position: absolute; 
  inset: 0; 
  background-size: cover; 
  background-position: center; 
  transition: transform 600ms ease-out; 
}

.hp-project-card:hover .hp-project-bg { 
  transform: scale(1.05); 
}

.hp-project-content { 
  position: absolute; 
  bottom: 0; 
  left: 0; 
  right: 0; 
  padding: clamp(24px, 3vw, 32px); 
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 50%, transparent 100%); 
  display: flex; 
  flex-direction: column; 
  gap: 12px; 
}

.hp-project-title { 
  font-family: 'Reddit Sans', sans-serif; 
  font-weight: 600; 
  font-style: normal; 
  font-size: 18px; 
  line-height: 28px; 
  letter-spacing: 0.02em;
  color: rgba(244, 244, 244, 1); 
  margin: 0; 
  text-transform: uppercase; 
  transform: translateY(0); 
  transition: transform 300ms ease-out; 
}

.hp-project-location { 
  font-family: 'Reddit Sans', sans-serif; 
  font-weight: 300; 
  font-size: clamp(14px, 1.5vw, 16px); 
  line-height: 1.5; 
  letter-spacing: 0.02em; 
  color: rgba(244,244,244,0.8); 
  margin: 0; 
  transform: translateY(0); 
  transition: transform 300ms ease-out; 
}

.hp-project-content .cta-button { 
  opacity: 0; 
  transform: translateY(8px); 
  transition: all 300ms ease-out; 
  transition-delay: 60ms; 
}

.hp-project-card:hover .hp-project-content .cta-button { 
  opacity: 1; 
  transform: translateY(0); 
}

/* On hover: lift title and location to make room for CTA */
.hp-project-card:hover .hp-project-title,
.hp-project-card:hover .hp-project-location { 
  transform: translateY(-10px); 
}

/* Projects Navigation Dots - HIDDEN */
.hp-projects-nav { 
  display: none !important; 
}

/* Section 5: CTA */
.hp-cta { position: relative; min-height: 72vh; background: url('../images/homepage_section_5.png') center/cover no-repeat; background-size: cover; text-align: center; display: flex; justify-content: center; align-items: center; }
.hp-cta-inner { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.hp-cta-title { font-family: 'Aboreto', serif; font-weight: 400; font-size: 50px; line-height: 60px; text-transform: uppercase; color: rgba(244,244,244,1); margin: 0; }
.hp-cta-desc { font-family: 'Reddit Sans', sans-serif; font-weight: 300; font-size: 16px; line-height: 24px; letter-spacing: 0.02em; color: rgba(244,244,244,1); margin: 0; }

/* Large Desktop Optimization */
@media (min-width: 1920px) {
  .homepage .container,
  .site-footer .footer-container,
  .site-header .header-container {
    max-width: 1800px;
  }
  .hp-projects-arrow {
    width: 82px;
    height: 82px;
  }
}

@media (min-width: 2560px) {
  .homepage .container,
  .site-footer .footer-container,
  .site-header .header-container {
    max-width: 2200px;
  }
  .hp-projects .container {
    max-width: 2200px;
  }
  .hp-projects-arrow {
    width: 82px;
    height: 82px;
  }
  .hp-projects-carousel { 
    gap: 0;
  }
}

/* Responsive breakpoints to mirror fam-contracting */
@media (max-width: 1199px) {
  .hp-services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .homepage .container { padding: 0 clamp(1.5rem, 4vw, 2rem); }
  .site-footer .footer-container, .site-header .header-container { padding-left: clamp(1.5rem, 4vw, 2rem); padding-right: clamp(1.5rem, 4vw, 2rem); }
  .hp-section { padding-top: 0; padding-bottom: 60px; }
  .hp-hero { min-height: 100vh; height: 100vh; padding-top: 0 !important; padding-bottom: 0 !important; }
  .hp-about { min-height: 100vh; height: 100vh; padding-top: 0; padding-bottom: 0; }
  .hp-services { min-height: auto; height: auto; padding-top: 60px; padding-bottom: 60px; }
  .hp-projects { min-height: auto; padding-top: 60px; }
  .hp-cta { min-height: auto; padding-top: 80px; padding-bottom: 80px; }
  .hp-hero-title { font-size: 48px; line-height: 56px; }
  .hp-about-title, .hp-services-title, .hp-projects-title, .hp-cta-title { font-size: 36px; line-height: 44px; }
  .icon-track-container { height: 100px; }
  .hp-projects-inner {
    padding: 0 clamp(1.5rem, 4vw, 2rem); /* Aligned with main container padding */
  }
  .hp-projects-scroll-container {
    padding: 0 0 60px 0; /* Adjusted for consistency, no left/right padding here */
  }
  .hp-projects-carousel { 
    gap: 0;
  }
  .hp-project-card { 
    flex: 0 0 clamp(260px, 35vw, 320px);
    width: clamp(260px, 35vw, 320px);
    height: 100vh;
  }
  .hp-project-content { 
    padding: 20px; 
  }
}

@media (max-width: 480px) {
  .homepage .container { padding-left: var(--fam-mobile-edge-padding); padding-right: var(--fam-mobile-edge-padding); }
  .site-footer .footer-container, .site-header .header-container { padding-left: var(--fam-mobile-edge-padding); padding-right: var(--fam-mobile-edge-padding); }
  .hp-section { padding-top: 0; padding-bottom: 40px; }
  .hp-hero { min-height: 100vh; height: 100vh; padding-top: 0 !important; padding-bottom: 0 !important; }
  .hp-about { min-height: 100vh; height: 100vh; padding-top: 0; padding-bottom: 0; }
  .hp-services { padding-top: 40px; padding-bottom: 40px; }
  .hp-projects { padding-top: 40px; }
  .hp-cta { padding-top: 60px; padding-bottom: 60px; }
  .hp-hero-title { font-size: 40px; line-height: 50px; }
  .hp-services-grid { grid-template-columns: 1fr; }
  .hp-projects-inner {
    padding: 0 var(--fam-mobile-edge-padding); /* Aligned with main container padding */
  }
  .hp-projects-scroll-container {
    padding: 0 0 50px 0; /* Adjusted for consistency, no left/right padding here */
  }
  .hp-projects-carousel { 
    gap: 0;
  }
  .hp-project-card { 
    flex: 0 0 clamp(240px, 70vw, 280px);
    width: clamp(240px, 70vw, 280px);
    height: 100vh;
  }
  .hp-project-content { 
    padding: 20px; 
  }
}


