/* ===== Estilos generales ===== */
body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  color: #fff;
  background-color: #000; /* base oscura en caso de que la imagen no cargue */
}

/* ===== Navbar ===== */
nav.navbar {
  background-color: rgba(51, 51, 51, 0.9);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  position: fixed;
  top: 0;
  width: 100%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  z-index: 1000;
}

.navbar.scrolled {
  background-color: rgba(51, 51, 51, 1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.logo img,
.logo-img {
  height: 50px;
  width: auto;
}

.logo {
  font-size: 1.4em;
  font-weight: bold;
}

/* ===== Menú principal ===== */
.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

.nav-links li {
  position: relative;
}

.nav-links a,
.dropdown-toggle {
  color: white;
  text-decoration: none;
  padding: 14px 20px;
  display: block;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-links a:hover,
.dropdown-toggle:hover {
  background-color: #444;
  color: #ffd700;
}

/* ===== Submenú (Escritorio) ===== */
.dropdown-menu {
  display: none;
  position: absolute;
  background-color: #333;
  top: 100%;
  left: 0;
  min-width: 180px;
  z-index: 1000;
  list-style: none;
  padding: 0;
  opacity: 0;
  transform: translateY(-10px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.dropdown-menu li a {
  padding: 12px 16px;
}

.dropdown:hover .dropdown-menu {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ===== Botón hamburguesa ===== */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
}

.bar {
  height: 3px;
  width: 100%;
  background-color: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle.active .bar:nth-child(1) {
  transform: rotate(45deg) translateY(8px);
}

.menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
  transform: rotate(-45deg) translateY(-8px);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    width: 100%;
    background-color: #333;
    max-height: 0;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: max-height 0.4s ease, opacity 0.4s ease;
    opacity: 0;
  }

  .nav-links.active {
    max-height: 600px;
    opacity: 1;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a,
  .dropdown-toggle {
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    border-top: 1px solid #444;
  }

  .dropdown-menu {
    position: static;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    box-shadow: none;
    transition: all 0.3s ease;
  }

  .dropdown.open .dropdown-menu {
    display: block;
    max-height: 300px;
    opacity: 1;
    transform: translateY(0);
  }

  .dropdown-menu li a {
    padding-left: 30px;
  }
}

/* ===== Sección principal con fondo ===== */
.main-section {
  position: relative;
  height: 100vh;
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
              url('imagenes/fachada.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

.main-section h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.main-section p {
  font-size: 1.2rem;
  margin: 5px 0;
}

/* ===== Botón de WhatsApp ===== */
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #25D366;
  color: white;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 16px;
  transition: background-color 0.3s ease;
  margin: 10px 0;
}

.btn-whatsapp:hover {
  background-color: #1ebe57;
}
