body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background-color: #e6f0f5;
  color: #333;
}

#menu-container { width: 100%; }

h1 {
  text-align: center;
  margin: 0;
  padding: 25px;
  background-color: #c4d9eb;
  font-weight: 600;
  font-size: 2em;
  color: #333;
  border-bottom: 2px solid #7aa7c7;
}

/* Carrusel */
.carousel {
  position: relative;
  max-width: 100%;
  height: 400px;
  overflow: hidden;
}
.carousel img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: none;
}
.carousel img.active {
  display: block;
  animation: fade 1s;
}
@keyframes fade { from {opacity:0;} to {opacity:1;} }

.hero-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
}
.hero-text h2 { font-size: 2.5em; margin-bottom: 15px; }
.hero-text a.button {
  background-color: #7aa7c7;
  color: white;
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s;
}
.hero-text a.button:hover { background-color: #6b96b5; }

/* Secciones */
.section { padding: 60px 20px; text-align: center; }
.section h3 {
  font-size: 1.5em;
  margin-bottom: 25px;
  color: #3a5f7d;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0;
  animation: fadeIn 0.6s forwards;
}
@keyframes fadeIn { to { opacity: 1; } }

/* Tarjetas */
.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.cards .card {
  flex: 0 1 280px;
  max-width: 300px;
  height: 400px; /* altura fija para mantener uniformidad */
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.cards .card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.cards .card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  padding: 10px;
}

.cards .card h4 {
  margin: 10px 0 5px;
  font-size: 1.3em;
  color: #333;
  text-align: center;
}

.cards .card p {
  font-size: 1em;
  color: #555;
  text-align: center;
  padding: 0 10px 10px;
}

.cards .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Desktop: máximo 5 tarjetas por fila */
@media (min-width: 1025px) {
  .cards .card { flex: 0 1 240px; }
}

/* Tablet: 3 tarjetas por fila */
@media (min-width: 769px) and (max-width: 1024px) {
  .cards .card { flex: 0 1 30%; }
}

/* Móvil: 2 tarjetas por fila */
@media (max-width: 768px) {
  .cards { flex-wrap: wrap; justify-content: center; }
  .cards .card { flex: 0 1 45%; margin-bottom: 20px; height: 350px; }
  .cards .card img { height: 150px; }
  .cards .card h4 { font-size: 1.1em; }
  .cards .card p { font-size: 0.9em; }
}

/* Footer */
footer {
  background: #7aa7c7;
  color: white;
  text-align: center;
  padding: 20px;
  font-size: 0.9em;
}

/* Botón flotante */
#config-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #7aa7c7;
  color: white;
  border: none;
  padding: 15px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
  z-index: 1000;
}
#config-btn:hover { background:#6b96b5; }

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}
.modal-content {
  background: white;
  padding: 30px;
  border-radius: 10px;
  width: 300px;
  text-align: center;
  position: relative;
}
.modal-content input, .modal-content textarea {
  width: 90%;
  padding: 8px;
  margin: 10px 0;
  border-radius: 5px;
  border: 1px solid #ccc;
}
.modal-content button {
  background: #7aa7c7;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  cursor: pointer;
  margin-top: 10px;
}
.modal-content button:hover { background: #6b96b5; }
.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  cursor: pointer;
  font-weight: bold;
  font-size: 18px;
}

/* ===== Menú ===== */
nav {
  background: #7aa7c7;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}
nav .logo { display: flex; align-items: center; font-weight: 600; font-size: 1.2em; color: #333; }
nav .logo img { width: 30px; height: 30px; margin-right: 10px; }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; }
nav ul li { position: relative; }
nav ul li a { display: flex; align-items: center; height: 50px; padding: 0 15px; color: #333; text-decoration: none; font-weight: 500; transition: background 0.3s; border-radius: 5px 5px 0 0; }
nav ul li a span.arrow { margin-left: 5px; font-size: 0.7em; transition: transform 0.3s; }
nav ul li:hover > a { background: #6b96b5; }
nav ul li ul {
  display: none;
  position: absolute;
  top: 50px;
  left: 0;
  min-width: 180px;
  background: #f0f4f8;
  border-radius: 8px;
  box-shadow: 0 8px 15px rgba(0,0,0,0.08);
  padding: 10px 0;
  z-index: 1000;
}
nav ul li:hover ul { display: block; }
nav ul li ul li a { padding: 10px 20px; display: block; font-weight: 400; }
nav ul li ul li a:hover { background: #d0e1f0; }

/* Botón hamburguesa */
.nav-toggle { display: none; flex-direction: column; cursor: pointer; }
.nav-toggle span { height: 3px; width: 25px; background: #333; margin: 4px 0; border-radius: 2px; }

/* Menú responsive */
@media (max-width: 768px) {
  nav { flex-wrap: wrap; }
  nav ul { flex-direction: column; width: 100%; display: none; }
  nav ul li { width: 100%; }
  nav ul li a { padding: 15px 20px; border-radius: 0; }
  nav ul li ul { position: static; box-shadow: none; padding: 0; }
  nav ul li ul li a { padding-left: 40px; }
  .nav-toggle { display: flex; }
  nav.active ul { display: flex; }
}
