/* ==========================================================================
   RESET Y CONFIGURACIÓN BÁSICA
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  color: #222;
  line-height: 1.6;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh; /* Asegura que el fondo cubra toda la altura */
}

/* ==========================================================================
   ESTRUCTURA DE SECCIONES
   ========================================================================== */
.section,
.hero,
.demo-section,
#faq,
#planes {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%; 
  box-sizing: border-box;
}


#contacto {
  padding: 3rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%; 
  box-sizing: border-box;
}


.section {
  padding: 4rem 1rem; 
  text-align: center;
  width: 100%; 
  box-sizing: border-box;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #002244;
}

/* ==========================================================================
   NAVEGACIÓN
   ========================================================================== */

header {
  width: 100%;
  margin: 0; 
  background-color: #1e3a8a; 
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-sizing: border-box;
}
body {
  margin: 0; 
  padding: 0; 
}
.logo {
  font-weight: bold;
  font-size: 1.5rem;
}

nav#main-nav {
  display: flex;
  gap: 1.5rem;
  position: relative;
}

nav#main-nav a {
  color: white;
  text-decoration: none;
  position: relative;
  padding-bottom: 0rem;
}

nav#main-nav .nav-line {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background-color: #38bdf8;
  transition: left 0.3s ease-in-out, width 0.3s ease-in-out; 
}

nav#main-nav a.active::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  height: 2px;
  width: 100%;
  background-color: transparent; 
}

.login-btn {
  background-color: #38bdf8;
  padding: 5px;
  border-radius: 6px;
  bottom: 3px;
  height: auto;
  width: 100%;


}

.login-btn:hover {
  background-color: #9bf169;
  color: #fff;
}
.login-btn:active {
  background-color: #0056b3;
  color: #fff;
}
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.menu-toggle div {
  width: 25px;
  height: 3px;
  background-color: white;
  margin: 4px 0;
}

@media (max-width: 768px) {
  header {
    width: 100%; 
    margin: 0; 
    padding: 1rem; 
    box-sizing: border-box; 
  }

  nav#main-nav {
    display: none;
    flex-direction: column;
    background-color: #1e3a8a;
    position: absolute;
    top: 100%; 
    left: 0;
    width: 100%; 
    padding: 1rem;
    box-sizing: border-box;
  }

  nav#main-nav.show {
    display: flex;
    width: 100%; 
  }

  .menu-toggle {
    display: flex;
  }

  .section {
    padding: 2rem 0.5rem; 
  }
}

body.scrolled .navbar {
  background-color: #002244; 
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   SECCIÓN HERO
   ========================================================================== */

.hero {
  height: 90vh;
  background: url('img/fondo.jpg') center/cover no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  color: white;
  text-align: center;
}


.hero-overlay {
  background-color: rgba(0, 0, 0, 0.6);
  padding: 2rem; 
  border-radius: 15px;
  width: 90%; 
  max-width: 600px;
}

.cta-button {
  background-color: #00bfff;
  color: white;
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: 25px;
  font-weight: bold;
  text-decoration: none;
  margin-top: 1rem;
  display: inline-block;
  transition: background-color 0.3s;
}

.cta-button:hover {
  background-color: #0099cc;
}

/* ==========================================================================
   CUADRÍCULA Y TARJETAS
   ========================================================================== */


.grid {
  display: flex;
  gap: 1.5rem; 
  flex-wrap: wrap;
  justify-content: center;
}


.card {
  background-color: #f7f9fb;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  width: 100%; 
  max-width: 300px;
  margin-bottom: 1rem; 
  text-align: left;
}

.card h3 {
  color: #0056b3;
  margin-bottom: 1rem;
}

.service-card, 
.feature-card {
  background-color: #ffffff;
  padding: 1.5rem; 
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  width: 100%; 
  max-width: 320px;
  margin-bottom: 1rem; 
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.service-card:hover, 
.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 25px rgba(0, 86, 179, 0.2);
}


.service-card h3, 
.feature-card h3 {
  color: #0056b3;
  margin: 1rem 0 0.5rem;
}

.service-card p, 
.feature-card p {
  color: #444;
  font-size: 0.95rem;
}

.icon {
  color: #0056b3;
  margin-bottom: 1rem;
}

/* ==========================================================================
   TARJETAS DE PLANES
   ========================================================================== */

.plan-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
  background-color: #ffffff;
  padding: 1.5rem;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  width: 100%; 
  max-width: 300px;
  margin-bottom: 1.5rem; 
}

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

.plan-card h3 {
  font-size: 1.5rem;
  color: #002244;
  margin-bottom: 0.5rem;
}

.plan-card .price {
  font-size: 1.2rem;
  font-weight: bold;
  color: #0056b3;
  margin-bottom: 1rem;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin-bottom: 1.5rem;
}

.plan-features li {
  margin: 0.5rem 0;
  color: #333;
}

.plan-card.destacado {
  border: 2px solid #0056b3;
  background-color: #eaf3ff;
}

/* ==========================================================================
   SIMULACIÓN DE CHAT
   ========================================================================== */

.chat-demo {
  background-color: #f1f1f1;
  padding: 1.5rem; 
  border-radius: 15px;
  display: inline-block;
  width: 100%; 
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
}

.chat-bubble {
  padding: 0.8rem; 
  border-radius: 15px;
  margin-bottom: 1rem;
  max-width: 80%; 
}

.user {
  background-color: #0056b3;
  color: white;
  margin-left: auto;
}

.bot {
  background-color: #e0e0e0;
  color: #333;
  margin-right: auto;
}

/* ==========================================================================
   SECCIÓN FAQ
   ========================================================================== */

.faq-item {
  background: white;
  padding: 1rem;
  border-radius: 1rem;
  box-shadow: 0 0 10px #ccc;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}


.faq-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
}
.faq-item {
  background-color: #ffffff;
  border-radius: 15px;
  padding: 1.5rem; 
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  text-align: left;
}


.faq-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 25px rgba(0, 86, 179, 0.2);
}


.faq-question {
  background: none;
  border: none;
  color: #0056b3;
  font-size: 17px; 
  font-weight: 600;
  width: 100%;
  text-align: left;
  cursor: pointer;
  padding: 0;
  position: relative;
  outline: none;
  font-family: inherit;
  transition: color 0.3s ease;
}

.faq-question:hover {
  color: #003366;
}

.faq-question::after {
  content: '\f078'; 
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font: 1.2rem;
  position: absolute;
  right: 0;
  top: 0;
  transition: transform 0.3s ease;
}

.faq-question.active::after {
  transform: rotate(180deg);
}

.faq-answer {
  color: #333;
  font-size: 15px; 
  margin-top: 15px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

/* ==========================================================================
   FORMULARIO DE CONTACTO
   ========================================================================== */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem; 
  width: 95%; 
  max-width: 700px;
  margin: 1rem auto;
  padding: 1.2rem;
  border: 2px solid #00bfff;
  border-radius: 15px;
  box-shadow: 0 0 15px rgba(0, 191, 255, 0.2);
  background-color: #ffffff;
}

.contact-form input {
  padding: 0.6rem; 
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 1rem;
  width: 100%;
  transition: all 0.3s ease;
}
.contact-form textarea {
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 1rem;
  width: 100%;
  height: 120px; 
  resize: none;
  transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border: 2px solid #00bfff;
  box-shadow: 0 0 10px rgba(0, 191, 255, 0.7);
  background-color: #f0faff;
}

.contact-form button {
  background-color: #00bfff;
  color: white;
  border: none;
  padding: 0.7rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-weight: bold;
  margin-top: 0.5rem;
}

.contact-form button:hover {
  background-color: #0099cc;
}

/* ==========================================================================
   PIE DE PÁGINA
   ========================================================================== */

footer {
  background-color: #002244;
  color: white;
  text-align: center;
  padding: 1rem;
  margin-top: 2rem; 
}

/* ==========================================================================
   ANIMACIONES
   ========================================================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   MEDIA QUERIES - RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
  .nav-links {
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 0;
    background-color: #387abd;
    width: 200px;
    display: none;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-radius: 0 0 10px 10px;
  }

  .nav-links.show {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  .grid {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }
  
  .section h2 {
    font-size: 1.8rem;
  }
  
  .card, .service-card, .feature-card, .plan-card, .faq-item {
    padding: 1.2rem;
  }
}

@media (max-width: 600px) {
  .section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .navbar {
    padding: 0.5rem 0.8rem;
  }
  
  .hero-overlay {
    padding: 1.5rem;
    width: 95%;
  }
  
  .contact-form {
    padding: 1rem;
    width: 95%;
  }
  
  .grid {
    gap: 1rem;
  }
  
  .card, .service-card, .feature-card, .plan-card {
    max-width: 100%;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }
  
  .chat-demo {
    max-width: 95%;
    padding: 1rem;
  }
  
  .faq-container {
    gap: 1rem;
  }
  
  .faq-item {
    padding: 1rem;
  }
  
  .faq-question {
    font-size: 16px;
  }
  
  .faq-answer {
    font-size: 14px;
  }
  
  .nav-links {
    width: 180px;
    top: 57px;
  }
  
  .nav-links li {
    text-align: center;
  }
  
  .logo {
    font-size: 1.3rem;
  }
}

@media (max-width: 400px) {
  .section {
    padding: 3rem 0.8rem;
  }
  
  .card, .service-card, .feature-card, .plan-card, .faq-item {
    padding: 1rem;
  }
  
  .contact-form input,
  .contact-form textarea,
  .contact-form button {
    padding: 0.6rem;
    font-size: 0.95rem;
  }
  
  .cta-button {
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
  }
}

.wrapper {
  --font-color-dark: #323232;
  --font-color-light: #fff;
  --bg-color: #fff;
  --main-color: #323232;
  --secondary-color: #505050;
  width: 100px;
  height: 36px;
  background-color: var(--bg-color);
  border: 2px solid var(--main-color);
  border-radius: 34px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 2px 2px var(--main-color);
}

.option {
  width: 45px;
  height: 28px;
  position: relative;
  border-radius: 34px;
  transition: 0.25s;
}

.input {
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  appearance: none;
  cursor: pointer;
}

.btn {
  width: 100%;
  height: 100%;
  border-radius: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.span {
  color: var(--font-color-dark);
  font-size: 18px;
}

.input:checked + .btn {
  background-color: var(--main-color);
  transition: 0.2s;
}

.input:checked + .btn .span {
  color: var(--font-color-light);
  transition: 0.25s;
}

.language-switcher {
  margin: 0 15px;
}

/* ==========================================================================
   BOTON FLOTANTE DEL CHATBOT
   ========================================================================== */

   #chat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
  }
  
  #chat-bubble {
    background-color: #4A90E2; 
    color: white;
    padding: 10px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  #chat-bubble:hover {
    background-color: #468fbd; 
  }
  
  /* ==========================================================================
     VENTANA DEL CHATBOT
     ========================================================================== */
  #chat-box {
    display: none; 
    position: fixed;
    bottom: 80px;
    right: 15px;
    width: 300px;
    height: 400px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
  }
  
  #chat-header {
    background-color: #4A90E2; 
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px 10px 0 0;
  }
  
  #chat-header span {
    cursor: pointer;
    font-size: 20px;
  }
  
  #chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background-color: #badbee;
    border-bottom: 2px solid #ccc;
  }
  
  #chat-input {
    padding: 8px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    width: calc(100% - 24px);
    box-sizing: border-box;
    margin: 10px;
  }
  
  #chat-input:focus {
    outline: none;
    border-color: #4A90E2; 
  }
  
  .chat-message {
    margin: 15px 0;
    padding: 8px;
    border-radius: 10px;
    max-width: 100%;
    word-wrap: break-word;
  }
  
  .chat-message.user {
    background-color: #4f534f;
    align-self: flex-end;
    text-align: right;
  }
  
  .chat-message.bot {
    background-color: #f0f0f0;
    align-self: flex-start;
    text-align: left;
  }
  
  .hidden {
    display: none;
  }
  
  .chat-message {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.5s forwards;
  }
  
  @keyframes fadeInUp {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* ==========================================================================
     CHAT CARD Y SU INTERFAZ
     ========================================================================== */

  .chat-card {
    width: 300px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
  }
  
  .chat-card .chat-header {
    padding: 10px;
    background-color: #f2f2f2;
    display: flex;
    align-items: center;
  }
  
  .chat-card .chat-header .h2 {
    font-size: 16px;
    color: #333;
  }
  
  .chat-card .chat-body {
    padding: 20px;
  }
  
  .chat-card .message {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 5px;
  }
  
  .chat-card .message.incoming {
    background-color: #e1e1e1;
  }
  
  .chat-card .message.outgoing {
    background-color: #f2f2f2;
    text-align: right;
  }
  
  .chat-card .message p {
    font-size: 14px;
    color: #333;
    margin: 0;
  }
  
  .chat-card .chat-footer {
    padding: 10px;
    background-color: #f2f2f2;
    display: flex;
  }
  
  .chat-card .chat-footer input[type="text"] {
    flex-grow: 1;
    padding: 5px;
    border: none;
    border-radius: 3px;
  }
  
  .chat-card .chat-footer button {
    padding: 5px 10px;
    border: none;
    background-color: #4285f4;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
  }
  
  .chat-card .chat-footer button:hover {
    background-color: #0f9d58;
  }
  
  @keyframes chatAnimation {
    0% {
      opacity: 0;
      transform: translateY(10px);
    }
  
    100% {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .chat-card .message {
    animation: chatAnimation 0.3s ease-in-out;
    animation-fill-mode: both;
    animation-delay: 0.1s;
  }
  
  .chat-card .message:nth-child(even) {
    animation-delay: 0.2s;
  }
  
  .chat-card .message:nth-child(odd) {
    animation-delay: 0.3s;
  }
  
  /* ==========================================================================
     CAJA DEL ENVIO DEL MSJ AL BOT Y POSICIONAMIENTO DEL ENVIO
     ========================================================================== */

  #chat-input-container {
    position: relative;
    display: flex;
    align-items: center;
    margin-top: 0px;
    padding: 2px;
  }
  
  #chat-input-container #chat-input {
    width: 80%;
    padding: 10px;
    border-radius: 20px;
    border: 1px solid #ddd;
    font-size: 16px;
  }
  
  #chat-input-container #send-message {
    position: absolute;
    top: 45%;
    right: 20px;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 20px;
    color: #007bff;
    transition: transform 0.2s;
  }
  
  #chat-input-container #send-message:hover {
    transform: translateY(-50%) scale(1.2);
  }

#chat-input-container {
  position: relative; 
  width: 100%; 
}
#chat-input-container button {
  cursor: pointer;
  padding: 0px;
  border-radius: 50%;
  background: transparent; 
  border: 2px solid black; 
  display: flex;
  justify-content: center;
  align-items: center;
  width: 35px;  
  height: 35px; 
  position: absolute; 
  right: 10px; 
  top: 50%; 
  transform: translateY(-50%); 
  margin-right: -10px;
  margin-top: 2.5px;
}

#chat-input-container input {
  width: calc(100% - 50px); 
  padding: 10px; 
  box-sizing: border-box;
}

#chat-input-container button svg {
  width: 40px; 
  height: 40px; 
  transition: transform 0.3s ease-in-out;
  transform-origin: center; 
}


#chat-input-container button:hover svg {
  transform: scale(1.5);  
}
#quienes-somos {
  text-align: center;
  padding: 60px 20px;
  background-color: #f4f8fb;
}

#quienes-somos h2 {
  font-size: 2.5rem;
  color: #222;
  margin-bottom: 20px;
}

#quienes-somos p {
  max-width: 800px;
  margin: 0 auto 15px auto;
  font-size: 1.1rem;
  color: #555;
  line-height: 1.6;
}

.team-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  margin-top: 40px;
}

.team-member {
  width: 200px;
  background-color: #fff;
  padding: 20px 15px;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.team-member:hover {
  transform: translateY(-5px);
}

.team-member img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 15px;
  border: 4px solid #00aaff;
}

.team-member h4 {
  margin-bottom: 6px;
  font-size: 1.1rem;
  color: #333;
}

.team-member p {
  font-size: 0.95rem;
  color: #777;
}

@media (max-width: 600px) {
  .team-member {
    width: 90%;
  }
}
