/* style.css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f9f9f9;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

/* === MENÚ SUPERIOR === */
.top-nav {
  background: #56af44;
  color: white;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.logo img {
  height: 50px;
}

.menu {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}

.menu a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.05rem;
  transition: color 0.3s ease;
}

.menu a:hover {
  color: black;
}

/* === BUSCADOR === */
.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-input {
  padding: 9px 12px;
  border: 1px solid #000;
  border-radius: 4px;
  width: 180px;
  font-size: 0.95rem;
  color: #000;
  background: white;
  outline: none;
}

.search-input::placeholder {
  color: #555;
}

.search-btn {
  background: #000;
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.search-btn:hover {
  background: #56af44;
  border: 1px solid #000;
}

/* === HEADER HERO CON CARROUSEL RESPONSIVO === */
.hero {
  height: 400px;
  position: relative;
  overflow: hidden;
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
}

.carousel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 400px;
  display: flex;
  transition: transform 0.8s ease-in-out;
}

.carousel img {
  min-width: 100%;
  height: 400px;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
  position: absolute;
  top: 0;
  left: 0;
}

.carousel img.active {
  opacity: 1;
  position: relative;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 400px;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  z-index: 2;
  max-width: 800px;
  padding: 1rem;
  width: 100%;
}

.hero-content h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

/* Botones */
.btn-primary {
  display: inline-block;
  background: #56af44;
  color: white;
  padding: 12px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  margin: 0 10px;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: black;
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid white;
  border-radius: 30px;
  padding: 10px 30px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* === SERVICIOS === */
.services {
  padding: 5rem 0;
  background: white;
}

.services h2 {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 3rem;
  color: #000;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.service-card {
  background: #f8f8f8;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}

.service-card:hover {
  transform: translateY(-10px);
}

.service-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.service-card h3 {
  padding: 1rem;
  color: #000;
  text-align: center;
}

.service-card p {
  padding: 0 1rem 1rem;
  text-align: center;
  color: #555;
}

/* === GALERÍA DE TRABAJOS === */
.gallery {
  padding: 5rem 0;
  background: #f0f7ff;
  text-align: center;
}

.gallery h2 {
  color: #000;
  margin-bottom: 1rem;
}

.gallery p {
  color: #555;
  margin-bottom: 2rem;
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.gallery-item {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: scale(1.03);
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: filter 0.3s ease;
}

.gallery-item img:hover {
  filter: brightness(0.9);
}

.instagram-cta {
  margin-top: 2rem;
}

/* === CATÁLOGO === */
.catalog {
  padding: 5rem 0;
  background: #f8f8f8;
}

.catalog h2 {
  text-align: center;
  font-size: 2.2rem;
  color: #000;
  margin-bottom: 1rem;
}

.catalog p {
  text-align: center;
  color: #555;
  margin-bottom: 3rem;
}

.catalog-category {
  font-size: 1.8rem;
  color: #000;
  margin: 3rem 0 1.5rem 0;
  text-align: left;
  border-bottom: 2px solid #56af44;
  padding-bottom: 0.5rem;
}

/* === TARJETAS DE PRODUCTOS === */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.product-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-4px);
}

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: #f9f9f9;
  display: block;
}

.product-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #000;
  text-align: center;
  padding: 1rem;
  margin: 0;
}

/* === CONTACTO === */
.contact {
  padding: 5rem 0;
  background: white;
}

.contact h2 {
  text-align: center;
  color: #000;
  margin-bottom: 3rem;
}

.contact-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
}

.contact-info {
  font-size: 1.1rem;
  color: #333;
}

.contact-info a {
  color: #56af44;
  text-decoration: none;
}

.contact-info p {
  margin-bottom: 1rem;
}

.social-icons {
  margin-top: 1.5rem;
  font-size: 1.5rem;
  color: #56af44;
  display: flex;
  gap: 1rem;
}

.social-icons a {
  transition: color 0.3s ease;
}

.social-icons a:hover {
  color: black;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
}

.contact-form button {
  width: 100%;
}

/* === FOOTER === */
.footer {
  background: #000;
  color: white;
  padding: 2rem 0;
}

.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-logo img {
  height: 40px;
  margin-bottom: 0.5rem;
}

.footer-logo p {
  font-size: 0.9rem;
  color: #aaa;
}

.footer-socials {
  display: flex;
  gap: 1.2rem;
}

.footer-socials a {
  color: white;
  font-size: 1.6rem;
  transition: color 0.3s ease, transform 0.3s ease;
}

.footer-socials a:hover {
  color: #56af44;
  transform: scale(1.1);
}

/* === BOTÓN WHATSAPP FLOTANTE === */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: #56af44;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000;
  border: 2px solid white;
}

.whatsapp-float img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: brightness(1.2);
  transition: transform 0.3s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  background: white;
  border: 2px solid #56af44;
}

.whatsapp-float:hover img {
  filter: brightness(1) invert(0);
  transform: scale(1.05);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .menu {
    display: none;
  }
  .search-box {
    display: none;
  }
  .hero-content h1 {
    font-size: 2.2rem;
  }
  .hero-content p {
    font-size: 1.1rem;
  }
  .btn-primary, .btn-secondary {
    display: block;
    margin: 10px auto;
  }
  .image-gallery {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
  .footer .container {
    flex-direction: column;
    text-align: center;
  }
  .footer-socials {
    justify-content: center;
    margin-top: 1rem;
  }
  .catalog-category {
    text-align: center;
  }
}

/* === MODAL PARA AMPLIAR IMÁGENES (añadido al CSS) === */
/* Mueve este estilo desde el HTML al CSS si decides externalizarlo */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 20px;
  box-sizing: border-box;
}

.modal-content {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 20px;
  box-sizing: border-box;
}

.modal-content img {
  max-width: 95vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  object-fit: contain;
  animation: fadeIn 0.3s ease;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
  text-shadow: 0 0 10px black;
}

.modal-close:hover {
  color: #bbb;
}

.modal-caption {
  color: white;
  font-size: 1.1rem;
  margin-top: 15px;
  text-align: center;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #56af44;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 1.5rem;
  z-index: 9999;
  animation: fadeOut 0.5s ease forwards;
  animation-delay: 1s;
}

@keyframes fadeOut {
  to { opacity: 0; visibility: hidden; }
}