
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

td {
  width: 33.33%;
  padding: 1.4vh;
  background-color: white;
  cursor: pointer;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
  font-family: 'Oswald', sans-serif;
  font-size: 4vh;
}

td:hover {
  background-color: #FFC300;
}

.tarjetas {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  box-sizing: border-box;
  padding: 0 15px;
}

.tarjeta {
  display: flex;
  width: 48%;
  min-width: 300px; 
  border: 1px solid #ccc;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.1);
  background-color: white;
  font-family: 'Open Sans', sans-serif;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.tarjeta:hover {
  border-color: #FFC300;
  transform: translateY(-5px);
}

.tarjeta img {
  width: 50%;
  object-fit: cover;
  cursor: pointer;
}

.texto {
  width: 50%;
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: black;
}

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
}

.modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
}

.modal-body {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.modal-body img {
  width: 100%;
  max-width: 300px;
  object-fit: cover;
  margin: 0 auto;
}

.modal-text {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#servicios .button-1 {
  background-color: var(--medium-color);
  color: var(--white-color);
  padding: 1vh;
  border: none;
  text-decoration: none;
  display: inline-block;
  font-family: var(--paragraph-font);
}

td.activo {
  background-color: #003566;
  color: white;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
}

.services-tittle {
  width: 100%;
  text-align: center;
  margin-top: 2vh;
  font-size: 6vh;
  background-color: #ecf0f1;
  padding: 2vh 0;
  border: none;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--tittle-font);
  overflow: hidden;
  z-index: 1;
  letter-spacing: 3vh;
}

.services-tittle::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('/assets/mapaBackground.webp');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.1;
  z-index: 0;
}

/* Media Queries para responsividad */
@media (max-width: 1024px) {
  .tarjeta {
    width: 45%;
  }
}

@media (max-width: 768px) {

  .services-tittle {
    font-size: 3vh;
    letter-spacing: 2vh;
  }

  td {
    font-size: clamp(14px, 3vh, 20px);
    padding: 8px 4px;
  }
  
  .tarjetas {
    gap: 15px;
    padding: 0 10px;
  }

  .tarjeta {
    width: 100%;
    max-width: 500px;
    flex-direction: column;
  }

  .tarjeta img,
  .texto {
    width: 100%;
  }

  .texto {
    padding: 15px;
  }
  
  .modal-body {
    flex-direction: column;
  }
  
  .modal-body img {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  td {
    font-size: clamp(12px, 2.5vh, 18px);
    padding: 6px 2px;
  }
  
  .services-tittle {
    font-size: clamp(20px, 4vh, 28px);
    padding: 1.5vh 0;
  }
  
  .tarjeta {
    min-width: 0;
    width: 100%;
  }
  
  .texto {
    padding: 12px;
    font-size: 14px;
  }
  
  .modal-content {
    width: 95%;
    margin: 10% auto;
    padding: 15px;
  }
}

@media (max-width: 360px) {
  td {
    font-size: clamp(10px, 2vh, 16px);
  }
  
  .services-tittle {
    font-size: clamp(18px, 3.5vh, 24px);
  }
}