/* =====================================================
   1. Estilos del overlay y slider de demolición
   ===================================================== */
   .overlay {
    position: fixed;
    top: 0;
    right: -80%;
    width: 80%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: right 0.5s ease;
  }
  .overlay.active {
    right: 0;
  }
  .overlay-content-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .close-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #ccc;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-weight: bold;
    z-index: 2100;
  }
  .close-overlay:hover {
    background: #aaa;
  }
  .dem-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2100;
  }
  .dem-control {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
  }
  .dem-control img {
    width: 48px;
    height: 48px;
    display: block;
  }
  
  /* =====================================================
     2. Contenedor adaptable para la imagen de cabecera
     ===================================================== */
  .image-container {
    width: 100%;
    height: 100vh;
    overflow: hidden;
  }
  .image-container img {
    width: 100% !important;
    height: 100% !important;
    /* Se cambia a 'fill' para que la imagen se estire y llene el contenedor,
       permitiendo deformarla ligeramente para evitar espacios en blanco */
    object-fit: fill !important;
    object-position: center !important;
  }
  
  /* =====================================================
     3. Animación del slider de demolición dentro del overlay
     ===================================================== */
  #demSliderImg {
    position: absolute;
    left: 50%;
    transform: translate(-50%, 100%);
    opacity: 0;
    max-width: 80%;
    max-height: 80%;
    animation: slideInOut 5s ease-in-out forwards;
  }
  @keyframes slideInOut {
    0% {
      transform: translate(-50%, 100%);
      opacity: 0;
    }
    20% {
      transform: translate(-50%, 0);
      opacity: 1;
    }
    80% {
      transform: translate(-50%, 0);
      opacity: 1;
    }
    100% {
      transform: translate(-50%, -100%);
      opacity: 0;
    }
  }
  
  /* =====================================================
     4. Estilos globales y de secciones
     ===================================================== */
  
  /* Global */
  body {
    margin: 0;
    font-family: Arial, sans-serif;
  }
  
  /* Secciones generales: introducción y alternada */
  .section,
  .section-alternate {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px;
  }
  
  /* Contenedor interno común */
  .section-content {
    max-width: 1200px;
    display: flex;
    gap: 50px;
    flex-wrap: wrap;
  }
  
  /* Contenido textual e imagen */
  .text-content {
    flex: 1;
    color: #132032;
  }
  .text-content h2 {
    font-size: 2rem;
    margin-bottom: 20px;
  }
  .text-content p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
  }
  .text-content .cta-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #132032;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1rem;
  }
  .image-content {
    flex: 1;
  }
  .image-content img {
    width: 100%;
    border-radius: 10px;
  }
  
  /* Diferencias visuales entre secciones */
  .section {
    background-color: #f9f9f9;
  }
  .section-alternate {
    background-color: #fff;
  }
  
  /* Desktop: en la sección alternada invertimos el orden */
  @media (min-width: 769px) {
    .section .section-content {
      flex-direction: row;
    }
    .section-alternate .section-content {
      flex-direction: row-reverse;
    }
  }
  
  /* Tablet y Móvil: ambas secciones se apilan verticalmente */
  @media (max-width: 768px) {
    .section,
    .section-alternate {
      padding: 40px 20px;
    }
    .section .section-content,
    .section-alternate .section-content {
      flex-direction: column;
      gap: 30px;
    }
    .text-content h2 {
      font-size: 1.8rem;
    }
    .text-content p,
    .text-content .cta-button {
      font-size: 1rem;
    }
    .text-content .cta-button {
      padding: 8px 18px;
    }
  }
  @media (max-width: 480px) {
    .section,
    .section-alternate {
      padding: 30px 10px;
    }
    .section .section-content,
    .section-alternate .section-content {
      flex-direction: column;
      gap: 20px;
    }
    .text-content h2 {
      font-size: 1.5rem;
    }
    .text-content p {
      font-size: 0.9rem;
    }
    .text-content .cta-button {
      font-size: 0.8rem;
      padding: 6px 15px;
    }
  }
  
  /* =====================================================
     5. Resto de las secciones
     ===================================================== */
  
  /* Imagen Section New */
  .image-section-new {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .image-section-new img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }
  @media (max-width: 768px) {
    .image-section-new img {
      object-fit: contain;
      background-image: url('images/fotoheader01.jpg');
      background-size: cover;
      background-position: center;
    }
  }
  
  /* Features Section */
  .features-section {
    background: linear-gradient(to right, #f9f9f9, #e9e9e9);
    text-align: center;
    padding: 50px 20px;
  }
  .features-section h2 {
    font-size: 2rem;
    margin-bottom: 20px;
  }
  .features-section p {
    font-size: 1rem;
    margin-bottom: 40px;
    color: #666;
  }
  .features {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
  }
  .feature {
    flex: 1;
    max-width: 300px;
    text-align: center;
  }
  .feature img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 20px;
  }
  .feature h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
  }
  .feature p {
    font-size: 0.9rem;
    color: #555;
  }
  @media (max-width: 768px) {
    .features-section h2 {
      font-size: 1.8rem;
    }
    .features {
      gap: 20px;
    }
    .feature {
      flex: 1 1 45%;
      max-width: none;
    }
    .feature h3 {
      font-size: 1.1rem;
    }
  }
  @media (max-width: 480px) {
    .features-section {
      padding: 30px 10px;
    }
    .features-section h2 {
      font-size: 1.5rem;
    }
    .features {
      gap: 15px;
    }
    .feature {
      flex: 1 1 100%;
    }
    .feature h3 {
      font-size: 1rem;
    }
    .feature p {
      font-size: 0.85rem;
    }
  }
  
  /* Testimonials Section */
  .testimonials-section {
    background-color: #f9f9f9;
    padding: 50px 20px;
    text-align: center;
  }
  .testimonials-section h2 {
    font-size: 2rem;
    margin-bottom: 10px;
  }
  .testimonials-section p {
    font-size: 1rem;
    margin-bottom: 40px;
    color: #666;
  }
  .testimonial-slider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
  }
  .testimonial {
    display: none;
    align-items: center;
    gap: 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    max-width: 700px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  .testimonial.active {
    display: flex;
  }
  .testimonial img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
  }
  .testimonial .text {
    text-align: left;
  }
  .testimonial .text p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 10px;
  }
  .testimonial .text .author {
    font-weight: bold;
    font-size: 0.9rem;
    color: #333;
  }
  .controls {
    margin-top: 20px;
    text-align: center;
  }
  .controls button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #132032;
  }
  .controls button:hover {
    color: #000;
  }
  .video-container {
    display: none;
    margin-top: 30px;
    text-align: center;
  }
  .video-container.active {
    display: block;
  }
  .video-container video {
    width: 80%;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  /* Special Services Section */
  .special-services {
    background-color: #f5f5f5;
    padding: 50px 20px;
    text-align: center;
  }
  .special-services h2 {
    font-size: 2rem;
    margin-bottom: 20px;
  }
  .special-services p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 40px;
  }
  .service-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
  }
  .service {
    max-width: 300px;
    padding: 15px;
    border: 2px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s, transform 0.3s;
    /* Fondo por defecto para la mayoría: fc1.jpg */
    background-image: url('images/fc1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }
  .service:hover,
  .service:active {
    background-image: url('images/fc.jpg');
    background-color: transparent;
    border-color: #007bff;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
    transform: scale(1.05);
  }
  /* Para el servicio "Restauration complète" se usa rc1 por defecto y rc en hover */
  .service.restauration {
    background-image: url('images/rc1.jpg');
  }
  .service.restauration:hover,
  .service.restauration:active {
    background-image: url('images/rc.jpg');
  }
  /* Fondo para Désinfection avancée */
  .service.desinfection {
    background-image: url('images/ds1.jpg');
  }
  .service.desinfection:hover,
  .service.desinfection:active {
    background-image: url('images/ds.jpg');
  }
  /* Fondo para Conseil personnalisé */
  .service.conseil {
    background-image: url('images/cn1.jpg');
  }
  .service.conseil:hover,
  .service.conseil:active {
    background-image: url('images/cn.jpg');
  }
    
  /* Ajuste para tablet y móvil: establecer un aspect-ratio fijo para que la altura se ajuste proporcionalmente */
  @media (max-width: 768px) {
    .special-services h2 {
      font-size: 1.8rem;
    }
    .service-list {
      gap: 20px;
    }
    .service {
      max-width: 100%;
      flex: 1 1 100%;
      background-size: 100% 100%;
      aspect-ratio: 4/3;
    }
    .service h3 {
      font-size: 1.1rem;
    }
  }
  @media (max-width: 480px) {
    .special-services {
      padding: 30px 10px;
    }
    .special-services h2 {
      font-size: 1.5rem;
    }
    .service-list {
      gap: 15px;
    }
    .service {
      max-width: 100%;
      flex: 1 1 100%;
      background-size: 100% 100%;
      aspect-ratio: 4/3;
    }
    .service h3 {
      font-size: 1rem;
    }
    .service p {
      font-size: 0.9rem;
    }
  }
    
  /* FAQ Section */
  .faq-section {
    position: relative;
    padding: 50px;
    background: url('images/5_large.jpg') no-repeat center center;
    background-size: cover;
    color: white;
    min-height: 300px;
  }
  @media (max-width: 768px) {
    .faq-section {
      background: url('images/5_medium.jpg') no-repeat center center;
      background-size: cover;
      min-height: 250px;
    }
  }
  @media (max-width: 480px) {
    .faq-section {
      background: url('images/5_small.jpg') no-repeat center center;
      background-size: cover;
      min-height: 200px;
    }
  }
  .faq-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 20px;
  }
  .faq-slider {
    max-width: 700px;
    margin: 0 auto;
    text-align: left;
  }
  .faq-item {
    display: none;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
  }
  .faq-item.active {
    display: block;
  }
  .faq-item h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #fff;
  }
  .faq-item p {
    font-size: 1rem;
    color: #ddd;
    line-height: 1.5;
  }
  .faq-controls {
    text-align: center;
    margin-top: 20px;
  }
  .faq-controls button {
    background-color: #132032;
    border: none;
    padding: 10px 20px;
    margin: 0 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
  }
  .faq-controls button:hover {
    background-color: #ddd;
  }
    
  /* Call to Action Section */
  .cta-section {
    padding: 50px 20px;
    background-color: #f9f9f9;
    text-align: center;
    color: #333;
  }
  .cta-section h2 {
    font-size: 2rem;
    margin-bottom: 20px;
  }
  .cta-section p {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 20px;
  }
    
  /* Contact Section */
  .contact-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 50px 20px;
  }
  .contact-info {
    flex: 1;
    min-width: 300px;
    padding: 20px;
    background-color: #132032;
    color: rgb(172, 137, 25);
    position: relative;
  }
  .contact-info h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
  }
  .contact-info p {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 10px;
  }
  .social-icons {
    position: absolute;
    bottom: 20px;
    display: flex;
    gap: 15px;
  }
  .social-icons a {
    display: inline-block;
    width: 60px;
    height: 60px;
    background-color: #132032;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .social-icons img {
    width: 60%;
    height: 60%;
  }
  .contact-info .social-icons {
    gap: 10px;
    margin-top: 20px;
  }
  .contact-info .social-icons a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
  }
  .contact-info .social-icons a:hover {
    color: #aaa;
  }
  .contact-form {
    flex: 2;
    min-width: 300px;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  .contact-form form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
  }
  .contact-form input,
  .contact-form textarea,
  .contact-form button {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
  }
  .contact-form button {
    background-color: #132032;
    color: rgb(172, 137, 25);
    font-size: 1rem;
    cursor: pointer;
  }
  .contact-form button:hover {
    background-color: #132032;
  }
  @media (max-width: 768px) {
    .contact-info,
    .contact-form {
      flex: 1 1 100%;
    }
    .contact-form input,
    .contact-form textarea,
    .contact-form button {
      font-size: 1rem;
    }
    /* Ajuste para que los íconos se dispongan en línea y puedan envolver si es necesario */
    .contact-info .social-icons {
      position: static !important;
      margin: 20px auto 0;
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 10px;
    }
    .social-icons a {
      width: 50px !important;
      height: 50px !important;
    }
  }
  @media (max-width: 480px) {
    .contact-info h2 {
      font-size: 1.3rem;
    }
    .contact-info p,
    .contact-form input,
    .contact-form textarea,
    .contact-form button {
      font-size: 0.9rem;
    }
    .contact-info .social-icons {
      position: static !important;
      margin: 15px auto 0;
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 10px;
    }
    .social-icons a {
      width: 40px !important;
      height: 40px !important;
    }
  }
    
  /* Footer */
  footer {
    background-color: #132032;
    color: white;
    text-align: center;
    padding: 20px;
  }
  footer p {
    margin: 0;
  }
  /* Works in Progress Section */
.works-in-progress {
  background-color: #f9f9f9;
  padding: 50px 20px;
  text-align: center;
}
.works-in-progress h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}
.works-in-progress p {
  font-size: 1rem;
  margin-bottom: 40px;
  color: #666;
}
.works-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}
.work-item {
  max-width: 300px;
  padding: 15px;
  border: 2px solid #ccc;
  border-radius: 5px;
  text-align: left;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.work-item img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 20px;
}
.work-item h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}
.work-item p {
  font-size: 0.9rem;
  color: #555;
}

@media (max-width: 768px) {
  .works-in-progress h2 {
    font-size: 1.8rem;
  }
  .works-list {
    gap: 20px;
  }
  .work-item {
    max-width: 100%;
    flex: 1 1 100%;
  }
  .work-item h3 {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .works-in-progress {
    padding: 30px 10px;
  }
  .works-in-progress h2 {
    font-size: 1.5rem;
  }
  .works-list {
    gap: 15px;
  }
  .work-item {
    max-width: 100%;
    flex: 1 1 100%;
  }
  .work-item h3 {
    font-size: 1rem;
  }
  .work-item p {
    font-size: 0.85rem;
  }
}