/* ============================================================
   TERRA MAX - ROBOTY ZIEMNE STYLES
   Extends: home.css
   ============================================================ */

/* ==================== PAGE HERO (Common) ==================== */
.page-hero {
  position: relative;
  min-height: 50vh; /* Changed from height to min-height for better spacing */
  display: flex;
  align-items: center;
  overflow: hidden;
  margin-top: 0;
  padding-bottom: 60px; /* Prevent content overlap on zoom */
}

.page-hero__background {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.page-hero__background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.page-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(30, 30, 30, 0.9) 0%,
    rgba(30, 30, 30, 0.6) 100%
  );
}
.page-hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: var(--color-primary);
  clip-path: polygon(0 100%, 100% 100%, 100% 0, 0 100%);
  z-index: 2;
}
.page-hero__content {
  position: relative;
  z-index: 3;
  padding-top: 100px; /* Increased from 60px for better spacing from header when zoomed */
}
.page-hero__title {
  color: var(--color-white);
  font-size: clamp(2.5rem, 4vw, 4rem);
  margin-bottom: 15px;
}
.page-hero__subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.2rem;
  max-width: 600px;
  border-left: 4px solid var(--color-primary);
  padding-left: 20px;
}

/* ==================== EARTHWORKS CATEGORIES PANEL ==================== */
.earthworks-categories {
  padding: 40px 0 20px;
  background: #fff;
}

.earthworks-categories__title {
  font-size: 1.5rem;
  color: var(--color-dark);
  text-align: center;
  margin-bottom: 30px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.earthworks-categories__filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 1000px;
  margin: 0 auto;
}

.category-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #fff;
  border: 1px solid #ddd;
  color: var(--color-dark);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  white-space: nowrap;
  clip-path: polygon(
    8px 0,
    100% 0,
    100% calc(100% - 8px),
    calc(100% - 8px) 100%,
    0 100%,
    0 8px
  );
}

.category-btn i {
  font-size: 14px;
  transition: transform 0.3s ease;
}

.category-btn:hover {
  background: var(--color-dark);
  color: var(--color-white);
  border-color: var(--color-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.category-btn.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-dark);
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
  font-weight: 700;
}

/* ==================== ZIG-ZAG SERVICES ==================== */
.services-split {
  padding: var(--section-padding) 0;
  background: #fff;
}

.earthwork-item {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.service-row {
  display: flex;
  align-items: center;
  gap: 60px;
  margin-bottom: 80px;
}

.service-row:last-child {
  margin-bottom: 0;
}
.service-row--reverse {
  flex-direction: row-reverse;
}

.service-row__content {
  flex: 1;
  padding: 20px;
}

.service-icon {
  width: 60px;
  height: 60px;
  background: var(--color-dark);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
  clip-path: polygon(
    10px 0,
    100% 0,
    100% calc(100% - 10px),
    calc(100% - 10px) 100%,
    0 100%,
    0 10px
  );
  box-shadow: var(--shadow-md);
}

.service-title {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--color-dark);
}

.service-desc {
  color: #666;
  font-size: 1.05rem;
  margin-bottom: 30px;
  line-height: 1.8;
}

.service-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-weight: 600;
  color: var(--color-gray-900);
}
.service-list i {
  color: var(--color-primary);
  font-size: 14px;
}

.service-row__content .btn {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-service-details {
  transition: all 0.3s ease;
}

.btn-service-details:hover {
  transform: translateX(5px);
}

.btn-service-details i {
  transition: transform 0.3s ease;
}

.btn-service-details:hover i {
  transform: translateX(3px);
}

.service-row__image {
  flex: 1;
  position: relative;
  height: 400px;
}

.service-row__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Geometric Cut */
  clip-path: polygon(
    50px 0,
    100% 0,
    100% calc(100% - 50px),
    calc(100% - 50px) 100%,
    0 100%,
    0 50px
  );
  filter: grayscale(20%);
  transition: all 0.5s var(--ease-tech);
}

.service-row:hover .service-row__image img {
  filter: grayscale(0%);
  transform: scale(1.02);
}

.image-accent {
  position: absolute;
  bottom: -15px;
  right: -15px;
  width: 150px;
  height: 150px;
  border-right: 4px solid var(--color-primary);
  border-bottom: 4px solid var(--color-primary);
  z-index: -1;
  transition: 0.3s;
}

.service-row--reverse .image-accent {
  right: auto;
  left: -15px;
  border-right: none;
  border-left: 4px solid var(--color-primary);
}

.service-row:hover .image-accent {
  bottom: -25px;
  right: -25px; /* Expansion effect */
}
.service-row--reverse:hover .image-accent {
  left: -25px;
}

/* ==================== CTA PROJECT ==================== */
.cta-project {
  padding: 40px 0 80px;
}

.cta-project__box {
  background: var(--color-dark);
  color: #fff;
  padding: 50px;
  display: flex;
  align-items: center;
  gap: 40px;
  border-left: 6px solid var(--color-primary);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.cta-project__icon {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--color-primary);
  flex-shrink: 0;
}

.cta-project__content {
  flex: 1;
}
.cta-project__content h3 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: #fff;
}
.cta-project__content p {
  color: #aaa;
  font-size: 1.1rem;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 992px) {
  .earthworks-categories__title {
    font-size: 1.3rem;
  }

  .category-btn {
    padding: 9px 16px;
    font-size: 12px;
  }

  .service-row {
    flex-direction: column;
    gap: 30px;
  }
  .service-row--reverse {
    flex-direction: column;
  } /* Stack normally on mobile */
  .service-row__image {
    width: 100%;
    height: 300px;
  }
  .image-accent {
    display: none;
  } /* Hide decoration on mobile */

  .cta-project__box {
    flex-direction: column;
    text-align: center;
    padding: 40px 20px;
  }
  .cta-project__action {
    width: 100%;
  }
  .cta-project__action .btn {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .earthworks-categories__filters {
    gap: 8px;
  }

  .category-btn {
    padding: 8px 12px;
    font-size: 11px;
    gap: 6px;
  }

  .category-btn i {
    font-size: 12px;
  }
}
