:root {
  --rojo-principal: #D82828; 
  --rojo-claro: #F05050;     
  --azul-principal: #1C50A4; 
  --azul-oscuro: #0F3A79;    
  --fondo-base: #F5F5F5;     
  --texto-principal: #222222;
  --bordes: #CCCCCC;         
}

* { margin:0; padding:0; box-sizing:border-box; font-family:"Inter",sans-serif; }

body {
  background: linear-gradient(90deg, rgba(0,81,255,0.52) 0%, rgba(255,0,0,0.51) 100%);
  min-height:100vh; 
  color:var(--texto-principal);
  display:flex;
  flex-direction:column;
}

/* Header */
header {
  width:100%; background:var(--azul-principal);
  border-bottom:1px solid var(--bordes);
  position:fixed; top:0; z-index:100;
  padding:0.8rem 0;
}

nav {
  width:90%; max-width:1200px;
  margin:auto; display:flex;
  justify-content:space-between;
  align-items:center;
}

.logo a img { width:50px; }

.menu { list-style:none; display:flex; gap:2rem; flex-wrap:wrap; justify-content:center; }
.menu li a { color:#fff; text-decoration:none; font-weight:500; transition:0.3s; letter-spacing:0.5px; }
.menu li a:hover { color:var(--rojo-claro); }

/* Main */
main { 
  flex:1;
  padding:2rem 1rem;
  text-align:center; 
  padding-top:100px; 
  line-height:1.6;
  letter-spacing:0.3px;
}

/* Carrusel */
.car-slider { 
  width:95%; 
  max-width:1200px; 
  margin:3rem auto; 
  overflow:hidden; 
  border-radius:12px; 
  border:1px solid var(--bordes);
}
.slider-track { 
  display:flex; 
  width:max-content; 
  animation:scroll 25s linear infinite; 
}
.slide { flex:none; margin-right:10px; }
.slide img { 
  width:320px; 
  height:200px; 
  object-fit:cover; 
  border-radius:8px; 
}

@keyframes scroll { 
  0%{ transform:translateX(0);} 
  100%{transform:translateX(-50%);} 
}

@media(max-width:768px){
  .slide img { width:240px; height:150px; }
}
@media(max-width:480px){
  .slide img { width:180px; height:110px; }
}

/* Chatbot */
#chatbot { position:fixed; bottom:80px; right:20px; width:280px; background:#0F3A79; border-radius:16px; color:#fff; display:flex; flex-direction:column; overflow:hidden; z-index:999; transition: transform 0.4s, opacity 0.4s; }
#chatbot.hide { transform:translateX(300px); opacity:0; }
.chat-header { padding:0.8rem; background:#1C50A4; display:flex; justify-content:space-between; align-items:center; font-weight:600; font-size:0.95rem; }
.chat-header button { background:none; border:none; color:#fff; font-size:1.2rem; cursor:pointer; }
.chat-messages { max-height:180px; padding:0.8rem; display:flex; flex-direction:column; gap:0.5rem; overflow-y:auto; scroll-behavior:smooth; }
.message { background:#1C50A4; padding:0.5rem 0.8rem; border-radius:12px; font-size:0.85rem; line-height:1.3; }
.message.from-bot { background:#D82828; color:#fff; align-self:flex-start; }
.chat-input { padding:0.6rem; border-top:1px solid rgba(255,255,255,0.2); text-align:center; }
.chat-input button { background:var(--rojo-principal); border:none; padding:0.5rem 1rem; border-radius:20px; color:#fff; font-weight:600; cursor:pointer; transition:0.3s; }
.chat-input button:hover { background:var(--rojo-claro); }

/* Botones */
.btn {
  display:inline-block;
  background:var(--azul-principal);
  color:#fff;
  padding:0.7rem 1.5rem;
  border-radius:8px;
  font-weight:600;
  text-decoration:none;
  transition:0.3s;
  box-shadow:0 4px 6px rgba(0,0,0,0.1);
  letter-spacing:0.3px;
}
.btn:hover {
  background:var(--rojo-claro);
  box-shadow:0 6px 8px rgba(0,0,0,0.15);
}

/* Footer */
footer {
  width:100%;
  background:var(--azul-oscuro);
  color:#fff;
  text-align:center;
  font-size:0.95rem;
  padding:1.5rem 0;
  box-shadow:0 -4px 6px rgba(0,0,0,0.1);
  margin-top:auto;
}

footer a {
  color:#fff;
  text-decoration:none;
  font-weight:500;
}
footer a:hover {
  color:var(--rojo-claro);
}
