/* ==========================================================================
   Hotel Molino del Puente — Responsive Header, 4-Locale Bar & Elastic Hero
   Loaded after front.css with deterministic filemtime cache-busting.
   ========================================================================== */

/* ---------- 1. Desktop Navigation & 992px..1199px Single-Row Fit ---------- */
#top_links a.is-active {
    font-weight: 700;
    color: #1f5c2e;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.molino-mobile-controls {
    display: none;
}

@media (min-width: 992px) {
    header.sticky {
        padding: 0;
        background-color: rgba(255, 255, 255, 0.98);
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    }

    header.sticky #top_header {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        margin: 0 auto;
    }

    #top_header > .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        padding-left: 16px;
        padding-right: 16px;
    }

    #top_header .navbar-brand {
        flex-shrink: 0;
        margin-right: 16px;
    }

    #top_header .main-menu .navbar-nav {
        flex-wrap: nowrap;
        align-items: center;
    }

    #top_header .main-menu ul li a.nav-link[aria-current="page"],
    #top_header .main-menu ul li a.nav-link.active {
        color: #2f6b3c;
        font-weight: 700;
        box-shadow: inset 0 -2px 0 #4d8b55;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    #top_header {
        width: min(1140px, calc(100% - 24px));
    }

    #top_header > .container {
        max-width: 100%;
        padding-left: 14px;
        padding-right: 14px;
    }

    #top_header .navbar-brand {
        margin-right: 12px;
    }

    #top_header .navbar-brand img {
        width: 190px;
        height: auto;
    }

    #top_header .main-menu ul li a.nav-link {
        padding-left: 0.55rem !important;
        padding-right: 0.55rem !important;
        font-size: 12.5px;
        letter-spacing: 0.01em;
        white-space: nowrap;
    }
}

/* ---------- 2. Mobile & Tablet Fixed Header, 4-Locale Bar & Drawer (<992px) ---------- */
@media (max-width: 991.98px) {
    body.molino-drawer-open {
        overflow: hidden;
    }

    header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        padding: 0 !important;
        z-index: 99999;
    }

    #top_line {
        display: none !important;
    }

    nav#top_header,
    header.sticky nav#top_header {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        position: relative;
        top: auto;
        left: auto;
    }

    nav#top_header > .container {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 8px 12px !important;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 8px;
    }

    nav#top_header .navbar-brand {
        margin: 0;
        padding: 0;
        min-width: 0;
        flex: 0 1 auto;
        display: inline-flex;
        align-items: center;
    }

    nav#top_header .navbar-brand img {
        display: block;
        width: auto;
        max-width: clamp(124px, 38vw, 215px);
        height: auto;
    }

    .molino-mobile-controls {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        flex: 0 0 auto;
        margin-left: auto;
    }

    .molino-lang-bar {
        list-style: none;
        margin: 0;
        padding: 2px;
        display: inline-flex;
        align-items: center;
        gap: 2px;
        background: #f4f6f4;
        border: 1px solid #dfe5df;
        border-radius: 999px;
    }

    .molino-lang-bar li {
        margin: 0;
        padding: 0;
        display: inline-flex;
    }

    .molino-lang-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 26px;
        min-height: 28px;
        padding: 2px 5px;
        border-radius: 999px;
        font-size: 11px;
        font-weight: 700;
        line-height: 1;
        text-transform: uppercase;
        color: #3a463d !important;
        text-decoration: none !important;
        transition: background-color 0.2s ease, color 0.2s ease;
    }

    .molino-lang-link:hover,
    .molino-lang-link:focus-visible {
        background: #e6ece7;
        color: #1f5c2e !important;
    }

    .molino-lang-link.is-active {
        background: #4d8b55;
        color: #fff !important;
    }

    nav#top_header .cmn-toggle-switch {
        position: relative !important;
        right: auto !important;
        top: auto !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 40px !important;
        height: 40px !important;
        min-width: 40px;
        min-height: 40px;
        flex: 0 0 40px;
        margin: 0 !important;
        padding: 0 !important;
        border: 1px solid #dfe5df !important;
        border-radius: 8px;
        background: #fff;
    }

    nav#top_header .cmn-toggle-switch:focus-visible {
        outline: 2px solid #4d8b55;
        outline-offset: 2px;
    }

    nav#top_header .cmn-toggle-switch span {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        width: 20px !important;
        height: 2px !important;
        background-color: #2c352e !important;
        display: block;
    }

    nav#top_header .cmn-toggle-switch span::before,
    nav#top_header .cmn-toggle-switch span::after {
        left: 0 !important;
        width: 20px !important;
        height: 2px !important;
        background-color: #2c352e !important;
    }

    nav#top_header .cmn-toggle-switch span::before {
        top: -6px !important;
    }

    nav#top_header .cmn-toggle-switch span::after {
        bottom: -6px !important;
    }

    .layer {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100vh;
        height: 100svh;
        background: rgba(12, 18, 14, 0.52);
        z-index: 99998;
        cursor: pointer;
    }

    .layer.layer-is-visible {
        display: block;
        opacity: 1;
    }

    #navbarSupportedContent.main-menu {
        display: flex !important;
        flex-direction: column;
        justify-content: flex-start !important;
        position: fixed !important;
        top: 0;
        left: 0 !important;
        bottom: auto;
        width: min(86vw, 340px);
        height: 100vh;
        height: 100svh;
        max-height: 100svh;
        overflow-y: auto;
        overscroll-behavior: contain;
        background: #fff;
        box-shadow: 6px 0 24px rgba(0, 0, 0, 0.22);
        transform: translateX(-104%);
        opacity: 1 !important;
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.26s ease, visibility 0.26s ease;
        z-index: 100002 !important;
    }

    #navbarSupportedContent.main-menu.show {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }

    #header_menu {
        display: flex !important;
        flex-direction: column;
        gap: 12px;
        padding: 14px 16px 12px !important;
        border-bottom: 1px solid #eaeeea;
        text-align: left !important;
    }

    .molino-drawer-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .molino-drawer-top img {
        max-width: 180px;
        height: auto;
        display: block;
    }

    button.molino-menu-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        border: 1px solid #d8e0d8;
        border-radius: 8px;
        background: #f7f9f7;
        color: #2b352d;
        font-size: 24px;
        line-height: 1;
        cursor: pointer;
        padding: 0;
    }

    button.molino-menu-close:hover,
    button.molino-menu-close:focus-visible {
        background: #e8efe9;
        color: #1f5c2e;
        outline: 2px solid #4d8b55;
        outline-offset: 2px;
    }

    .molino-drawer-locales {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 6px;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .molino-drawer-locales li {
        border: 0 !important;
        margin: 0;
        padding: 0;
    }

    .molino-drawer-locales .molino-lang-link {
        min-width: 42px;
        min-height: 34px;
        padding: 4px 10px !important;
        border: 1px solid #dfe5df;
        background: #f8faf8;
        font-size: 12px;
    }

    .molino-drawer-locales .molino-lang-link.is-active {
        background: #4d8b55;
        border-color: #4d8b55;
        color: #fff !important;
    }

    #navbarSupportedContent.main-menu .navbar-nav {
        width: 100%;
        margin: 0;
        padding: 6px 0 24px;
    }

    #navbarSupportedContent.main-menu ul li a.nav-link {
        padding: 13px 18px !important;
        font-size: 14px;
        font-weight: 600;
    }

    #navbarSupportedContent.main-menu ul li a.nav-link[aria-current="page"],
    #navbarSupportedContent.main-menu ul li a.nav-link.active {
        color: #2f6b3c !important;
        background-color: #f2f7f3;
        border-left: 4px solid #4d8b55;
        padding-left: 14px !important;
    }
}

@media (max-width: 480px) {
    #navbarSupportedContent.main-menu {
        width: 100%;
    }
}

@media (max-width: 359.98px) {
    nav#top_header > .container {
        padding: 6px 8px !important;
        gap: 6px;
    }

    .molino-lang-link {
        min-width: 24px;
        padding: 2px 4px;
        font-size: 10.5px;
    }
}

/* ---------- 3. Elastic Hero (Home & Subpages) + Mobile Photo Crop ---------- */
.sub_header {
    height: auto !important;
    display: flex;
    flex-direction: column;
    background-position: center center;
    background-size: cover;
}

.sub_header[style*="--hero-bg-desktop"] {
    background-image: linear-gradient(
            180deg,
            rgba(16, 22, 18, 0.48) 0%,
            rgba(16, 22, 18, 0.28) 52%,
            rgba(16, 22, 18, 0.48) 100%
        ),
        var(--hero-bg-desktop) !important;
}

.sub_header_content {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: auto !important;
    flex: 1 1 auto;
    box-sizing: border-box;
    padding: 112px 24px 68px !important;
}

.sub_header--home,
.sub_header--home .sub_header_content {
    min-height: clamp(470px, 62svh, 580px);
}

.sub_header--page,
.sub_header--page .sub_header_content {
    min-height: clamp(350px, 45svh, 460px);
}

.sub_header_content > div,
.sub_header .intro_title {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    padding: 0 !important;
    text-align: center;
}

.sub_header_content div h1 {
    font-size: clamp(1.5rem, 1.05rem + 2.3vw, 2.85rem);
    line-height: 1.18;
    padding-top: 0 !important;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.42);
}

.sub_header_content div p {
    font-size: clamp(0.95rem, 0.86rem + 0.55vw, 1.2rem);
    line-height: 1.45;
    margin: 4px auto 16px;
    max-width: 48ch;
    color: #fff;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.42);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-top: 4px;
}

.hero-actions .button_intro {
    margin: 0;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .sub_header_content {
        padding: 84px 20px 64px !important;
    }

    .sub_header--home,
    .sub_header--home .sub_header_content {
        min-height: clamp(420px, 58svh, 520px);
    }

    .sub_header--page,
    .sub_header--page .sub_header_content {
        min-height: clamp(300px, 42svh, 390px);
    }
}

@media (max-width: 767.98px) {
    .sub_header[style*="--hero-bg-mobile"] {
        background-image: linear-gradient(
                180deg,
                rgba(16, 22, 18, 0.54) 0%,
                rgba(16, 22, 18, 0.34) 50%,
                rgba(16, 22, 18, 0.56) 100%
            ),
            var(--hero-bg-mobile, var(--hero-bg-desktop)) !important;
        background-position: center 38% !important;
        background-size: cover !important;
    }

    .sub_header_content {
        padding: 76px 16px 64px !important;
    }

    .sub_header--home,
    .sub_header--home .sub_header_content {
        min-height: clamp(400px, 68svh, 540px) !important;
    }

    .sub_header--page,
    .sub_header--page .sub_header_content {
        min-height: clamp(270px, 42svh, 360px) !important;
    }

    .sub_header_content div h1::before,
    .sub_header_content div h1::after {
        display: none;
    }
}

@media (max-width: 399.98px) {
    .hero-actions .button_intro {
        width: min(100%, 260px);
    }
}

/* ---------- 4. Contact Map Top Offset Under Fixed Header ---------- */
#google_map {
    margin-top: 96px;
    height: 480px;
}

@media (max-width: 991.98px) {
    #google_map {
        margin-top: 56px;
        height: clamp(280px, 48svh, 420px);
    }
}

/* ---------- 5. Interior Views: Room List Containment, Availability Bar, Gallery & Reviews ---------- */
.strip_all_rooms_list {
    overflow: hidden;
    padding: 12px;
    text-align: left;
}

.strip_all_rooms_list > .row {
    margin-left: -10px;
    margin-right: -10px;
}

.strip_all_rooms_list > .row > [class*="col-"] {
    padding-left: 10px;
    padding-right: 10px;
    min-width: 0;
}

.img_list {
    position: relative;
    overflow: hidden;
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    min-height: 220px;
    aspect-ratio: 3 / 2;
    margin: 0;
    border-radius: 4px;
    box-sizing: border-box;
}

.img_list a {
    display: block;
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 100%;
    overflow: hidden;
}

.img_list img,
.img_list a img,
.img_list a:hover img {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    min-height: 220px;
    object-fit: cover;
    object-position: center;
    display: block;
    transform: none !important;
}

.rooms_list_desc {
    height: auto !important;
    min-height: 0;
    padding: 6px 10px 6px 4px !important;
    border-right: 0 !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
    text-align: left;
}

.rooms_list_desc h3 {
    margin: 0;
    line-height: 1.3;
}

.rooms_list_desc h3 a {
    color: inherit;
    text-decoration: none;
}

.rooms_list_desc h3 a:hover,
.rooms_list_desc h3 a:focus-visible {
    color: #27614c;
}

.rooms_list_desc p {
    margin-bottom: 0;
}

.rooms_list_desc .ftb_widget,
.ftb_widget {
    width: 100%;
    max-width: 100%;
    margin: 4px 0 6px;
    box-sizing: border-box;
}

.rooms_list_desc .ftb_widget form,
.rooms_list_desc .ftb_widget > div {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px 10px;
    max-width: 100%;
}

.rooms_list_desc .ftb_widget input[type="text"],
.rooms_list_desc .ftb_widget input[type="date"],
.rooms_list_desc .ftb_widget select,
.rooms_list_desc .ftb_widget button,
.rooms_list_desc .ftb_widget input[type="submit"] {
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 767.98px) {
    .rooms_list_desc {
        padding: 14px 4px 4px !important;
    }
}

.magnific-gallery .gallery-photo-item {
    margin-bottom: 20px;
}

.magnific-gallery .gallery-grid-thumb {
    margin-top: 0;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

#testimonials {
    padding: 36px 16px;
    border-radius: 8px;
}

#quote-carousel {
    padding: 0 12px 44px;
}

#quote-carousel .carousel-inner {
    height: auto !important;
    min-height: 210px;
    overflow: hidden !important;
    padding-top: 8px;
}

#quote-carousel .item blockquote,
#quote-carousel blockquote.molino-review-quote {
    border-left: 0;
    margin: 0 auto;
    max-width: 760px;
    padding: 4px 8px 8px;
    text-align: center;
    font-size: clamp(1.05rem, 0.96rem + 0.4vw, 1.35rem);
    line-height: 1.6;
}

.molino-review-avatar,
.box_overlay .pic figure {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2f6b3c;
    color: #fff;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
}

.molino-review-avatar__initial {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    user-select: none;
}

#quote-carousel img.molino-review-avatar__img,
.molino-review-avatar img.molino-review-avatar__img,
.box_overlay .pic figure img,
.review_strip_single img.rounded-circle {
    width: 56px !important;
    height: 56px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    object-position: center;
    display: block;
}

#quote-carousel img.molino-review-avatar__img,
.molino-review-avatar img.molino-review-avatar__img {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    border: 0 !important;
    background-color: #2f6b3c;
}

#quote-carousel img.molino-review-avatar__img.is-broken,
#quote-carousel img.molino-review-avatar__img[hidden],
.molino-review-avatar img.molino-review-avatar__img.is-broken,
.molino-review-avatar img.molino-review-avatar__img[hidden] {
    display: none !important;
}

#strip_activities ul li img.rounded-circle {
    width: 115px;
    height: 115px;
    object-fit: cover;
    padding-right: 0 !important;
}

@media (max-width: 480px) {
    #strip_activities ul li img.rounded-circle {
        width: 80px;
        height: 80px;
    }
}

.box_cat .cat-img {
    display: block !important;
    inset: 0;
    width: 100%;
    height: 100%;
}

.box_cat .cat-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (hover: none), (pointer: coarse), (max-width: 991.98px) {
    .box_cat_wp {
        height: auto !important;
        min-height: 240px;
        margin-bottom: 16px;
    }

    .box_cat {
        height: auto !important;
        min-height: 230px;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
    }

    .cat-hover .cat-overlay,
    .cat-overlay {
        display: flex !important;
        flex-direction: column;
        justify-content: flex-end;
        align-items: flex-start;
        position: relative !important;
        top: auto !important;
        bottom: auto !important;
        left: auto !important;
        width: 100%;
        height: auto !important;
        min-height: 230px;
        margin: 0 !important;
        padding: 72px 16px 16px !important;
        background: linear-gradient(
            180deg,
            rgba(16, 22, 18, 0.12) 0%,
            rgba(16, 22, 18, 0.74) 52%,
            rgba(16, 22, 18, 0.88) 100%
        ) !important;
        text-decoration: none !important;
    }

    .box_cat_wp .cat-overlay h2 {
        background: transparent;
        border: 0;
        padding-left: 0;
        margin-bottom: 6px;
        color: #fff;
    }

    .box_cat_wp .cat-overlay p,
    .box_cat_wp a.cat-overlay:hover p {
        padding: 0 0 10px 0;
        margin: 0;
        color: rgba(255, 255, 255, 0.94);
    }

    .box_cat_bt {
        margin-left: 0;
    }
}
