/* ===================== */
/*        HEADER         */
/* ===================== */
header {
  padding: 20px 20px; /* antes 100px 20px 40px */
  background-color: #141e30; /* azul oscuro */
  color: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  min-height: 60px; /* más compacto */
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0; /* antes 20px */
  max-width: 1300px;
  margin: auto;
  position: relative;
}


.logo-pequeño {
  width: 350px;
  height: auto;
}

.logo {
  font-size: 40px;
  font-weight: bold;
  color: white;
  text-transform: uppercase;
}

@media (max-width: 768px) {
  .logo-pequeño {
    width: 150px;
    display: block;
  }
}

.menu-toggle {
  display: none;
  font-size: 28px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  z-index: 1001;
  position: absolute;
  top: 20px;
  right: 20px;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  color: rgb(255, 255, 255);
  text-decoration: none;
  font-size: 18px;
  transition: color 0.3s;
}

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

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    background-color: #bfb580; /* CAMBIADO DE ROJO A DORADO */
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    text-align: center;
    padding: 20px 0;
    z-index: 999;
  }

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

  .nav-links a {
    padding: 10px 0;
    font-size: 18px;
    color: white;
  }

  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }
}
.hero {
  width: 100%;
  height: 80vh; /* ocupa toda la pantalla */
  background-image: url("/img/despacho2.jpg"); /* 👈 aquí tu imagen */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}


/* ===================== */
/* INTRO / SOBRE NOSOTROS */
/* ===================== */
#sobre-mi {
  background-color: #fff;
  padding: 40px 20px;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-radius: 10px;
}

#sobre-mi h2 {
  font-size: 28px;
  margin-bottom: 20px;
  text-align: center;
}

.intro-con-imagen {
  display: flex;
  align-items: flex-start;
  gap: 30px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.foto-sobremi {
  width: 850px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  object-fit: cover;
  flex-shrink: 0;
  cursor: pointer;
}

.intro {
  flex: 1;
  font-size: 16px;
  color: #555;
  line-height: 1.6;
  text-align: justify;
}

/* ===================== */
/* FORMULARIO        */
/* ===================== */
.formulario-contacto {
  background-color: #fff;
  padding: 40px 20px;
  max-width: 600px;
  margin: 40px auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-radius: 10px;
}

.formulario-contacto h2 {
  font-size: 28px;
  margin-bottom: 20px;
  text-align: center;
}

form label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

form input,
form textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 20px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

form button {
  display: block;
  width: 100%;
  padding: 12px;
  background-color: #333;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
}

form button:hover {
  background-color: #555;
}

.espaciador {
  height: 40px;
}

/* ===================== */
/* BOLETÍN        */
/* ===================== */
.boletin {
  background-color: #fafafa;
  padding: 40px 20px;
  text-align: center;
}

.boletin h2 {
  font-size: 24px;
  margin-bottom: 10px;
}

.boletin p {
  margin-bottom: 20px;
}

.newsletter-form input {
  padding: 10px;
  width: 300px;
  max-width: 80%;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.newsletter-form button {
  padding: 10px 20px;
  margin-left: 10px;
  background-color: #ed7365;
  border: none;
  color: white;
  border-radius: 5px;
  cursor: pointer;
}

.newsletter-form button:hover {
  background-color: #e45241;
}

/* ===================== */
/* FOOTER         */
/* ===================== */
.footer {
  background-color: #121b2b;
  color: #eee;
  padding: 40px 20px 20px;
  font-size: 14px;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: auto;
}

.footer-section h3 {
  margin-bottom: 15px;
  color: #fff;
}

.footer-section p,
.footer-section a {
  color: #ccc;
  text-decoration: none;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section ul li a:hover {
  color: #fff;
}

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  border-top: 1px solid #ede3e3;
  padding-top: 15px;
  color: #ffffff;
}
/* ===================== */
/* CATÁLOGO       */
/* ===================== */
.catalogo {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Tres columnas fijas */
  gap: 20px;
  padding: 20px;
  max-width: 1200px;
  margin: auto;
}

.item {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  text-align: center;
  transition: transform 0.2s;
  cursor: pointer;
}

.item:hover {
  transform: scale(1.05);
}

.item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.item p {
  margin: 10px 0;
  font-weight: bold;
  color: #333;
}

.ver-todos {
  text-align: center;
  margin-bottom: 40px;
}

.ver-todos button {
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  background-color: #333;
  color: white;
  border-radius: 5px;
  cursor: pointer;
}

.ver-todos button:hover {
  background-color: #555;
}

/* ========================= */
/* RESPONSIVE DESIGN     */
/* ========================= */
@media (max-width: 768px) {
  .header-container {
      flex-direction: column;
      gap: 20px;
  }

  .intro-con-imagen {
      flex-direction: column;
      align-items: center;
      text-align: center;
  }

  .foto-sobremi {
      width: 100%;
      max-width: 100%;
  }

  .intro {
      padding: 0 10px;
  }

  .footer-container {
      grid-template-columns: 1fr;
      text-align: center;
  }

  .newsletter-form input {
      width: 100%;
      margin-bottom: 10px;
  }

  .newsletter-form button {
      width: 100%;
      margin-left: 0;
  }

  .catalogo {
      grid-template-columns: 1fr 1fr; /* Dos columnas en tablets */
  }
}

@media (max-width: 480px) {
  .catalogo {
      grid-template-columns: 1fr; /* Una columna en móviles */
  }
}


/* ===================== */
/* MODAL          */
/* ===================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  text-align: center;
  padding-top: 5vh;
  box-sizing: border-box;
}

.modal.hidden {
  display: none;
}

.modal .close {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}

.modal img {
  max-width: 80%;
  max-height: 80vh;
}

#caption {
  color: white;
  margin-top: 10px;
  font-size: 18px;
}

.nav-buttons {
  position: fixed;
  bottom: 30px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  box-sizing: border-box;
  z-index: 999;
}

.nav-buttons a {
  background-color: #007BFF;
  color: rgb(249, 164, 164);
  padding: 10px 15px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 16px;
  transition: background-color 0.3s ease;
}

.nav-buttons a:hover {
  background-color: #0056b3;
}
#btnSubirArriba {
  position: fixed;
  bottom: 10px;
  right: 10px;
  display: none; /* oculto por defecto */
  color: rgb(249, 97, 74);
  border: none;
  padding: 12px 14px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index: 1000;
  transition: opacity 0.3s ease;
}

#btnSubirArriba:hover {
  background-color: #f59f9f;
}
#modal-title {
  font-size: 1.8em;
  margin-bottom: 10px;
  color: #fff;
}

/* Tamaño del icono dentro del botón */
#btnSubirArriba .icono-subir-arriba {
  width: 24px;
  height: 24px;
}

/* Mostrar botón solo en móviles */
@media (max-width: 768px) {
  #btnSubirArriba {
    display: block;
  }
}