/* 🎨 Estilos generales del sitio SIGAPH S.A.S. */

:root {
  --azul: #002b5c;
  --verde: #2e6b2e;
  --gris: #f5f5f5;
  --blanco: #ffffff;
  --muted: #6c757d;
  --radius: 10px;
  font-family: 'Poppins', sans-serif;
}

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

/* Cuerpo */
body {
  background: var(--gris);
  color: var(--azul);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ENCABEZADO */
header {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 5%;
}

nav img {
  height: 48px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 18px;
}

nav ul li a {
  text-decoration: none;
  font-weight: 600;
  color: var(--azul);
  transition: 0.3s;
}

nav ul li a:hover {
  color: var(--verde);
}

/* SECCIONES PRINCIPALES */
.section {
  max-width: 1100px;
  margin: 100px auto 30px;
  background: var(--blanco);
  padding: 40px 25px;
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
}

.section h2 {
  text-align: center;
  color: var(--azul);
  margin-bottom: 15px;
}

.section p,
.section ul li {
  color: var(--muted);
  margin-bottom: 12px;
  text-align: justify;
}

/* HERO PRINCIPAL */
.hero {
  position: relative;
  margin-top: 80px;
  height: 80vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero video {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--blanco);
  padding: 20px;
}

.hero-content h1 {
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.hero-content p {
  font-size: 16px;
  margin-bottom: 20px;
}

.hero-content button {
  margin: 5px;
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s;
}

.primary {
  background: var(--verde);
  color: var(--blanco);
}

.secondary {
  background: transparent;
  border: 2px solid var(--blanco);
  color: var(--blanco);
}

.primary:hover {
  background: #246324;
}

.secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* TARJETAS DE SERVICIOS */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 25px;
}

.card {
  background: #fafafa;
  border-radius: var(--radius);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  text-align: center;
  transition: 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card h3 {
  color: var(--azul);
  margin: 10px 0;
}

.card p {
  color: var(--muted);
  padding: 0 12px 12px;
}

/* BOTONES GENERALES */
.btn {
  display: inline-block;
  background: var(--verde);
  color: var(--blanco);
  padding: 10px 18px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
}

.btn:hover {
  background: #235923;
}

/* PIE DE PÁGINA */
footer {
  text-align: center;
  padding: 20px;
  background: var(--azul);
  color: var(--blanco);
  margin-top: 20px;
}

/* BOTÓN WHATSAPP */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  z-index: 99;
  display: flex;
  justify-content: center;
  align-items: center;
}

.whatsapp-float img {
  width: 100%;
  height: 100%;
  transition: 0.3s;
}

.whatsapp-float img:hover {
  transform: scale(1.1);
}

/* Tooltip del botón de WhatsApp */
.whatsapp-float .tooltip {
  position: absolute;
  bottom: 70px;
  right: 70px;
  background: rgba(45, 122, 45, 0.95);
  color: white;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(5px);
  transition: all 0.4s ease;
  pointer-events: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

.whatsapp-float:hover .tooltip {
  opacity: 1;
  transform: translateY(0);
}

/* MODALES */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.modal {
  background: var(--blanco);
  border-radius: var(--radius);
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 15px;
  background: var(--azul);
  color: var(--blanco);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  padding: 15px;
  overflow-y: auto;
}

label {
  display: block;
  margin-top: 10px;
  color: var(--azul);
  font-weight: 500;
}

select,
input,
textarea {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: var(--radius);
}

.actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.actions .btn.secondary {
  background: var(--azul);
}

/* RESULTADO DEL DIAGNÓSTICO */
.result-box {
  margin-top: 15px;
  padding: 10px;
  background: #f3f3f3;
  border-left: 4px solid var(--verde);
  border-radius: var(--radius);
  display: none;
}

/* RESPONSIVE */
@media (max-width: 700px) {
  .hero-content h1 {
    font-size: 18px;
  }

  nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  .section {
    margin: 90px 10px 20px;
    padding: 25px;
  }
}

.footer-contacto {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 25px;
  margin-bottom: 10px;
}

.footer-contacto a {
  color: var(--blanco);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: 0.3s;
}

.footer-contacto a:hover {
  color: var(--verde);
}

.footer-contacto img {
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1);
}

/* Estilo moderno para los íconos del footer */
.footer-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
  margin-bottom: 15px;
}

.footer-icons .icono {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.4s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.3);
}

.footer-icons .icono:hover {
  transform: scale(1.15);
  background: rgba(45, 122, 45, 0.9);
  box-shadow: 0 0 15px rgba(45, 122, 45, 0.6);
}

.footer-icons img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
  transition: transform 0.3s ease, filter 0.3s ease;
}

.footer-icons .icono:hover img {
  filter: brightness(1) invert(0);
  transform: scale(1.1);
}

.logo-vidrio img {
  width: 180px;
  height: auto;
  display: block;
  object-fit: contain;
  background: transparent;
}

/* ============================================
   AJUSTE Y CORRECCIÓN FINAL DE TABLA DIRECTORIO
   ============================================ */

.directorio-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
}

.directorio-container table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  border: 1px solid #dcdcdc;
}

.directorio-container th,
.directorio-container td {
  border: 1px solid #dcdcdc;
  padding: 12px;
  text-align: center;
  word-wrap: break-word;
  background-color: #fff;
}

.directorio-container th {
  background-color: #002f6c;
  color: #fff;
  font-weight: 600;
}

.section .directorio-container {
  overflow: visible;
  padding-bottom: 20px;
}

.directorio-container td:last-child {
  border-right: 1px solid #dcdcdc;
}

@media (max-width: 768px) {
  .directorio-container {
    padding: 0 10px;
  }

  .directorio-container table {
    min-width: unset;
    font-size: 0.9rem;
  }

  .directorio-container th,
  .directorio-container td {
    padding: 8px 5px;
  }

  .section .directorio-container {
    padding-bottom: 30px;
  }
}
