/* style.css */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: #f4f4f4;
  color: #333;
  margin: 0;
  max-height: 100vh; 
  overflow-y: auto;
}

.container {
  width: 80%;
  margin: 0 auto;
  padding: 15px 0;
}

header {
  top: 0;
  width: 100%;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.logo {
  padding: 15px 0;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: flex-end; 
}

nav ul li {
  margin-left: 20px; 
}

nav ul li:first-child {
  margin-left: 0;
}

nav ul li a {
  text-decoration: none;
  color: #333;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

nav ul li a:hover {
  background-color: #eee;
}

main {
  padding: 40px 0; 
  margin-top: -20px; 
}

.service-cards {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap; 
  gap: 20px; 
}

.service-card {
  flex: calc(30% - 20px); 
  background-color: #fff;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  transition: transform 0.3s ease;
  margin-bottom: 20px;
}

.service-card.precios-de-coches {
  margin-top: 20px; 
}

.service-card:hover {
  transform: translateY(-5px);
}

.service-card img {
  width: 100%; 
  height: 280px; 
  object-fit: cover; 
  border-radius: 6px; 
}

.service-card h3 {
  font-size: 20px; 
  margin-bottom: 8px;
}

.service-card p {
  font-size: 14px;
  margin-bottom: 15px; 
}

.resized-image {
  width: 122px;
  height: 122px;
}

.service-card .btn {
  display: block;
  width: 100%;
  padding: 8px 0; 
  text-align: center;
  background-color: #333;
  color: #fff;
  border: none;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.service-card .btn:hover {
  background-color: #555;
}

footer {
  position: fixed; 
  bottom: 0;
  width: 100%;
  background-color: #333;
  color: #fff;
  text-align: center;
  padding: 20px 10px; 
}

@media only screen and (max-width: 768px) {
  .container {
    padding: 10px;
  }

  header {
    position: sticky;
  }

  .logo img {
    max-width: 80px;
  }

  nav ul {
    justify-content: space-around;
  }

  nav ul li {
    margin: 0;
  }

  .service-cards {
    flex-direction: column; 
  }

  .service-card {
    flex: 100%; 
    margin-bottom: 10px; 
    padding: 15px; 
  }

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

  .service-card h3 {
    font-size: 16px; 
    margin-bottom: 6px;
  }

  .service-card p {
    font-size: 12px; 
    margin-bottom: 10px;
  }

  .service-cards:last-child {
    margin-bottom: 40px; 
  }
}
