/* ============================================ */
/* 1. VARIABLES Y RESET                         */
/* ============================================ */

:root {
  --primary: #1a3d7c;
  --primary-dark: #122b5a;
  --primary-light: #2a568f;
  --secondary: #3d71b3;
  --accent: #2ecc71;
  --light: #f8f9fa;
  --dark: #212529;
  --gray: #6c757d;
  --border-radius: 8px;
  --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
}

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

body {
  font-family: "Montserrat", "Roboto Condensed", sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f7fa;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
}

/* ============================================ */
/* 2. TIPOGRAFÍA                               */
/* ============================================ */

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2rem;
  position: relative;
  padding-bottom: 15px;
  margin-bottom: 30px;
  color: var(--primary);
}

h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

.section-subtitle {
  color: var(--gray);
  font-size: 1.1rem;
  margin-bottom: 30px;
}

/* ============================================ */
/* 3. HEADER                                   */
/* ============================================ */

header {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-light) 50%,
    var(--secondary) 100%
  );
  color: white;
  padding: 50px 0 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

header::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(
    circle at 10% 20%,
    rgba(255, 255, 255, 0.05) 0%,
    transparent 20%
  );
  pointer-events: none;
}

header h1 {
  margin: 0;
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header-location {
  display: block;
  font-size: 1.8rem;
  font-weight: 400;
  opacity: 0.9;
  margin-top: 5px;
}

.header-subtitle {
  font-size: 1.1rem;
  opacity: 0.85;
  max-width: 700px;
  margin: 15px auto 0;
}

/* ============================================ */
/* 4. NAVEGACIÓN                               */
/* ============================================ */

nav {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

nav .container {
  padding: 0;
}

.nav-links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 0;
}

.nav-links li {
  margin: 0;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 20px 30px;
  display: block;
  position: relative;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background-color: white;
  transition: var(--transition);
  transform: translateX(-50%);
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  width: 70%;
}

.nav-links a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-links a[aria-current="page"] {
  background-color: rgba(255, 255, 255, 0.15);
}

/* ============================================ */
/* 5. MAIN - SECCIONES GENERALES               */
/* ============================================ */

main {
  padding: 40px 0;
}

section {
  margin: 40px 0 60px;
  padding: 40px;
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  position: relative;
  overflow: hidden;
}

section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  z-index: 2;
}

/* ============================================ */
/* 6. SECCIÓN INICIO                           */
/* ============================================ */

.bg-inicio {
  background: linear-gradient(135deg, #0d2b5a 0%, #1a3d7c 50%, #3d71b3 100%);
  color: white;
}

.bg-inicio h2 {
  color: white;
}

.bg-inicio h2::after {
  background: linear-gradient(90deg, #6aa6e8, #b3d7ff);
}

.bg-inicio p {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 800px;
}

.inicio-destacados {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.destacado-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.1);
  padding: 15px 20px;
  border-radius: var(--border-radius);
  backdrop-filter: blur(2px);
  font-weight: 500;
}

.destacado-item i {
  font-size: 1.5rem;
  color: #6aa6e8;
}

/* ============================================ */
/* 7. SERVICIOS                                */
/* ============================================ */

.services-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.service-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  background: var(--light);
  padding: 20px;
  border-radius: var(--border-radius);
  border-left: 4px solid var(--secondary);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  cursor: pointer;
}

.service-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
}

.service-icon {
  font-size: 1.8rem;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.service-content h3 {
  font-size: 1rem;
  margin-bottom: 2px;
  color: var(--primary);
}

.service-content p {
  font-size: 0.9rem;
  color: var(--gray);
  margin: 0;
}
/* ============================================ */
/* INDICADOR "→ Solicitar presupuesto"          */
/* ============================================ */

.click-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--secondary);
  margin-top: 10px;

  /* OCULTO POR DEFECTO */
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;

  /* Para que no ocupe espacio cuando está oculto */
  max-height: 0;
  overflow: hidden;
  margin-top: 0;
}

/* AL HACER HOVER EN LA TARJETA, APARECE */
.service-item:hover .click-indicator {
  opacity: 1;
  transform: translateX(0);
  max-height: 50px;
  margin-top: 10px;
}

/* Efecto adicional al hacer hover en el indicador */
.click-indicator:hover {
  color: var(--primary);
  transform: translateX(6px);
}

/* Línea decorativa debajo del indicador */
.click-indicator::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  transition: width 0.3s ease;
}

.service-item:hover .click-indicator::after {
  width: 100%;
}
/* ============================================ */
/* 8. BOTÓN EN SERVICIOS                       */
/* ============================================ */

.btn-servicio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 10px;
  font-family: inherit;
}

.btn-servicio:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(26, 61, 124, 0.3);
}

.btn-servicio i {
  font-size: 0.8rem;
}
.click-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: 8px;
  transition: var(--transition);
}

.service-item:hover .click-indicator {
  transform: translateX(5px);
  color: var(--secondary);
}
/* ============================================ */
/* 9. MENSAJES DE CARGA Y ERROR                */
/* ============================================ */

.loading-message {
  text-align: center;
  padding: 40px;
  color: var(--gray);
  font-size: 1.1rem;
}

.loading-message i {
  margin-right: 10px;
  color: var(--primary);
}

.error-message {
  text-align: center;
  padding: 40px;
  color: #721c24;
  background: #f8d7da;
  border-radius: var(--border-radius);
  border-left: 4px solid #dc3545;
}

.error-message i {
  margin-right: 10px;
}

/* ============================================ */
/* 10. UBICACIONES                             */
/* ============================================ */

.ubicaciones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

.ubicacion-card {
  text-align: center;
  padding: 30px 20px;
  border-radius: var(--border-radius);
  background: var(--light);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  border: 1px solid #eaeaea;
}

.ubicacion-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.08);
  border-color: var(--secondary);
}

.ubicacion-card i {
  font-size: 2.8rem;
  color: var(--primary);
  margin-bottom: 15px;
  display: inline-block;
}

.ubicacion-card h3 {
  color: var(--primary);
  font-size: 1.2rem;
}

.ubicacion-card p {
  font-size: 0.9rem;
  color: var(--gray);
  margin: 0;
}

/* ============================================ */
/* 11. ENLACES DE INTERÉS                      */
/* ============================================ */

.enlaces-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 25px;
}

.enlace-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--dark);
  transition: var(--transition);
  padding: 25px 15px;
  background-color: var(--light);
  border-radius: var(--border-radius);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
  border-top: 4px solid var(--primary);
  min-height: 180px;
}

.enlace-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.enlace-card i {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 15px;
}

.enlace-card.arba-card i {
  color: #00afc3;
}

.enlace-card.arba-card {
  border-top-color: #00afc3;
}

.enlace-nombre {
  font-weight: 700;
  font-size: 1.2rem;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 5px;
  text-align: center;
}

.arba-card .enlace-nombre {
  color: #00afc3;
}

.enlace-desc {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--gray);
  text-align: center;
}

/* ============================================ */
/* 12. FOOTER                                  */
/* ============================================ */

footer {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  padding: 40px 0 20px;
  margin-top: 60px;
}

footer h3,
footer h4 {
  color: white;
  margin-bottom: 15px;
}

footer h3 {
  font-size: 1.4rem;
}

footer a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: var(--transition);
}

footer a:hover {
  color: white;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-info p {
  opacity: 0.8;
  font-size: 0.9rem;
}

.footer-contacto {
  margin-top: 10px;
  font-weight: 600;
}

.footer-contacto a {
  color: white;
  opacity: 1;
}

.footer-links ul,
.footer-legal ul {
  list-style: none;
}

.footer-links ul li,
.footer-legal ul li {
  margin-bottom: 8px;
}

.footer-links ul li a,
.footer-legal ul li a {
  font-size: 0.9rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  opacity: 0.7;
  font-size: 0.85rem;
}

/* ============================================ */
/* 13. BOTÓN WHATSAPP                          */
/* ============================================ */

.wa-chat-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  border-radius: 50%;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: var(--transition);
  border: none;
}

.wa-chat-btn:hover {
  transform: scale(1.1) translateY(-5px);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

.wa-chat-btn-icon {
  width: 36px;
  height: 36px;
  fill: white;
}

/* ============================================ */
/* 14. SERVICIO SELECCIONADO EN CONTACTO       */
/* ============================================ */

.servicio-seleccionado {
  background: #e8f4fd;
  border-left: 4px solid var(--primary);
  padding: 15px 20px;
  border-radius: var(--border-radius);
  margin-bottom: 25px;
}

.servicio-seleccionado p {
  margin: 5px 0;
}

.servicio-seleccionado strong {
  color: var(--primary);
}

#servicio-detalle {
  color: var(--gray);
  font-size: 0.9rem;
}

/* ============================================ */
/* 15. FORMULARIO DE CONTACTO                  */
/* ============================================ */

.formulario-contacto {
  max-width: 700px;
  margin: 0 auto;
}

.campo-formulario {
  margin-bottom: 20px;
}

.campo-formulario label {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--primary);
}

.campo-formulario input,
.campo-formulario select,
.campo-formulario textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
  font-family: inherit;
  background: white;
}

.campo-formulario input:focus,
.campo-formulario select:focus,
.campo-formulario textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 61, 124, 0.1);
}

.campo-formulario input.error,
.campo-formulario select.error,
.campo-formulario textarea.error {
  border-color: #dc3545;
}

.mensaje-error {
  display: block;
  color: #dc3545;
  font-size: 0.85rem;
  margin-top: 5px;
  min-height: 20px;
}

.campo-formulario.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.campo-formulario.checkbox input {
  width: auto;
  margin-top: 4px;
  flex-shrink: 0;
}

.campo-formulario.checkbox label {
  font-weight: normal;
  cursor: pointer;
  color: #333;
}

.campo-formulario.checkbox label a {
  color: var(--primary);
  text-decoration: underline;
}

.boton-enviar {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  padding: 15px 40px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  justify-content: center;
}

.boton-enviar:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(26, 61, 124, 0.3);
}

/* ============================================ */
/* 16. MENSAJE DE ÉXITO                        */
/* ============================================ */

.mensaje-exito {
  background: #d4edda;
  color: #155724;
  padding: 25px 30px;
  border-radius: var(--border-radius);
  border-left: 4px solid #28a745;
  text-align: center;
  max-width: 700px;
  margin: 20px auto 0;
}

.mensaje-exito i {
  font-size: 2rem;
  color: #28a745;
  display: block;
  margin-bottom: 10px;
}

.mensaje-exito strong {
  font-size: 1.2rem;
  display: block;
}

.mensaje-exito p {
  margin-top: 8px;
  opacity: 0.9;
}

/* ============================================ */
/* 17. RESPONSIVE - MEDIA QUERIES              */
/* ============================================ */
/* Para móviles: al tocar, se muestra */
.service-item:active .click-indicator,
.service-item:focus .click-indicator {
  opacity: 1;
  transform: translateX(0);
  max-height: 50px;
  margin-top: 10px;
}

@media (max-width: 992px) {
  header h1 {
    font-size: 2.2rem;
  }

  .header-location {
    font-size: 1.4rem;
  }

  .nav-links a {
    padding: 18px 20px;
    font-size: 0.85rem;
  }

  section {
    padding: 30px 20px;
  }

  h2 {
    font-size: 1.7rem;
  }
}

@media (max-width: 768px) {
  header {
    padding: 35px 0 25px;
  }

  header h1 {
    font-size: 1.8rem;
  }

  .header-location {
    font-size: 1.1rem;
  }

  .header-subtitle {
    font-size: 0.95rem;
  }

  .nav-links {
    flex-direction: column;
    gap: 0;
  }

  .nav-links a {
    padding: 14px 20px;
    text-align: center;
    font-size: 0.9rem;
  }

  .nav-links a::after {
    display: none;
  }

  section {
    padding: 25px 15px;
    margin: 30px 0 40px;
  }

  h2 {
    font-size: 1.5rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .ubicaciones-grid {
    grid-template-columns: 1fr 1fr;
  }

  .enlaces-grid {
    grid-template-columns: 1fr 1fr;
  }

  .inicio-destacados {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .destacado-item {
    padding: 12px 15px;
    font-size: 0.85rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 25px;
  }

  .wa-chat-btn {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
  }

  .wa-chat-btn-icon {
    width: 30px;
    height: 30px;
  }

  .btn-servicio {
    width: 100%;
    justify-content: center;
  }
}

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

  .header-location {
    font-size: 0.95rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  h2::after {
    width: 50px;
  }

  .ubicaciones-grid {
    grid-template-columns: 1fr;
  }

  .enlaces-grid {
    grid-template-columns: 1fr;
  }

  .inicio-destacados {
    grid-template-columns: 1fr;
  }

  .service-item {
    padding: 15px;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .service-icon {
    font-size: 2rem;
  }

  .section-subtitle {
    font-size: 0.95rem;
  }

  .wa-chat-btn {
    width: 45px;
    height: 45px;
    bottom: 15px;
    right: 15px;
  }

  .wa-chat-btn-icon {
    width: 25px;
    height: 25px;
  }

  .campo-formulario input,
  .campo-formulario select,
  .campo-formulario textarea {
    padding: 10px 12px;
    font-size: 0.95rem;
  }

  .campo-formulario.checkbox {
    flex-wrap: wrap;
  }

  .boton-enviar {
    padding: 14px 20px;
    font-size: 1rem;
  }

  .mensaje-exito {
    padding: 20px;
  }
}
