/* ================================
1. Reset y estilo base global
=================================== */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* ================================
Botones - Estilo base
=================================== */
button,
.btn-contact,
.btn-contact:hover,
.call-now-link,
.whatsapp-btn,
.lang-btn,
.plus-d-info,
.modal-exit-btn {
  font-family: inherit;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  text-align: center;
  display: inline-block;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body,
html {
  font-family: Arial, sans-serif;
  line-height: 1.5;
  background: #fff;
  color: #222;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ================================
/* ================================
   1. Estilo del HEADER (contenedor)
   ================================ */
header {
  background-color: white;
  width: 100%;
  border-bottom: 2px solid #FF6600;
  padding: 0.5rem 1rem;               /* Padding más compacto */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;                       /* Espacio entre elementos */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ================================
   2. Botones de navegación (dentro de <nav>) - AJUSTE AUTOMÁTICO
   ================================ */
nav {
  display: flex;
  flex-wrap: wrap;                    /* Permite que los botones se envuelvan si no caben */
  gap: 0.25rem;                       /* Espacio entre botones */
  align-items: center;
  justify-content: center;
  max-width: 60%;                     /* Limita el ancho del menú de navegación */
}

nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.4rem;            /* Padding mínimo */
  background-color: #f8f9fa;
  color: #1E3A8A;
  text-decoration: none;
  border: 1px solid #ddd;
  border-radius: 4px;                /* Bordes redondeados más pequeños */
  font-weight: 500;
  font-size: 0.7rem;                 /* Tamaño de fuente más pequeño */
  transition: all 0.3s ease;
  white-space: nowrap;
  min-height: 1.6rem;                 /* Altura mínima consistente */
  
  /* Ajuste automático al contenido */
  width: fit-content;
  flex-shrink: 0;                    /* No se encoge en pantallas pequeñas */
}

nav a:hover {
  background-color: #1E3A8A;
  color: white;
  border-color: #1E3A8A;
  transform: translateY(-1px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

nav a.active {
  background-color: #FF6600;
  color: white;
  border-color: #FF6600;
}

/* ================================
   3. Botones de idioma - AJUSTE AUTOMÁTICO
   ================================ */
.language-buttons {
  display: flex;
  gap: 0.25rem;                      /* Espacio muy reducido entre idiomas */
  align-items: center;
  flex-shrink: 0;                    /* No se encoge */
}

.lang-btn {
  background-color: #4B5563;
  color: white;
  border: none;
  padding: 0.15rem 0.3rem;           /* Padding extremadamente reducido */
  font-size: 0.6rem;                 /* Fuente muy pequeña */
  border-radius: 3px;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  min-height: 1.4rem;                /* Altura mínima */
  
  /* Ajuste automático al contenido */
  width: fit-content;
}

.lang-btn:hover,
.lang-btn:focus {
  background-color: #374151;
  transform: translateY(-1px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}


.plus-d-info {
  background-color: #bfdbfe; /* azul claro (Tailwind bg-blue-200) */
  color: #1e3a8a;            /* azul oscuro para el texto */
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  transition: background-color 0.3s;
}

.plus-d-info:hover {
  background-color: #93c5fd; /* azul un poco más fuerte al pasar el mouse */
}

/* ================================
   4. Botón WhatsApp - AJUSTE AUTOMÁTICO
   ================================ */
.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;                      /* Espacio entre ícono y texto */
  background-color: #25D366;         /* Color verde WhatsApp */
  color: white;
  padding: 0.2rem 0.4rem;            /* Padding ajustado */
  font-size: 0.7rem;
  border-radius: 12px;               /* Bordes redondeados estilo WhatsApp */
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: nowrap;
  min-height: 1.6rem;
  
  /* Ajuste automático al contenido */
  width: fit-content;
  flex-shrink: 0;
}

.whatsapp-btn:hover {
  background-color: #128C7E;         /* Verde más oscuro */
  transform: translateY(-1px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ================================
   5. Logo container
   ================================ */
.logo-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;                       /* Espacio reducido */
  flex-shrink: 0;                    /* No se encoge */
}

.logo {
  height: 2rem;                      /* Altura fija reducida */
  width: auto;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.logo h1 {
  margin: 0;
  font-size: 1rem;                   /* Tamaño reducido */
  font-weight: bold;
  color: #1E3A8A;
  white-space: nowrap;
}

/* ================================
   6. Responsive - Menú móvil
   ================================ */
@media (max-width: 768px) {
  header {
    padding: 0.4rem 0.6rem;
    flex-wrap: wrap;
  }
  
  nav {
    display: none;                   /* Oculto en móvil */
    width: 100%;
    order: 3;                        /* Se mueve al final */
    max-width: 100%;
  }
  
  .menu-toggle {
    display: block;
  }
  
  /* En móvil, los botones de idioma y WhatsApp se agrupan */
  .header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
  }
}

/* Para pantallas muy pequeñas */
@media (max-width: 480px) {
  header {
    padding: 0.3rem 0.4rem;
    gap: 0.3rem;
  }
  
  .logo h1 {
    font-size: 0.8rem;
  }
  
  nav a {
    font-size: 0.6rem;
    padding: 0.1rem 0.3rem;
  }
}

/* ================================
   4. Responsive - Menú móvil
   ================================ */
@media (max-width: 768px) {
  header nav {
    display: none;                      /* Oculta navegación desktop */
  }
  
  .menu-toggle {                        /* Botón hamburguesa */
    display: block;                     /* Muestra en móvil */
  }
  
  header {
    padding: 0.6rem 0.8rem;             /* Padding aún más compacto */
  }
}
/* ================================
10. Contenedores generales
=================================== */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
}
#contenedor-servicios {
  max-width: 700px;
  margin: 10px auto;
}

/* ================================
11. Texto destacado
=================================== */
.highlight-orange {
  color: #FF6600;
  font-weight: bold;
}

/* ================================
12. Contenido principal (main)
=================================== */
main.main-content {
  padding-left: 0; /* Cambiado de 256px a 0 */
  padding-top: 112px;
  padding-right: 20px;
  padding-bottom: 20px;
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: flex-start;
  justify-content: flex-start;
}

@media (max-width: 768px) {
  main.main-content {
    margin-left: 0;
    padding: 1rem;
    flex-direction: column;
    gap: 20px;
  }

  .llamar-btn,
  .discover-btn,
  .savoir-plus-btn,
  .call-now-link,
  .whatsapp-btn {
    display: block;
    width: 100%;
    margin: 10px 0;
    padding: 14px;
    font-size: 16px;
    text-align: center;
    border-radius: 6px;
  }
  .telefono {
    font-size: 1.2rem;
  }
  .ad-image-wrapper img,
  .emergency-img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }
  .emergency-details ul {
    list-style: disc inside;
    padding-left: 0;
  }
  .emergency-card .tel {
    margin-top: 10px;
  }
}

/* ================================
13. Servicios en pareja
=================================== */
.pareja-servicios {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 60px;
}
.servicio-izq,
.servicio-der {
  width: calc(50% - 20px);
  box-sizing: border-box;
}
.servicio-izq h2,
.servicio-der h2 {
  margin-top: 0;
  margin-bottom: 8px;
}
.service-entry img,
.servicio-izq img,
.servicio-der img {
  width: 100%;
  max-width: 300px;
  height: auto;
  object-fit: cover;
  display: block;
  margin-bottom: 10px;
}
.service-entry h2,
.service-entry h3 {
  font-size: 1.5rem;
  color: #1E3A8A;
  margin-bottom: 10px;
}
.service-entry p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 10px;
}

@media (max-width: 768px) {
  .pareja-servicios {
    flex-direction: column;
  }
  .servicio-izq,
  .servicio-der {
    width: 100%;
    margin-bottom: 20px;
  }
}

/* ================================
18. Carrusel de imágenes
=================================== */
.carousel {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 20px auto;
  overflow: hidden;
  border-radius: 6px;
}
.carousel-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: none;
}
.carousel-image.active {
  display: block;
}
.prev,
.next {
  position: absolute;
  top: 50%;
  font-size: 24px;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
}
.prev {
  left: 10px;
}
.next {
  right: 10px;
}

/* ================================
19. Footer
=================================== */
.footer {
  background-color: #000;
  color: white;
  padding: 1rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center; /* Cambiado a centro para mejor simetría */
  width: 100vw; /* Ocupa todo el ancho de la ventana */
  left: 0; /* Asegura que empiece desde el borde izquierdo */
  right: 0; /* Asegura que llegue al borde derecho */
  position: relative; /* Puedes usar `fixed` si necesitas que esté siempre visible */
  margin-left: 0; /* Elimina margen izquierdo */
}

/* Elimina o ajusta el ::before para que coincida con el nuevo ancho */
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 100%; /* Ahora ocupa el ancho completo del footer */
  background: linear-gradient(to right, #FF6600, #FACC15);
}
.footer h4 {
  color: #FF6600;
  font-weight: bold;
  margin-bottom: 1rem;
}
.footer a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}
.footer a:hover {
  color: #eab308;
}
.footer ul {
  list-style: none;
  padding: 0;
}
.footer ul li {
  margin-bottom: 0.5rem;
}
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 100%;
  background: linear-gradient(to right, #FF6600, #FACC15);
}
.telefono {
  font-size: 1.1rem;
  color: white;
  font-weight: bold;
  margin-right: 8px;
}

/* Responsive para móviles */
@media (max-width: 768px) {
  .footer {
    margin-left: 0;
    width: 100%;
    padding: 2rem 1rem;
    text-align: center;
  }
}
/* Estilo para "Appeler maintenant", "Llamar ahora", etc. */
.call-now-link {
  color:  #10B981 !important; /* Azul oscuro */
  text-decoration: underline !important;
  text-underline-offset: 4px !important;
  transition: color 0.3s ease !important;
}
.call-now-link:hover {
  color: #1B3C70 !important;
}


/* Estilo para el botón de WhatsApp */
.whatsapp-btn {
  color: #10B981;
  text-decoration: none;
  border-bottom: 1px dashed #10B981;
  transition: all 0.3s ease;
}
.whatsapp-btn:hover {
  color: #059669;
  border-color: #059669;
}

/* Estilo general para el botón de retorno */
.back-to-top-btn {
  display: none; /* Oculto por defecto */
  transition: all 0.3s ease;
  font-size: 0.8rem;
}

/* Ajuste para móviles */
@media (max-width: 768px) {
  .back-to-top-btn {
    display: block !important; /* Siempre visible en móvil */
    bottom: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    padding: 0;
    background-color: #F3F4F6 !important; /* Gris claro */
    color: #4B5563 !important; /* Gris oscuro */
    text-align: center;
    font-weight: bold;
  }
  .back-to-top-btn a {
    justify-content: center;
    height: 100%;
  }
}

/* Botón de minimizar */
.chatbot-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #4F46E5;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
}

/* ================================
   Styles pour les Pages de Service Individuelles
   ================================ */

/* Conteneur principal de la page de service */
.service-page .container {
    max-width: 1200px; /* Peut être un peu plus large que le container général si besoin */
    padding: 20px;
    margin: 0 auto;
}

/* Titre principal de la page */
.service-page h1 {
    font-size: 2.2rem;
    color: #1E3A8A; /* Couleur principale du header */
    margin-bottom: 10px;
    text-align: center; /* Centrer le titre principal */
}

/* Texte mis en avant sous le titre */
.service-page .highlight-orange {
    font-size: 1.2rem;
    color: #FF6600; /* Couleur orange */
    font-weight: bold;
    text-align: center; /* Centrer le texte d'accroche */
    margin-bottom: 30px;
}

/* Section détaillant le service */
.service-detail {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

/* Sous-titres des sections (h2) */
.service-detail h2 {
    font-size: 1.6rem;
    color: #1E3A8A;
    margin-top: 30px; /* Espace généreux au-dessus */
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #eee;
}

/* Premier h2 après le texte d'accroche */
.service-detail > h2:first-of-type {
    margin-top: 10px; /* Moins d'espace avant le premier bloc de contenu */
}

/* Sous-sous-titres (h3) */
.service-detail h3 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-top: 25px;
    margin-bottom: 12px;
}

/* Paragraphes */
.service-detail p {
    font-size: 1rem;
    line-height: 1.7;
    color: #444;
    margin-bottom: 15px;
}

/* Listes non ordonnées */
.service-detail ul {
    list-style-type: disc;
    padding-left: 25px;
    margin-bottom: 20px;
}

/* Éléments de liste */
.service-detail li {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* Mise en évidence dans le texte */
.service-detail strong {
    color: #1E3A8A;
    font-weight: 600;
}

.service-detail em {
    color: #e67e22; /* Optionnel: une couleur pour l'italique */
}

/* --- Styles pour les Images du Service --- */

/* Image dans le texte (hors carrousel) */
.service-detail img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 20px auto; /* Centrer l'image et ajouter de l'espace */
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* --- Styles pour le Carrousel --- */
/* Ces styles s'ajoutent à ceux déjà présents dans votre CSS */

/* Conteneur du carrousel - Centrer et définir une largeur max */
.service-detail .carousel {
    max-width: 900px; /* Ajustez selon vos besoins */
    margin: 30px auto; /* Centrer le carrousel et ajouter de l'espace vertical */
    border-radius: 10px; /* Bordures arrondies pour le carrousel */
    overflow: hidden; /* Cacher les parties débordantes des images */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* Ombre plus marquée */
    position: relative; /* Nécessaire pour le positionnement absolu des boutons */
}

/* Images du carrousel */
.service-detail .carousel-image {
    width: 100%;
    /* Hauteur fixe pour uniformiser le carrousel */
    height: 450px; /* Ajustez cette valeur selon vos images */
    object-fit: cover; /* Remplir le conteneur sans déformation */
    display: none; /* Caché par défaut */
    border-radius: 0; /* Enlever le border-radius des images individuelles si le conteneur l'a */
}

/* Image active */
.service-detail .carousel-image.active {
    display: block;
}

/* --- Section CTA (Call to Action) --- */

/* Section CTA */
.cta-section {
    background-color: #f8f9fa; /* Fond gris clair */
    border-left: 5px solid #FF6600; /* Bordure gauche orange */
    padding: 30px;
    margin: 40px 0;
    border-radius: 0 8px 8px 0; /* Bordures arrondies sauf à gauche */
    text-align: center; /* Centrer le texte à l'intérieur */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Titre de la section CTA */
.cta-section h3 {
    font-size: 1.5rem;
    color: #1E3A8A;
    margin-bottom: 15px;
}

/* Paragraphe de la section CTA */
.cta-section p {
    font-size: 1rem;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Informations de contact dans la CTA */
.cta-section .contact-info {
    margin-top: 20px;
}

/* Numéro de téléphone */
.cta-section .tel {
    font-size: 1.4rem;
    font-weight: bold;
    color: #1E3A8A;
    margin-bottom: 15px;
}

/* Lien WhatsApp dans la CTA */
.cta-section .whatsapp-btn {
    /* Utilise les styles globaux de .whatsapp-btn */
    /* Vous pouvez spécifier des styles supplémentaires ici si nécessaire */
    margin: 10px 5px;
    display: inline-flex; /* Pour un alignement centré avec le bouton email */
    align-items: center;
    justify-content: center;
}

/* Lien Email dans la CTA */
.cta-section .btn-contact {
    /* Utilise les styles globaux de .btn-contact */
    /* Vous pouvez spécifier des styles supplémentaires ici si nécessaire */
    margin: 10px 5px;
    display: inline-flex; /* Pour un alignement centré avec le bouton WhatsApp */
    align-items: center;
    justify-content: center;
}

/* --- Fil d'Ariane (Breadcrumb) --- */
/* Si vous l'ajoutez à vos pages de service */
.breadcrumb {
    margin-bottom: 20px;
    font-size: 0.9rem;
}
.breadcrumb a {
    color: #1E3A8A;
    text-decoration: none;
}
.breadcrumb a:hover {
    text-decoration: underline;
}
.breadcrumb span { /* Pour le séparateur '>' */
    color: #7f8c8d;
    margin: 0 8px;
}


/* --- Responsive --- */
@media (max-width: 768px) {
    .service-page h1 {
        font-size: 1.8rem;
    }
    .service-page .highlight-orange {
        font-size: 1rem;
    }
    .service-detail {
        padding: 20px 15px;
    }
    .service-detail h2 {
        font-size: 1.4rem;
    }
    .service-detail h3 {
        font-size: 1.2rem;
    }
    .service-detail .carousel {
        margin: 20px auto;
    }
    .service-detail .carousel-image {
        height: 250px; /* Hauteur réduite sur mobile */
    }
    .cta-section {
        padding: 20px 15px;
    }
    .cta-section h3 {
        font-size: 1.3rem;
    }
    .cta-section .tel {
        font-size: 1.2rem;
    }
    /* Centrer les boutons CTA sur mobile */
    .cta-section .whatsapp-btn,
    .cta-section .btn-contact {
        width: 100%;
        margin: 10px 0;
        justify-content: center; /* Centrer le texte et l'icône */
    }
}
