/* ========= Tipografía ========= */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&family=Poppins:wght@600&display=swap');

:root {
  --azul: #0442BF;
  --azul-oscuro: #021F59;
  --naranja: #E26535;
  --amarillo: #EEBB22;
  --celeste: #227CB0;
  --gris-claro: #f7f7f7;
  --gris: #777;
  --blanco: #fff;
  --negro: #111;
  --radius: 12px;
}

/* ========= Reset ========= */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Open Sans', sans-serif;
  color: var(--negro);
  line-height: 1.6;
  background: var(--gris-claro);
}
h1, h2, h3, h4 {
  font-family: 'Poppins', sans-serif;
  color: var(--azul-oscuro);
}
.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}
a { text-decoration: none; color: inherit; }

/* ========= Header/Nav ========= */
.site-header {
  background: var(--azul);
  color: var(--blanco);
  padding: .8rem 0;
  position: sticky; top: 0; z-index: 1000;
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex; align-items: center;
  font-weight: bold; font-size: 1.2rem;
  color: var(--blanco);
}
.brand-logo { height: 40px; margin-right: 8px; }
.site-nav ul { display: flex; gap: 1rem; list-style: none; }
.site-nav a {
  padding: .5rem .8rem;
  border-radius: var(--radius);
  transition: .3s;
}
.site-nav a:hover, .site-nav a.active {
  background: var(--naranja);
  color: var(--blanco);
}
.nav-toggle { display: none; }

/* ========= Hero/Carrusel ========= */
.hero {
  background: var(--azul-oscuro);
  color: var(--blanco);
  text-align: center;
  padding: 2rem 0 0;
}
.hero h1 { font-size: 2rem; margin-bottom: .5rem; }
.hero p { margin-bottom: 1rem; }
.media-carousel {
  position: relative;
  overflow: hidden;
  height: 300px;
}
.media-carousel .slides {
  display: flex;
  transition: transform .6s ease;
}
.media-carousel .slide {
  min-width: 100%;
  height: 300px;
}
.media-carousel img, .media-carousel video {
  width: 100%; height: 100%; object-fit: cover;
}
.carousel-prev, .carousel-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,.4); color: var(--blanco);
  border: none; font-size: 2rem; padding: .3rem .6rem;
  cursor: pointer; border-radius: var(--radius);
}
.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }

/* ========= Home Cards ========= */
.home-cards {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
  margin: 2rem 0;
}
.card {
  background: var(--blanco);
  padding: 1.2rem;
  border-radius: var(--radius);
  box-shadow: 0 2px 6px rgba(0,0,0,.1);
}
.card h3 { margin-bottom: .5rem; }
.btn {
  display: inline-block;
  background: var(--naranja);
  color: var(--blanco);
  padding: .5rem 1rem;
  border-radius: var(--radius);
  margin-top: .5rem;
  transition: .3s;
}
.btn:hover { background: var(--azul); }

/* ========= Sección Aliados ========= */
.allies { background: var(--blanco); padding: 2rem 0; text-align: center; }
.logo-carousel .slides {
  display: flex; gap: 2rem; justify-content: center; align-items: center;
}
.logo-carousel img { height: 60px; }

/* ========= Footer ========= */
.site-footer {
  background: var(--azul-oscuro);
  color: var(--blanco);
  text-align: center;
  padding: 1rem 0;
  font-size: .9rem;
}

/* ========= Secciones interiores ========= */
.split {
  display: grid; gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px,1fr));
  margin: 2rem 0;
}
.split h2 { text-align: center; margin-bottom: .5rem; }
.split p { text-align: justify; }

/* ========= Formularios ========= */
form { display: grid; gap: .8rem; }
input, textarea, select {
  padding: .6rem; border-radius: var(--radius);
  border: 1px solid #ccc; font-size: 1rem;
}
button[type=submit] {
  background: var(--celeste); color: var(--blanco);
  padding: .6rem; border: none; border-radius: var(--radius);
  cursor: pointer; font-weight: 600;
}
button[type=submit]:hover { background: var(--azul); }

/* ========= Botones flotantes ========= */
.fab {
  position: fixed; bottom: 20px;
  width: 50px; height: 50px;
  border-radius: 50%; border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; cursor: pointer;
  color: var(--blanco);
  box-shadow: 0 3px 8px rgba(0,0,0,.3);
  z-index: 1200;
}
.fab-whatsapp { right: 80px; background: #25d366; }
.fab-chat { right: 20px; background: var(--naranja); }

/* ========= Chatbot ========= */
.chatbot {
  position: fixed; bottom: 80px; right: 20px;
  width: 320px; max-height: 400px;
  background: var(--blanco);
  border-radius: var(--radius);
  box-shadow: 0 3px 10px rgba(0,0,0,.3);
  display: flex; flex-direction: column;
  overflow: hidden; z-index: 1300;
}
.chatbot.hidden { display: none; }
.chatbot-header {
  background: var(--azul);
  color: var(--blanco);
  padding: .6rem;
  display: flex; justify-content: space-between; align-items: center;
}
.chatbot-messages {
  flex: 1; padding: .6rem; overflow-y: auto; font-size: .9rem;
}
.chatbot-messages .msg { margin-bottom: .4rem; }
.msg.bot { color: var(--azul-oscuro); }
.msg.user { text-align: right; color: var(--naranja); }
.chatbot-form { display: flex; border-top: 1px solid #ddd; }
.chatbot-form input {
  flex: 1; border: none; padding: .5rem;
}
.chatbot-form button {
  background: var(--azul); color: var(--blanco);
  border: none; padding: .5rem 1rem; cursor: pointer;
}
