/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: #f8f9fa;
  color: #333;
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* HEADER */
.main-header {
  background-color: #003366;
  color: white;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 90px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
}

.nav-links li a {
  color: white;
  text-decoration: none;
  font-weight: 500;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
}

/* HERO */
.hero {
  position: relative;
  width: 100vw; /* fuerza el ancho completo del viewport */
  background-image: url("../img/portada.jpg"); /* o el nombre correcto */
  background-size: cover; /* cubre el espacio completo */
  background-position: center;
  background-repeat: no-repeat;
  min-height: 60vh; /* puedes ajustar el alto a gusto */
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4); /* Oscurece la imagen */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 2rem;
  color: white;
}

.hero-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1.2rem;
  max-width: 600px;
}

/* SECTIONS */
.section-light {
  background-color: #f8f9fa;
  padding: 4rem 2rem;
}

.section-dark {
  background-color: #ffffff;
  padding: 4rem 2rem;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2.5rem;
  color: #003366;
}

/* CARDS */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.card {
  background-color: #f0f4f8;
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease-in-out;
}

.card:hover {
  transform: translateY(-5px);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card h3 {
  margin: 1rem 0 0.5rem;
  color: #003366;
}

.card p {
  padding: 0 1rem 1.5rem;
  font-size: 0.95rem;
  color: #555;
}

.card {
  background-color: #f0f4f8;
  border-radius: 8px;
  text-align: center;
  padding: 2rem 1rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease-in-out;
}

.card:hover {
  transform: translateY(-5px);
}

.card h3 {
  margin: 1rem 0 0.5rem;
  font-size: 1.1rem;
  color: #003366;
}

.card p {
  font-size: 0.95rem;
  color: #555;
}

.servicio-icono {
  width: 2cm;
  height: 2cm;
  object-fit: contain;
  margin-bottom: 1rem;
}

/* ENLACES DE INTERÉS */
.logos-enlaces {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2rem;
}

.logos-enlaces a img {
  max-height: 80px;
  width: auto;
  transition: transform 0.2s ease-in-out;
}

.logos-enlaces a:hover img {
  transform: scale(1.05);
}

/* CONTACTO */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  margin-bottom: 1rem;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
}

.contact-form button {
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #0052cc, #003366);
  color: #fff;
  border: none;
  padding: 1rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #003366, #0052cc);
}


/* FOOTER */
.site-footer {
  background-color: #003366;
  color: #f1f1f1;
  padding: 3rem 2rem;
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  align-items: start;
}

.footer-brand img {
  width: 100px;
  margin-bottom: 1rem;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #f1f1f1;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* REDES SOCIALES */
.social-links a img,
.footer-social a img,
.social-icons a img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  margin: 0 8px;
  transition: transform 0.2s ease-in-out;
}

.social-links a:hover img,
.social-icons a:hover img {
  transform: scale(1.1);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    background-color: #003366;
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    padding: 1rem;
  }

  .nav-links.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .logos-enlaces {
    flex-direction: column;
  }
}