/* ==============================
   PÁGINA DE SERVICIOS
   ============================== */

.services-page {
  padding: 3rem 0;
  min-height: 70vh;
}

.services-header {
  text-align: center;
  margin-bottom: 4rem;
}

.services-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #10375c;
  margin-bottom: 1rem;
}

.services-header p {
  font-size: 1.1rem;
  color: #666;
  max-width: 900px; /* Aumentado de 700px a 900px para que el texto ocupe dos líneas específicas */
  margin: 0 auto;
  line-height: 1.6;
}

/* Galería de servicios - contenedores más estrechos */
.services-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Máximo 3 por fila */
  gap: 3rem; /* Aumentado el gap para compensar el ancho reducido */
  margin-bottom: 4rem;
  max-width: 1000px; /* Ancho máximo reducido para hacer los contenedores más estrechos */
  margin-left: auto;
  margin-right: auto;
}

.service-card {
  background: #ffffff;
  border-radius: 20px; /* Bordes redondeados de 20px */
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none; /* Quitar subrayado del enlace */
  color: inherit; /* Mantener color de texto */
  aspect-ratio: 2.5 / 4; /* Proporción más estrecha (2.5:4 en lugar de 3:4) */
  width: 100%;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.service-image {
  width: 100%;
  height: 60%; /* Aumentado para ocupar más espacio vertical */
  overflow: hidden;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.service-image::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(to right, #10375c, #0c2d48); /* Degradado en la línea separadora */
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.service-card:hover .service-image img {
  transform: scale(1.05);
}

.service-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 40%; /* El contenido ocupa el 40% restante */
}

.service-content h3 {
  font-size: 1.2rem; /* Ligeramente reducido para mejor proporción */
  font-weight: 600;
  color: #10375c;
  margin-bottom: 0.75rem;
  margin-top: 1rem; /* Added spacing between image and title */
  text-align: center; /* Título centrado */
}

.service-content p {
  color: #666;
  line-height: 1.5; /* Ligeramente reducido para mejor ajuste */
  margin-bottom: 1rem;
  flex: 1;
  text-align: justify; /* Texto justificado */
  font-size: 0.95rem; /* Ligeramente más pequeño para mejor proporción */
}

.service-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: #10375c;
  color: white;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 500;
  text-align: center;
  transition: all 0.3s ease;
  align-self: flex-start;
}

.service-button:hover {
  background-color: #0c2d48;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 55, 92, 0.3);
}

/* Call to Action */
.services-cta {
  text-align: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 3rem 2rem;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.services-cta h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #10375c;
  margin-bottom: 1rem;
}

.services-cta p {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2rem;
  background-color: #10375c;
  color: white;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(16, 55, 92, 0.3);
}

.cta-button:hover {
  background-color: #0c2d48;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(16, 55, 92, 0.4);
}

/* ==============================
   PÁGINAS INDIVIDUALES DE SERVICIOS
   ============================== */

.service-detail-page {
  padding: 3rem 0;
  min-height: 70vh;
}

.service-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid #e5e7eb;
}

.service-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #10375c;
  margin-bottom: 1rem;
}

.breadcrumb {
  font-size: 0.9rem;
  color: #666;
  margin-top: 1rem;
}

.breadcrumb a {
  color: #10375c;
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: #0c2d48;
  text-decoration: underline;
}

.breadcrumb span {
  color: #999;
}

.service-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

.service-description {
  background: #ffffff;
  padding: 3rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
  margin-bottom: 3rem;
}

.service-description p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #333;
  margin-bottom: 2rem;
  text-align: justify;
}

.service-description h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #10375c;
  margin: 2rem 0 1.5rem 0;
  border-left: 4px solid #10375c;
  padding-left: 1rem;
}

.service-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

.service-list li {
  position: relative;
  padding: 0.75rem 0 0.75rem 2rem;
  font-size: 1rem;
  line-height: 1.6;
  color: #555;
  border-bottom: 1px solid #f0f0f0;
}

.service-list li:before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.75rem;
  color: #10375c;
  font-weight: bold;
  font-size: 1.1rem;
}

.service-list li:last-child {
  border-bottom: none;
}

.service-commitment {
  font-size: 1.1rem;
  font-weight: 500;
  color: #10375c;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #10375c;
  margin-top: 2rem;
  font-style: italic;
}

.service-cta {
  text-align: center;
  background: linear-gradient(135deg, #10375c 0%, #0c2d48 100%);
  color: white;
  padding: 3rem 2rem;
  border-radius: 12px;
  box-shadow: 0 6px 25px rgba(16, 55, 92, 0.3);
}

.service-cta h3 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: white;
}

.service-cta p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
}

.service-cta .cta-button {
  background-color: white;
  color: #10375c;
  border: 2px solid white;
  transition: all 0.3s ease;
}

.service-cta .cta-button:hover {
  background-color: transparent;
  color: white;
  border-color: white;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
}

/* Modo oscuro */
body.dark-mode .services-header h1 {
  color: #ffffff;
}

body.dark-mode .services-header p {
  color: rgba(255, 255, 255, 0.8);
}

body.dark-mode .service-card {
  background-color: #071326;
  border-color: #1f2937;
}

body.dark-mode .service-image {
  background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
}

body.dark-mode .service-image::after {
  background: linear-gradient(to right, #64b5f6, #1976d2); /* Degradado en modo oscuro */
}

body.dark-mode .service-content h3 {
  color: #ffffff;
}

body.dark-mode .service-content p {
  color: rgba(255, 255, 255, 0.8);
}

body.dark-mode .service-button {
  background: linear-gradient(135deg, #10375c 0%, #0c2d48 100%);
}

body.dark-mode .service-button:hover {
  background: linear-gradient(135deg, #0c2d48 0%, #081f33 100%);
}

body.dark-mode .services-cta {
  background: linear-gradient(135deg, #071326 0%, #1f2937 100%);
  border-color: #374151;
}

body.dark-mode .services-cta h2 {
  color: #ffffff;
}

body.dark-mode .services-cta p {
  color: rgba(255, 255, 255, 0.8);
}

body.dark-mode .cta-button {
  background-color: #64b5f6;
  color: #071326;
  border-color: #64b5f6;
}

body.dark-mode .cta-button:hover {
  background-color: transparent;
  color: #64b5f6;
  border-color: #64b5f6;
}

/* Modo oscuro para páginas individuales */
body.dark-mode .service-header {
  border-bottom-color: #374151;
}

body.dark-mode .service-header h1 {
  color: #ffffff;
}

body.dark-mode .breadcrumb {
  color: rgba(255, 255, 255, 0.7);
}

body.dark-mode .breadcrumb a {
  color: #64b5f6;
}

body.dark-mode .breadcrumb a:hover {
  color: #90caf9;
}

body.dark-mode .breadcrumb span {
  color: rgba(255, 255, 255, 0.5);
}

body.dark-mode .service-description {
  background-color: #071326;
  border-color: #1f2937;
}

body.dark-mode .service-description p {
  color: rgba(255, 255, 255, 0.9);
}

body.dark-mode .service-description h2 {
  color: #ffffff;
  border-left-color: #64b5f6;
}

body.dark-mode .service-list li {
  color: rgba(255, 255, 255, 0.8);
  border-bottom-color: #374151;
}

body.dark-mode .service-list li:before {
  color: #64b5f6;
}

body.dark-mode .service-commitment {
  color: #ffffff;
  background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
  border-left-color: #64b5f6;
}

body.dark-mode .service-cta {
  background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
}

body.dark-mode .service-cta h3 {
  color: #ffffff;
}

body.dark-mode .service-cta p {
  color: rgba(255, 255, 255, 0.8);
}

body.dark-mode .service-cta .cta-button {
  background-color: #64b5f6;
  color: #071326;
  border-color: #64b5f6;
}

body.dark-mode .service-cta .cta-button:hover {
  background-color: transparent;
  color: #64b5f6;
  border-color: #64b5f6;
}

/* Responsive */
@media (max-width: 1024px) {
  .services-gallery {
    grid-template-columns: repeat(2, 1fr); /* 2 por fila en tablets */
    max-width: 700px; /* Ancho máximo reducido para tablets */
  }

  .service-card {
    aspect-ratio: 3 / 4; /* Proporción menos estrecha en tablets */
  }
}

@media (max-width: 768px) {
  .services-page {
    padding: 2rem 0;
  }

  .services-header {
    margin-bottom: 3rem;
  }

  .services-header h1 {
    font-size: 2rem;
  }

  .services-header p {
    max-width: 100%; /* Permitir que use todo el ancho en móviles */
  }

  .services-gallery {
    grid-template-columns: 1fr; /* 1 por fila en móviles */
    gap: 1.5rem;
    margin-bottom: 3rem;
    max-width: 400px; /* Ancho máximo reducido para móviles */
  }

  .service-card {
    margin: 0 1rem;
    aspect-ratio: 4 / 3; /* Proporción menos vertical en móviles para mejor legibilidad */
  }

  .service-image {
    height: 50%; /* Reducir altura de imagen en móviles */
  }

  .service-content {
    height: 50%; /* Aumentar espacio para contenido en móviles */
  }

  .services-cta {
    padding: 2rem 1rem;
    margin: 0 1rem;
  }

  .services-cta h2 {
    font-size: 1.5rem;
  }

  .service-detail-page {
    padding: 2rem 0;
  }

  .service-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
  }

  .service-header h1 {
    font-size: 2rem;
  }

  .service-content {
    padding: 0 1rem;
  }

  .service-description {
    padding: 2rem 1.5rem;
    margin-bottom: 2rem;
  }

  .service-description h2 {
    font-size: 1.3rem;
  }

  .service-cta {
    padding: 2rem 1rem;
  }

  .service-cta h3 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .services-header h1 {
    font-size: 1.75rem;
  }

  .service-content {
    padding: 1rem;
  }

  .service-content h3 {
    font-size: 1.1rem;
  }

  .services-cta h2 {
    font-size: 1.3rem;
  }

  .cta-button {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }

  .services-gallery {
    max-width: 350px; /* Aún más estrecho en móviles pequeños */
  }

  .service-header h1 {
    font-size: 1.75rem;
  }

  .service-description {
    padding: 1.5rem 1rem;
  }

  .service-description p {
    font-size: 1rem;
  }

  .service-description h2 {
    font-size: 1.2rem;
  }

  .service-list li {
    padding-left: 1.5rem;
    font-size: 0.95rem;
  }

  .service-commitment {
    padding: 1rem;
    font-size: 1rem;
  }

  .service-cta h3 {
    font-size: 1.3rem;
  }

  .cta-button {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
}
