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

html,
body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: "Roboto", sans-serif;
  background-color: #fff;
  color: #222;
}

/* --- HERO SECTION --- */
.hero {
  background-image: url("../img/Fondo2.jpg");
  background-size: cover;
  background-position: center;
  color: white;
  height: 50vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  border: none;
  margin: 0;
  padding: 0;

  /* Sombra elegante sin franja gris */
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

/* --- NAVBAR --- */
.navbar {
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  flex-wrap: wrap;
}

.logo {
  color: #f72727;
  font-weight: 600;
  font-size: 1.2rem;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 25px;
}

.nav-links li a {
  color: #f72727;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links li a:hover {
  color: #ffffff;
}

.nav-links li a.active {
  font-weight: 700;
  color: #ffffff;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
}

/* --- HERO TEXT --- */
.hero-text {
  color: #f72727;
  text-align: center;
  padding: 50px 20px;
  background: rgba(0, 0, 0, 0.4);
}

.hero-text h1 {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
}

/* --- TARJETAS DE LABORATORIOS --- */
.labs-container {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  padding: 60px 40px;
  max-width: 1200px;
  margin: auto;
}

.lab-card {
  background: rgba(245, 245, 245, 0.9);
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  padding: 20px;
  transition: transform 0.3s ease;
}

.lab-card:hover {
  transform: translateY(-5px);
}

.lab-image img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 15px;
}

.lab-card h3 {
  color: #f52020;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.lab-card p {
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.btn {
  background-color: #f52020;
  color: white;
  border: none;
  padding: 10px 25px;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn a {
  color: white;
  text-decoration: none;
}

.btn:hover {
  background-color: #ef4444;
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 50, 50, 0.7);
}

/* --- FOOTER --- */
footer {
  background-color: #222;
  color: #ccc;
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
  margin-top: auto;
}

/* --- RESPONSIVE --- */
@media (max-width: 1000px) {
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background: rgba(0, 0, 0, 0.9);
    position: absolute;
    top: 60px;
    left: 0;
    padding: 20px 0;
  }

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

  .menu-toggle {
    display: block;
  }

  .nav-links li {
    text-align: center;
    margin: 10px 0;
  }

  .labs-container {
    display: flex;
    flex-direction: column;
  }
}
