/*
 Theme Name: Divi Acuabit
 Theme URI: https://www.elegantthemes.com/gallery/divi/
 Description: Divi Child Theme, enriquezido por Acuabit
 Author: Acuabit
 Author URI: https://www.acuabit.es 
 Template: Divi
 Version: 1.0.0
*/
 
/* =Theme customization starts here
------------------------------------------------------- */

/* -------------------
/*      VARIABLES     
 * ------------------- */

:root {
    --color-primario: #446f79; /* rgb(68, 111, 121) */
    --color-secundario: #f38e26;
    --color-secundario-aa: #b4600a; /* Versión accesible con blanco superpuesto */
    --color-crema: #fbf9f4;
}

/* -------------------
 *      GENERALES
 * ------------------- */

html {
    scroll-behavior: smooth;
}

#main-content .et_pb_section {
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    padding-bottom: 0 !important;
}

address, time {
    font-style: normal;
}



/* ----------------
 *      CLASES     
 * ---------------- */

.titulo b {
/* Puede ser h1, h2... o un p */
    font-weight: bold;
}

.separador {
  p, h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0;
    padding-bottom: 0;

    &::after {
      content: "";
      display: block;
      height: 5px;
      background: url('./img/separador.png');
      background-repeat: no-repeat;
      margin: 15px 0;
    }
  }
}

.separador.centrado {
    p, h1, h2, h3, h4, h5, h6 {
        &::after {
            background-position: center;
        }
    }
}

@media screen and (min-width: 981px) {
    .separador.derecha {
        p, h1, h2, h3, h4, h5, h6 {
            &::after {
                background-position: right;
            }
        }
    }
}

.hero.interna .columna {
    backdrop-filter: blur(10px);
}



/* ----------------
 *      HEADER     
 * ---------------- */

/* Submenús */
ul.sub-menu {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Menú escritorio */ 
#menu-principal {
    /* Indicador de página activa */
    & .current_page_item > a,
    & .current-menu-parent > a,
    & .current-menu-ancestor > a {
        font-weight: bold;
    }
    
    /* Ensanchar submenús para evitar varias líneas por li */
    ul.sub-menu {
        min-width: 300px;
        display: flex;
        flex-direction: column;

        li > a {
            width: 100%;
        }
    }
}

/* Menú móvil */
.et_mobile_menu {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;

    /* Mientras no podamos esconder submenús con JS o PHP: */
    overflow-y: scroll;
    max-height: 50vh;
    &::after {
       /* content: "🡙";*/
        position: absolute;
        bottom: 15px;
        right: 10px;
        font-size: 24px;
    }
}

.et_mobile_menu a {
    font-size: 14px !important;
    padding-top: 5px;
    padding-bottom: 5px;
}

.et_pb_menu_1_tb_header.et_pb_menu .et_mobile_menu .boton a {
    background-color: var(--color-primario);
    color: #fff !important;
    border-radius: 12px;

    &:active {
        background-color: var(--color-secundario-aa);
    }
}

/* Estado inicial: solo transparente arriba del todo */
#cabecera {
    background: transparent !important;
    transition: background-color 0.4s ease-in-out, box-shadow 0.4s ease-in-out, backdrop-filter 0.4s ease-in-out;
}

html.cabecera-con-fondo #cabecera,
body.cabecera-con-fondo #cabecera {
    background: rgba(68, 111, 121, 0.8) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0px 5px 5px rgba(0, 0, 0, 0.3);
    padding-top: 0em;
    padding-bottom: 0em;
}

/*
 * Diferente en páginas con integración del plugin de reservas
 * y en páginas legales
 * para evitar solapamiento y problemas con colores
 */
html:has(#ohbe_iframe),
html:has(.seccion-legal) {
    #cabecera {
        position: relative !important;
        top: 0;
        background: var(--color-primario) !important;
        backdrop-filter: blur(10px);

        /* Opcionalmente, que vuelva a ser fijo al bajar */
        &:has(.et_pb_sticky) {
            position: fixed !important;
        }
    }
}

.page-id-122 {
    background-color: var(--color-crema) !important;
}

.page-id-122 #cabecera {
    position: fixed !important;
    background-color: var(--color-primario) !important;
    &:has(.et_pb_sticky) {
        background: rgba(68, 111, 121, 0.8) !important;
        padding: 0 !important;
        height: auto !important;
        transition: all 0.4s ease-in-out !important;
        box-shadow: 0px 5px 5px rgba(0, 0, 0, 0.3) !important;
    }
}

#dates_form > div.main {
    margin-top: 50px !important;
}

.main {
    margin-top: 50px;
}

/* ----------------
 *      FOOTER     
 * ---------------- */

#pie a {
    color: #fff !important;
}

#firma {
    background: var(--color-primario);
    color: #ffffff;
    text-align: center;
    border-top: 1px solid #fff;
    padding: 1em 0;
        font-size: 10px;

    a {
        color: #ffffff;
    }
}

/*Formulario de contacto*/
.cf7-custom-css {
  --azul-oscuro: #00335B;
  --azul-medio: #31859b;
  --amarillo: #FBBA00;
  --blanco: #ffffff;
  --texto: #0f2940;
  --borde: rgba(0, 51, 91, 0.14);
  --fondo-input: #f7fafc;
  --sombra: 0 18px 45px rgba(0, 51, 91, 0.12);

  max-width: 100%;
  padding: 34px;
  border-radius: 24px;
  background: linear-gradient(180deg, #71893d48 0%, var(--blanco-roto) 100%);
  box-shadow: var(--sombra);
  border: 1px solid rgba(49, 133, 155, 0.12);
}

.cf7-custom-css .fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.cf7-custom-css .fields.fields-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cf7-custom-css .field-item {
  width: 100%;
}

.cf7-custom-css .field-item input[type="text"],
.cf7-custom-css .field-item input[type="email"],
.cf7-custom-css .field-item input[type="tel"],
.cf7-custom-css .field-item textarea {
  width: 100%;
  min-height: 58px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--borde);
  /*background: var(--blanco-roto);*/
  color: var(--color-primario);
  font-size: 16px;
  line-height: 1.4;
  transition: all 0.25s ease;
  box-sizing: border-box;
  outline: none;
}

.cf7-custom-css .field-item textarea {
  min-height: 150px;
  resize: vertical;
}

.cf7-custom-css .field-item input::placeholder,
.cf7-custom-css .field-item textarea::placeholder {
  color: var(--rojo);
}

.cf7-custom-css .field-item input:focus,
.cf7-custom-css .field-item textarea:focus {
  border-color: var(--azul-medio);
  background: var(--blanco);
  box-shadow: 0 0 0 4px rgba(49, 133, 155, 0.14);
}

/* Radios */
.cf7-custom-css .field-item .wpcf7-form-control-wrap {
  display: block;
}

.cf7-custom-css .field-item .wpcf7-radio {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cf7-custom-css .field-item .wpcf7-list-item {
  margin: 0;
}

.cf7-custom-css .field-item .wpcf7-list-item label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid var(--borde);
  background: var(--fondo-input);
  color: var(--azul-oscuro);
  cursor: pointer;
  transition: all 0.25s ease;
  box-sizing: border-box;
  font-weight: 500;
}

.cf7-custom-css .field-item .wpcf7-list-item input[type="radio"] {
  accent-color: var(--amarillo);
  transform: scale(1.1);
}

.cf7-custom-css .field-item .wpcf7-list-item label:hover {
  border-color: rgba(49, 133, 155, 0.45);
  background: #fff;
}

/* Aceptación */
.cf7-custom-css .conditions {
  margin-top: 6px;
  margin-bottom: 24px;
}

.cf7-custom-css .conditions p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(0, 51, 91, 0.9);
}

.cf7-custom-css .conditions .wpcf7-list-item {
  margin: 0;
}

.cf7-custom-css .conditions label {
  display: inline;
}

.cf7-custom-css .conditions input[type="checkbox"] {
  accent-color: var(--amarillo);
  margin-right: 8px;
  transform: translateY(1px);
}

.cf7-custom-css .conditions a {
  color: var(--rojo);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.25s ease;
}

.cf7-custom-css .conditions a:hover {
  color: var(--azul-oscuro);
  border-bottom-color: currentColor;
}

/* Botón */
.cf7-custom-css .submit {
  margin-top: 6px;
}

.cf7-custom-css .submit .wpcf7-submit,
.cf7-custom-css .submit .et_pb_button,
.cf7-custom-css .submit input[type="submit"] {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 16px 30px;
  min-height: 56px;
  background-color: white;
  color: var(--blanco-roto);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.cf7-custom-css .submit .wpcf7-submit:hover,
.cf7-custom-css .submit .et_pb_button:hover,
.cf7-custom-css .submit input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px var(--verde);
  filter: brightness(1.02);
}

.cf7-custom-css .submit .wpcf7-submit:active,
.cf7-custom-css .submit .et_pb_button:active,
.cf7-custom-css .submit input[type="submit"]:active {
  transform: translateY(0);
}

/* Mensajes CF7 */
.cf7-custom-css .wpcf7-not-valid-tip {
  margin-top: 8px;
  font-size: 13px;
  color: #c0392b;
}

.cf7-custom-css .wpcf7-response-output {
  margin: 18px 0 0 !important;
  padding: 14px 16px !important;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
}

.cf7-custom-css form.invalid .wpcf7-response-output,
.cf7-custom-css form.unaccepted .wpcf7-response-output,
.cf7-custom-css form.failed .wpcf7-response-output {
  border: 1px solid rgba(192, 57, 43, 0.2);
  background: rgba(192, 57, 43, 0.06);
  color: #8e2c20;
}

.cf7-custom-css form.sent .wpcf7-response-output {
  border: 1px solid rgba(49, 133, 155, 0.25);
  background: rgba(49, 133, 155, 0.08);
  color: var(--azul-oscuro);
}

/* -------------------------------------------------
 *      FORMULARIO DE RESERVAS    
 * No podemos tocar el booking.css del plugin
 * (usado en un iframe), pero sí personalizar 
 * el formulario creado por del shortcode 
 * ------------------------------------------------- */

.formulario-reservas .et_pb_code {
    width: 100%;
}

.ohbe-search-form {
    .input-group {
        display: flex;
        justify-content: center;
        flex-wrap: nowrap;
        margin-bottom: 0;

        .ohbe-datepicker-arrival, .ohbe-datepicker-departure, .ohbe-search-submit {
            width: fit-content;
            max-width: 100%;
            height: 80px;
            margin-bottom: 0;
            padding: 0 30px;
            font-size: 18px;
        }

        .ohbe-datepicker-arrival {
            margin-right: 0;
            border-top-left-radius: 12px;
            border-bottom-left-radius: 12px;
            border-top-right-radius: 0;
            border-bottom-right-radius: 0;
            border: 0;
            border-right: 1px solid var(--color-secundario);
        }

        .ohbe-datepicker-departure {
            margin-right: 0;
            border: 0;
            border-radius: 0;
        }

        .ohbe-search-submit {
            border-top-left-radius: 0;
            border-bottom-left-radius: 0;
            border-top-right-radius: 12px;
            border-bottom-right-radius: 12px;
            border: 0;
            font-weight: bolder;
            transition: all 0.4s ease-in-out;

            &:hover {
                background-color: var(--color-secundario-aa);
                border-color: var(--color-secundario-aa);
            }
        }
    }
}

@media screen and (max-width: 720px) {
    .ohbe-search-form {
        .input-group {
            flex-direction: column;
            gap: 0;

            .ohbe-datepicker-arrival, .ohbe-datepicker-departure, .ohbe-search-submit {
                width: 100%;
            }

            .ohbe-datepicker-arrival {
                border-top-left-radius: 12px;
                border-bottom-left-radius: 0;
                border-top-right-radius: 12px;
                border-bottom-right-radius: 0;
                border: 0;
                border-right: 0;
                border-bottom: 1px solid var(--color-secundario);
            }

            .ohbe-datepicker-departure {
                border: 0;
            }

            .ohbe-search-submit {
                border: 0;
                border-top-left-radius: 0;
                border-bottom-left-radius: 12px;
                border-top-right-radius: 0;
                border-bottom-right-radius: 12px;
            }
        }
    }
}




/* ------------------------
 *      BANNER COOKIES     
 * ------------------------ */

html.show--consent .btnpref,
html.show--preferences .btnpref {
    display: none;
}

.btnpref {
    position: fixed;
    z-index: 99999999999;
    bottom: 15px;
    left: 15px;
    max-width: 72px;
    font-size: 14px;
    padding: 5px;
    border-radius: 8px;
    background-color: white;
    box-shadow: 1px -1px 1px 0px rgba(0, 0, 0, 0.3);
    border: 1px solid black;
}

.btnpref img {
    max-width: 40px;
    transition: transform 0.3s ease-in-out;
}

.btnpref img:hover {
    transform: scale(1.1);
    animation: bounce 0.5s ease;
}

/*animacion efecto rebote*/
@keyframes bounce {
    0% {
        transform: scale(1);
    }

    30% {
        transform: scale(1.2);
    }

    50% {
        transform: scale(1);
    }

    70% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.btnpref:hover {
    cursor: pointer;
}

@media(max-width: 980px) {
    .btnpref {
        bottom: 69px !important;
        left: 0px;
        max-width: 180px;
        border: none !important;
        border-radius: 0px 8px 0px 0px !important;
        border-bottom-left-radius: 0px !important;
        border-bottom-right-radius: 0px !important;
    }

    .btnpref img {
        max-width: 14px !important;
    }

    .cf7-custom-css {
        padding: 15px;
    }

    #cabecera #mobile_menu2 {
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }

    #cabecera #mobile_menu2::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
    }
}

/* Menú móvil: preparar items con submenú */
.et_mobile_menu li.menu-item-has-children,
.et_mobile_menu li.page_item_has_children {
    position: relative;
}

/* Submenús cerrados por defecto */
.et_mobile_menu li.menu-item-has-children > ul.sub-menu,
.et_mobile_menu li.page_item_has_children > ul.children {
    display: none !important;
}

/* Submenú abierto */
.et_mobile_menu li.submenu-open > ul.sub-menu,
.et_mobile_menu li.submenu-open > ul.children {
    display: block !important;
}

/* Botón + */
.et_mobile_menu .submenu-toggle {
    position: absolute;
    top: 0;
    right: 8px;
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    color: #446F79;
    font-size: 24px;
    line-height: 42px;
    text-align: center;
    cursor: pointer;
    z-index: 9999;
    padding: 0;
}

/* Símbolo + */
.et_mobile_menu .submenu-toggle::before {
    content: "+";
    font-weight: 400;
}

/* Cambia a - cuando está abierto */
.et_mobile_menu li.submenu-open > .submenu-toggle::before {
    content: "–";
}

/* Dejamos hueco para que el + no tape el texto */
.et_mobile_menu li.menu-item-has-children > a,
.et_mobile_menu li.page_item_has_children > a {
    padding-right: 50px !important;
}