/* Variables CSS */
:root {
  --primary-color: #000000;
  --secondary-color: #0a0a0a;
  --accent-color: #3b82f6;
  --accent-gradient: linear-gradient(135deg, #3b82f6, #1d4ed8);
  --text-color: #ffffff;
  --text-secondary: #cccccc;
  --text-dark: #333333;
  --border-color: #333333;
  --background-color: #000000;
  --background-light: #f8f9fa;
  --card-bg: rgba(20, 20, 20, 0.9);
  --card-bg-light: #ffffff;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
  --shadow-accent: 0 10px 25px rgba(59, 130, 246, 0.25);
  --transition-fast: 0.3s ease;
  --transition-medium: 0.5s ease;
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
}

/* Hero Section - Fondo Oscuro */
.hero-detalle {
  background-color: var(--background-color);
  /* Aumentando padding-top para evitar que la navbar tape el contenido */
  padding: 130px 0 60px 0;
  min-height: calc(100vh - 80px);
  color: var(--text-color);
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* Reduciendo gap entre columnas */
  gap: 40px;
  align-items: start;
  /* Aumentando altura mínima para acomodar imagen más grande */
  min-height: 600px;
}

/* Sección de Imágenes */
.imagenes-section {
  /* Cambiando a flex column para incluir empresa-info debajo */
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  height: 100%;
}

.imagen-principal {
  width: 100%;
  /* Aumentando altura de la imagen para crear simetría perfecta con los botones */
  height: 550px;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.imagen-principal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-medium);
}

.imagen-principal:hover img {
  transform: scale(1.02);
}

/* Información del Servicio */
.info-section {
  display: flex;
  flex-direction: column;
  /* Reduciendo gap entre elementos */
  gap: 18px;
  /* Ajustando altura para coincidir con la nueva estructura */
  height: auto;
  justify-content: flex-start;
}

.servicio-header {
  display: flex;
  flex-direction: column;
  /* Reduciendo gap */
  gap: 10px;
}

.servicio-titulo {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  color: var(--text-color);
}

.rating-section {
  display: flex;
  align-items: center;
  /* Reduciendo gap */
  gap: 10px;
}

.stars {
  display: flex;
  gap: 3px;
  color: #f59e0b;
  font-size: 1.2rem;
}

.rating-text {
  color: var(--text-secondary);
  font-size: 1rem;
}

.no-rating {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 40px;
}

.no-rating-text {
  color: #999;
  font-size: 0.85rem;
  font-style: italic;
  text-align: center;
}

/* Precio */
.precio-section {
  /* Reduciendo margen */
  margin: 15px 0;
}

.precio-principal {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.precio-valor {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-color);
  line-height: 1;
}

.precio-nota {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 400;
  opacity: 0.8;
}

/* Eliminando estilos obsoletos del precio */
.precio-label {
  display: none;
}

/* Descripción */
.descripcion-section {
  /* Reduciendo margen para mejor distribución del espacio */
  margin: 10px 0;
  flex-grow: 1;
}

.descripcion-section p {
  line-height: 1.6;
  color: var(--text-secondary);
  font-size: 1rem;
  /* Reduciendo margen inferior */
  margin-bottom: 8px;
}

.descripcion-corta {
  font-size: 1rem;
  line-height: 1.6;
  /* Reduciendo margen inferior */
  margin-bottom: 10px !important;
}

.empresa-desc {
  font-size: 0.95rem;
  line-height: 1.5;
  /* Reduciendo margen inferior */
  margin-bottom: 6px !important;
  opacity: 0.9;
}

/* Características */
.caracteristicas-section {
  /* Reduciendo margen */
  margin: 10px 0;
}

.caracteristica-item {
  display: flex;
  align-items: center;
  gap: 15px;
  /* Reduciendo margen inferior */
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.caracteristica-item i {
  color: #10b981;
  font-size: 1.2rem;
  width: 20px;
  text-align: center;
}

/* Botones de Acción */
.acciones-section {
  display: flex;
  gap: 12px;
  /* Reduciendo margen */
  margin: 15px 0;
  flex-wrap: wrap;
}

.btn-comprar,
.btn-cotizar,
.btn-contactar {
  padding: 10px 20px;
  border: none;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex: 1;
  justify-content: center;
  min-width: 120px;
}

.btn-comprar {
  background-color: var(--accent-color);
  color: white;
}

.btn-comprar:hover {
  background-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent);
}

.btn-cotizar {
  background-color: transparent;
  color: var(--text-color);
  border: 1px solid #666;
}

.btn-cotizar:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: translateY(-2px);
}

.btn-contactar {
  background-color: transparent;
  color: var(--text-color);
  border: 1px solid #666;
}

.btn-contactar:hover {
  border-color: #10b981;
  color: #10b981;
  transform: translateY(-2px);
}

/* Información de la Empresa */
.empresa-info {
  display: flex;
  align-items: center;
  /* Reduciendo gap */
  gap: 12px;
  /* Reduciendo padding */
  padding: 12px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  /* Removiendo margin-top auto ya que ahora está en imagenes-section */
  margin-top: 0;
  /* Agregando ancho completo para que se vea bien debajo de la imagen */
  width: 100%;
}

.empresa-logo {
  /* Reduciendo tamaño del logo */
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  /* Evitando que se encoja */
  flex-shrink: 0;
}

.empresa-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-placeholder {
  color: var(--text-secondary);
  font-size: 1.5rem;
}

.empresa-details h3 {
  /* Reduciendo margen */
  margin: 0 0 3px 0;
  color: var(--text-color);
  /* Reduciendo tamaño de fuente */
  font-size: 1.1rem;
  font-weight: 600;
}

.empresa-details p {
  margin: 0;
  color: #10b981;
  /* Reduciendo tamaño de fuente */
  font-size: 0.85rem;
  /* Reduciendo margen entre párrafos */
  margin-bottom: 2px;
}

.empresa-industria {
  color: var(--text-secondary) !important;
}

.empresa-ubicacion {
  color: var(--text-secondary) !important;
}

/* Sección de Detalles - Fondo Claro */
.detalles-servicio {
  background-color: var(--background-light);
  /* Reduciendo padding vertical */
  padding: 60px 0;
  color: var(--text-dark);
}

.tabs-container {
  max-width: 1200px;
  margin: 0 auto;
}

.tabs-header {
  display: flex;
  /* Reduciendo margen inferior */
  margin-bottom: 30px;
  border-bottom: 1px solid #e5e7eb;
}

.tab {
  /* Reduciendo padding */
  padding: 15px 25px;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  position: relative;
  color: #6b7280;
  background: none;
  border: none;
  transition: all var(--transition-fast);
  border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
  /* Eliminando borde azul de los tabs */
}

.tab.active {
  color: white;
  background-color: var(--text-dark);
  /* Sin borde azul, solo fondo negro cuando está activo */
}

.tab:hover {
  color: var(--text-dark);
  background-color: #f3f4f6;
}

.tab.active:hover {
  background-color: var(--text-dark);
  color: white;
}

.tab-content {
  display: none;
  /* Reduciendo padding */
  padding: 30px 0;
}

.tab-content.active {
  display: block;
}

/* Contenido de Detalles */
.detalles-content h3 {
  font-size: 1.8rem;
  font-weight: 700;
  /* Reduciendo margen inferior */
  margin-bottom: 15px;
  color: var(--text-dark);
}

.descripcion-completa {
  display: flex;
  flex-direction: column;
  /* Reduciendo gap */
  gap: 20px;
}

.descripcion-principal p {
  line-height: 1.8;
  color: #4b5563;
  font-size: 1.1rem;
  margin-bottom: 0;
  padding: 20px;
  background-color: #f9fafb;
  border-radius: var(--border-radius-md);
  border-left: 4px solid var(--accent-color);
}

.info-adicional {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  /* Reduciendo gap */
  gap: 20px;
}

.info-item {
  background-color: white;
  /* Reduciendo padding */
  padding: 20px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid #e5e7eb;
  transition: all var(--transition-fast);
}

.info-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.info-item h4 {
  font-size: 1.2rem;
  font-weight: 700;
  /* Reduciendo margen inferior */
  margin-bottom: 12px;
  color: var(--text-dark);
  border-bottom: 2px solid var(--accent-color);
  /* Reduciendo padding inferior */
  padding-bottom: 6px;
}

.info-item p {
  line-height: 1.6;
  color: #6b7280;
  font-size: 1rem;
  margin-bottom: 10px;
}

.info-item i {
  margin-right: 8px;
  color: var(--accent-color);
}

.beneficios-lista {
  list-style: none;
  padding: 0;
  margin: 0;
}

.beneficios-lista li {
  padding: 8px 0;
  color: #6b7280;
  position: relative;
  padding-left: 25px;
}

.beneficios-lista li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: bold;
}

.empresa-detalle {
  grid-column: 1 / -1;
}

.contacto-empresa {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e5e7eb;
}

.contacto-empresa p {
  margin-bottom: 8px;
}

.contacto-empresa a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
}

.contacto-empresa a:hover {
  text-decoration: underline;
}

/* Sección de Reviews */
.reviews-section {
  /* Reduciendo padding */
  padding: 15px 0;
}

.reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* Reduciendo margen inferior */
  margin-bottom: 30px;
}

.reviews-header h3 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}

.btn-escribir-review {
  padding: 10px 20px;
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-escribir-review:hover {
  background-color: #2563eb;
  transform: translateY(-2px);
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* Reduciendo gap */
  gap: 25px;
}

.review-card {
  background-color: var(--card-bg-light);
  /* Reduciendo padding */
  padding: 20px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid #e5e7eb;
  transition: all var(--transition-fast);
}

.review-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  /* Reduciendo margen inferior */
  margin-bottom: 12px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 1.2rem;
}

.user-details h4 {
  margin: 0 0 5px 0;
  color: var(--text-dark);
  font-size: 1.1rem;
  font-weight: 600;
}

.review-rating {
  display: flex;
  gap: 2px;
  color: #f59e0b;
  font-size: 0.9rem;
}

.review-date {
  font-size: 0.85rem;
  color: #9ca3af;
}

.review-text {
  line-height: 1.6;
  color: #6b7280;
  font-size: 1rem;
  margin: 0;
}

/* Servicios Relacionados */
.servicios-relacionados {
  background-color: var(--background-light);
  /* Reduciendo padding vertical */
  padding: 60px 0;
}

.servicios-relacionados h2 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  /* Reduciendo margen inferior */
  margin-bottom: 40px;
  color: var(--text-dark);
}

.relacionados-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  /* Reduciendo gap */
  gap: 25px;
}

.servicio-card {
  background-color: var(--card-bg-light);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
  cursor: pointer;
  border: 1px solid #e5e7eb;
}

.servicio-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.servicio-card .servicio-img {
  height: 200px;
  overflow: hidden;
}

.servicio-card .servicio-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-medium);
}

.servicio-card:hover .servicio-img img {
  transform: scale(1.1);
}

.servicio-card .servicio-info {
  /* Reduciendo padding */
  padding: 15px;
}

.servicio-card .servicio-info h3 {
  font-size: 1.2rem;
  font-weight: 700;
  /* Reduciendo margen inferior */
  margin-bottom: 6px;
  color: var(--text-dark);
}

.servicio-card .empresa {
  font-size: 0.9rem;
  color: #6b7280;
  /* Reduciendo margen inferior */
  margin-bottom: 12px;
}

.servicio-card .precio {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-color);
}

/* Animaciones */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 1200px) {
  .relacionados-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .hero-content {
    grid-template-columns: 1fr;
    /* Reduciendo gap en móviles */
    gap: 30px;
    min-height: auto;
  }

  .imagenes-section {
    order: -1;
    height: auto;
  }

  .info-section {
    height: auto;
  }

  .relacionados-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .reviews-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* Ajustando padding para móviles */
  .hero-detalle {
    padding: 100px 0 50px 0;
  }

  .servicio-titulo {
    font-size: 1.8rem;
  }

  .precio-valor {
    /* Ajustando tamaño del precio para móviles */
    font-size: 2.5rem;
  }

  .acciones-section {
    flex-direction: column;
  }

  .btn-comprar,
  .btn-cotizar,
  .btn-contactar {
    flex: none;
  }

  .tabs-header {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 5px;
  }

  .tab {
    /* Reduciendo padding en móviles */
    padding: 12px 18px;
    min-width: max-content;
  }

  .reviews-header {
    flex-direction: column;
    /* Reduciendo gap */
    gap: 15px;
    align-items: flex-start;
  }

  .info-adicional {
    grid-template-columns: 1fr;
  }

  .info-item {
    /* Reduciendo padding en móviles */
    padding: 15px;
  }

  .imagen-principal {
    /* Manteniendo altura proporcional en móviles */
    height: 300px;
  }
}

@media (max-width: 576px) {
  .hero-detalle {
    /* Ajustando padding en pantallas pequeñas */
    padding: 90px 0 30px 0;
  }

  .detalles-servicio {
    /* Reduciendo padding */
    padding: 30px 0;
  }

  .servicios-relacionados {
    /* Reduciendo padding */
    padding: 30px 0;
  }

  .relacionados-grid {
    grid-template-columns: 1fr;
  }

  .imagen-principal {
    /* Altura optimizada para pantallas muy pequeñas */
    height: 250px;
  }

  .servicio-titulo {
    font-size: 1.8rem;
  }

  .precio-valor {
    /* Precio más pequeño en pantallas muy pequeñas */
    font-size: 2rem;
  }
}

/* Estilos adicionales para mejorar la experiencia */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus states for accessibility */
.btn-comprar:focus,
.btn-cotizar:focus,
.btn-contactar:focus,
.tab:focus,
.thumbnail:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Loading states */
.servicio-card img,
.imagen-principal img,
.thumbnail img {
  background-color: #f3f4f6;
}

/* Estilos para botones de formularios de reseñas */
.btn-primary {
  background-color: var(--accent-color);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 1rem;
}

.btn-primary:hover {
  background-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-secondary);
  border: 2px solid #e5e7eb;
  padding: 10px 22px;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 1rem;
}

.btn-secondary:hover {
  background-color: #f9fafb;
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: translateY(-1px);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #e5e7eb;
}

/* Print styles */
@media print {
  .hero-detalle {
    background-color: white !important;
    color: black !important;
  }

  .acciones-section,
  .servicios-relacionados {
    display: none;
  }
}
