/* ============================================================
   JD Soluções Elétricas — Base & Page Styles
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--navbar-height);
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  color: var(--color-black);
  background-color: var(--color-white);
  overflow-x: clip;
  max-width: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  line-height: var(--lh-heading);
  font-weight: var(--fw-bold);
  color: var(--color-primary);
}

h1 {
  font-size: var(--fs-h1);
}
h2 {
  font-size: var(--fs-h2);
}
h3 {
  font-size: var(--fs-h3);
}
h4 {
  font-size: var(--fs-h4);
}

a {
  transition: color var(--transition);
}

.container {
  max-width: var(--container-max);
}

.container,
.container-fluid {
  /* Keep row negative margins inside the container (avoids white strip on mobile) */
  --bs-gutter-x: var(--gap);
}

.row {
  --bs-gutter-x: var(--gap);
  --bs-gutter-y: var(--gap);
}

img,
video,
iframe,
svg {
  max-width: 100%;
}

/* Skip link (a11y) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  background: var(--color-secondary);
  color: var(--color-primary-dark);
  font-family: var(--font-heading);
  font-weight: var(--fw-semibold);
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* ----- Hero ----- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: calc(var(--navbar-height) + 2rem) 0 4rem;
  background: linear-gradient(
      105deg,
      rgba(5, 28, 48, 0.92) 0%,
      rgba(11, 60, 93, 0.78) 45%,
      rgba(11, 60, 93, 0.55) 100%
    ),
    url("../images/image1.jpeg") center/cover no-repeat;
  color: var(--color-white);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  /*background: linear-gradient(to top, var(--color-white), transparent);*/
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.hero-brand img {
  height: 72px;
  width: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: var(--fs-h1);
  font-weight: var(--fw-extrabold);
  color: var(--color-white);
  line-height: var(--lh-tight);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero h1 .accent {
  color: var(--color-secondary);
}

.hero .hero-lead {
  font-size: var(--fs-body);
  color: rgba(255, 255, 255, 0.85);
  max-width: 540px;
  margin-bottom: 2rem;
  line-height: var(--lh-body);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--color-secondary);
  font-size: 2rem;
  animation: bounce 2s infinite;
  text-decoration: none;
}

.hero-scroll:hover {
  color: var(--color-secondary);
  opacity: 0.85;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* ----- About (home) ----- */
.about-image-wrap {
  position: relative;
  overflow: hidden;
}

.about-image-wrap img {
  width: 100%;
  height: 480px;
  object-fit: cover;
}

.about-image-wrap::before {
  content: "";
  position: absolute;
  top: -1rem;
  left: -1rem;
  width: 40%;
  height: 40%;
  border: 3px solid var(--color-secondary);
  z-index: -1;
  pointer-events: none;
}

.about-content .section-title {
  margin-bottom: 1.25rem;
}

.about-content p {
  color: var(--color-gray);
  margin-bottom: 1rem;
}

/* ----- Service detail (servicos page) ----- */
.service-detail {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--color-gray-light);
}

.service-detail:last-child {
  border-bottom: none;
}

.service-detail .service-num {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: var(--fw-extrabold);
  color: rgba(11, 60, 93, 0.1);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.service-detail h3 {
  font-size: var(--fs-h3);
  margin-bottom: 1rem;
}

.service-detail p {
  color: var(--color-gray);
  margin-bottom: 0;
}

.service-detail .icon-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background-color: rgba(11, 60, 93, 0.08);
  color: var(--color-primary);
  font-size: 2rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

/* ----- Values (empresa) ----- */
.value-block {
  padding: 2rem 1.5rem;
  background: var(--color-bg);
  height: 100%;
  border-left: 3px solid var(--color-secondary);
}

.value-block h4 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.value-block p {
  font-size: var(--fs-small);
  color: var(--color-gray);
  margin: 0;
}

/* ----- Swiper overrides ----- */
.testimonials-swiper {
  padding-bottom: 3rem !important;
}

.testimonials-swiper .swiper-pagination-bullet {
  background: var(--color-primary);
  opacity: 0.3;
}

.testimonials-swiper .swiper-pagination-bullet-active {
  background: var(--color-secondary);
  opacity: 1;
}

/* ----- Utility ----- */
.text-secondary-brand {
  color: var(--color-secondary) !important;
}

.bg-primary-brand {
  background-color: var(--color-primary) !important;
}

.visually-hidden-focusable:not(:focus):not(:focus-within) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
