/*
   Serene Cottage - UI/UX mobile polish layer
   Purpose: responsive layout, touch usability, image sizing, and overflow control.
   This file intentionally does not redefine the site's font family, brand colours, button colours,
   or existing theme variables.
*/

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
svg,
video,
iframe {
    max-width: 100%;
}

img {
    height: auto;
}

.navbar-toggler {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.site-navbar .navbar-brand {
    white-space: normal;
    line-height: 1.15;
}

.top-strip .d-flex {
    row-gap: .35rem;
}

.hero-bg-img,
.photo-card img,
.photo-panel img,
.gallery-image,
.gallery-grid img,
.image-feature-row img {
    object-fit: cover;
}

.hero-actions .btn,
.inner-hero-actions .btn,
.booking-card .btn,
.cta-panel .btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.form-control,
.form-select,
textarea.form-control {
    min-height: 44px;
}

.location-map-card iframe {
    display: block;
}

@media (max-width: 1199.98px) {
    .site-navbar .nav-link {
        padding-left: .7rem !important;
        padding-right: .7rem !important;
    }
}

@media (max-width: 991.98px) {
    .site-navbar {
        position: sticky;
        top: 0;
    }

    .site-navbar .navbar-collapse {
        padding-top: .75rem;
        padding-bottom: .75rem;
    }

    .site-navbar .navbar-nav {
        align-items: stretch !important;
        gap: .35rem !important;
    }

    .site-navbar .nav-link,
    .site-navbar .navbar-nav .btn {
        width: 100%;
        text-align: left;
        padding: .75rem 1rem !important;
    }

    .hero-slide,
    .hero-content {
        min-height: min(78svh, 640px);
    }

    .hero-content,
    .inner-hero-panel {
        padding-top: clamp(2.5rem, 6vh, 4rem);
        padding-bottom: clamp(2.5rem, 6vh, 4rem);
    }

    .inner-hero-slide,
    .inner-hero-panel {
        min-height: 460px;
    }

    .hero-stat-row {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: .75rem;
    }

    .hero-stat {
        min-width: 0;
    }

    .photo-panel {
        min-height: 420px;
    }

    .image-feature-row img {
        min-height: 300px;
    }

    .location-map-card,
    .location-map-card iframe {
        min-height: 360px;
    }

    .floating-contact {
        right: .75rem;
        bottom: .75rem;
    }
}

@media (max-width: 767.98px) {
    body {
        padding-bottom: 76px;
    }

    .container {
        --bs-gutter-x: 1.25rem;
    }

    .top-strip .container > .d-flex {
        justify-content: center !important;
        text-align: center;
    }

    .top-strip .container > .d-flex > div {
        width: 100%;
    }

    .section-pad {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .section-pad-sm {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .section-title {
        font-size: clamp(1.65rem, 7vw, 2.25rem);
        letter-spacing: -.025em;
    }

    .lead,
    .lead-muted {
        font-size: 1rem;
        line-height: 1.65;
    }

    .hero-title,
    .inner-hero-title {
        font-size: clamp(2rem, 12vw, 3rem);
        line-height: 1.05;
        letter-spacing: -.035em;
    }

    .hero-subtitle,
    .inner-hero-subtitle {
        font-size: 1rem;
        line-height: 1.6;
    }

    .hero-actions,
    .inner-hero-actions,
    .cta-panel .d-flex,
    .booking-card .d-flex {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: .75rem !important;
    }

    .hero-actions .btn,
    .inner-hero-actions .btn,
    .cta-panel .btn,
    .booking-card .btn {
        width: 100%;
    }

    .hero-stat-row {
        grid-template-columns: 1fr 1fr;
    }

    .hero-stat {
        padding: .85rem;
    }

    .hero-stat strong {
        font-size: 1.25rem;
    }

    .inner-hero-slide,
    .inner-hero-panel {
        min-height: 420px;
    }

    .swiper-button-next,
    .swiper-button-prev {
        display: none !important;
    }

    .photo-card img,
    .gallery-grid img,
    .gallery-image {
        height: 220px;
    }

    .photo-card.tall img {
        height: 260px;
    }

    .photo-panel {
        min-height: 340px;
    }

    .photo-panel-content {
        padding: 1.25rem;
    }

    .image-feature-row img {
        min-height: 240px;
        max-height: 320px;
    }

    .amenity-pill {
        align-items: flex-start;
    }

    .booking-card.p-4,
    .booking-card.p-lg-5,
    .sc-card.p-4,
    .p-5 {
        padding: 1.25rem !important;
    }

    .location-map-card,
    .location-map-card iframe {
        min-height: 320px;
    }

    .floating-contact {
        left: 0;
        right: 0;
        bottom: 0;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: .5rem;
        padding: .6rem .75rem;
    }

    .floating-contact .btn {
        width: 100%;
        min-width: 0;
    }

    .site-footer .row {
        row-gap: 1.75rem;
    }

    .footer-bottom {
        text-align: left;
    }

    input,
    select,
    textarea {
        font-size: 16px;
    }
}

@media (max-width: 575.98px) {
    .navbar-brand {
        font-size: 1.15rem;
    }

    .hero-slide,
    .hero-content {
        min-height: min(82svh, 620px);
    }

    .hero-content {
        align-items: flex-end;
    }

    .hero-kicker,
    .inner-hero-eyebrow {
        letter-spacing: .11em;
    }

    .hero-stat-row {
        grid-template-columns: 1fr;
    }

    .fact-card {
        padding: 1.1rem;
    }

    .fact-card strong {
        font-size: 1.45rem;
    }

    .gallery-caption {
        padding: .75rem;
    }

    .footer-contact-link {
        overflow-wrap: anywhere;
    }
}

@media (max-width: 360px) {
    .navbar-brand {
        font-size: 1.02rem;
    }

    .section-kicker,
    .hero-kicker,
    .inner-hero-eyebrow,
    .badge-soft {
        letter-spacing: .08em;
    }

    .floating-contact {
        grid-template-columns: 1fr;
    }

    body {
        padding-bottom: 124px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* ============================================================
   Home page – Best Suited For section  (.home-suited-section)
   Scoped to this section only; does not affect other pages.
   ============================================================ */

.home-suited-section .suited-left {
    padding-right: 1.5rem;
}

.home-suited-section .suited-desc {
    color: rgba(255, 255, 255, .72);
    font-size: .97rem;
    line-height: 1.75;
}

/* Override fact-card layout inside this section */
.home-suited-section .suited-card {
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1.4rem;
    border-radius: 18px;
    height: 100%;
}

.home-suited-section .suited-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--sc-primary);
    line-height: 1;
    margin-bottom: .3rem;
}

.home-suited-section .suited-label {
    display: block;
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--sc-ink);
    margin-bottom: .45rem;
}

.home-suited-section .suited-card-desc {
    font-size: .83rem;
    color: var(--sc-muted);
    line-height: 1.55;
    margin-bottom: 0;
}

/* Tablet: tighten left padding */
@media (max-width: 991.98px) {
    .home-suited-section .suited-left {
        padding-right: 0;
    }
}

/* Mobile: single-column cards, tighter values */
@media (max-width: 575.98px) {
    .home-suited-section .suited-value {
        font-size: 1.65rem;
    }

    .home-suited-section .suited-card {
        padding: 1rem 1.1rem;
    }
}
