/* ============================================================
   Hotel Amber Court — Public Site CSS
   Premium boutique identity: warm cream base, brass/gold accent,
   Playfair Display display type + Inter body + Hind Siliguri (bn).
   Theme colours are overridable from SiteSettings via inline CSS vars
   in _Layout — the fallbacks below MUST use the same var names.
   ============================================================ */

:root {
    --primary: #8B5E3C;
    --accent: #C9A227;
    --dark: #1E1B16;
    --cream: #F5F1EA;
    --cream-2: #EFE9DD;
    --border: #E7E0D4;
    --muted: #78716C;
    --ink: #2A241C;
    --shadow-sm: 0 4px 18px rgba(30, 27, 22, .06);
    --shadow-md: 0 12px 32px rgba(30, 27, 22, .12);
    --shadow-lg: 0 24px 64px rgba(30, 27, 22, .18);
}

html { scroll-behavior: smooth; }
body {
    overflow-x: clip; /* not "hidden" — preserves position:sticky */
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans Bengali", "Hind Siliguri", sans-serif;
    color: var(--ink);
    background: var(--cream);
    line-height: 1.65;
}

h1, h2, h3, h4, .font-display {
    font-family: 'Playfair Display', Georgia, 'Hind Siliguri', serif;
}

img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
table { max-width: 100%; }
.container, .container-fluid { overflow-wrap: break-word; }
h1, h2, h3, h4, p, a, span, li { overflow-wrap: break-word; }
.navbar-brand { min-width: 0; }
@media (max-width: 1199.98px) { .row.g-5, .row.gx-5 { --bs-gutter-x: 1.5rem; } }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }

.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: #6E4A2E; border-color: #6E4A2E; }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: #A8871E; border-color: #A8871E; color: #fff; }

.text-primary { color: var(--primary) !important; }
.text-accent  { color: var(--accent) !important; }
.bg-primary   { background: var(--primary) !important; }
.bg-accent    { background: var(--accent) !important; }
.bg-dark-ac   { background: var(--dark) !important; color: #fff; }

/* ===== Signature motif: a thin hand-drawn-style underline ===== */
.motif-underline { display: block; width: 68px; height: 10px; margin: 10px 0 18px; }
.eyebrow { color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }

/* ===== Top bar ===== */
.topbar { background: var(--dark); color: #D6D3D1; font-size: 13px; padding: 8px 0; }
.topbar a { color: #D6D3D1; }
.topbar a:hover { color: #fff; }

/* ===== Header ===== */
.site-header { background: rgba(245, 241, 234, .92); backdrop-filter: saturate(140%) blur(10px); box-shadow: 0 2px 12px rgba(30, 27, 22, .06); position: sticky; top: 0; z-index: 1020; transition: box-shadow .3s ease, padding .3s ease; }
.site-header.scrolled { box-shadow: 0 6px 24px rgba(30, 27, 22, .12); }
.site-header .navbar { padding-top: .65rem; padding-bottom: .65rem; transition: padding .3s ease; }
/* Keep the brand+toggler row from wrapping only above the collapse breakpoint — below it,
   Bootstrap's own .navbar-expand-* media query already governs wrap/collapse behaviour. */
@media (min-width: 1200px) { .site-header .navbar { flex-wrap: nowrap; } }
.site-header.scrolled .navbar { padding-top: .4rem; padding-bottom: .4rem; }
.site-header .navbar-brand { font-family: 'Playfair Display', serif; font-weight: 800; color: var(--dark); font-size: 22px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.site-header .nav-link { color: var(--ink); font-weight: 500; padding: 12px 14px; position: relative; }
.site-header .nav-link.active, .site-header .nav-link:hover { color: var(--primary); }
.site-header .dropdown-toggle::after { vertical-align: .1em; }

/* ===== Hero (cinematic, Ken-Burns + parallax) ===== */
.hero { position: relative; min-height: 620px; background: var(--dark); color: #fff; overflow: hidden; }
.hero .hero-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.1s ease; will-change: transform, opacity; }
.hero .hero-slide.active { opacity: 1; animation: kenburns 9s ease-in-out forwards; }
.hero .hero-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(30,27,22,.80), rgba(30,27,22,.30)); }
.hero .hero-content { position: relative; z-index: 2; padding: 100px 0 150px; max-width: 720px; }
.hero .hero-content h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 800; line-height: 1.12; margin-bottom: 16px; }
.hero .hero-content p.lead { font-size: 18px; opacity: .92; margin-bottom: 26px; }
.hero .scroll-cue { position: absolute; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 2; color: #fff; opacity: .8; animation: bob 2.2s ease-in-out infinite; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.08); } }
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 10px); } }
@media (prefers-reduced-motion: reduce) {
    .hero .hero-slide.active { animation: none; }
    .hero .scroll-cue { animation: none; }
}

/* ===== Booking widget (glass card) ===== */
.booking-card { background: rgba(255,255,255,.96); backdrop-filter: blur(6px); color: var(--ink); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 20px; margin-top: 0; position: relative; z-index: 3; border: 1px solid rgba(255,255,255,.5); }
.hero + .container > .booking-card { margin-top: -64px; }
.booking-card .form-select, .booking-card .form-control { border-color: var(--border); }

/* ===== Sections ===== */
.section { padding: 76px 0; }
.section.alt { background: var(--cream-2); }
.section-title { text-align: center; margin-bottom: 44px; }
.section-title h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 800; color: var(--dark); margin-top: 8px; }
.section-title p { color: var(--muted); margin-top: 10px; max-width: 640px; margin-left: auto; margin-right: auto; }
@media (max-width: 767px) { .section, .page-hero { padding: 40px 0; } }

/* ===== Scroll-reveal ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in-view { opacity: 1; transform: none; }
.reveal-stagger.in-view > * { transition-delay: calc(var(--stagger-i, 0) * 90ms); }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===== Room card ===== */
.room-card { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .3s ease, box-shadow .3s ease; }
.room-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.room-card .card-img { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--cream-2); }
.room-card .card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.room-card:hover .card-img img { transform: scale(1.07); }
.room-card .badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; }
.room-card .badge-featured { background: var(--dark); color: #fff; padding: 5px 10px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .3px; }
.room-card .badge-new { background: var(--accent); color: #fff; padding: 5px 10px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.room-card .compare-check { position: absolute; top: 12px; right: 12px; }
.room-card .card-body { padding: 18px 20px 20px; }
.room-card .price { color: var(--accent); font-size: 20px; font-weight: 800; }
.room-card .price small { color: var(--muted); font-weight: 500; font-size: 12px; }
.room-card .title { color: var(--dark); font-size: 18px; font-weight: 700; margin: 6px 0; font-family: 'Playfair Display', serif; }
.room-card .meta { display: flex; gap: 14px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--border); padding-top: 12px; margin-top: 4px; flex-wrap: wrap; }
.room-card .meta span i { color: var(--primary); margin-right: 4px; }

/* ===== Facility / venue / package card ===== */
.facility-card, .venue-card, .package-card { background: #fff; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); transition: all .3s; height: 100%; box-shadow: var(--shadow-sm); }
.facility-card:hover, .venue-card:hover, .package-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.facility-card { text-align: center; padding: 30px 20px; }
.facility-card .icon-wrap { width: 66px; height: 66px; border-radius: 50%; background: rgba(139,94,60,.10); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; font-size: 28px; margin-bottom: 16px; }
.facility-card h5 { color: var(--dark); font-weight: 700; }
.venue-card .vc-img, .package-card .pc-img { aspect-ratio: 16/10; background: var(--cream-2); overflow: hidden; }
.venue-card .vc-img img, .package-card .pc-img img { width: 100%; height: 100%; object-fit: cover; }
.venue-card .vc-body, .package-card .pc-body { padding: 18px 20px; }

/* ===== Stat ring (SVG animated counter) ===== */
.stat-ring-wrap { text-align: center; color: #fff; padding: 20px 12px; }
.stat-ring { position: relative; width: 128px; height: 128px; margin: 0 auto 14px; }
.stat-ring svg { transform: rotate(-90deg); }
.stat-ring circle { fill: none; stroke-width: 6; }
.stat-ring .ring-bg { stroke: rgba(255,255,255,.18); }
.stat-ring .ring-fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset 1.4s cubic-bezier(.22,1,.36,1); }
.stat-ring .ring-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 800; }
.stat-label { font-size: 14px; opacity: .88; margin-top: 4px; }

/* ===== Testimonial ===== */
.testi-card { background: #fff; border-radius: 14px; padding: 28px; border: 1px solid var(--border); height: 100%; }
.testi-card .stars { color: var(--accent); margin-bottom: 10px; }
.testi-card .testi-msg { color: var(--ink); font-style: italic; }
.testi-card .testi-name { font-weight: 700; color: var(--dark); margin-top: 14px; }
.testi-card .testi-photo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }

/* ===== Partners ===== */
.partner-logo { padding: 10px; opacity: .65; transition: opacity .2s, filter .2s; filter: grayscale(60%); }
.partner-logo:hover { opacity: 1; filter: grayscale(0%); }
.partner-logo img { max-height: 60px; max-width: 140px; }

/* ===== "A Day at Amber Court" scroll-story ===== */
.day-story { position: relative; background: var(--dark); color: #fff; }
.day-story .ds-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.day-story .ds-img { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity .6s ease; }
.day-story .ds-img.active { opacity: 1; }
.day-story .ds-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(30,27,22,.85), rgba(30,27,22,.15) 55%); }
.day-story .ds-chapter { min-height: 100vh; display: flex; align-items: center; padding: 40px 0; }
.day-story .ds-chapter-inner { position: relative; z-index: 2; max-width: 520px; }
.day-story .ds-chapter-inner .eyebrow { color: var(--accent); }
.day-story .ds-chapter-inner h3 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 12px; }
@media (max-width: 767px) {
    /* Falls back to a plain stacked layout — no sticky pinning on small screens */
    .day-story .ds-sticky { position: relative; height: auto; }
    .day-story .ds-img { position: relative; inset: auto; height: 260px; opacity: 1; }
    .day-story .ds-chapter { min-height: auto; padding: 24px 0; }
}

/* ===== Concierge chat widget ===== */
.concierge-fab { position: fixed; right: 18px; bottom: 88px; z-index: 1040; width: 56px; height: 56px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; box-shadow: var(--shadow-md); border: none; }
.concierge-panel { position: fixed; right: 18px; bottom: 152px; z-index: 1040; width: min(340px, calc(100vw - 36px)); max-height: min(480px, 70vh); background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); display: none; flex-direction: column; overflow: hidden; }
.concierge-panel.open { display: flex; }
.concierge-panel .cp-head { background: var(--dark); color: #fff; padding: 14px 16px; font-weight: 700; }
.concierge-panel .cp-body { flex: 1; overflow-y: auto; padding: 12px; font-size: 14px; }
.concierge-panel .cp-msg { margin-bottom: 10px; padding: 8px 12px; border-radius: 10px; max-width: 88%; }
.concierge-panel .cp-msg.bot { background: var(--cream-2); }
.concierge-panel .cp-msg.user { background: var(--primary); color: #fff; margin-left: auto; }
.concierge-panel .cp-input { display: flex; gap: 6px; border-top: 1px solid var(--border); padding: 10px; }

/* ===== Footer ===== */
.site-footer { background: var(--dark); color: #D6D3D1; padding: 64px 0 24px; margin-top: 64px; border-top: 4px solid var(--accent); }
.site-footer h5 { color: #fff; font-family: 'Playfair Display', serif; font-weight: 700; margin-bottom: 18px; font-size: 17px; }
.site-footer a { color: #D6D3D1; }
.site-footer a:hover { color: #fff; }
.site-footer .footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 40px; padding-top: 20px; font-size: 13px; }
.dev-credit { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: rgba(201,162,39,.12); color: var(--accent) !important; font-weight: 600; font-size: 13px; }
.dev-credit-heart { color: #D64545; animation: dc-pulse 1.6s ease-in-out infinite; }
@keyframes dc-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }
@media (prefers-reduced-motion: reduce) { .dev-credit-heart { animation: none; } }

/* ===== Back to top ===== */
.back-to-top { position: fixed; right: 18px; bottom: 18px; z-index: 1030; width: 46px; height: 46px; border-radius: 50%; background: var(--dark); color: #fff; display: none; align-items: center; justify-content: center; box-shadow: var(--shadow-md); border: none; }
.back-to-top.show { display: flex; }

/* ===== Floating WhatsApp + Call ===== */
.float-actions { position: fixed; right: 18px; bottom: 18px; z-index: 1030; display: flex; flex-direction: column; gap: 10px; }
.float-actions a { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 22px; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.float-actions .fa-whatsapp { background: #25D366; }
.float-actions .fa-call { background: var(--primary); }

/* ===== Magnetic buttons (desktop pointer only) ===== */
@media (hover: hover) and (pointer: fine) {
    .btn-magnetic { transition: transform .18s ease; }
}

/* ===== Booking wizard ===== */
.wizard-steps { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 28px; flex-wrap: wrap; }
.wizard-steps .ws-step { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.wizard-steps .ws-dot { width: 30px; height: 30px; border-radius: 50%; background: var(--cream-2); color: var(--muted); display: flex; align-items: center; justify-content: center; font-weight: 700; transition: all .25s; }
.wizard-steps .ws-step.active .ws-dot { background: var(--primary); color: #fff; }
.wizard-steps .ws-step.done .ws-dot { background: var(--accent); color: #fff; }
.wizard-steps .ws-sep { width: 28px; height: 2px; background: var(--border); }
.wizard-panel { display: none; }
.wizard-panel.active { display: block; }

/* ===== Room comparison tray ===== */
.compare-tray { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1035; background: var(--dark); color: #fff; padding: 12px 0; transform: translateY(110%); transition: transform .3s ease; }
.compare-tray.show { transform: translateY(0); }

/* ===== Masonry gallery ===== */
.masonry { column-count: 3; column-gap: 14px; }
.masonry .m-item { break-inside: avoid; margin-bottom: 14px; border-radius: 12px; overflow: hidden; cursor: zoom-in; }
.masonry .m-item img { width: 100%; display: block; transition: transform .4s ease; }
.masonry .m-item:hover img { transform: scale(1.04); }
@media (max-width: 991.98px) { .masonry { column-count: 2; } }
@media (max-width: 575.98px) { .masonry { column-count: 1; } }

/* ===== Misc ===== */
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(139,94,60,.15); }
.divider { height: 4px; width: 60px; background: var(--accent); border-radius: 2px; margin: 0 auto; }

/* ===== Lift floating actions above cookie banner when banner is visible ===== */
body:has(.ac-cookie-banner[style*="display: block"]) .float-actions,
body:has(.ac-cookie-banner[style*="display: block"]) .back-to-top { bottom: 90px; }

/* ===== TABLET ===== */
@media (max-width: 991.98px) {
    .topbar .small { font-size: 12px; }
    .topbar .small span { display: inline-block; }
    .hero { min-height: 520px; }
    .site-header .navbar-brand { font-size: 18px; }
    .section-title h2 { font-size: 28px; }
    .masonry { column-count: 2; }
}

/* ===== MOBILE ===== */
@media (max-width: 767.98px) {
    .topbar { padding: 6px 0; font-size: 11px; }
    .topbar .small { font-size: 11px; flex: 1 1 auto; }
    .topbar a i { font-size: 14px; }
    /* Icon classes live on the inner <i>, not the <a> — target via :has() with a class-prefix fallback for older engines. */
    .topbar a:has(> i.bi-facebook), .topbar a:has(> i.bi-youtube), .topbar a:has(> i.bi-instagram), .topbar a:has(> i.bi-linkedin) { display: none; }

    .hero { min-height: 460px; }
    .hero .hero-content { padding: 40px 0 90px; }
    .hero .hero-content p.lead { font-size: 15px; }
    .hero .btn-lg { padding: 10px 18px; font-size: 15px; }

    .booking-card { margin-top: -40px; padding: 14px; }
    .booking-card .col-md-3 { margin-bottom: 6px; }

    .section { padding: 36px 0; }
    .section-title { margin-bottom: 28px; }
    .section-title h2 { font-size: 22px; }
    .eyebrow { font-size: 11px; }

    .room-card .card-body { padding: 14px 16px 16px; }
    .room-card .price { font-size: 17px; }
    .room-card .title { font-size: 15px; }
    .room-card .meta { gap: 10px; font-size: 11px; padding-top: 8px; }

    .facility-card { padding: 20px 12px; }
    .facility-card .icon-wrap { width: 48px; height: 48px; font-size: 22px; }
    .facility-card h5 { font-size: 14px; }

    .stat-ring { width: 96px; height: 96px; }
    .stat-ring .ring-num { font-size: 20px; }

    .testi-card { padding: 18px; }

    .site-footer { padding: 40px 0 20px; margin-top: 40px; }
    .site-footer h5 { font-size: 14px; margin-bottom: 12px; }

    .float-actions { right: 12px; bottom: 12px; gap: 8px; }
    .float-actions a { width: 46px; height: 46px; font-size: 18px; }
    .back-to-top { right: 12px; bottom: 12px; width: 40px; height: 40px; }
    .concierge-fab { right: 12px; bottom: 78px; width: 48px; height: 48px; font-size: 19px; }
    .concierge-panel { right: 12px; bottom: 134px; }

    .ac-cookie-banner .container { flex-direction: column; align-items: stretch !important; text-align: center; }
}

/* ===== EXTRA SMALL (phones) ===== */
@media (max-width: 480px) {
    .hero .hero-content h1 { font-size: 22px; }
    .hero .hero-content p.lead { font-size: 13px; }
    .section-title h2 { font-size: 19px; }
    .room-card .badges { top: 8px; left: 8px; gap: 4px; }
    .room-card .badge-featured, .room-card .badge-new { padding: 3px 7px; font-size: 10px; }
}

/* ===== Detail-page polish (tabs, key-fact tiles) ===== */
@media (max-width: 767.98px) {
    .nav-tabs, .nav-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    .nav-tabs .nav-link, .nav-pills .nav-link { white-space: nowrap; padding: .5rem .75rem; font-size: 14px; }
}

@media (max-width: 575.98px) {
    .bg-light.rounded.p-3.text-center { padding: .65rem !important; }
    .bg-light.rounded.p-3.text-center .fs-3 { font-size: 1.25rem !important; }
    .bg-light.rounded.p-3.text-center .fw-bold { font-size: .92rem; word-break: break-word; line-height: 1.2; margin-top: .25rem !important; }
    .bg-light.rounded.p-3.text-center .small { font-size: 10.5px; }
    .h2.fw-bold { font-size: 1.35rem; }
    .h3.fw-bold { font-size: 1.25rem; }
    .modal-dialog { margin: .5rem; }
    .modal-content { border-radius: 10px; }
    .modal-body { padding: 1rem; }
}

@media (max-width: 575.98px) {
    .site-footer .col-lg-3 form { flex-wrap: wrap; }
    .site-footer .col-lg-3 form .form-control { flex: 1 1 100%; }
    .site-footer .col-lg-3 form .btn { flex: 1 1 100%; }
    .site-footer .footer-bottom { text-align: center; flex-direction: column; gap: .5rem !important; }
    .site-footer .footer-bottom > div { width: 100%; }
    .site-footer .col-6 h5 { font-size: 13px; margin-bottom: 8px; }
}

.room-card .card-img img,
.venue-card .vc-img img,
.package-card .pc-img img { background: var(--cream-2); }

/* ===== PRINT ===== */
@media print {
    .topbar, .site-header, .site-footer, .float-actions, .back-to-top, .concierge-fab, .concierge-panel, .ac-cookie-banner { display: none !important; }
    .section { padding: 20px 0; }
}
