/* Carrusel */
.carousel {
  position: relative;
  width: 100%;
  max-width: 1300px;
  height: 710px;
  overflow: hidden;
  margin: 0 auto;
}

.carousel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.carousel img.active {
  display: block;
}

.carousel-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  padding: 30px;
  z-index: 10;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 10px;
  max-width: 80%;
}

.carousel-text .top-line {
  display: block;
  font-size: 1rem;
  margin-bottom: 10px;
  letter-spacing: 2px;
}

.carousel-text .top-line::before,
.carousel-text .top-line::after {
  content: "";
  display: inline-block;
  width: 60px;
  height: 1px;
  background: white;
  margin: 0 10px;
  vertical-align: middle;
}

.carousel-text h1 {
  font-size: 3rem;
  margin: 10px 0;
  font-weight: bold;
}

.carousel-text p {
  font-size: 1.2rem;
  margin-top: 10px;
}

/* Tarjeta destacada */
.about-section {
  display: flex;
  width: 1100px;
  height: 424px;
  margin: 50px auto;
  background-color: #d84e22;
  overflow: hidden;
}

/* Fondo específico por tarjeta */
.fondo-nosotros .about-text {
  background-image: url("../img/madera.jpg");
}

.fondo-productos .about-text {
  background-image: url("../img/pasto.jpg");
}

.fondo-servicios .about-text {
  background-image: url("../img/Servicios-2.png");
}

.about-text {
  width: 50%;
  background-size: cover;
  background-position: center;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.about-text h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.about-text button {
  background: #d84e22;
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 1rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
}

.about-text button:hover {
  background: #aa3d1a;
}

.about-image {
  width: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px;
  box-sizing: border-box;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-section.reverse {
  flex-direction: row-reverse;
}

/* Testimonios */
.testimonials {
  background: #df532f;
  padding: 40px 0;
  margin: 40px 0;
}

.testimonials-title {
  max-width: 1210px;
  margin: 0 auto 30px;
  padding: 0 20px;
  box-sizing: border-box;
  text-align: center;
  font-size: 2rem;
  color: white;
}

.testimonial-card {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  flex: 0 0 300px; /* No crecer, no encoger, base de 300px */
}

.testimonial-card p {
  font-style: italic;
}

.testimonial-card h4 {
  margin-top: 15px;
  text-align: right;
  font-weight: 700;
  color: #2c3e50;
}

/* Bloques de texto */
.text-blocks {
  max-width: 1210px;
  margin: 40px auto;
  padding: 0 20px;
}

.text-block {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.text-content {
  flex: 1 1 60%;
}

.text-content h3 {
  margin-top: 0;
  font-size: 1.8rem;
  color: #2c3e50;
}

.text-content p {
  font-size: 1rem;
  line-height: 1.6;
  color: #444;
}

.image-container {
  flex: 1 1 30%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-container img {
  max-width: 150px;
  height: auto;
  display: block;
}

/* Contacto */
.contact-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background-color: white;
  padding: 50px 40px;
  gap: 90px;
  font-family: "Segoe UI", sans-serif;
  flex-wrap: wrap;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-info {
  flex: 1;
  max-width: 400px;
  color: #0b2b2d;
}

.contact-info h2 {
  color: #d84e22;
  font-size: 2.2rem;
  margin: 0 0 20px;
}

.contact-info p {
  margin: 18px 0;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #003333;
}

.social-icons {
  margin-top: 30px;
}

.social-icons a {
  margin-right: 10px;
  font-size: 1.6rem;
  color: #000;
  text-decoration: none;
}

.social-icons a:hover {
  color: #d84e22;
}

.contact-form {
  flex: 0.8;
  max-width: 400px;
}

.form-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.form-group {
  flex: 1;
}

.contact-form label {
  display: block;
  margin: 12px 0 5px;
  color: #0b2b2d;
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px;
  font-size: 1rem;
  border-radius: 5px;
  border: 1px solid #d84e22;
  box-sizing: border-box;
}

.contact-form button {
  margin-top: 20px;
  background-color: #d84e22;
  color: white;
  border: none;
  padding: 12px 30px;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.contact-form button:hover {
  background-color: #aa3d1a;
}

/* Tablets y pantallas medianas (≤1024px) */
@media (max-width: 1024px) {
  .carousel {
    height: auto;
    max-height: 500px;
  }

  .carousel-text {
    width: 90%;
    padding: 20px;
    font-size: 0.95rem;
  }

  .carousel-text h1 {
    font-size: 2rem;
    line-height: 1.2;
  }

  .carousel-text p {
    font-size: 1rem;
  }

  .carousel-text .top-line::before,
  .carousel-text .top-line::after {
    width: 30px;
    margin: 0 6px;
  }

  .carousel-text .top-line {
    font-size: 0.9rem;
  }

  .about-section {
    flex-direction: column !important;
    width: 90%;
    height: auto;
    margin: 30px auto;
  }

  .about-text,
  .about-image {
    width: 100%;
    padding: 10px 0;
    margin: 0 0 20px 0;
  }

  .about-image img {
    max-height: 300px;
  }

  .testimonials {
    padding: 20px 0;
  }

  .testimonial-card {
    max-width: 100%;
    flex: 1 1 100%;
  }

  .text-blocks {
    max-width: 90%;
  }

  .text-block {
    flex-direction: column;
    gap: 20px;
  }

  .text-content,
  .image-container {
    flex: 1 1 100%;
    text-align: center;
  }

  .image-container img {
    max-width: 120px;
  }

  .contact-container {
    flex-direction: column;
    gap: 40px;
    max-width: 90%;
    padding: 40px 20px;
  }

  .contact-info,
  .contact-form {
    max-width: 100%;
    flex: none;
  }

  .contact-info h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
  }
}

/* Teléfonos (≤768px) */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  nav {
    width: 100%;
  }

  nav ul {
    flex-direction: column;
    width: 100%;
    background-color: #d84e22;
  }

  nav ul li {
    width: 100%;
  }

  nav ul li a {
    padding: 15px 20px;
  }
}

/* Móviles pequeños (≤425px) */
@media (max-width: 425px) {
  .carousel-text {
    padding: 15px;
    font-size: 0.85rem;
  }

  .carousel-text h1 {
    font-size: 1.6rem;
  }

  .about-section {
    margin: 20px 10px;
  }

  .about-text h2 {
    font-size: 1.5rem;
  }

  .testimonial-card {
    max-width: 100%;
    padding: 15px;
  }

  .contact-container {
    padding: 20px 10px;
  }
}
