/* ===========================
   RESET GENERAL Y TIPOGRAFÍA
   =========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  color: #333;
  line-height: 1.6;
  background-color: #fff;
}

/* ======================
   ENCABEZADO Y NAVEGACIÓN
   ====================== */
.encabezado {
  background-color: #2e7d32;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.logo {
  height: 120px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

nav a:hover {
  text-decoration: underline;
}

/* =========================
   HERO PRINCIPAL CON FONDO
   ========================= */
.hero {
  background: url('../images/fondo.jpg') center/cover no-repeat;
  color: white;
  text-align: center;
  padding: 100px 20px;
}

.hero h1 {
  font-size: 3em;
  margin-bottom: 20px;
}

/* ====================
   SECCIONES GENERALES
   ==================== */
section {
  padding: 60px 20px;
  text-align: center;
}

/* ===================
   GALERÍA DE SERVICIOS
   =================== */
.galeria {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
}

.card {
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  max-width: 300px;
  transition: transform 0.3s ease;
}

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

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

.card p {
  padding: 15px;
  font-size: 1.1em;
  color: #444;
}

/* =====================
   SECCIÓN DE TESTIMONIOS
   ===================== */
.testimonios {
  background: #e8f5e9;
}

.testimonios h2 {
  font-size: 2em;
  color: #2e7d32;
  margin-bottom: 40px;
}

.slider {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  overflow: hidden;
  height: 160px;
}

.slide {
  display: none;
  opacity: 0;
  transition: opacity 1s ease;
}

.slide.activo {
  display: block;
  opacity: 1;
}

.slide p {
  font-size: 1.2em;
  color: #444;
  margin-bottom: 10px;
}

.slide h4 {
  color: #2e7d32;
  font-weight: bold;
}

/* ================================
   FORMULARIO DE CONTACTO ESTILIZADO
   ================================ */
.contacto {
  background-color: #f1f8e9;
  padding: 60px 20px;
  text-align: center;
}

.contacto h2 {
  font-size: 2em;
  margin-bottom: 30px;
  color: #2e7d32;
}

.contacto form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contacto input,
.contacto textarea {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1em;
  width: 100%;
  box-sizing: border-box;
}

.contacto textarea {
  resize: vertical;
}

.contacto button {
  background-color: #2e7d32;
  color: white;
  border: none;
  padding: 12px;
  font-size: 1em;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.contacto button:hover {
  background-color: #1b5e20;
}


/* ======= SLIDER ANTES Y DESPUÉS (ajustado) ======= */
.antes-despues {
  padding: 60px 20px;
  text-align: center;
  background-color: #f9f9f9;
}

.comparador {
  position: relative;
  width: 100%;
  max-width: 700px;
  margin: auto;
  aspect-ratio: 16 / 9; /* relación visual moderna */
  overflow: hidden;
  border-radius: 10px;
}

.comparador .imagen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.imagen img {
  width: 100%;
  height: auto;
  object-fit: cover; /* Recorta sin distorsionar */
}

.imagen-despues {
  clip-path: inset(0 90% 0 0); /* Empieza con 50% visible */
  z-index: 2;
}

.slider {
  position: relative;
  z-index: 3;
  width: 100%;
  margin-top: 20px;
}




/* ==========================
   DATOS DE CONTACTO (TARJETA)
   ========================== */
.datos-contacto {
  background-color: #e8f5e9;
  padding: 40px 20px;
  text-align: center;
}

.datos-contacto h2 {
  font-size: 2em;
  margin-bottom: 20px;
  color: #2e7d32;
}

.datos-contacto ul {
  list-style: none;
  padding: 0;
}

.datos-contacto li {
  font-size: 1.1em;
  margin-bottom: 10px;
  color: #444;
}
/* ======= BOTONES FLOTANTES DE REDES SOCIALES ======= */
.social-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 999; /* Asegura que queden sobre todo */
}

.social-btn {
  width: 50px;
  height: 50px;
  background-color: white;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.social-btn:hover {
  transform: scale(1.1);
}

.social-btn img {
  width: 28px;
  height: 28px;
}

/* ======= CARRUSEL BEFORE & AFTER ======= */
.before-after-carousel {
  background-color: #f4f4f4;
  padding: 60px 20px;
  text-align: center;
}

.before-after-carousel h2 {
  font-size: 2em;
  color: #2e7d32;
  margin-bottom: 30px;
}

.slider-ba {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  overflow: hidden;
  height: auto;
}

.ba-slide {
  display: none;
  transition: opacity 0.5s ease;
}

.ba-slide.active {
  display: block;
}

.ba-slide img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
}

/* ======= GALLERY SLIDER STYLES ======= */
.gallery-carousel {
  padding: 60px 20px;
  background-color: #f4f4f4;
  text-align: center;
}

.gallery-carousel h2 {
  font-size: 2em;
  color: #2e7d32;
  margin-bottom: 30px;
}

.gallery-slider {
  position: relative;
  max-width: 800px;
  margin: auto;
  overflow: hidden;
  border-radius: 10px;
}

.gallery-slide {
  display: none;
}

.gallery-slide.active {
  display: block;
}

.gallery-slide img {
  width: 80%;
  max-width: 600px;
  height: 500px;
  display: block;
  margin: 0 auto;
  border-radius: 10px;
  object-fit: cover;
}

/* ======= TESTIMONIAL SLIDER STYLES ======= */
.testimonios {
  background-color: #f9f9f9;
  padding: 60px 20px;
  text-align: center;
}

.testimonios h2 {
  font-size: 2em;
  color: #2e7d32;
  margin-bottom: 30px;
}

.slider {
  max-width: 700px;
  margin: auto;
  overflow: hidden;
  position: relative;
}

.slide {
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  padding: 20px;
}

.slide.active {
  display: block;
  opacity: 1;
}

.slide p {
  font-size: 1.2em;
  color: #333;
}

.slide h4 {
  color: #2e7d32;
  margin-top: 10px;
}
