/* ============================================================
   ESTÁNDAR INGENIEROS — Servicios Page
   ============================================================ */

/* ── Services Grid ─────────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

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

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

/* ── Service Detail Card (Full) ────────────────────────────── */
.service-detail {
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  transition: box-shadow var(--transition-base);
}

.service-detail:hover {
  box-shadow: var(--shadow-lg);
}

.service-detail__image {
  aspect-ratio: 16 / 8;
  overflow: hidden;
  position: relative;
}

.service-detail__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slower);
}

.service-detail:hover .service-detail__image img {
  transform: scale(1.04);
}

.service-detail__image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-4) var(--space-6);
  background: linear-gradient(to top, rgba(30,30,29,0.90) 0%, transparent 100%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.service-detail__body {
  padding: var(--space-8) var(--space-8);
}

.service-detail__title {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-4);
  letter-spacing: var(--tracking-snug);
}

.service-detail__description {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-6);
}

.service-detail__section-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.service-detail__benefits {
  margin-bottom: var(--space-6);
}

.service-detail__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}

/* ── Service Hero Placeholder Image ───────────────────────── */
.service-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.service-img--construccion {
  background: linear-gradient(135deg, #2C2C2B 0%, #3C3C3B 50%, #4A3020 100%);
}

.service-img--remodelacion {
  background: linear-gradient(135deg, #1E2A2C 0%, #2C3C3B 50%, #1A2A35 100%);
}

.service-img--diseno {
  background: linear-gradient(135deg, #1A1A2E 0%, #2A2A4A 50%, #16213E 100%);
}

.service-img--mantenimiento {
  background: linear-gradient(135deg, #2A1A1A 0%, #3C2020 50%, #2A1E1E 100%);
}

.service-img--interventoria {
  background: linear-gradient(135deg, #1A2A1A 0%, #2A3C2A 50%, #1E3020 100%);
}

.service-img--topografia {
  background: linear-gradient(135deg, #2A2A1A 0%, #3C3C20 50%, #302E1A 100%);
}

/* Uniform variant: same background for every service card, differentiated
   only by icon + name (used on the services overview cards) */
.service-img--uniform {
  background: linear-gradient(135deg, #2C2C2B 0%, #3C3C3B 55%, #2A2A29 100%);
}

.service-img__icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.12;
}

.service-img__icon svg {
  width: 120px;
  height: 120px;
  fill: var(--color-white);
}

.service-img__pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}

.service-img__label {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: rgba(255,255,255,0.70);
}

.service-img__label svg {
  width: 40px;
  height: 40px;
  fill: var(--color-orange);
}

.service-img__label img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.service-img__label span {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--color-white);
}

/* ── Services Navigation Bar ───────────────────────────────── */
.services-nav {
  background: var(--color-bg-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: var(--header-height-mobile);
  z-index: calc(var(--z-sticky) - 5);
  overflow-x: auto;
  scrollbar-width: none;
}

.services-nav::-webkit-scrollbar { display: none; }

.services-nav__list {
  display: flex;
  gap: 0;
  padding-inline: var(--container-pad);
  min-width: max-content;
}

.services-nav__link {
  display: inline-flex;
  align-items: center;
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.services-nav__link:hover {
  color: var(--color-orange);
  border-bottom-color: rgba(243,146,0,0.3);
}

.services-nav__link.is-active {
  color: var(--color-orange);
  border-bottom-color: var(--color-orange);
  font-weight: var(--weight-semibold);
}

@media (min-width: 1024px) {
  .services-nav {
    top: var(--header-height-desktop);
  }
}

/* ── GEO Blocks (Answer Engine Optimization) ───────────────── */
.geo-block {
  background: var(--color-bg-lighter);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-orange);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: var(--space-6);
  margin-block: var(--space-6);
}

.geo-block__question {
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-3);
}

.geo-block__answer {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

/* ── Service FAQ (per service) ─────────────────────────────── */
.service-faq {
  background: var(--color-bg-section);
  padding: var(--space-8);
  border-radius: var(--radius-xl);
  margin-top: var(--space-8);
}
