/* ====== VARIABLES DE BOOTSTRAP PERSONALIZADAS ====== */
:root {
    /* Fondo y texto general  --bs-body-bg: #f4f4f2; */
    --bs-body-bg: #f4f4f2;
    --bs-body-color: #333333;

    /* Paleta personalizada */
    --bs-primary: #8b5e3c;
    /* Marrón suave */
    --bs-secondary: #a98467;
    /* Marrón claro */
    --bs-success: #7a9e7e;
    /* Verde natural */
    --bs-info: #c2d3c0;
    /* Verde grisáceo */
    --bs-light: #f6f3ee;
    /*    --bs-light: #f6f3ee;
*/
    --bs-dark: #2f2f2f;

    /* Opcional: bordes y links */
    --bs-border-color: #ddd;
    --bs-link-color: var(--bs-primary);
    --bs-link-hover-color: #6f472f;
}

/* ====== Personalización visual adicional ====== */

/* Scroll suave y offset para navbar fijo */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* Fondo del body */
body {
    padding-top: 56px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    background-color: var(--bs-light);
    color: var(--bs-body-color);
}

/* Recorta overflow horizontal de animaciones AOS (slide-left/right) */
body {
    overflow-x: hidden;
}

@supports (overflow-x: clip) {
    body {
        overflow-x: clip;
    }
}

/* Contenedor principal: recorte adicional para secciones animadas */
#main-content {
    overflow-x: hidden;
}

@supports (overflow-x: clip) {
    #main-content {
        overflow-x: clip;
    }
}

/* Botones personalizados */
.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.btn-primary:hover {
    background-color: var(--bs-info) !important;
    border-color: #6f472f;
    color: #6f472f;
}

.btn-outline-primary:hover {
    background-color: var(--bs-info) !important;
    border-color: #6f472f;
    color: #6f472f !important;
}

.btn-primary:focus,
.btn-primary:active:focus {
    background-color: #6f472f;
    border-color: #6f472f;
    color: #fff !important;
}


.btn-success {
    background-color: var(--bs-success);
    border-color: var(--bs-success);
}

.btn-success:hover {
    background-color: #648a68;
    border-color: #648a68;
}

.btn-outline-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff !important;
}

.btn-outline-primary:hover {
    background-color: var(--bs-info) !important;
    border-color: #6f472f;
    color: #6f472f;
}

.btn-outline-primary:focus,
.btn-outline-primary:active:focus {
    background-color: #6f472f;
    border-color: #6f472f;
    color: #fff !important;
}

.text-primary {
    color: var(--bs-primary) !important;
}

/* Header y navbar: z-index alto para visibilidad durante animaciones AOS */
.Header {
    position: relative;
    z-index: 1060;
}

.navbar.fixed-top {
    z-index: 1060 !important;
}

.navbar {
    background-color: var(--bs-secondary) !important;
    /* 92% opacidad del marrón secundario (#a98467) */
}

.navbar #jarronblanco {
    object-fit: contain !important;
    width: 2.9rem !important;
    margin-top: 0.4rem !important;
}

.navbar #balora-letras-blanco {
    object-fit: contain !important;
    width: 6.8rem !important;
}

.navbar a.nav-link,
.navbar-brand {
    color: #fff !important;
}

.navbar a.nav-link:hover {
    color: var(--bs-info) !important;
}

/* Botón de cambio de idioma */
.lang-toggle {
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    color: #fff !important;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 0.4rem 0.6rem !important;
    min-width: 45px;
    transition: all 0.2s ease;
    border-radius: 0.375rem;
    margin-right: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.lang-toggle .lang-flag-img {
    width: 20px;
    height: 15px;
    object-fit: cover;
    display: block;
    border-radius: 2px;
}

.lang-toggle:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
    color: #fff !important;
    transform: translateY(-1px);
}

.lang-toggle:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
    color: #fff !important;
}

/* Ajuste para móvil - se movió a la sección de Media Queries */

/* HERO/ASIDE*/

.hero-placeholder {
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, .15)), url(../imagenes/hero-nosotros/heroBaloOfic.webp) center/cover no-repeat;
    color: #fff;
    text-align: center;

}

/* Espaciado principal */

main {
    padding-top: 2rem;
    padding-bottom: 4rem;
}

#wpp {
    z-index: 1000;
    width: 45px;
    height: 45px;
    position: fixed;
    bottom: 40px;
    right: 5%;
    transition: .3s ease;
}

#wpp:hover {
    transform: translateY(-4px);
}


/* Cards y secciones */
.card {
    background-color: #fff;
    border: 1px solid #eaeaea;
    border-radius: 0.75rem;
}

/*    <!-- SECCIÓN 1: NOSOTROS -->*/

/*    <!-- SECCIÓN 2: TRATAMIENTOS -->*/

#services {
    margin-top: 5rem;
}

.treatment-card {
    transition: transform .18s ease, box-shadow .18s ease;
    min-height: 300px;
    max-height: 520px;
    height: 480px;

}

@media (hover: hover) {
    .treatment-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    }
}

/* Control de altura de imágenes en cards de servicios */
.treatment-card .card-img-top {
    max-height: 320px;
    width: 100%;
    object-fit: fill;
    object-position: bottom;
}

/* Modal imagen responsiva */
.modal-img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* ==== SECCIÓN 3: EXILIS ==== */

#exilis {
    padding-top: 0 !important;
    margin-top: 0 !important;
    background-color: var(--bs-light) !important;
}



.before-after {
    width: 100%;
    aspect-ratio: 1 / 1;
    /* cuadrado perfecto, se ajusta bien en grillas */
    object-fit: cover;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.before-after:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Espaciado general de la grilla */
.before-after-grid {
    justify-content: center;
}

/* ==== SECCIÓN 4: EQUIPO ==== */

.team-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
}

.team-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.team-photo {
    width: 90%;
    /* tamaño del círculo */
    height: 50vh;
    object-fit: cover;
    /* recorte natural sin distorsión */
    border-radius: 5%;
    /* forma circular */
    margin: 0 auto;
    /* centra la imagen */
    display: block;
    /* asegura centrado vertical */
    box-shadow: 0 0 0 4px #f8f9fa, 0 4px 12px rgba(0, 0, 0, 0.1);
    /* borde elegante */
}

.img-derecha {
    object-position: right;
}

.img-abajo {
    object-position: bottom;
}

/* ==== SECCIÓN 5: FAQ ==== */

#faq .accordion-button {
    background-color: #fff;
    color: #333;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

#faq .accordion-button:not(.collapsed) {
    background-color: var(--bs-secondary) !important;
    color: #fff !important;
    box-shadow: none;
}

#faq .accordion-item {
    border-radius: 0.5rem;

}

#faq .accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
    box-shadow: 0 0 0 0.25rem var(--bs-success) !important;


}

/* ==== SECCIÓN 7: CONTACTO ==== */

#contacto h4 {
    color: black;
}

#contacto a:hover {
    color: white;
    text-decoration: none;
}

#contacto iframe {
    filter: grayscale(20%) brightness(95%);
    transition: filter 0.4s ease;
}

#contacto iframe:hover {
    filter: grayscale(0%) brightness(100%);
}

/* Formulario de contacto */
.contact-form-wrapper {
    border: 1px solid var(--bs-border-color);
}

.contact-form .form-control,
.contact-form .form-select {
    border-radius: 0.5rem;
    border-color: var(--bs-border-color);
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(139, 94, 60, 0.2);
}

.contact-form .form-label {
    font-weight: 500;
    color: var(--bs-dark);
}

.contact-form #formSubmitBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: var(--bs-secondary) !important;
}

.contact-form .form-text {
    font-size: 0.8rem;
    color: var(--bs-secondary);
}

/* Textarea consulta: tamaño fijo, sin redimensionar */
.contact-form .form-textarea-fixed {
    resize: none;
    min-height: 5.5rem;
}

/* Desplegable personalizado de tratamientos */
.custom-select-wrapper {
    position: relative;
    overflow: visible;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.custom-select-trigger:hover {
    border-color: var(--bs-primary);
}

.custom-select-trigger[aria-expanded="true"] {
    border-color: var(--bs-primary);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.custom-select-trigger .custom-select-value {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-value:empty::before {
    content: attr(data-placeholder);
    color: #6c757d;
}

.custom-select-arrow {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.custom-select-trigger[aria-expanded="true"] .custom-select-arrow {
    transform: rotate(180deg);
}

/* Lista de opciones: oculta por defecto, 5 visibles + scroll cuando abre */
.custom-select-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    background: #fff;
    border: 1px solid var(--bs-border-color);
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.custom-select-options.is-open {
    display: block;
    max-height: 12.5rem; /* ~5 opciones x 2.5rem */
    overflow-y: auto;
}

.custom-select-options li {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.custom-select-options li:hover,
.custom-select-options li:focus {
    background: var(--bs-info);
    outline: none;
}

.custom-select-options li[aria-selected="true"] {
    background: rgba(139, 94, 60, 0.1);
}

@media (max-width: 991px) {
    .contact-row .order-1 {
        order: 1;
    }
    .contact-row .order-2 {
        order: 2;
    }
}

/* Footer */

footer {
    background-color: var(--bs-secondary);
    color: #fff;
    font-size: 0.95rem;
    padding-bottom: 1rem;
}


footer #logoCompleto {
    object-fit: contain;
    max-width: 65%;
    margin-top: 0.5rem;

}

footer a {
    color: #fff;
}

footer a:hover {

    color: var(--bs-info);
    text-decoration: none;
}

.bi-instagram {
    font-size: 2rem;
    color: #fff;
    border: none;
    transition: transform 0.5s ease;
    display: inline-block;
}

/* Animación de movimiento leve en hover */
footer .btn-outline-secondary:hover .bi-instagram,
footer a.btn-outline-secondary:hover .bi-instagram,
footer a:hover .bi-instagram {
    transform: translateY(-3px) !important;
    color: var(--bs-info);
}

footer .btn-outline-secondary {
    border: none;
    color: #fff;
    background-color: transparent !important;
}

footer .btn-outline-secondary:hover {
    background-color: transparent !important;
}


/* ===========================
   Media Queries / Responsividad
   Orden: max-width de mayor a menor, luego min-width (desktop)
   =========================== */

/* 1. Desktop pequeño / Tablet grande (1200px) */


/* 2. Tablet y móvil (992px): navbar colapsado + carruseles */
@media (max-width: 991px) {

    /* ----- Navbar responsive ----- */
    .navbar .container-fluid {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
    }

    .lang-toggle {
        margin-right: 0.5rem;
        margin-left: auto;
        order: 2;
    }

    .navbar-toggler {
        order: 3;
    }

    .navbar-collapse {
        order: 4;
        width: 100%;
        flex-basis: 100%;
    }

    /* ----- Services: scroll snap carousel ----- */
    .services-responsive {
        margin-left: 0;
        margin-right: 0;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        display: flex !important;
        flex-wrap: nowrap;
        gap: 0.5rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-top: 0.5rem;
        padding-bottom: 0.75rem;
        scrollbar-width: none;
    }

    /* ocultar scrollbar Webkit */
    .services-responsive::-webkit-scrollbar {
        display: none;
    }

    /* Cada item (col) funciona como slide - ancho reducido en tablet */
    .services-responsive>.col {
        flex: 0 0 min(85%, 360px);
        max-width: min(85%, 360px);
        scroll-snap-align: start;
        /* snap al inicio del slide */
        box-sizing: border-box;
        padding-left: 0.2rem;
        /* compensar gutter */
        padding-right: 0.2rem;
    }

    /* Asegurarnos que la card ocupe 100% del slide */
    .services-responsive>.col .card {
        width: 100%;
        height: 100%;
    }

    /* Opcional: un poco de padding inferior para no pisar el footer en móviles */
    .services-responsive+.services-mobile-ui {
        margin-top: 0.25rem;
    }

    /* ---------------------------
     Mobile UI: flechas y dots (visuales)
     --------------------------- */
    .services-mobile-ui {
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        margin-top: 0.5rem;
        gap: 1rem;
    }

    /* Dots */
    .carousel-dots {
        display: flex;
        gap: .5rem;
        align-items: center;
    }

    .carousel-dots span {
        width: 10px;
        height: 10px;
        background: #d0d0d0;
        border-radius: 50%;
        display: inline-block;
        transition: background 0.2s ease, transform 0.2s ease;
        cursor: pointer;
    }

    .carousel-dots span.active {
        background: var(--bs-primary);
        transform: scale(1.2);
    }

    /* Pequeña mejora visual: sombra al hacer scroll (opcional) */
    .services-responsive:active .card,
    .services-responsive:focus-within .card {
        transition: box-shadow .18s ease;
    }

}

/* 3. Tablet pequeño / Mobile grande (770px) */
@media (max-width: 770px) {
    .treatment-card .card-img-top {
        height: 250px;
        max-height: 250px;
        object-position: bottom;
    }
}

/* 3b. Tablet (768-991px): altura de imagen reducida */
@media (min-width: 577px) and (max-width: 991px) {
    .treatment-card .card-img-top {
        height: 260px;
        max-height: 260px;
        object-position: bottom;
    }
}

/* 4. Mobile (576px) */
@media (max-width: 576px) {
    .treatment-card .card-img-top {
        height: 220px;
        max-height: 220px;
        object-position: bottom;
    }

    .overlay-text {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }

    .hero-placeholder {
        background: linear-gradient(180deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, .15)), url(../imagenes/hero-nosotros/heroBaloOficMovil.webp) center/cover no-repeat;
        height: auto;
    }

    .hero-placeholder h1 {
        margin-top: 4rem;
        margin-bottom: 1rem;
    }

    .hero-placeholder .btn {
        padding: 0.5rem 1.2rem;
        margin-bottom: 4rem;
    }
}

/* 5. Solo desktop (min-width 992px): compensar centrado del menú */
@media (min-width: 992px) {
    .navbar .navbar-collapse .navbar-nav {
        transform: translateX(-1.5rem);
    }

    .treatment-card .card-img-top {
        height: 320px;
        max-height: 320px;
    }


}

@media (min-width: 1200px) {
    #exilis {
        margin-left: 4rem !important;
    }
}