/* =====================================================================
   THIRDY'S — DESIGN & USABILITY ENHANCEMENTS
   Loaded AFTER the inline styles in index.html so these rules win
   where selectors overlap. Covers:
   1. Typography & contrast accessibility pass
   2. Booking inquiry modal
   3. Floating contact pill (replaces scroll-guide popup)
   4. Property comparison table
   5. Gallery lightbox
   6. Mobile hero improvements
   ===================================================================== */

/* --------------------------------------------------------------------
   1. TYPOGRAPHY & CONTRAST PASS
   -------------------------------------------------------------------- */
:root {
  --muted: #6b655d;            /* was #8a8a8a — failed contrast on cream */
  --ink-soft: #3f3a35;         /* was #4a4a4a — slightly darker */
}

/* Minimum legible sizes for UI text (were 0.62–0.68rem) */
.btn { font-size: .78rem; letter-spacing: .14em; }
.btn-sm { font-size: .72rem; }
.section-eyebrow { font-size: .75rem; letter-spacing: .22em; }
.section-lede { font-size: 1rem; }

#top-bar { font-size: .72rem; }
.nav-links a { font-size: .78rem; }
.trust-text-label { font-size: .72rem; }
.trust-text-val { font-size: .92rem; }
.prop-qf-label { font-size: .72rem; }
.hero-perk-note { font-size: .75rem; }
.faq-a, .faq-q { font-size: 1rem; }
footer, .foot-links-new a { font-size: .92rem; }

/* Focus visibility for keyboard users */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--burgundy);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* --------------------------------------------------------------------
   2. BOOKING INQUIRY MODAL
   -------------------------------------------------------------------- */
.bk-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(26, 18, 12, .55);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.bk-overlay.open { opacity: 1; pointer-events: auto; }

.bk-modal {
  background: var(--cream);
  width: 100%; max-width: 560px;
  max-height: 92vh; overflow-y: auto;
  padding: 40px 36px 32px;
  position: relative;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .35);
  transform: translateY(16px);
  transition: transform .3s cubic-bezier(.25, .8, .25, 1);
}
.bk-overlay.open .bk-modal { transform: translateY(0); }

.bk-close {
  position: absolute; top: 14px; right: 14px;
  background: none; border: none; cursor: pointer;
  font-size: 1.5rem; line-height: 1; color: var(--ink-soft);
  width: 40px; height: 40px;
}
.bk-close:hover { color: var(--burgundy); }

.bk-eyebrow {
  font-size: .72rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--burgundy); font-weight: 600; display: block; margin-bottom: 10px;
}
.bk-title {
  font-family: 'Cormorant Garamond', serif; font-weight: 500;
  font-size: 2rem; line-height: 1.1; color: var(--ink); margin-bottom: 6px;
}
.bk-sub { color: var(--ink-soft); font-size: .92rem; line-height: 1.6; margin-bottom: 24px; }

.bk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bk-field { display: flex; flex-direction: column; gap: 6px; }
.bk-field.full { grid-column: 1 / -1; }
.bk-field label {
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 600; color: var(--ink-soft);
}
.bk-field input, .bk-field select, .bk-field textarea {
  font-family: 'Jost', sans-serif; font-size: .95rem;
  padding: 11px 12px; border: 1px solid var(--line);
  background: var(--white); color: var(--ink);
  border-radius: 0; width: 100%;
}
.bk-field input:focus, .bk-field select:focus, .bk-field textarea:focus {
  border-color: var(--burgundy); outline: none;
  box-shadow: 0 0 0 2px rgba(122, 37, 53, .15);
}
.bk-field textarea { resize: vertical; min-height: 76px; }

.bk-actions { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.bk-submit { width: 100%; justify-content: center; padding: 15px 32px; }
.bk-alt {
  text-align: center; font-size: .85rem; color: var(--ink-soft);
  display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center;
}
.bk-alt a { color: var(--burgundy); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.bk-success { text-align: center; padding: 30px 0 10px; display: none; }
.bk-success.show { display: block; }
.bk-success .bk-title { margin-bottom: 12px; }
.bk-success p { color: var(--ink-soft); font-size: .95rem; line-height: 1.7; margin-bottom: 20px; }

.bk-error {
  display: none; margin-top: 14px; padding: 12px 14px;
  background: #fbeaea; border: 1px solid #e5b8bf;
  color: var(--burgundy-deep); font-size: .88rem; line-height: 1.5;
}
.bk-error.show { display: block; }

@media (max-width: 560px) {
  .bk-modal { padding: 32px 20px 26px; }
  .bk-grid { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------
   3. FLOATING CONTACT PILL  (replaces scroll-guide popup)
   -------------------------------------------------------------------- */
#contact-pill {
  position: fixed; bottom: 24px; right: 24px; z-index: 500;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
.cp-options {
  display: flex; flex-direction: column; gap: 8px;
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
#contact-pill.open .cp-options { opacity: 1; transform: translateY(0); pointer-events: auto; }
.cp-opt {
  display: flex; align-items: center; gap: 10px;
  background: var(--white); color: var(--ink);
  padding: 11px 18px; border-radius: 50px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .18);
  font-size: .82rem; font-weight: 500; letter-spacing: .04em;
  transition: transform .18s ease, box-shadow .18s ease;
}
.cp-opt:hover { transform: translateX(-3px); box-shadow: 0 6px 24px rgba(0, 0, 0, .22); }
.cp-opt svg { width: 17px; height: 17px; flex-shrink: 0; }
.cp-opt.cp-wa svg { color: #1faa53; }
.cp-opt.cp-fb svg { color: #1877f2; }
.cp-opt.cp-tel svg { color: var(--burgundy); }

.cp-fab {
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--burgundy); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 22px rgba(122, 37, 53, .4);
  transition: background .2s ease, transform .2s ease;
}
.cp-fab:hover { background: var(--burgundy-deep); transform: scale(1.06); }
.cp-fab svg { width: 26px; height: 26px; color: #fff; }
.cp-fab .cp-icon-close { display: none; }
#contact-pill.open .cp-fab .cp-icon-chat { display: none; }
#contact-pill.open .cp-fab .cp-icon-close { display: block; }

@media (max-width: 480px) {
  #contact-pill { bottom: 16px; right: 16px; }
  .cp-fab { width: 52px; height: 52px; }
}

/* --------------------------------------------------------------------
   4. PROPERTY COMPARISON TABLE
   -------------------------------------------------------------------- */
.cmp-wrap { overflow-x: auto; margin-top: 48px; -webkit-overflow-scrolling: touch; }
.cmp-table {
  width: 100%; min-width: 680px; border-collapse: collapse;
  background: var(--white); box-shadow: var(--card-shadow);
}
.cmp-table th, .cmp-table td {
  padding: 16px 20px; text-align: left;
  border-bottom: 1px solid var(--line-light);
  font-size: .92rem; vertical-align: top;
}
.cmp-table thead th {
  background: var(--ink); color: #fff;
  font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: 1.15rem;
  border-bottom: none;
}
.cmp-table thead th .cmp-price {
  display: block; font-family: 'Jost', sans-serif;
  font-size: .78rem; color: var(--gold-light); margin-top: 4px; letter-spacing: .04em;
}
.cmp-table tbody th {
  font-weight: 600; color: var(--ink-soft);
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  width: 180px;
}
.cmp-table tbody tr:last-child th, .cmp-table tbody tr:last-child td { border-bottom: none; }
.cmp-table td .cmp-yes { color: var(--burgundy); font-weight: 600; }
.cmp-table td .cmp-no { color: var(--muted); }
.cmp-cta-row td { padding: 18px 20px; background: var(--cream-2); }

/* --------------------------------------------------------------------
   5. GALLERY LIGHTBOX
   -------------------------------------------------------------------- */
.lb-overlay {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(12, 8, 6, .92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
  padding: 24px;
}
.lb-overlay.open { opacity: 1; pointer-events: auto; }
.lb-img {
  max-width: min(1080px, 92vw); max-height: 84vh;
  object-fit: contain; box-shadow: 0 20px 80px rgba(0, 0, 0, .5);
}
.lb-close, .lb-prev, .lb-next {
  position: absolute; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .25);
  color: #fff; cursor: pointer; border-radius: 50%;
  width: 46px; height: 46px; font-size: 1.25rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255, 255, 255, .2); }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lb-caption {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  color: rgba(255, 255, 255, .75); font-size: .85rem; letter-spacing: .06em;
  text-align: center; max-width: 80vw;
}

/* Make gallery + room images visibly clickable */
.gal-item-new, .room-img-new { cursor: zoom-in; }
.gal-item-new img, .room-img-new img { transition: transform .5s cubic-bezier(.25, .8, .25, 1); }
.gal-item-new:hover img, .room-img-new:hover img { transform: scale(1.045); }

/* --------------------------------------------------------------------
   6. MOBILE HERO IMPROVEMENTS
   -------------------------------------------------------------------- */
@media (max-width: 960px) {
  /* Show a compact booking card on mobile instead of hiding it entirely */
  .hero-book-card {
    display: block; position: relative; z-index: 5;
    margin: 0 16px 26px; padding: 22px 22px 18px;
    align-self: stretch;
  }
  .hero-book-perks { display: none; }   /* keep it compact on small screens */
  #hero { flex-direction: column; justify-content: flex-end; }
  .hero-title { font-size: clamp(2.4rem, 11vw, 3.4rem); }
  .hero-subtitle { font-size: .95rem; max-width: 100%; }
}

/* --------------------------------------------------------------------
   7. HERO BOOKING BAR (desktop, below hero content)
   -------------------------------------------------------------------- */
.hero-bookbar {
  position: relative; z-index: 6;
  background: var(--white);
  box-shadow: 0 -4px 40px rgba(0, 0, 0, .18);
  display: flex; align-items: stretch; justify-content: center;
  flex-wrap: wrap;
}
.hero-bookbar .hbb-field {
  display: flex; flex-direction: column; justify-content: center;
  padding: 14px 26px; border-right: 1px solid var(--line-light); gap: 2px;
}
.hero-bookbar .hbb-label {
  font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.hero-bookbar .hbb-val { font-size: .95rem; color: var(--ink); font-weight: 500; }
.hero-bookbar .hbb-btn {
  display: flex; align-items: center; padding: 0 36px;
  background: var(--burgundy); color: #fff;
  font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600;
  cursor: pointer; border: none; transition: background .2s ease;
}
.hero-bookbar .hbb-btn:hover { background: var(--burgundy-deep); }
@media (max-width: 720px) { .hero-bookbar { display: none; } }  /* mobile uses the card instead */

/* --------------------------------------------------------------------
   8. PER-PROPERTY ACCENT COLORS
   Guests always know which property they're reading about.
   -------------------------------------------------------------------- */
#tab-inn .prop-label { color: #7a2535; }
#tab-hostel .prop-label { color: #3f5e45; }
#tab-hometel .prop-label { color: #a05a2c; }

#tab-inn .prop-accent-line { background: #7a2535; }
#tab-hostel .prop-accent-line { background: #3f5e45; }
#tab-hometel .prop-accent-line { background: #a05a2c; }

/* --------------------------------------------------------------------
   9. NEWSLETTER FORM STATES
   -------------------------------------------------------------------- */
#nl-email::placeholder { color: rgba(255, 255, 255, .45); }
#nl-email:focus { border-color: var(--gold-light); outline: none; }

/* --------------------------------------------------------------------
   10. STICKY MINI BOOKING BAR (appears after scrolling past hero)
   -------------------------------------------------------------------- */
#sticky-book {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 450;
  background: var(--white);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 30px rgba(26, 26, 26, .12);
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 28px; gap: 16px;
  transform: translateY(110%);
  transition: transform .35s cubic-bezier(.25, .8, .25, 1);
}
#sticky-book.show { transform: translateY(0); }
#sticky-book .sb-text { font-size: .85rem; color: var(--ink-soft); }
#sticky-book .sb-text strong { color: var(--ink); font-weight: 600; }
#sticky-book .sb-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
#sticky-book .sb-close {
  background: none; border: none; cursor: pointer; font-size: 1.1rem;
  color: var(--muted); padding: 4px 8px; line-height: 1;
}
#sticky-book .sb-close:hover { color: var(--ink); }
@media (max-width: 720px) {
  #sticky-book { padding: 8px 14px; }
  #sticky-book .sb-text { display: none; }
  #sticky-book { justify-content: center; }
}

/* --------------------------------------------------------------------
   11. PROMO CODE + AVAILABILITY MESSAGES (booking modal)
   -------------------------------------------------------------------- */
.bk-promo-msg { font-size: .82rem; line-height: 1.5; padding: 11px 0; color: var(--muted); align-self: center; }
.bk-promo-msg.good { color: #2e7d43; font-weight: 500; }
.bk-promo-msg.bad { color: var(--burgundy); font-weight: 500; }

.bk-avail-msg { margin-top: 14px; font-size: .85rem; line-height: 1.5; padding: 11px 14px; display: none; }
.bk-avail-msg.free { display: block; background: #eef6ef; border: 1px solid #c3ddc7; color: #2e7d43; }
.bk-avail-msg.warn { display: block; background: #fdf3e7; border: 1px solid #ecd3ac; color: #8a5a1a; }

/* --------------------------------------------------------------------
   12. MAYON VIEWING-SEASON BADGE (hero, dry-season months only)
   -------------------------------------------------------------------- */
.season-badge {
  display: inline-flex; align-items: center; gap: 9px;
  margin: 16px 0 6px; padding: 10px 20px;
  background: rgba(212, 165, 32, .14);
  border: 1px solid rgba(212, 165, 32, .45);
  color: #f3e2b3;
  font-family: 'Jost', sans-serif; font-size: .78rem;
  letter-spacing: .1em; text-transform: uppercase;
  cursor: pointer; transition: background .2s ease, border-color .2s ease;
}
.season-badge:hover { background: rgba(212, 165, 32, .26); border-color: rgba(212, 165, 32, .7); }
.season-badge .sb-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold-light); box-shadow: 0 0 8px var(--gold-light);
  flex-shrink: 0;
}
.season-badge .season-cta { color: #fff; font-weight: 600; margin-left: 6px; }
@media (max-width: 480px) {
  .season-badge { font-size: .68rem; padding: 8px 14px; letter-spacing: .06em; }
}
