@import url('https://fonts.googleapis.com/css2?family=Caprasimo&display=swap');

/* === SERVICES SECTION === */
.services-section {
  background-color: #f9faff;
  padding: 0rem 1rem;
  font-family: 'Caprasimo', serif;
  color: #023047;
  text-align: center;
}

.services-header h2 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #011627;
}

.services-header p {
  font-size: 1.2rem;
  color: #555d66;
  margin-bottom: 2.5rem;
  font-weight: 400;
}

/* === GRID LAYOUT === */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  justify-items: center;
}

/* === SERVICE CARD === */
.service-card {
  cursor: pointer;
  outline: none;
  width: 100%;
  max-width: 250px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  background-color: #ffffff;
  box-shadow: 0 4px 12px rgba(2, 48, 71, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  display: block;
}

.service-card:hover,
.service-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 10px 20px rgba(2, 48, 71, 0.15);
}

/* === MODAL OVERLAY === */
.modal {
  position: fixed;
  inset: 0;
  background-color: rgba(1, 22, 39, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
  overflow-y: auto;
}

.modal.show {
  display: flex;
  opacity: 1;
}

/* === MODAL CONTENT === */
.modal-content {
  background: white;
  border-radius: 14px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  padding: 2rem 2.5rem;
  box-shadow: 0 10px 40px rgba(2, 48, 71, 0.25);
  position: relative;
  text-align: left;
  font-family: 'Caprasimo', serif;
  overflow-y: auto;
  margin: auto;
  display: block;
}

/* === MODAL CLOSE BUTTON === */
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 2.2rem;
  font-weight: 700;
  color: #023047;
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-close:hover,
.modal-close:focus-visible {
  color: #d64541;
  outline: none;
}

/* === MODAL TEXT === */
#modalTitle {
  font-size: 1.8rem;
  font-weight: 700;
  color: #023047;
  margin-bottom: 1rem;
}

#modalDescription {
  text-align: justify;
  font-size: 1.1rem;
  color: #394955;
  line-height: 1.6;
}

/* === KEYBOARD ACCESSIBILITY === */
.service-card:focus-visible {
  outline: 3px solid #d64541;
  outline-offset: 3px;
}

/* === RESPONSIVE: TABLET === */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-card {
    max-width: 100%;
  }

  .services-header h2 {
    font-size: 2.2rem;
  }

  .services-header p {
    font-size: 1.1rem;
  }
}

/* === RESPONSIVE: MOBILE === */
@media (max-width: 600px) {
  .services-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    width: 90%;
    max-width: 90vw;
    padding: 1.5rem;
    border-radius: 12px;
  }

  .services-header h2 {
    font-size: 1.8rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
  }

  .services-header p {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 2rem;
  }

  #modalTitle {
    font-size: 1.5rem;
  }

  #modalDescription {
    font-size: 1rem;
  }
}
