/*
 * style-enhancements-accommodation.css
 * Builds the design-language layer for accommodation pages across all 10 consuming domains.
 * Ported from the package version (moremi.com/style-enhancements.css) with:
 *   - Package-specific sections removed (Safari route map, Other packages scroll strip,
 *     Best time to visit widget, Packages index page styling, dual-handle range sliders)
 *   - Subnav adapted: --subnav-height token added, footer padding rule added, hide-on-footer
 *     CSS class kept defensively (JS observer disabled in enhancements-accommodation.js)
 *   - Reduced-motion opt-out added on .reveal
 *
 * Loaded after style-accommodation.css on every accommodation page.
 * Same file content deployed per consuming domain.
 */

/*
 * style-enhancements.css — v4
 * Builds on the safe base (colours, transitions, hover lift) and adds:
 *   - Widget card treatment
 *   - Gradient overlay on portfolio cards
 *   - Accordion header colour (colour only, not display/height)
 *   - Scroll-reveal on safe layout sections only
 *   - At-a-glance SVG hover
 *   - Blockquote accent
 *   - Portfolio scroll strip (tablet portrait + mobile, ≤767px)
 *
 * NEVER touches: display, height, overflow, visibility, padding on
 * JS-controlled elements (accordion-content, tab-content, widget tabs,
 * .stars, .flexslider internals, isotope items).
 */


/* ─── Design tokens ──────────────────────────────────────────────────────── */

:root {
  --accent:      #c17d3c;
  --accent-dark: #8a5520;
  --ink:         #2a2118;
  --ink-mid:     #6b5f55;
  --surface:     #faf8f5;
  --white:       #ffffff;
  --border:      #e8e0d6;
  --ease:        cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-sm:   0 2px 8px  rgba(42,33,24,0.08);
  --shadow-md:   0 6px 20px rgba(42,33,24,0.11);
  --shadow-lg:   0 16px 48px rgba(42,33,24,0.18);
  --subnav-height: 72px;
}

/* ─── Smooth scroll ──────────────────────────────────────────────────────── */

html { scroll-behavior: smooth; }


/* ─── Header scroll shadow ───────────────────────────────────────────────── */

.header-top-inner {
  transition: box-shadow 0.3s var(--ease);
}
.header-top-inner.scrolled {
  box-shadow: 0 2px 16px rgba(42,33,24,0.13);
}

/* ─── Nav ────────────────────────────────────────────────────────────────── */

.main-navigation ul > li a {
  transition: color 0.2s var(--ease);
}
.main-navigation ul > li a:hover,
.main-navigation li.current a {
  color: var(--accent);
}

/* ─── Accent on meta text ────────────────────────────────────────────────── */

.single-project .client-name {
  color: var(--accent);
}

/* ─── Blockquote ─────────────────────────────────────────────────────────── */

blockquote {
  border-left-color: var(--accent);
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */

a.back-btn,
a.previous-btn,
a.next-btn,
a.read-more-btn {
  transition: background 0.22s var(--ease),
              transform  0.18s var(--ease),
              box-shadow 0.18s var(--ease);
}

a.back-btn           { background: var(--accent); }
a.back-btn:hover     { background: var(--accent-dark); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
a.previous-btn:hover,
a.next-btn:hover     { background: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
a.read-more-btn:hover { background: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

#submit {
  background-color: var(--accent) !important;
  color: #fff !important;
  transition: background 0.22s var(--ease), transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
#submit:hover {
  background-color: var(--accent-dark) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}





/* ─── Accordion header colour only ──────────────────────────────────────── */
/* JS controls display/height — we only recolour */

.accordion-header {
  background: var(--ink);
  transition: background 0.2s var(--ease);
}
.active-header {
  background: var(--accent) !important;
}
.inactive-header {
  background: #ede8e2;
  color: var(--ink);
}
.inactive-header:hover {
  background: var(--ink);
  color: #fff;
}

/* ─── Tab colour only ────────────────────────────────────────────────────── */
/* JS controls active state — we only add warm colours */

ul.tabs li {
  background: #ede8e2;
  color: var(--ink-mid);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
ul.tabs li:hover {
  background: var(--ink);
  color: #fff;
}
ul.tabs li.active {
  background: var(--accent);
  color: #fff;
}

/* ─── Portfolio cards — hover lift + gradient overlay ────────────────────── */

.project-item {
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.project-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.project-item img {
  transition: transform 0.4s var(--ease);
}
.project-item:hover img {
  transform: scale(1.04);
}

/* Gradient overlay — bottom-up fade instead of flat black */
.project-image:hover .overlay,
.project-image-always-show-overlay .overlay {
  background: linear-gradient(
    to top,
    rgba(42,33,24,0.92) 0%,
    rgba(42,33,24,0.35) 55%,
    transparent 100%
  ) !important;
}

/* ─── At-a-glance items ──────────────────────────────────────────────────── */

.at-a-glance-item {
  border-radius: 8px;
  transition: background 0.22s var(--ease), transform 0.22s var(--ease);
}
.at-a-glance-item:hover {
  transform: translateY(-3px);
}
.at-a-glance-item svg {
  transition: transform 0.25s var(--ease);
}
.at-a-glance-item:hover svg {
  transform: scale(1.08);
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */

#footer-global[role="contentinfo"] {
  background-color: var(--ink);
  border-top-color: var(--accent);
}

/* Footer bottom padding — clears the bottom-fixed sticky subnav so copyright
   row + legal links remain visible above the bar. iOS safe-area-inset
   accommodates the home indicator on iPhones. */
#footer-global {
  padding-bottom: calc(var(--subnav-height) + env(safe-area-inset-bottom, 0px));
}

/* ─── Link hovers ────────────────────────────────────────────────────────── */

.on-page-links li a,
#copyright-details a {
  transition: color 0.18s var(--ease);
}
.on-page-links li a:hover,
#copyright-details a:hover {
  color: var(--accent);
}

/* ─── HR ─────────────────────────────────────────────────────────────────── */

hr { border-color: var(--border); }

/* ─── Content links ──────────────────────────────────────────────────────── */
/* Scoped to body content areas — does not affect nav, buttons, or footer */

.project-description p a,
.project-description li a,
.accordion-content p a,
.widget p a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(193, 125, 60, 0.35);
  text-underline-offset: 3px;
  transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease);
}

.project-description p a:hover,
.project-description li a:hover,
.accordion-content p a:hover,
.widget p a:hover {
  color: var(--accent-dark);
  text-decoration-color: var(--accent-dark);
}

/* ─── Scroll-reveal ──────────────────────────────────────────────────────── */
/*
 * Applied by enhancements.js via IntersectionObserver.
 * Selector list in JS is narrow and explicit — see enhancements.js.
 * The .reveal class is ONLY added to elements in that safe list.
 */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Reduced-motion opt-out — users who request reduced motion at the OS level
   get static appearance, no opacity/translate transitions. */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   SAFARI PACKAGE SECONDARY NAV
   Sticky bottom bar with drawer on mobile, inline links on desktop.
   Breakpoint: ≤900px = mobile/portrait-tablet version
═══════════════════════════════════════════════════════════════════════════ */

/* ── Bar ── */

#safari-subnav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 900;
  font-family: 'museo-sans', sans-serif;
  /* Hide/show transition when footer reached */
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

#safari-subnav.subnav-hidden {
  transform: translateY(100%);
}

.subnav-bar {
  background: #2a2118;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-bottom: env(safe-area-inset-bottom, 0px); /* iPhone home indicator */
}

.subnav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
  height: 72px;
}

/* ── Desktop inline links ── */

.subnav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.subnav-links a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.8em;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.18s var(--ease);
  white-space: nowrap;
}

.subnav-links a:hover {
  color: #ffffff;
}

/* ── CTA button ── */

.subnav-cta {
  display: inline-block;
  background: #e8820c;
  color: #ffffff !important;
  text-decoration: none;
  font-size: 0.75em;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 22px;
  border-radius: 20px;
  white-space: nowrap;
  transition: background 0.18s var(--ease), transform 0.18s var(--ease);
  flex-shrink: 0;
  /* Reset button defaults — accommodation .subnav-cta is a <button> element so
     the widget's .sw-book-btn click handler can fire without href="#" scroll.
     transparent border (rather than border:none) preserves the height the
     anchor variant had — keeps subnav pill at the original size. */
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
}

.subnav-cta:hover {
  background: #d07000;
  transform: translateY(-1px);
}

/* ── Right side group (CTA + back to top) ── */
.subnav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ── Mobile toggle (hamburger) ── */

.subnav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: #ffffff;
}

.subnav-toggle-label {
  font-family: 'museo-sans', sans-serif;
  font-size: 0.75em;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
}

.subnav-hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 20px;
}

.subnav-hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: rgba(255,255,255,0.85);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

/* Hamburger → X when open */
.subnav-toggle[aria-expanded="true"] .subnav-hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.subnav-toggle[aria-expanded="true"] .subnav-hamburger span:nth-child(2) {
  opacity: 0;
}
.subnav-toggle[aria-expanded="true"] .subnav-hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile drawer ── */

.subnav-drawer {
  background: #332820;
  border-top: 1px solid rgba(255,255,255,0.08);
  position: absolute;
  bottom: 100%;
  left: 0;
  width: 100%;
  max-height: 50vh;
  overflow-y: auto;
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    opacity   0.25s var(--ease);
}

.subnav-drawer.subnav-drawer-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.subnav-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 1.1em;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s;
}

.subnav-close:hover {
  color: #ffffff;
}

.subnav-drawer-links {
  list-style: none;
  margin: 0;
  padding: 16px 0 20px;
}

.subnav-drawer-links li {
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.subnav-drawer-links li:last-child {
  border-bottom: none;
}

.subnav-drawer-links a {
  display: block;
  padding: 14px 20px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.9em;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: color 0.15s, background 0.15s;
}

.subnav-drawer-links a:hover,
.subnav-drawer-links a.subnav-active {
  color: #e8820c;
  background: rgba(232,130,12,0.06);
}

/* ── Responsive — mobile/portrait-tablet ≤900px ── */

@media (max-width: 900px) {
  .subnav-links  { display: none; }
  .subnav-toggle { display: flex; }
  .subnav-right  { gap: 8px; }
}

@media (max-width: 480px) {
  .subnav-cta {
    font-size: 0.68em;
    padding: 8px 14px;
  }
}

@media (min-width: 901px) {
  .subnav-drawer { display: none; }
  .subnav-right  { gap: 16px; }
}



/* ── Back to top button ── */

.subnav-totop {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  vertical-align: middle;
  align-self: center;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}

.subnav-totop:hover {
  border-color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.08);
}

/* Pure CSS upward chevron — absolutely centred */
.subnav-totop {
  position: relative; /* needed for ::before absolute positioning */
}
.subnav-totop::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-top: 2px solid rgba(255,255,255,0.7);
  border-right: 2px solid rgba(255,255,255,0.7);
  transform: translate(-50%, -30%) rotate(-45deg);
  transition: border-color 0.18s var(--ease);
}

.subnav-totop:hover::before {
  border-color: #ffffff;
}


/* ═══════════════════════════════════════════════════════════════════════════
   COMPATIBILITY SHIM — undo bleed from booking-widget.css universal reset

   booking-widget.css starts with two unscoped rules that bleed onto host page:
     * { margin: 0; padding: 0; box-sizing: border-box; }
     body { font-family: 'museo-sans', sans-serif; background: #f5f3ef; color: #333; }

   This breaks three things on the host accommodation page:
   1. * { box-sizing: border-box } — the Cabana grid was authored for content-box.
      Under border-box, .five.columns.offset-by-one (width: 280px + padding-left:
      60px) gives only 220px content area instead of 280px — sidebar widgets
      render narrower than designed.
   2. * { margin: 0 } — zeroes paragraph margins. Cabana didn't reset p (relied
      on browser default 1em margin), so non-first paragraphs lose all spacing.
   3. * { margin: 0 } — also kills .main-navigation ul > li { margin-right: 10px }
      from base style.css, leaving nav items tightly packed.

   The widget's own elements (#booking-widget-modal, .modal-overlay) keep
   border-box and margin: 0 — only chrome elements need restoration.

   REMOVE THIS BLOCK once booking-widget.css is properly scoped (post-launch fix).
═══════════════════════════════════════════════════════════════════════════ */

/* Restore content-box for Cabana grid containers and columns */
.container,
.container .row,
.container [class*="columns"] {
  box-sizing: content-box;
}

/* Restore paragraph spacing in body content areas */
.project-description p {
  margin-bottom: 20px;
}

/* Restore nav item spacing to match Cabana base (booking-widget * { margin: 0 } kills the base 10px) */
.main-navigation ul > li {
  margin-right: 10px;
}

/* Restore hr UA-default margins (booking-widget * { margin: 0 } zeros the
   browser's user-agent margin-block-start/end: 0.5em that legacy rate-table
   pages relied on for vertical rhythm between rate rows). */
hr {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}


