/* ========== RESET ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ========== BASE ========== */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #0f172a;
  color: #e5e7eb;
  line-height: 1.6;
}

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

/* ========== HEADER - 110px ========== */
.header {
  background: #020617;
  border-bottom: 2px solid #3b82f6;
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 110px;
  overflow: visible;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  position: relative;
}

/* LOGO CENTRADO */
.brand {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.brand img {
  height: 180px;
  width: auto;
  display: block;
  object-fit: contain;
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.3));
}

/* MENÚ ESCRITORIO */
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
  margin: 0;
  padding: 0;
  height: 100%;
}

.nav-links li a {
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 0.5rem 0;
  transition: 0.3s;
}

.nav-links li a:hover {
  color: #3b82f6;
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 20;
}

/* ========== HERO ========== */
.hero {
  position: relative;
  padding: 100px 0;
  background: linear-gradient(rgba(2, 6, 23, 0.6), rgba(2, 6, 23, 0.7)), url("../img/hero.png") center/cover no-repeat;
  background-size: cover;
  background-position: center;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.hero-text {
  flex: 1;
}

.hero-text h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: white;
}

.hero-text p {
  font-size: 1.2rem;
  color: #cbd5e1;
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

/* ========== SECCIONES ========== */
.section {
  padding: 80px 0;
}

.section h2 {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 2rem;
}

.section h2::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  background: #3b82f6;
  margin: 0.7rem auto;
  border-radius: 3px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.card {
  background: #1e293b;
  padding: 2rem;
  border-radius: 16px;
  text-align: center;
  transition: 0.3s;
  border: 1px solid #334155;
}

.card:hover {
  transform: translateY(-5px);
  border-color: #3b82f6;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.card h3 {
  color: #60a5fa;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

/* CONTACTO */
.contact-grid {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.contact-form, .contact-info {
  flex: 1;
  background: #1e293b;
  padding: 2rem;
  border-radius: 16px;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.8rem;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  color: white;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #3b82f6;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.7rem;
  background: #0f172a;
  border-radius: 8px;
}

.footer {
  background: #020617;
  text-align: center;
  padding: 2rem;
  margin-top: 2rem;
  border-top: 1px solid #3b82f6;
}

/* ========== RESPONSIVE MÓVIL - MENÚ CON FONDO SÓLIDO ========== */
@media (max-width: 768px) {
  .header {
    height: 80px;
  }

  .brand img {
    height: 130px;
    top: 50%;
    transform: translateY(-50%);
  }

  .menu-toggle {
    display: block;
  }

  /* Contenedor del menú - fondo sólido */
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0;
    margin: 0;
    background-color: #020617;
    border-top: 2px solid #3b82f6;
    border-bottom: 2px solid #3b82f6;
    position: absolute;
    top: 80px;
    left: 0;
    z-index: 999;
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.5);
  }

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

  /* Cada item del menú - fondo sólido */
  .nav-links li {
    width: 100%;
    text-align: center;
    background-color: #020617;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  /* Cada enlace - fondo sólido siempre */
  .nav-links li a {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 1rem;
    width: 100%;
    color: #e2e8f0;
    background-color: #020617;
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
    text-decoration: none;
    transition: 0.1s;
  }

  /* El último enlace sin borde inferior */
  .nav-links li:last-child a {
    border-bottom: none;
  }

  /* EFECTO AL "PINCHAR" (touch) - cambia a azul momentáneamente */
  .nav-links li a:active {
    background-color: #3b82f6;
    color: white;
    transform: scale(0.98);
  }

  .hero {
    padding: 80px 0 60px;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-content {
    flex-direction: column;
    text-align: center;
  }

  .section {
    padding: 50px 0;
  }

  @media (max-width: 900px) {
    .grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  @media (max-width: 600px) {
    .grid {
      grid-template-columns: 1fr;
    }
  }

  /* ========== PÁGINA DE CONTACTO MEJORADA ========== */

  /* Grid de contacto - 2 columnas */
  .contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
  }

  /* Tarjetas de contacto */
  .contact-form, .contact-info {
    background: #1e293b;
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid #334155;
    transition: 0.3s;
  }

  .contact-form:hover, .contact-info:hover {
    border-color: #3b82f6;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  }

  .contact-form h3, .contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #60a5fa;
    text-align: center;
  }

  /* Campos del formulario */
  .contact-form .form-group {
    margin-bottom: 1.2rem;
  }

  .contact-form input,
  .contact-form select,
  .contact-form textarea {
    width: 100%;
    padding: 0.9rem;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 12px;
    color: white;
    font-size: 0.95rem;
    transition: 0.2s;
  }

  .contact-form input:focus,
  .contact-form select:focus,
  .contact-form textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  }

  /* Botón de envío */
  .contact-form .btn {
    width: 100%;
    text-align: center;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    margin-top: 0.5rem;
  }

  /* Información de contacto */
  .info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem;
    background: #0f172a;
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: 0.2s;
  }

  .info-item:hover {
    background: #020617;
    transform: translateX(5px);
  }

  .info-item span:first-child {
    font-size: 1.5rem;
  }

  .info-item p {
    margin: 0;
    color: #e5e7eb;
  }

  .contact-cta {
    margin-top: 1.5rem;
  }

  .contact-cta .btn {
    display: block;
    text-align: center;
    background: #22c55e;
  }

  .contact-cta .btn:hover {
    background: #16a34a;
  }

  /* Mensajes de alerta */
  .alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    text-align: center;
  }

  .alert-success {
    background: #22c55e20;
    border: 1px solid #22c55e;
    color: #22c55e;
  }

  .alert-error {
    background: #ef444420;
    border: 1px solid #ef4444;
    color: #ef4444;
  }

  /* Responsive */
  @media (max-width: 768px) {
    .contact-grid {
      grid-template-columns: 1fr;
      gap: 1.5rem;
    }

    .contact-form, .contact-info {
      padding: 1.5rem;
    }

    .info-item {
      padding: 0.7rem;
    }
  }
}