/*
 * Estilos principales para la página web de IVO
 *
 * La paleta se basa en tonos azules y naranjas para transmitir
 * tecnología y calidez. Se utiliza la fuente Poppins para un
 * aspecto moderno y legible.
 */

/* Variables de colores */
:root {
  --primary-color: #0d47a1; /* azul oscuro */
  --secondary-color: #ff6f00; /* naranja intenso */
  --accent-color: #00bcd4; /* cian */
  --light-bg: #f5f7fa;
  --dark-bg: #0a192f;
  --text-color: #222;
  --text-light: #f5f5f5;
  --border-radius: 8px;
}

/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text-color);
  background-color: var(--light-bg);
  line-height: 1.6;
  scroll-behavior: smooth;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Contenedor base */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(10, 25, 47, 0.9);
  backdrop-filter: blur(5px);
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--secondary-color);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  transition: transform 0.3s ease;
}

.nav-links li a {
  color: var(--text-light);
  font-weight: 500;
  padding: 0.5rem;
  transition: color 0.3s;
}

.nav-links li a:hover {
  color: var(--secondary-color);
}

/* Mobile menu */
.menu-toggle {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
}

/* Hero section */
.hero-section {
  min-height: 100vh;
  padding-top: 80px;
  display: flex;
  align-items: center;
  color: var(--text-light);
  /* El fondo se maneja mediante el elemento .hero-bg. Al definir la posición
     relativa y ocultar el desbordamiento, la imagen se coloca detrás del
     contenido. */
  position: relative;
  overflow: hidden;
  z-index: 0;
}

/* Ajustes para las imágenes de la sección hero */
.hero-image {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.hero-image img {
  max-width: 80%;
  height: auto;
}

@media (min-width: 768px) {
  .hero-image {
    flex-direction: row;
    justify-content: center;
  }
  .hero-image img {
    max-width: 45%;
  }
  /* Ajusta el tamaño relativo de la foto de la asistente para que no domine
     visualmente al dispositivo. */
  .hero-image img.assistant-photo {
    max-width: 35%;
  }
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;

  /* Asegura que el contenido se superponga al fondo */
  position: relative;
  z-index: 1;
}

/*
 * .hero-bg se coloca como un elemento absolutamente posicionado dentro de la
 * sección hero. Usa una doble capa: un gradiente oscuro para mejorar el
 * contraste del texto y la imagen generada para darle un aspecto futurista.
 */
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Imagen de fondo sin gradiente para que la imagen se aprecie con claridad. */
  /* Capas: añade un ligero gradiente oscuro para mejorar la legibilidad y la
     imagen generada de fondo. */
  background-image: linear-gradient(
      rgba(0, 0, 0, 0.2),
      rgba(0, 0, 0, 0.2)
    ),
    url('../images/hero_bg.png');
  background-size: cover;
  background-position: center;
  z-index: 0;
}

@media (min-width: 768px) {
  .hero-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.hero-text {
  flex: 1;
  max-width: 600px;
}

.hero-text h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

.hero-text p {
  font-size: 1rem;
  margin-bottom: 2rem;
  color: var(--text-light);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: background-color 0.3s, color 0.3s;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--secondary-color);
  color: var(--text-light);
}

.btn-primary:hover {
  background-color: #ff8f24;
}

.btn-secondary {
  background-color: transparent;
  border: 2px solid var(--secondary-color);
  color: var(--secondary-color);
}

.btn-secondary:hover {
  background-color: var(--secondary-color);
  color: var(--text-light);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--text-light);
  color: var(--text-light);
}

.btn-outline:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  color: var(--text-light);
}

.hero-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image img {
  width: 320px;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Section titles */
.section-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
  text-align: center;
}

.section-subtitle {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1rem;
  color: #555;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Features section */
.features-section {
  padding: 4rem 0;
  background-color: var(--light-bg);
}

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

.feature-card {
  background-color: #ffffff;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  font-size: 2rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.feature-card p {
  font-size: 0.9rem;
  color: #444;
}

/* Video section */
.videos-section {
  padding: 4rem 0;
  background-color: #ffffff;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Download section */
.download-section {
  padding: 4rem 0;
  background-color: var(--primary-color);
  color: var(--text-light);
}

.download-container {
  display: flex;
  flex-direction: column-reverse;
  gap: 2rem;
}

@media (min-width: 768px) {
  .download-container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.download-text {
  flex: 1;
  max-width: 600px;
}

.download-text h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

.download-text p {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.download-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.download-image {
  flex: 1;
  text-align: center;
}

.download-image img {
  max-width: 350px;
  border-radius: var(--border-radius);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* Pricing section */
.pricing-section {
  padding: 4rem 0;
  background-color: var(--light-bg);
}

.pricing-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 768px) {
  .pricing-content {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.price-box,
.payment-box {
  flex: 1;
  background-color: #fff;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.price-box h3,
.payment-box h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.price-tag {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin: 0.5rem 0 1rem 0;
}

.price-tag .currency {
  font-size: 1.2rem;
  vertical-align: top;
}

.price-features {
  list-style: none;
  margin-top: 1rem;
}

.price-features li {
  margin-bottom: 0.5rem;
  color: #555;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.price-features li i {
  color: var(--secondary-color);
}

.payment-list {
  list-style: none;
  margin: 1rem 0;
}

.payment-list li {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #555;
}

.payment-list li i {
  color: var(--primary-color);
}

.contact-info {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #555;
}

.contact-info a {
  color: var(--secondary-color);
  font-weight: 600;
}

.whatsapp-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--secondary-color);
  font-weight: 600;
}

/* Contact section */
.contact-section {
  padding: 4rem 0;
  background-color: var(--primary-color);
  color: var(--text-light);
}

/* Ajusta el color de los textos en la sección de contacto que se
   heredan de estilos globales */
.contact-section .section-subtitle {
  color: var(--text-light);
}

.contact-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 768px) {
  .contact-container {
    flex-direction: row;
    justify-content: space-between;
  }
}

.contact-details,
.contact-form {
  flex: 1;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.contact-details h3 {
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

.contact-details p,
.contact-details a {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.8rem;
}

.social-icons {
  margin-top: 1rem;
  display: flex;
  gap: 0.8rem;
}

.social-icons a {
  color: var(--text-light);
  font-size: 1.2rem;
  transition: color 0.3s;
}

.social-icons a:hover {
  color: var(--secondary-color);
}

.contact-form form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  padding: 0.8rem;
  border: none;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--secondary-color);
}

.contact-form button {
  align-self: flex-start;
}

/* Footer */
.footer {
  background-color: #0a192f;
  color: var(--text-light);
  padding: 1.5rem 0;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-nav a {
  color: var(--text-light);
  font-size: 0.9rem;
  transition: color 0.3s;
}

.footer-nav a:hover {
  color: var(--secondary-color);
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--secondary-color);
  color: var(--text-light);
  border: none;
  padding: 0.6rem 0.8rem;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  display: none;
  z-index: 999;
  transition: opacity 0.3s, transform 0.3s;
}

.back-to-top.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Responsive styles */
@media (max-width: 767px) {
  .nav-links {
    position: absolute;
    top: 70px;
    right: 0;
    background-color: rgba(10, 25, 47, 0.95);
    flex-direction: column;
    width: 200px;
    transform: translateX(100%);
    padding: 1rem;
    gap: 1rem;
    border-radius: 0 0 0 8px;
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .menu-toggle {
    display: block;
  }
}