/* ============================================================
   ESTÁNDAR INGENIEROS — Home Page Styles
   ============================================================ */

/* ── Hero Section ──────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-height-mobile));
  display: flex;
  align-items: center;
  background: var(--color-bg-header);
  overflow: hidden;
}

@media (min-width: 1024px) {
  .hero {
    min-height: calc(100svh - var(--header-height-desktop));
  }
}

/* Hero background geometric pattern */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}

.hero__bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(243,146,0,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(190,22,34,0.07) 0%, transparent 50%),
    linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.3) 100%);
}

/* Animated floating elements */
.hero__shape {
  position: absolute;
  border-radius: var(--radius-2xl);
  opacity: 0.04;
  animation: heroFloat 8s ease-in-out infinite;
}

.hero__shape--1 {
  width: 320px;
  height: 320px;
  background: var(--color-orange);
  top: -80px;
  right: 10%;
  animation-delay: 0s;
  transform: rotate(15deg);
}

.hero__shape--2 {
  width: 200px;
  height: 200px;
  background: var(--color-red);
  bottom: 10%;
  right: 25%;
  animation-delay: -3s;
  transform: rotate(-20deg);
}

.hero__shape--3 {
  width: 160px;
  height: 160px;
  background: var(--color-orange);
  top: 30%;
  left: 5%;
  animation-delay: -5s;
  transform: rotate(30deg);
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0) rotate(15deg); }
  50%       { transform: translateY(-20px) rotate(18deg); }
}

.hero__shape--2 { animation-name: heroFloat2; }
@keyframes heroFloat2 {
  0%, 100% { transform: translateY(0) rotate(-20deg); }
  50%       { transform: translateY(15px) rotate(-17deg); }
}

.hero__shape--3 { animation-name: heroFloat3; }
@keyframes heroFloat3 {
  0%, 100% { transform: translateY(0) rotate(30deg); }
  50%       { transform: translateY(-12px) rotate(33deg); }
}

/* Hero Content */
.hero__content {
  position: relative;
  z-index: 1;
  padding-block: clamp(var(--space-16), 10vw, var(--space-24));
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  align-items: center;
}

@media (min-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr 420px;
    gap: var(--space-16);
  }
}

.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: rgba(243,146,0,0.12);
  border: 1px solid rgba(243,146,0,0.25);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-orange);
  margin-bottom: var(--space-5);
}

.hero__tag-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-orange);
  animation: pulse 2s ease-in-out infinite;
}

.hero__title {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-6xl));
  font-weight: var(--weight-extrabold);
  color: var(--color-white);
  letter-spacing: var(--tracking-tight);
  line-height: 1.08;
  margin-bottom: var(--space-6);
}

.hero__title .accent {
  color: var(--color-orange);
  display: block;
}

.hero__subtitle {
  font-size: clamp(var(--text-base), 2vw, var(--text-lg));
  color: rgba(255,255,255,0.70);
  line-height: var(--leading-relaxed);
  max-width: 560px;
  margin-bottom: var(--space-8);
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-10);
}

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

.hero__trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.55);
  font-weight: var(--weight-medium);
}

.hero__trust-item svg {
  width: 16px;
  height: 16px;
  fill: var(--color-orange);
}

/* Hero Visual Card */
.hero__visual {
  display: none;
}

@media (min-width: 1024px) {
  .hero__visual {
    display: block;
  }
}

.hero-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  backdrop-filter: blur(8px);
  animation: fadeInUp 0.8s ease both 0.3s;
}

.hero-card__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: rgba(255,255,255,0.50);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  margin-bottom: var(--space-5);
}

.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.hero-stat {
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-4);
  text-align: center;
}

.hero-stat__num {
  display: block;
  font-size: var(--text-3xl);
  font-weight: var(--weight-extrabold);
  color: var(--color-orange);
  letter-spacing: var(--tracking-tight);
  line-height: 1;
}

.hero-stat__lbl {
  display: block;
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.50);
  margin-top: var(--space-1);
}

.hero-card__divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin-block: var(--space-5);
}

.hero-card__services {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.hero-card__service {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.70);
}

.hero-card__service-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-orange);
  flex-shrink: 0;
}

/* ── Scroll indicator ──────────────────────────────────────── */
.hero__scroll {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: rgba(255,255,255,0.4);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  animation: bounce 2s ease-in-out infinite;
}

.hero__scroll-bar {
  width: 1.5px;
  height: 32px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.4), transparent);
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ── Servicios Home Grid ────────────────────────────────────── */
.home-services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 640px) {
  .home-services__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .home-services__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Process Section ───────────────────────────────────────── */
.home-process {
  background: var(--color-bg-section);
}

/* ── Projects Grid (Home) ──────────────────────────────────── */
.home-projects__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .home-projects__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .home-projects__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Why Us Section ────────────────────────────────────────── */
.why-us {
  background: var(--color-bg-light);
}

.why-us__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(var(--space-10), 5vw, var(--space-16));
  align-items: center;
}

@media (min-width: 1024px) {
  .why-us__inner {
    grid-template-columns: 1fr 1fr;
  }
}

.why-us__image-wrap {
  position: relative;
  border-radius: var(--radius-2xl);
  overflow: hidden;
}

.why-us__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.why-us__badge {
  position: absolute;
  bottom: var(--space-6);
  left: var(--space-6);
  background: var(--color-orange);
  color: var(--color-white);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-orange);
}

.why-us__badge-num {
  display: block;
  font-size: var(--text-2xl);
  font-weight: var(--weight-extrabold);
  line-height: 1;
}

.why-us__badge-text {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  opacity: 0.85;
  margin-top: 2px;
}

.why-us__features {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* ── EEAT Section ──────────────────────────────────────────── */
.eeat-section {
  background: var(--color-bg-header);
  color: var(--color-white);
  position: relative;
  overflow: hidden;
}

.eeat-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 90% 50%, rgba(243,146,0,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.eeat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 640px) {
  .eeat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .eeat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.eeat-card {
  padding: var(--space-8) var(--space-6);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-xl);
  text-align: center;
  transition: all var(--transition-base);
}

.eeat-card:hover {
  border-color: rgba(243,146,0,0.30);
  background: rgba(255,255,255,0.03);
  transform: translateY(-4px);
}

.eeat-card__icon {
  width: 56px;
  height: 56px;
  background: rgba(243,146,0,0.12);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-5);
  transition: background var(--transition-base);
}

.eeat-card:hover .eeat-card__icon {
  background: rgba(243,146,0,0.20);
}

.eeat-card__icon svg {
  width: 28px;
  height: 28px;
  fill: var(--color-orange);
}

.eeat-card__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--color-white);
  margin-bottom: var(--space-3);
}

.eeat-card__text {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.55);
  line-height: var(--leading-relaxed);
}

/* ── FAQ Section (Home) ────────────────────────────────────── */
.home-faq__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(var(--space-10), 5vw, var(--space-16));
}

@media (min-width: 1024px) {
  .home-faq__inner {
    grid-template-columns: 380px 1fr;
    align-items: start;
  }
}

/* ── Final CTA Section ─────────────────────────────────────── */
.home-cta {
  background: var(--color-bg-section);
}

/* ── Testimonials ──────────────────────────────────────────── */
.home-testimonials {
  background: var(--color-bg-white);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 640px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Hero Image Carousel ────────────────────────────────────── */
.hero-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: var(--shadow-xl);
  animation: fadeInUp 0.8s ease both 0.3s;
}

.hero-carousel__track {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-carousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-slower);
}

.hero-carousel__slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-carousel__slide::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 45%);
  pointer-events: none;
}

.hero-carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-carousel__caption {
  position: absolute;
  z-index: 2;
  left: var(--space-5);
  bottom: var(--space-5);
  color: var(--color-white);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  background: rgba(0,0,0,0.40);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  backdrop-filter: blur(4px);
}

.hero-carousel__arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--color-white);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.hero-carousel__arrow:hover {
  background: rgba(0,0,0,0.60);
}

.hero-carousel__arrow svg {
  width: 18px;
  height: 18px;
}

.hero-carousel__arrow--prev { left: var(--space-3); }
.hero-carousel__arrow--next { right: var(--space-3); }

.hero-carousel__dots {
  position: absolute;
  z-index: 3;
  right: var(--space-5);
  bottom: var(--space-5);
  display: flex;
  gap: var(--space-2);
}

.hero-carousel__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.45);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.hero-carousel__dot.is-active {
  width: 22px;
  background: var(--color-orange);
}

/* Image placeholder for hero visual area */
.hero-project-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.hero-project-thumb {
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

.hero-project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}
