/* Explain: Component styles for gallery items, lightbox, header, and booking form. */
.site-header {
    background: linear-gradient(180deg, rgba(250, 249, 246, 0.86), rgba(250, 249, 246, 0.52));
    backdrop-filter: blur(18px);
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--sage-dark);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.section-kicker::before {
    display: inline-block;
    width: 2.4rem;
    height: 1px;
    background: var(--accent-color);
    content: "";
}

.glass-panel {
    border: 1px solid var(--glass-border);
    background: linear-gradient(145deg, rgba(250, 249, 246, 0.78), rgba(255, 255, 255, 0.48));
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.arch-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(88, 129, 87, 0.38);
    background: var(--surface-color);
    box-shadow: var(--shadow-soft);
}

.arch-frame::after {
    position: absolute;
    inset: 1.1rem;
    border: 1px solid rgba(250, 249, 246, 0.62);
    border-radius: inherit;
    content: "";
    pointer-events: none;
}

.arch-frame-large {
    height: min(82vh, 860px);
    min-height: 560px;
    border-radius: 999px 999px 2.5rem 2.5rem;
}

.arch-frame-medium {
    height: 620px;
    max-width: 450px;
    border-radius: 999px 999px 2.1rem 2.1rem;
}

.floating-note {
    position: absolute;
    right: -1.5rem;
    bottom: 4rem;
    display: flex;
    max-width: 250px;
    align-items: center;
    gap: 0.85rem;
    border-radius: 999px;
    padding: 1rem 1.2rem;
    color: var(--text-color);
    font-size: 0.82rem;
    font-weight: 600;
}

.story-card {
    position: absolute;
    right: 0;
    bottom: 2.5rem;
    max-width: 290px;
    border-radius: 2rem;
    padding: 1.5rem;
}

.quiet-detail,
.amenity-row,
.contact-note {
    border: 1px solid var(--glass-border);
    border-radius: 1.6rem;
    background: rgba(250, 249, 246, 0.58);
    padding: 1.25rem;
}

.quiet-detail span {
    display: inline-flex;
    margin-bottom: 0.9rem;
    color: var(--accent-color);
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
}

.quiet-detail p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.75;
}

.class-card {
    min-height: 360px;
    border-radius: 2.2rem;
    padding: 2rem;
    transition: transform 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
}

.class-card:hover {
    border-color: rgba(88, 129, 87, 0.58);
    box-shadow: 0 26px 80px rgba(31, 46, 35, 0.11);
    transform: translateY(-6px);
}

.amenity-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
}

.amenity-dot {
    width: 0.8rem;
    height: 0.8rem;
    margin-top: 0.4rem;
    border-radius: 999px;
    background: var(--accent-color);
    box-shadow: 0 0 0 0.45rem var(--terracotta-soft);
}

.amenity-image-wrap {
    height: 660px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: 999px 999px 2rem 2rem;
    box-shadow: var(--shadow-soft);
}

.booking-form,
.booking-overlay-panel {
    border-radius: 2.4rem;
    padding: clamp(1.5rem, 4vw, 2.5rem);
}

.form-label {
    display: block;
    margin-bottom: 0.55rem;
    color: var(--text-color);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.form-status.success {
    color: #4A6B53;
}

.form-status.error {
    color: #9B4A3D;
}

.mobile-book-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 45;
    border-top: 1px solid var(--glass-border);
    background: rgba(250, 249, 246, 0.86);
    padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom));
    backdrop-filter: blur(18px);
}

.booking-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
    overflow-y: auto;
    background: rgba(31, 46, 35, 0.32);
    padding: 1rem;
}

.booking-overlay.is-open {
    display: block;
}

.booking-overlay-panel {
    min-height: calc(100vh - 2rem);
    background: var(--background-color);
    box-shadow: 0 30px 90px rgba(31, 46, 35, 0.22);
}

@media (max-width: 767px) {
    .section-kicker::before {
        width: 1.6rem;
    }

    .arch-frame-large,
    .arch-frame-medium,
    .amenity-image-wrap {
        height: 510px;
        min-height: 0;
    }

    .arch-frame-large {
        margin-right: auto;
        margin-left: auto;
        width: min(100%, 450px);
    }

    .floating-note,
    .story-card {
        position: relative;
        right: auto;
        bottom: auto;
        margin: -2.5rem auto 0;
    }

    .amenity-image-wrap {
        border-radius: 999px 999px 2rem 2rem;
    }
}

.space-block + .space-block {
    margin-top: clamp(3.5rem, 7vw, 6rem);
}

.gallery-item {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--glass-border);
    border-radius: 1.6rem;
    background: var(--surface-color);
    box-shadow: var(--shadow-soft);
    transition: transform 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 500ms ease;
}

.gallery-item:hover,
.gallery-item:focus-visible {
    border-color: rgba(88, 129, 87, 0.58);
    box-shadow: 0 26px 80px rgba(31, 46, 35, 0.11);
    transform: translateY(-4px);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item-caption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 1.6rem 1rem 0.9rem;
    background: linear-gradient(180deg, transparent, rgba(20, 30, 24, 0.74));
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: left;
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(20, 30, 24, 0.88);
    backdrop-filter: blur(6px);
}

.gallery-lightbox.is-open {
    display: flex;
}

.gallery-lightbox-inner {
    position: relative;
    display: flex;
    width: 100%;
    max-width: 1100px;
    flex-direction: column;
    align-items: center;
}

.gallery-lightbox-stage {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 40vh;
    margin: 0;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox-stage img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 74vh;
    border-radius: 1rem;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
    transition: opacity 300ms ease;
}

.gallery-lightbox-stage.is-loading img {
    opacity: 0;
}

.gallery-lightbox-spinner {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 2rem;
}

.gallery-lightbox-stage.is-loading .gallery-lightbox-spinner {
    display: flex;
}

.gallery-lightbox-spinner i {
    animation: gallery-spin 0.9s linear infinite;
}

@keyframes gallery-spin {
    to {
        transform: rotate(360deg);
    }
}

.gallery-lightbox-caption {
    max-width: 90%;
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.95rem;
    text-align: center;
}

.gallery-lightbox-close,
.gallery-lightbox-nav {
    position: fixed;
    z-index: 91;
    display: inline-flex;
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 1.2rem;
    transition: background 300ms ease;
}

.gallery-lightbox-close:hover,
.gallery-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.gallery-lightbox-close {
    top: 1rem;
    right: 1rem;
}

.gallery-lightbox-prev {
    top: 50%;
    left: 0.75rem;
    transform: translateY(-50%);
}

.gallery-lightbox-next {
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
}

.gite-gallery {
    column-gap: 1.25rem;
    columns: 1;
}

.gite-gallery .gallery-item {
    margin-bottom: 1.25rem;
    break-inside: avoid;
}

.gite-gallery .gallery-item img {
    height: auto;
    aspect-ratio: auto;
}

@media (min-width: 640px) {
    .gite-gallery {
        columns: 2;
    }
}

@media (min-width: 1024px) {
    .gite-gallery {
        columns: 3;
    }
}

.booking-calendar {
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    background: rgba(250, 249, 246, 0.5);
    padding: clamp(1rem, 3vw, 1.5rem);
}

.booking-calendar-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.booking-calendar-label {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: 1.02rem;
    font-weight: 600;
}

.booking-calendar-label i {
    color: var(--accent-color);
}

.booking-calendar-nav {
    display: inline-flex;
    gap: 0.5rem;
}

.booking-cal-nav {
    display: inline-flex;
    width: 2.6rem;
    height: 2.6rem;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: var(--surface-color);
    color: var(--text-color);
    transition: background 300ms ease, border-color 300ms ease, opacity 300ms ease;
}

.booking-cal-nav:hover:not(:disabled) {
    border-color: var(--accent-color);
    background: var(--glass-bg);
}

.booking-cal-nav:disabled {
    cursor: not-allowed;
    opacity: 0.35;
}

.booking-calendar-months {
    display: grid;
    gap: 1.75rem;
    margin-top: 1.35rem;
}

@media (min-width: 640px) {
    .booking-calendar-months {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.cal-month-title {
    margin: 0 0 0.75rem;
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    text-transform: capitalize;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.25rem;
}

.cal-weekday {
    padding-bottom: 0.35rem;
    color: var(--text-muted);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-align: center;
    text-transform: uppercase;
}

.cal-day {
    position: relative;
    display: flex;
    min-height: 2.4rem;
    aspect-ratio: 1 / 1;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0.7rem;
    background: transparent;
    color: var(--text-color);
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 200ms ease, color 200ms ease;
}

.cal-day.is-empty {
    visibility: hidden;
    pointer-events: none;
}

.cal-day.is-past {
    color: var(--text-muted);
    opacity: 0.4;
    cursor: default;
}

.cal-day.is-available:hover {
    background: var(--sage-soft);
}

.cal-day.is-unavailable {
    color: var(--text-muted);
    text-decoration: line-through;
    cursor: default;
    opacity: 0.55;
}

.cal-day.is-today::after {
    position: absolute;
    bottom: 0.28rem;
    width: 0.28rem;
    height: 0.28rem;
    border-radius: 999px;
    background: var(--accent-color);
    content: "";
}

.cal-day.is-in-range {
    background: var(--sage-soft);
}

.cal-day.is-start,
.cal-day.is-end {
    background: var(--accent-color);
    color: #ffffff;
    font-weight: 700;
}

.cal-day.is-start.is-today::after,
.cal-day.is-end.is-today::after {
    background: #ffffff;
}

.booking-calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 1.25rem;
    margin: 1.25rem 0 0;
    padding: 0;
    color: var(--text-muted);
    font-size: 0.76rem;
    list-style: none;
}

.booking-calendar-legend li {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.booking-legend-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 999px;
}

.booking-legend-dot.is-available {
    border: 1px solid var(--glass-border);
    background: var(--field-bg);
}

.booking-legend-dot.is-unavailable {
    background: var(--text-muted);
    opacity: 0.5;
}

.booking-legend-dot.is-selected {
    background: var(--accent-color);
}

.booking-selection {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 1.25rem;
    border: 1px dashed var(--glass-border);
    border-radius: 1.4rem;
    background: var(--surface-color);
    padding: 0.9rem 1.15rem;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 600;
}
