/* === Home Page Styles === */

/* -----------------------------------------------
   SECTION 1: HERO
----------------------------------------------- */
.hero-section {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Background image layer */
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('https://connect.mediaserve.io/storage/v1/object/public/media/78dba5ff-e514-44fd-bc2d-1f49dd7a0a6f/d76259fe-1239-4613-a209-c964df00721f/media/images/res-fence-dl.webp');
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  z-index: 0;
  transform: scale(1.03);
  animation: hero-bg-drift 20s ease-in-out infinite alternate;
}

@keyframes hero-bg-drift {
  from { transform: scale(1.03) translateX(0); }
  to   { transform: scale(1.06) translateX(-12px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg { animation: none; transform: scale(1); }
}

/* Dark gradient overlay — heavier on left for text legibility */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(0, 0, 0, 0.80) 0%,
    rgba(0, 0, 0, 0.65) 55%,
    rgba(0, 0, 0, 0.30) 100%
  );
  z-index: 1;
}

/* Accent blue angled panel — right side geometric shape */
.hero-accent-panel {
  position: absolute;
  top: 0;
  right: -80px;
  width: 52%;
  height: 100%;
  background: linear-gradient(160deg, rgba(0, 63, 163, 0.28) 0%, rgba(0, 63, 163, 0.06) 100%);
  clip-path: polygon(18% 0, 100% 0, 100% 100%, 0% 100%);
  z-index: 2;
  pointer-events: none;
}

/* Floating geometric shapes */
.hero-shape {
  position: absolute;
  pointer-events: none;
  z-index: 2;
  border-radius: var(--radius-md);
  opacity: 0;
  animation: hero-shape-in var(--duration-slower) var(--ease-out) forwards;
}

@keyframes hero-shape-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-shape { animation: none; opacity: 1; }
}

/* Top-right corner accent bar */
.hero-shape-1 {
  top: var(--space-12);
  right: var(--space-16);
  width: 120px;
  height: 4px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
  opacity: 0;
  animation-delay: 0.4s;
}

/* hero-shape-2 removed */

/* Right side vertical accent bar */
.hero-shape-3 {
  top: 20%;
  right: 3%;
  width: 4px;
  height: 80px;
  background: linear-gradient(to bottom, var(--color-accent), transparent);
  border-radius: var(--radius-full);
  opacity: 0;
  animation-delay: 0.5s;
}

/* Main hero layout */
.hero-container {
  position: relative;
  z-index: 3;
  flex-direction: row;
  align-items: center;
  gap: var(--space-12);
  padding-top: var(--space-24);
  padding-bottom: var(--space-20);
}

.hero-content {
  flex: 1 1 520px;
  display: flex;
  flex-direction: column;
}

/* Hero eyebrow label */
.hero-eyebrow {
  color: var(--color-primary) !important;
  margin-bottom: var(--space-4);
  background: #ffffff !important;
  text-shadow: none;
  letter-spacing: var(--letter-spacing-widest);
  opacity: 0;
  animation: hero-fadein 0.7s var(--ease-out) 0.1s forwards;
}

@keyframes hero-fadein {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-eyebrow,
  .hero-heading,
  .hero-sub,
  .hero-ctas,
  .hero-stats {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.hero-heading {
  font-size: clamp(var(--font-size-3xl), 5.2vw, var(--font-size-6xl));
  font-weight: var(--font-weight-extrabold);
  line-height: var(--line-height-tight);
  color: var(--color-text-on-dark);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
  margin-bottom: var(--space-6);
  letter-spacing: var(--letter-spacing-tight);
  opacity: 0;
  animation: hero-fadein 0.7s var(--ease-out) 0.25s forwards;
}

/* Accent underline on second line of heading */
.hero-heading-accent {
  position: relative;
  display: inline-block;
  color: var(--color-text-on-dark);
}

.hero-heading-accent::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, var(--color-primary), var(--color-accent));
  border-radius: var(--radius-full);
  transform: scaleX(0);
  transform-origin: left;
  animation: underline-draw 0.6s var(--ease-out) 0.9s forwards;
}

@keyframes underline-draw {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-heading-accent::after { animation: none; transform: scaleX(1); }
}

.hero-sub {
  font-size: var(--font-size-lg);
  color: var(--color-text-on-dark);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-8);
  opacity: 0.92;
  animation: hero-fadein 0.7s var(--ease-out) 0.4s forwards;
  opacity: 0;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
  margin-bottom: var(--space-10);
  opacity: 0;
  animation: hero-fadein 0.7s var(--ease-out) 0.55s forwards;
}

/* Mini stats row below CTAs */
.hero-stats {
  display: flex;
  align-items: center;
  gap: var(--space-10);
  padding: var(--space-4) var(--space-8);
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  width: fit-content;
  opacity: 0;
  animation: hero-fadein 0.7s var(--ease-out) 0.7s forwards;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
}

.hero-stat-num {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-extrabold);
  color: #ffffff;
  line-height: var(--line-height-none);
}

.hero-stat-label {
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  line-height: var(--line-height-snug);
  white-space: nowrap;
}

.hero-stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

/* Floating image panel on right */
.hero-img-panel {
  flex: 0 0 380px;
  position: relative;
  opacity: 0;
  animation: hero-img-in 0.9s var(--ease-out) 0.5s forwards;
}

@keyframes hero-img-in {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-img-panel { animation: none; opacity: 1; transform: none; }
}



.hero-img-frame {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 0 3px rgba(0, 63, 163, 0.5),
    0 0 0 6px rgba(0, 63, 163, 0.15);
}

/* Blue accent corner brackets on image frame */
.hero-img-frame::before,
.hero-img-frame::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  z-index: 2;
  pointer-events: none;
}

.hero-img-frame::before {
  top: -3px;
  left: -3px;
  border-top: 3px solid var(--color-accent);
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius-sm) 0 0 0;
}

.hero-img-frame::after {
  bottom: -3px;
  right: -3px;
  border-bottom: 3px solid var(--color-primary);
  border-right: 3px solid var(--color-primary);
  border-radius: 0 0 var(--radius-sm) 0;
}

.hero-img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  display: block;
  transition: transform var(--duration-slow) var(--ease-default);
}

.hero-img-frame:hover .hero-img {
  transform: scale(1.03);
}

/* Badge overlay on image */
.hero-img-badge {
  position: absolute;
  bottom: var(--space-4);
  left: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-wide);
  z-index: 2;
}

.hero-badge-icon {
  width: 1rem;
  height: 1rem;
  color: #4ade80;
  flex-shrink: 0;
}

/* Angled bottom edge on hero */
.hero-bottom-angle {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 60px;
  background: var(--color-accent);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  z-index: 4;
  pointer-events: none;
}

.btn-icon {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

/* -----------------------------------------------
   SECTION 2: TRUST BAR
----------------------------------------------- */
.trust-section {
  background-color: var(--color-accent);
  padding: var(--space-10) 0;
}

.trust-container {
  flex-direction: row;
  flex-wrap: wrap;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  width: 100%;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.trust-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  flex-shrink: 0;
  color: #ffffff;
}

.trust-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.trust-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.trust-stat {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-on-dark);
  line-height: var(--line-height-tight);
}

.trust-label {
  font-size: var(--font-size-sm);
  color: var(--color-neutral-400);
  line-height: var(--line-height-snug);
}

/* -----------------------------------------------
   SECTION 3: SERVICES OVERVIEW
----------------------------------------------- */
.services-section {
  background-color: var(--color-neutral-100);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-10);
}

.section-title {
  font-size: clamp(var(--font-size-2xl), 3vw, var(--font-size-4xl));
  font-weight: var(--font-weight-extrabold);
  color: var(--color-text);
  margin-bottom: var(--space-3);
  letter-spacing: var(--letter-spacing-tight);
}

.section-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: var(--line-height-relaxed);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  width: 100%;
}

.service-card {
  background: var(--color-bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border-bottom: var(--space-1) solid var(--color-primary);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--color-text);
  transition: transform var(--duration-normal) var(--ease-default), box-shadow var(--duration-normal) var(--ease-default);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  color: var(--color-text);
}

.service-card-img {
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.service-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-default);
}

.service-card:hover .service-card-img img {
  transform: scale(1.05);
}

.service-card-body {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.service-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-md);
  background: var(--color-secondary-light);
  color: var(--color-accent);
  margin-bottom: var(--space-4);
  flex-shrink: 0;
}

.service-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.service-card-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.service-card-desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
  flex: 1;
  margin-bottom: var(--space-4);
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  margin-top: auto;
  transition: gap var(--duration-fast) var(--ease-default);
}

.service-card:hover .service-link {
  gap: var(--space-3);
}

.inline-icon {
  width: 0.875rem;
  height: 0.875rem;
}

/* -----------------------------------------------
   SECTION 4: ABOUT SNIPPET
----------------------------------------------- */
.about-section {
  background: var(--color-accent);
}

.about-container {
  gap: var(--space-12);
  align-items: center;
}

.about-img-col {
  flex: 1 1 420px;
}

.about-img {
  width: 100%;
  border-radius: var(--img-radius);
  object-fit: cover;
  max-height: 480px;
  box-shadow: var(--shadow-xl);
}

.about-text-col {
  flex: 1 1 420px;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.about-eyebrow {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-widest);
  text-transform: uppercase;
  color: var(--color-primary);
  background: #ffffff;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  display: inline-block;
  align-self: flex-start;
  width: fit-content;
}

.about-heading {
  font-size: clamp(var(--font-size-2xl), 3vw, var(--font-size-4xl));
  font-weight: var(--font-weight-extrabold);
  color: var(--color-text-on-dark);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
}

.about-body {
  font-size: var(--font-size-base);
  color: var(--color-neutral-300);
  line-height: var(--line-height-relaxed);
}

/* -----------------------------------------------
   SECTION 5: SERVICE AREAS
----------------------------------------------- */
.areas-section {
  background-color: var(--color-primary);
}

.areas-title {
  color: #ffffff;
}

.areas-subtitle {
  color: rgba(255, 255, 255, 0.85);
}

.areas-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  margin-bottom: var(--space-10);
}

.area-pill {
  display: inline-block;
  padding: var(--space-2) var(--space-5);
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-full);
  color: #ffffff;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  transition: background var(--duration-fast) var(--ease-default), border-color var(--duration-fast) var(--ease-default);
  background: rgba(255, 255, 255, 0.1);
}

.area-pill:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: #ffffff;
  color: #ffffff;
}

.areas-cta {
  text-align: center;
}

/* -----------------------------------------------
   SECTION 6: TESTIMONIALS
----------------------------------------------- */
.testimonials-section {
  background-color: var(--color-neutral-100);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  width: 100%;
  margin-bottom: var(--space-8);
}

.testimonial-card {
  background: var(--color-bg-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: box-shadow var(--duration-normal) var(--ease-default);
}

.testimonial-card:hover {
  box-shadow: var(--shadow-lg);
}

.testimonial-stars {
  display: flex;
  gap: var(--space-1);
}

.star-icon {
  width: 1.125rem;
  height: 1.125rem;
  color: #f59e0b;
  fill: #f59e0b;
}

.testimonial-text {
  font-size: var(--font-size-base);
  color: var(--color-text);
  line-height: var(--line-height-relaxed);
  font-style: italic;
  flex: 1;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-4);
  margin-top: auto;
}

.author-name {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
}

.author-location {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.testimonials-more {
  text-align: center;
}

/* -----------------------------------------------
   SECTION 7: FAQ
----------------------------------------------- */
.faq-section {
  background-color: var(--color-bg);
}

.faq-wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

/* -----------------------------------------------
   SECTION 8: CTA BANNER
----------------------------------------------- */
.cta-section {
  background-color: var(--color-primary);
}

.cta-container {
  align-items: center;
  text-align: center;
}

.cta-heading {
  font-size: clamp(var(--font-size-2xl), 4vw, var(--font-size-5xl));
  font-weight: var(--font-weight-extrabold);
  color: #ffffff;
  letter-spacing: var(--letter-spacing-tight);
  margin-bottom: var(--space-3);
}

.cta-sub {
  font-size: var(--font-size-lg);
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: var(--space-8);
  max-width: 540px;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
}

/* -----------------------------------------------
   RESPONSIVE - TABLET (max-width: 1024px)
----------------------------------------------- */
@media (max-width: 1024px) {
  .hero-container {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-8);
    padding-top: var(--space-20);
    padding-bottom: var(--space-16);
  }

  .hero-content {
    flex: 1 1 100%;
  }

  .hero-img-panel {
    flex: 0 0 auto;
    width: 100%;
    max-width: 480px;
    align-self: center;
  }

  .hero-img {
    height: 320px;
  }

  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-container {
    flex-direction: column;
    gap: var(--space-8);
  }

  .about-img-col,
  .about-text-col {
    flex: 1 1 100%;
  }

  .about-img {
    max-height: 380px;
  }

  .hero-stats {
    gap: var(--space-10);
    padding: var(--space-4) var(--space-8);
    align-self: flex-start;
    justify-content: flex-start;
  }
}

/* -----------------------------------------------
   RESPONSIVE - MOBILE (max-width: 768px)
----------------------------------------------- */
@media (max-width: 768px) {
  .hero-section {
    min-height: auto;
  }

  .hero-container {
    padding-top: var(--space-16);
    padding-bottom: var(--space-12);
  }

  .hero-img-panel {
    display: none;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: var(--space-4);
    justify-content: center;
    align-self: flex-start;
  }

  .hero-stat-divider {
    display: none;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: flex-start;
  }

  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }

  .trust-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .trust-text {
    align-items: center;
    text-align: center;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .service-card-img {
    height: 200px;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .areas-grid {
    gap: var(--space-2);
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
}

/* -----------------------------------------------
   RESPONSIVE - SMALL MOBILE (max-width: 480px)
----------------------------------------------- */
@media (max-width: 480px) {
  .trust-item {
    gap: var(--space-3);
  }

  .trust-icon-wrap {
    width: 2.5rem;
    height: 2.5rem;
  }
}
