/* ---------- ESTILO GENERAL ---------- */

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: white;
  color: #333;
}

/* ---------- NAVBAR ---------- */
.navbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: #f47a2c;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
}

.logo {
  height: 80px;
}

.brand-name {
  color: white;
  font-size: 1.5rem;
  margin: 0;
}

.menu {
  display: flex;
  justify-content: center;
  gap: 2rem;
  justify-self: center;
}

.menu a {
  color: white;
  font-weight: bold;
  text-decoration: none;
  position: relative;
  font-size: 1rem;
}

.menu a::after {
  content: "";
  height: 2px;
  background: white;
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  transition: 0.3s;
}

.menu a:hover::after {
  width: 100%;
}

.dropdown {
  justify-self: end;
  position: relative;
}

.dropdown-btn {
  background-color: #6a0dad;
  color: white;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  transition: background 0.3s;
}

.dropdown-btn:hover {
  background-color: #580aa4;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 115%;
  right: 0;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 8px;
  min-width: 160px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  z-index: 999;
  flex-direction: column;
  overflow: hidden;
  animation: dropdownFade 0.3s ease;
}

.dropdown-menu a {
  color: #333;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  transition: background 0.2s;
}

.dropdown-menu a:hover {
  background-color: #f6f6f6;
}

@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- banner ---------- */

.hero {
  text-align: center;
  padding: 6rem 1rem 8rem 1rem;
  background: linear-gradient(to bottom right, #f47a2c, #f98b3d);
  color: white;
  position: relative;
  clip-path: ellipse(150% 100% at 50% 0%);
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1.25rem;
  max-width: 700px;
  margin: 0 auto 3rem auto;
  line-height: 1.5;
}

.botones-hero {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.botones-hero .btn-secundario {
  padding: 1rem 2rem;
  background: white;
  color: #f47a2c;
  border: 2px solid transparent; /* AÑADIR */
  border-radius: 50px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.botones-hero .btn-secundario:hover {
  background: #f47a2c;
  color: white;
  border: 2px solid white;
}


/* ---------- CHATBOT BURBUJA ---------- */

.bot-burbuja {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #25D366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: background 0.3s;
}

.bot-burbuja:hover {
  background: #128C7E;
}

/* ---------- CHATBOT MODAL ---------- */

.bot-modal {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 320px;
  background: white;
  color: black;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  display: none;
  z-index: 10000;
}

.chat-container {
  background: #ffffff;
  border: 2px solid #6a0dad;
  border-radius: 12px;
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.chat-header {
  background: #6a0dad;
  color: white;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-window {
  padding: 10px;
  height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f9f9f9;
}

.user-message,
.bot-message {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 20px;
  line-height: 1.4;
  font-size: 14px;
}

.user-message {
  background: #d1e7ff;
  align-self: flex-end;
}

.bot-message {
  background: #e7d6ff;
  align-self: flex-start;
}

form {
  display: flex;
  border-top: 1px solid #ccc;
}

input[type="text"] {
  flex: 1;
  padding: 10px;
  border: none;
  font-size: 14px;
}

button {
  background: #6a0dad;
  color: white;
  border: none;
  padding: 0 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background: #580aa4;
}


/* Estilo del input mientras se espera el nombre */
.input-nombre {
  border: 2px solid #ff4d4d;
  background-color: #fff5f5;
  color: #333;
  animation: vibrar 0.2s ease-in-out infinite alternate;
}

/* Animación leve para indicar espera */
@keyframes vibrar {
  0% { transform: translateX(0); }
  100% { transform: translateX(2px); }
}

.chat-window:empty::before {
  content: "";
  display: block;
  min-height: 10px; /* ocupa algo de espacio para que no se colapse */
}

/* ---------- SERVICIOS ---------- */

.servicios {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.servicio-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
  border: 2px solid transparent;
}

.servicio-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 25px rgba(0,0,0,0.1);
  border: 2px solid #f47a2c;
}

.servicio-card img {
  max-width: 100%;
  border-radius: 8px;
  height: auto;
  margin-bottom: 1rem;
}

.servicio-card h3 {
  color: #1b1b1b;
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
}

.servicio-card p {
  color: #333;
  font-size: 1rem;
  line-height: 1.5;
}

/* ---------- CAPACITACIONES ---------- */

.capacitaciones {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  background: linear-gradient(135deg, #f9fafc, #f0f4f9);
  border-radius: 24px;
}

.capacitaciones-texto {
  flex: 1 1 400px;
  max-width: 550px;
}

.capacitaciones-texto .categoria {
  color: #f47a2c;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.capacitaciones-texto h2 {
  font-size: 2rem;
  color: #1b1b1b;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.capacitaciones-texto p {
  font-size: 1rem;
  color: #333;
  line-height: 1.6;
}

.capacitaciones-imagen {
  flex: 1 1 300px;
  max-width: 500px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 15px 25px rgba(0,0,0,0.1);
}

.capacitaciones-imagen img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 16px;
}

@media (max-width: 900px) {
  .capacitaciones {
    flex-direction: column-reverse;
    text-align: center;
    padding: 3rem 1rem;
  }
}


/* ---------- CARRUSEL PROYECTOS DESTACADOS ---------- */

.proyectos-carrusel {
  padding: 4rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.proyectos-carrusel h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #1b1b1b;
}

.carrusel-contenedor {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 1rem;
  padding-bottom: 1rem;
}

.carrusel-contenedor::-webkit-scrollbar {
  height: 10px;
}

.carrusel-contenedor::-webkit-scrollbar-thumb {
  background: #f47a2c;
  border-radius: 5px;
}

.proyecto-card {
  background: #fff;
  border-radius: 12px;
  flex: 0 0 300px;
  scroll-snap-align: start;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.proyecto-card:hover {
  transform: translateY(-5px);
}

.proyecto-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.proyecto-info {
  padding: 1rem;
  text-align: left;
}

.proyecto-info .fecha {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 0.5rem;
}

.proyecto-info h3 {
  font-size: 1.2rem;
  color: #1b1b1b;
  margin-bottom: 0.5rem;
}

.proyecto-info p {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.4;
}

/* ---------- FOOTER INGELEAN ---------- */

.footer {
  background-color: #0c1a42;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  padding: 3rem 1rem 1rem 1rem;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto 1rem auto;
  gap: 2rem;
}

.footer-column {
  flex: 1 1 250px;
}

.logo-footer {
  width: 150px;
  margin-bottom: 1rem;
}

.footer-column h4 {
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 1rem;
}

.footer-column p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #ddd;
  margin: 0.3rem 0;
}

.punto {
  color: #40bfff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: #ddd;
}

.redes-footer {
  margin-top: 0.5rem;
}

.redes-footer a {
  color: #fff;
  margin: 0 0.4rem;
  font-size: 1.1rem;
  transition: color 0.3s ease;
}

.redes-footer a:hover {
  color: #f47a2c;
}

@media (max-width: 768px) {
  .footer-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
