:root {
  --primary: #1e40af;
  --primary-light: #3b82f6;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --white: #ffffff;
  --background: #f9fafb;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  line-height: 1.5;
  color: var(--text-dark);
  background-color: var(--background);
}

.hero {
  position: relative;
  background: linear-gradient(to right, var(--primary), var(--primary-light));
  color: var(--white);
  padding: 6rem 2rem;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("https://images.pexels.com/photos/162500/elevator-belt-elevator-shaft-lift-162500.jpeg")
    center/cover;
  opacity: 0.2;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 100px auto;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.9;
}

.wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: var(--background);
}

.services {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.services-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 4rem;
}

.services-header h2 {
  color: var(--primary);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.services-header p {
  color: var(--text-light);
  font-size: 1.125rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--white);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.service-card .image-container img[alt="Normativa de ascensores"] {
  width: 60%;
  height: auto;
  margin: 0 auto;
  display: block;
  padding-top: 80px;
}

.normativa-card .image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px; /* o lo que uses normalmente para todas */
}

.normativa-card .image-container img {
  width: 60%;
  height: auto;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--card-shadow-hover);
}

.image-container {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.service-card:hover .image-container img {
  transform: scale(1.1);
}

.content {
  padding: 1.5rem;
}

.content h3 {
  color: var(--primary);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.content p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.learn-more {
  display: inline-flex;
  align-items: center;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.learn-more:hover {
  color: var(--primary-light);
}

.learn-more::after {
  content: "→";
  margin-left: 0.5rem;
  transition: transform 0.2s ease;
}

.learn-more:hover::after {
  transform: translateX(4px);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

.fade-in-delay {
  animation: fadeIn 0.8s ease-out 0.2s forwards;
  opacity: 0;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .services-header h2 {
    font-size: 2rem;
  }

  .services {
    padding: 3rem 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fade-in,
  .fade-in-delay,
  .service-card,
  .image-container img,
  .learn-more::after {
    animation: none;
    transition: none;
  }
}
