/* Estilos principales para Noosferica Cloud - v2 (Correcciones de menú y contraste) */

/* Variables globales */
:root {
  --primary-color: #0056b3; /* Azul primario */
  --secondary-color: #00a0e9; /* Azul secundario */
  --accent-color: #ff6b00; /* Naranja acento */
  --dark-color: #212529; /* Gris oscuro (para texto principal) */
  --medium-gray: #6c757d; /* Gris medio */
  --light-gray: #f8f9fa; /* Gris claro (fondo principal) */
  --white-color: #ffffff; /* Blanco */
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --font-primary: 'Montserrat', sans-serif;
  --font-secondary: 'Roboto', sans-serif; /* Cambiado a Roboto para mejor legibilidad */
  --transition: all 0.3s ease;
  --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Reset y estilos base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-secondary);
  color: var(--dark-color);
  line-height: 1.7; /* Aumentado para mejor legibilidad */
  overflow-x: hidden;
  background-color: var(--light-gray);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--dark-color);
}

h1 {
  font-size: 2.8rem; /* Ligeramente más grande */
}

h2 {
  font-size: 2.2rem;
}

h3 {
  font-size: 1.75rem;
}

p {
  margin-bottom: 1rem;
  color: var(--medium-gray); /* Texto de párrafo más suave */
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

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

img {
  max-width: 100%;
  height: auto;
  display: block; /* Evitar espacios extra debajo de las imágenes */
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem; /* Ligeramente más grande */
  border-radius: 5px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: var(--font-primary);
  text-transform: uppercase; /* Botones en mayúsculas */
  letter-spacing: 0.5px;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--white-color);
}

.btn-primary:hover {
  background-color: #00418a; /* Azul primario más oscuro */
  color: var(--white-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--white-color);
}

.btn-secondary:hover {
  background-color: #007bbd; /* Azul secundario más oscuro */
  color: var(--white-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-accent {
  background-color: var(--accent-color);
  color: var(--white-color);
}

.btn-accent:hover {
  background-color: #e55e00; /* Naranja acento más oscuro */
  color: var(--white-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Header y navegación - CORREGIDO */
.header {
  background-color: var(--white-color);
  box-shadow: var(--box-shadow);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: background-color 0.3s ease;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0; /* Reducido ligeramente */
}

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

.logo img {
  height: 45px; /* Ligeramente más grande */
}

.nav-menu {
  display: flex;
  list-style: none;
}

.nav-item {
  margin-left: 0; /* Eliminado margen izquierdo, gestionado por flex */
  position: relative; /* Para posicionar submenu */
}

.nav-link {
  color: var(--dark-color);
  font-weight: 600;
  padding: 1rem 1.2rem; /* Aumentado padding para mejor área de clic */
  display: block; /* Asegurar que ocupa todo el espacio */
  position: relative;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.nav-link:hover,
.nav-item:hover > .nav-link { /* Mantener estilo al hacer hover en el item */
  color: var(--primary-color);
  background-color: rgba(0, 86, 179, 0.05); /* Fondo sutil al hacer hover */
}

/* Submenu - CORREGIDO */
.submenu {
  display: none; /* Oculto por defecto */
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--white-color);
  list-style: none;
  padding: 0.5rem 0;
  margin: 0;
  min-width: 200px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border-radius: 0 0 5px 5px;
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.nav-item:hover > .submenu {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.submenu li a {
  display: block;
  padding: 0.7rem 1.5rem;
  color: var(--dark-color);
  white-space: nowrap;
  font-weight: 500;
}

.submenu li a:hover {
  background-color: var(--light-gray);
  color: var(--primary-color);
}

.mobile-toggle {
  display: none;
  cursor: pointer;
  font-size: 1.8rem;
  color: var(--primary-color);
}

/* Hero section - Contraste CORREGIDO */
.hero {
  min-height: 80vh; /* Reducido para no ocupar toda la pantalla siempre */
  background: linear-gradient(rgba(0, 40, 85, 0.8), rgba(0, 20, 45, 0.8)), url('../images/hero-bg.jpg'); /* Fondo más oscuro para contraste */
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  color: var(--white-color); /* Texto blanco */
  padding-top: 100px; /* Espacio para el header fijo */
  padding-bottom: 40px;
}

.hero-content {
  max-width: 800px;
  text-align: center; /* Centrado */
  margin: 0 auto; /* Centrado */
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: var(--white-color); /* Asegurar texto blanco */
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5); /* Sombra para legibilidad */
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9); /* Blanco ligeramente transparente */
}

.hero strong {
  color: var(--secondary-color); /* Destacar palabras clave */
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center; /* Centrar botones */
}

/* Secciones */
.section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 2.5rem; /* Títulos de sección más grandes */
}

.section-title h2::after {
  content: '';
  position: absolute;
  width: 60px;
  height: 4px;
  background-color: var(--primary-color);
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

.section-description {
  max-width: 800px;
  margin: 0 auto 3rem;
  text-align: center;
  font-size: 1.1rem;
  color: var(--medium-gray);
}

/* Servicios */
.services {
  background-color: var(--white-color);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* Ancho mínimo mayor */
  gap: 2rem;
}

.service-card {
  background-color: var(--white-color); /* Fondo blanco para tarjetas */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* Sombra más sutil */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.service-img {
  height: 220px; /* Más altura */
  overflow: hidden;
}

.service-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.service-card:hover .service-img img {
  transform: scale(1.05);
}

.service-content {
  padding: 1.5rem;
  flex-grow: 1; /* Para que ocupe el espacio restante */
  display: flex;
  flex-direction: column;
}

.service-content h3 {
  margin-bottom: 0.8rem;
  color: var(--primary-color);
}

.service-content p {
  margin-bottom: 1rem;
  flex-grow: 1; /* Empuja el botón hacia abajo */
  color: var(--medium-gray);
}

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

.service-features li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--dark-color);
}

.service-features li::before {
  content: '\f00c'; /* Icono check de Font Awesome */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 2px;
  color: var(--success-color);
}

/* Sobre nosotros */
.about {
  background-color: var(--light-gray);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-img {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.about-content h3 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.about-content p {
  margin-bottom: 1.5rem;
  color: var(--medium-gray);
}

.about-features {
  margin-top: 2rem;
}

.feature-item {
  display: flex;
  align-items: flex-start; /* Alinear al inicio */
  margin-bottom: 1.5rem;
}

.feature-icon {
  margin-right: 1rem;
  color: var(--primary-color);
  font-size: 1.8rem; /* Icono más grande */
  width: 40px; /* Ancho fijo para alinear texto */
  text-align: center;
}

.feature-item h4 {
  margin-bottom: 0.3rem;
  font-size: 1.1rem;
}

.feature-item p {
  margin-bottom: 0;
  font-size: 0.95rem;
  color: var(--medium-gray);
}

/* Estadísticas - Contraste CORREGIDO */
.stats {
  background-color: var(--primary-color); /* Fondo azul primario */
  color: var(--white-color); /* Texto blanco */
  padding: 4rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-item {
  padding: 1rem;
}

.stat-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--secondary-color); /* Iconos en azul secundario */
}

.stat-counter {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--white-color); /* Asegurar texto blanco */
}

.stat-title {
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85); /* Blanco ligeramente transparente */
}

/* Testimonios */
.testimonials {
  background-color: var(--white-color);
}

.testimonial-slider {
  /* Configuración para slider (ej. Slick Slider) */
  max-width: 800px;
  margin: 0 auto;
}

.testimonial-item {
  text-align: center;
  padding: 2rem;
  background-color: var(--light-gray);
  border-radius: 8px;
  margin: 0 1rem; /* Espacio entre items si es slider */
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.testimonial-text {
  font-style: italic;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: var(--medium-gray);
  position: relative;
  padding: 0 1rem;
}

.testimonial-text::before, .testimonial-text::after {
  content: '"';
  font-size: 2rem;
  color: var(--primary-color);
  opacity: 0.5;
  position: absolute;
}

.testimonial-text::before {
  top: -0.5rem;
  left: -0.5rem;
}

.testimonial-text::after {
  bottom: -0.5rem;
  right: -0.5rem;
}

.testimonial-author {
  font-weight: 700;
  margin-top: 1rem;
  color: var(--dark-color);
}

.testimonial-position {
  color: var(--primary-color);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Contacto */
.contact {
  background-color: var(--light-gray);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr; /* Más espacio para el formulario */
  gap: 3rem;
}

.contact-info h3 {
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.contact-icon {
  margin-right: 1rem;
  color: var(--primary-color);
  font-size: 1.5rem;
  width: 30px;
  text-align: center;
  margin-top: 3px;
}

.contact-item h4 {
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.contact-item p,
.contact-item a {
  color: var(--medium-gray);
  margin-bottom: 0;
}

.contact-item a:hover {
  color: var(--secondary-color);
}

.cta-box {
  background-color: var(--primary-color);
  color: var(--white-color);
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 2rem;
}

.cta-box h4 {
  color: var(--white-color);
  margin-bottom: 0.5rem;
}

.cta-box p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1rem;
}

.cta-box .btn-accent {
  width: 100%;
}

.contact-form {
  background-color: var(--white-color);
  padding: 2.5rem; /* Más padding */
  border-radius: 8px;
  box-shadow: var(--box-shadow);
}

/* Formulario mejorado */
.form-group-enhanced {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--dark-color);
}

.form-control-enhanced {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-family: var(--font-secondary);
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control-enhanced:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 86, 179, 0.25);
}

textarea.form-control-enhanced {
  resize: vertical;
  min-height: 120px;
}

.form-required {
  color: var(--danger-color);
  margin-left: 2px;
}

.form-error {
  color: var(--danger-color);
  font-size: 0.85rem;
  margin-top: 0.3rem;
  display: none; /* Oculto por defecto, mostrar con JS */
}

.form-check {
  display: flex;
  align-items: center;
}

.form-check-input {
  margin-right: 0.5rem;
}

.form-check-label {
  font-weight: 500;
  color: var(--medium-gray);
}

.form-check-label a {
  color: var(--primary-color);
}

.form-submit {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  background-color: var(--accent-color);
  color: var(--white-color);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  font-weight: 700;
}

.form-submit:hover {
  background-color: #e55e00;
}

.form-privacy {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--medium-gray);
  text-align: center;
}

.form-privacy a {
  color: var(--primary-color);
}

/* Footer - Contraste CORREGIDO */
.footer {
  background-color: var(--dark-color);
  color: rgba(255, 255, 255, 0.7); /* Texto base más claro */
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-col h3 {
  color: var(--white-color);
  margin-bottom: 1.5rem;
  position: relative;
  font-size: 1.2rem;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 3px;
  background-color: var(--primary-color);
  bottom: -10px;
  left: 0;
  border-radius: 1px;
}

.footer-col p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.footer-links {
  list-style: none;
}

.footer-link {
  margin-bottom: 0.8rem;
}

.footer-link a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
  font-size: 0.95rem;
}

.footer-link a:hover {
  color: var(--white-color);
  padding-left: 5px;
}

.social-links {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--white-color);
  transition: var(--transition);
  font-size: 1rem;
}

.social-link:hover {
  background-color: var(--primary-color);
  color: var(--white-color);
  transform: scale(1.1);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.8);
}

.footer-bottom a:hover {
  color: var(--white-color);
}

/* Animaciones */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.animate {
  opacity: 1;
  transform: translateY(0);
}

/* Utilidades */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; } .mt-5 { margin-top: 2.5rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; } .mb-5 { margin-bottom: 2.5rem; }
.py-1 { padding-top: 0.5rem; padding-bottom: 0.5rem; } .py-2 { padding-top: 1rem; padding-bottom: 1rem; } .py-3 { padding-top: 1.5rem; padding-bottom: 1.5rem; } .py-4 { padding-top: 2rem; padding-bottom: 2rem; } .py-5 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.px-1 { padding-left: 0.5rem; padding-right: 0.5rem; } .px-2 { padding-left: 1rem; padding-right: 1rem; } .px-3 { padding-left: 1.5rem; padding-right: 1.5rem; } .px-4 { padding-left: 2rem; padding-right: 2rem; } .px-5 { padding-left: 2.5rem; padding-right: 2.5rem; }
.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }
.text-accent { color: var(--accent-color); }
.text-dark { color: var(--dark-color); }
.text-light { color: var(--white-color); } /* Cambiado a blanco */
.bg-primary { background-color: var(--primary-color); color: var(--white-color); } /* Añadido color de texto */
.bg-secondary { background-color: var(--secondary-color); color: var(--white-color); } /* Añadido color de texto */
.bg-accent { background-color: var(--accent-color); color: var(--white-color); } /* Añadido color de texto */
.bg-dark { background-color: var(--dark-color); color: var(--white-color); } /* Añadido color de texto */
.bg-light { background-color: var(--light-gray); color: var(--dark-color); } /* Añadido color de texto */
.shadow { box-shadow: var(--box-shadow); }
.rounded { border-radius: 8px; }

/* Corrección específica: Texto azul sobre fondo gris (ej. testimonios) */
.testimonial-position {
  color: var(--primary-color); /* Mantenido, pero el fondo es light-gray, contraste OK */
}

/* Corrección específica: Texto negro sobre fondo azul (ej. stats, cta-box) */
/* Ya corregido usando variables y asegurando texto blanco donde corresponde */

/* Corrección específica: Texto en footer */
/* Ya corregido usando rgba(255, 255, 255, 0.7) y 0.6 para mejor contraste */

/* Mejoras de accesibilidad */
*:focus {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

/* Ocultar visualmente pero mantener accesible para lectores de pantalla */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

