/* Incredible Peru Tours - formulario lateral de tours individuales.
 * Se carga exclusivamente con is_singular('tour').
 * No modifica las landings, los artículos ni el modal de imágenes del mapa.
 */
.ipt-tour-entry__top {
    width: 100%;
    min-width: 0;
}

.ipt-tour-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 352px);
    gap: 24px;
    align-items: start;
    width: 100%;
    margin-top: 26px;
}

.ipt-tour-layout__main {
    min-width: 0;
    width: 100%;
}

/* La barra es sticky mientras dure el área de información del tour. */
.ipt-tour-layout__sidebar {
    min-width: 0;
    width: 100%;
    position: sticky;
    top: 92px;
    align-self: start;
    scroll-margin-top: 104px;
    z-index: 5;
}

.ipt-tour-form {
    width: 100%;
    border: 1px solid #e1e5ed;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 32px rgba(24, 37, 69, .10);
    overflow: hidden;
    /* Evita que formularios altos se salgan del área visible en laptops. */
    max-height: calc(100vh - 112px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.ipt-tour-form__header {
    padding: 20px 22px;
    background: linear-gradient(135deg, #4b64e8, #3954d4);
    color: #fff;
}

.ipt-tour-form__eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, .85);
    font-family: Nunito, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .075em;
    margin-bottom: 10px;
}

.ipt-tour-form__title {
    margin: 0 0 8px !important;
    padding: 0 !important;
    color: #fff !important;
    font-family: Montserrat, sans-serif;
    font-size: 18px !important;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0;
}

.ipt-tour-form__title::before,
.ipt-tour-form__title::after {
    display: none !important;
}

.ipt-tour-form__description {
    color: rgba(255, 255, 255, .85) !important;
    font-family: Nunito, sans-serif;
    font-size: 13px;
    line-height: 1.45;
    text-align: left !important;
    margin: 0 !important;
}

.ipt-tour-form__body {
    padding: 20px 22px 24px;
}

/* Fluent Forms: estilos acotados al nuevo sidebar. */
.ipt-tour-form .fluentform {
    width: 100%;
}

.ipt-tour-form .ff-el-group {
    margin-bottom: 12px;
}

.ipt-tour-form .ff-el-form-control {
    max-width: 100%;
    width: 100%;
    min-height: 42px;
    border: 1px solid #d4d9e2;
    border-radius: 6px;
    background-color: #fff;
    font-family: Nunito, sans-serif;
    font-size: 14px;
    color: #293343;
}

.ipt-tour-form textarea.ff-el-form-control {
    min-height: 88px;
    resize: vertical;
}

.ipt-tour-form .ff-el-form-control:focus {
    border-color: #4b64e8;
    box-shadow: 0 0 0 2px rgba(75, 100, 232, .12);
    outline: none;
}

.ipt-tour-form .ff-btn-submit {
    width: 100%;
    min-height: 42px;
    background: #116b4e !important;
    border-color: #116b4e !important;
    border-radius: 6px;
    font-family: Nunito, sans-serif;
    font-weight: 700;
    color: #fff !important;
}

.ipt-tour-form .ff-btn-submit:hover,
.ipt-tour-form .ff-btn-submit:focus {
    background: #09593f !important;
    border-color: #09593f !important;
}

/* Las cinco pestañas deben ajustarse al menor ancho de la columna izquierda. */
.ipt-tour-layout__main .responsive-tabs__list {
    flex-wrap: wrap;
    gap: 10px;
}

.ipt-tour-layout__main .responsive-tabs__list__item {
    flex: 1 1 132px;
    min-width: 0;
}

.ipt-tour-layout__main .responsive-tabs,
.ipt-tour-layout__main .tabcontent {
    max-width: 100%;
    min-width: 0;
}

@media (max-width: 1000px) {
    .ipt-tour-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
        margin-top: 22px;
    }

    /* En tablets y móviles el formulario aparece después de la galería,
       antes de los detalles; sin superposición ni scroll interno. */
    .ipt-tour-layout__sidebar {
        position: static;
        order: -1;
        scroll-margin-top: 24px;
    }

    .ipt-tour-form {
        max-height: none;
        overflow: visible;
    }

    .ipt-tour-form__header {
        padding: 18px 22px;
    }
}

@media (max-width: 640px) {
    .ipt-tour-layout {
        margin-top: 16px;
        gap: 18px;
    }

    .ipt-tour-form__body {
        padding: 18px 16px 20px;
    }

    .ipt-tour-form__header {
        padding: 18px 16px;
    }

    .ipt-tour-form__title {
        font-size: 17px !important;
    }

    .ipt-tour-layout__main .tabcontent {
        padding: 20px 16px !important;
    }
}