/* Elemento US Builder / WPBakery: Tabs de Villas */

/*
 * Valores base. La distribución por dispositivo (columnas/apilado, orden,
 * orientación de las pestañas, tamaños...) se genera por instancia en la
 * plantilla (templates/elements/portblue_villas_tabs.php) con las media
 * queries de Opciones del tema; aquí solo queda el aspecto por defecto
 * (dos columnas, imagen a la derecha, pestañas en vertical).
 */
.portblue-villas-tabs {
    --pbvt-side: 36%;
    --pbvt-gap: 30px;
    --pbvt-indent: 40px;
    --pbvt-line-width: 1px;
    --pbvt-line-color: currentColor;

    display: grid;
    grid-template-columns: var(--pbvt-side) minmax(0, 1fr);
    gap: var(--pbvt-gap);
    align-items: stretch;
}

/* -- Columna de texto ----------------------------------------------------- */

.portblue-villas-tabs__aside {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.portblue-villas-tabs__eyebrow {
    margin: 0 0 6px;
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--color-content-link, inherit);
}

.portblue-villas-tabs__title {
    margin: 0;
    padding: 0;
    font-size: 36px;
    line-height: 1.2;
}

.portblue-villas-tabs__text,
.portblue-villas-tabs__list,
.portblue-villas-tabs__cta {
    padding-left: var(--pbvt-indent);
}

.portblue-villas-tabs__text {
    max-width: 320px;
    margin-top: 20px;
    font-size: 16px;
    line-height: 1.5;
    /* La sangría no debe restar del ancho máximo del párrafo. */
    box-sizing: content-box;
}

/* -- Pestañas ------------------------------------------------------------- */

.portblue-villas-tabs__list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 40px;
    /* Para la variante horizontal con scroll en móvil. */
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.portblue-villas-tabs__list::-webkit-scrollbar {
    display: none;
}

.portblue-villas-tabs__item {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-align: left;
    white-space: nowrap;
    color: inherit;
    opacity: .75;
    cursor: pointer;
    transition: color .25s ease, opacity .25s ease, border-color .25s ease;
}

.portblue-villas-tabs__item:hover,
.portblue-villas-tabs__item.active {
    opacity: 1;
}

.portblue-villas-tabs__item:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

.portblue-villas-tabs__label {
    flex: 0 0 auto;
}

/*
 * Línea conectora: ocupa el resto del ancho de la pestaña y solo se pinta
 * en la activa. Se anima con scaleX (no con el ancho) para no provocar
 * recálculos de layout al cambiar de pestaña.
 */
.portblue-villas-tabs__line {
    flex: 1 1 auto;
    min-width: 24px;
    height: var(--pbvt-line-width);
    margin-left: 16px;
    background-color: var(--pbvt-line-color);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .4s ease;
}

.portblue-villas-tabs__item.active .portblue-villas-tabs__line {
    transform: scaleX(1);
}

/* -- Botón general -------------------------------------------------------- */

.portblue-villas-tabs__cta {
    margin-top: 50px;
}

/* -- Panel con imagen ----------------------------------------------------- */

.portblue-villas-tabs__media {
    position: relative;
    height: 480px;
    min-width: 0;
    overflow: hidden;
    background-color: var(--color-content-bg-alt, #f2f2f2);
}

.portblue-villas-tabs__panel {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease, visibility 0s linear .5s;
}

.portblue-villas-tabs__panel.active {
    z-index: 1;
    opacity: 1;
    visibility: visible;
    transition: opacity .5s ease, visibility 0s linear 0s;
}

.portblue-villas-tabs__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Velo por defecto: oscurece arriba y abajo, donde va el texto. */
.portblue-villas-tabs__panel::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0) 65%, rgba(0, 0, 0, .3) 100%);
    pointer-events: none;
}

.portblue-villas-tabs__panel-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    height: 100%;
    padding: 40px;
    box-sizing: border-box;
    text-align: right;
    color: #fff;
}

.portblue-villas-tabs__heading {
    max-width: 420px;
    font-size: 24px;
    line-height: 1.25;
    color: #fff;
}

.portblue-villas-tabs__subheading {
    margin-top: 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #fff;
}

.portblue-villas-tabs__panel-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

/* -- Ajustes base para pantallas pequeñas --------------------------------
 * Solo afecta a valores sin control propio en el elemento; la distribución
 * se controla desde los campos responsive del elemento.
 */
@media (max-width: 600px) {
    .portblue-villas-tabs__panel-buttons .w-btn {
        flex: 1 1 auto;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .portblue-villas-tabs__panel,
    .portblue-villas-tabs__line,
    .portblue-villas-tabs__item {
        transition: none;
    }
}
