/* =====================================================================
   SINGLE LISTING  — ported from surfside-single-listing.html
   Loaded only on single `listing` pages (see functions.php).
   ===================================================================== */

/* PHOTO GALLERY HERO */
.gallery-hero { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 380px 200px; gap: 3px; max-height: 585px; }
.gallery-main { grid-row: span 2; position: relative; overflow: hidden; cursor: pointer; }
/* Adapt to photo count so a single Featured Image fills the banner cleanly. */
.gallery-hero--single { grid-template-columns: 1fr; grid-template-rows: clamp(340px, 44vw, 520px); }
.gallery-hero--duo { grid-template-columns: 2fr 1fr; grid-template-rows: clamp(340px, 40vw, 520px); }
.gallery-hero--single .gallery-main, .gallery-hero--duo .gallery-main { grid-row: auto; }
.gallery-thumb { position: relative; overflow: hidden; cursor: pointer; }
.gallery-img { width: 100%; height: 100%; object-fit: cover; background-size: cover; background-position: center; transition: transform .4s ease; }
.gallery-main:hover .gallery-img, .gallery-thumb:hover .gallery-img { transform: scale(1.04); }
.gallery-view-all { position: absolute; bottom: 1rem; right: 1rem; background: rgba(255,255,255,.92); color: var(--text); font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: .5rem 1rem; border-radius: 4px; cursor: pointer; transition: background .2s; border: none; }
.gallery-view-all:hover { background: #fff; }
.gallery-breadcrumb { position: absolute; top: 1.25rem; left: 1.25rem; background: rgba(15,74,99,.8); backdrop-filter: blur(8px); color: #fff; font-size: .64rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: .45rem .9rem; border-radius: 4px; display: flex; align-items: center; gap: .4rem; z-index: 10; }
.gallery-breadcrumb a { color: rgba(255,255,255,.85); text-decoration: none; }
.gallery-breadcrumb a:hover { color: #fff; }
.gallery-breadcrumb span { color: rgba(255,255,255,.35); }

/* MAIN CONTENT WRAPPER */
.profile-body { max-width: var(--wrap); margin: 0 auto; padding: 2.5rem 2rem; display: grid; grid-template-columns: 1fr 360px; gap: 3rem; align-items: start; }

/* TITLE BLOCK */
.profile-title-block { margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border); }
.profile-tags { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.profile-tag { font-size: .55rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; padding: .3rem .75rem; border-radius: 3px; text-decoration: none; }
.tag-cat { background: var(--sky); color: var(--ocean); border: 1px solid var(--border); }
.tag-featured { background: var(--coral); color: #fff; }
.tag-free { background: #e8f5e9; color: #2e7d32; border: 1px solid rgba(46,125,50,.2); }
.tag-accessible { background: #e3f2fd; color: #1565c0; border: 1px solid rgba(21,101,192,.2); }
.profile-name { font-family: var(--font-head); font-size: clamp(1.8rem, 3.5vw, 3rem); font-weight: 700; color: var(--text); line-height: 1.1; margin-bottom: .6rem; }
.profile-subtitle { font-size: .9rem; color: var(--text-light); letter-spacing: .05em; display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.profile-subtitle-divider { color: var(--border); }

/* QUICK FACTS ROW */
.quick-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 2.5rem; }
.quick-fact { background: #fff; padding: 1.25rem; text-align: center; }
.quick-fact-icon { font-size: 1.3rem; display: block; margin-bottom: .3rem; }
.quick-fact-value { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; color: var(--ocean); display: block; line-height: 1.2; }
.quick-fact-label { font-size: .6rem; letter-spacing: .15em; text-transform: uppercase; color: var(--text-light); font-weight: 700; display: block; margin-top: .2rem; }

/* DESCRIPTION */
.profile-description { font-size: .95rem; color: var(--text-mid); line-height: 1.9; margin-bottom: 2.5rem; }
.profile-description p { margin-bottom: 1.1rem; }
.profile-description p:last-child { margin-bottom: 0; }
.profile-description strong { color: var(--text); font-weight: 700; }

/* SECTION HEADINGS */
.profile-section-title { font-family: var(--font-head); font-size: 1.3rem; font-weight: 700; color: var(--text); margin-bottom: 1.25rem; padding-bottom: .75rem; border-bottom: 2px solid var(--border); display: flex; align-items: center; gap: .6rem; }

/* AMENITIES */
.amenities-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-bottom: 2.5rem; }
.amenity-item { display: flex; align-items: center; gap: .6rem; font-size: .8rem; color: var(--text-mid); padding: .75rem; background: #fff; border: 1px solid var(--border); border-radius: 6px; font-weight: 600; }
.amenity-icon { font-size: 1rem; }

/* HOURS TABLE */
.hours-table { width: 100%; border-collapse: collapse; margin-bottom: 2.5rem; font-size: .85rem; }
.hours-table tr { border-bottom: 1px solid var(--border); }
.hours-table tr:last-child { border-bottom: none; }
.hours-table td { padding: .75rem 0; color: var(--text-mid); }
.hours-table td:first-child { font-weight: 700; color: var(--text); width: 40%; }
.hours-table td:last-child { text-align: right; }
.hours-today { color: var(--teal) !important; font-weight: 700 !important; }

/* MAP */
.profile-map { border-radius: var(--radius); overflow: hidden; height: 320px; background: var(--sky); border: 1px solid var(--border); margin-bottom: .75rem; }
.profile-map-frame { width: 100%; height: 100%; border: 0; display: block; }
.profile-map-caption { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; margin-bottom: 2.5rem; }
.profile-map-address { font-weight: 700; color: var(--ocean); font-size: .9rem; line-height: 1.4; }
.profile-map-link { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ocean); text-decoration: none; }

/* FONT AWESOME ICON ACCENTS */
.profile-section-title i { color: var(--teal); }
.quick-fact-icon i { color: var(--teal); }
.amenity-icon i { color: var(--teal); width: 1.1rem; text-align: center; }
.sidebar-detail-icon i { color: var(--ocean); width: 1.2rem; text-align: center; }
.profile-subtitle i { color: var(--text-light); }

/* LIGHTBOX */
.gallery-main[data-lb-index], .gallery-thumb[data-lb-index] { cursor: pointer; }
.gallery-main[data-lb-index]:focus-visible, .gallery-thumb[data-lb-index]:focus-visible { outline: 3px solid var(--teal); outline-offset: -3px; }
.vsb-lightbox { position: fixed; inset: 0; z-index: 9999; background: rgba(10,25,35,.94); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity .25s ease; }
.vsb-lightbox.is-open { opacity: 1; visibility: visible; }
.vsb-lightbox-img { max-width: 90vw; max-height: 82vh; border-radius: 6px; box-shadow: 0 12px 48px rgba(0,0,0,.55); object-fit: contain; }
.vsb-lb-btn { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: none; cursor: pointer; width: 48px; height: 48px; border-radius: 50%; font-size: 1.6rem; line-height: 1; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.vsb-lb-btn:hover { background: rgba(255,255,255,.28); }
.vsb-lb-prev { left: 2vw; top: 50%; transform: translateY(-50%); }
.vsb-lb-next { right: 2vw; top: 50%; transform: translateY(-50%); }
.vsb-lb-close { top: 1.5rem; right: 1.5rem; width: 42px; height: 42px; font-size: 1.1rem; }
.vsb-lb-count { position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.75); font-size: .8rem; letter-spacing: .1em; }
@media (max-width: 700px) { .vsb-lb-prev { left: .5rem; } .vsb-lb-next { right: .5rem; } }

/* SIDEBAR */
.sidebar-card { background: #fff; border-radius: var(--radius); box-shadow: 0 4px 24px rgba(0,0,0,.08); overflow: hidden; margin-bottom: 1.5rem; }
.sidebar-card-header { background: var(--ocean); padding: 1.5rem; }
.sidebar-header-title { font-family: var(--font-head); font-size: 1.2rem; font-weight: 700; color: #fff; margin-bottom: .25rem; }
.sidebar-header-sub { font-size: .7rem; color: rgba(255,255,255,.6); letter-spacing: .05em; }
.sidebar-card-body { padding: 1.25rem 1.5rem; }
.sidebar-detail { display: flex; align-items: flex-start; gap: .75rem; padding: .85rem 0; border-bottom: 1px solid var(--border); font-size: .85rem; }
.sidebar-detail:last-of-type { border-bottom: none; padding-bottom: 0; }
.sidebar-detail-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: .1rem; }
.sidebar-detail-label { font-size: .58rem; letter-spacing: .15em; text-transform: uppercase; color: var(--text-light); font-weight: 700; display: block; margin-bottom: .15rem; }
.sidebar-detail-value { color: var(--text); font-weight: 600; line-height: 1.4; display: block; }
.sidebar-detail-value a { color: var(--ocean); text-decoration: none; }
.sidebar-detail-sub { font-size: .75rem; color: var(--text-light); font-weight: 400; display: block; margin-top: .1rem; }
.sidebar-cta { padding: 1.25rem 1.5rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: .75rem; }
.share-row { display: flex; align-items: center; justify-content: center; gap: .75rem; padding-top: .25rem; }
.share-label { font-size: .6rem; letter-spacing: .15em; text-transform: uppercase; color: var(--text-light); font-weight: 700; }
.share-btn { width: 32px; height: 32px; border-radius: 50%; background: var(--sky); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: .85rem; cursor: pointer; transition: background .2s; text-decoration: none; }
.share-btn i { color: var(--ocean); font-size: .8rem; transition: color .2s; }
.share-btn:hover { background: var(--teal-light); }
.share-btn:hover i { color: #fff; }

/* SIDEBAR — events at this location */
.sb-events-title { font-family: var(--font-head); font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 1rem; }
.sb-event { display: flex; gap: .75rem; align-items: flex-start; padding-bottom: .75rem; border-bottom: 1px solid var(--border); margin-bottom: .75rem; }
.sb-event:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.sb-event-date { background: var(--ocean); color: #fff; border-radius: 6px; padding: .4rem .6rem; text-align: center; flex-shrink: 0; min-width: 44px; }
.sb-event-date.is-featured { background: var(--coral); color: #fff; }
.sb-event-day { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; line-height: 1; display: block; }
.sb-event-mon { font-size: .5rem; letter-spacing: .1em; text-transform: uppercase; opacity: .8; display: block; }
.sb-event-title { font-weight: 700; font-size: .85rem; color: var(--text); line-height: 1.3; }
.sb-event-meta { font-size: .7rem; color: var(--text-light); margin-top: .2rem; }
.sb-events-link { display: block; text-align: center; margin-top: 1.25rem; font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ocean); text-decoration: none; padding-top: 1rem; border-top: 1px solid var(--border); }

/* NEARBY */
.nearby-section { max-width: var(--wrap); margin: 0 auto 4rem; padding: 0 2rem; }
.nearby-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 1.5rem; }
.nearby-title { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; color: var(--text); }
.nearby-title em { font-style: italic; color: var(--ocean); }
.nearby-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.nearby-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.07); display: flex; transition: transform .3s, box-shadow .3s; cursor: pointer; text-decoration: none; }
.nearby-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,.1); }
.nearby-card-image { width: 100px; flex-shrink: 0; background-size: cover; background-position: center; }
.nearby-card-body { padding: 1rem 1.25rem; }
.nearby-card-cat { font-size: .55rem; letter-spacing: .2em; text-transform: uppercase; color: var(--teal); font-weight: 700; display: block; margin-bottom: .3rem; }
.nearby-card-title { font-weight: 700; font-size: .9rem; color: var(--text); line-height: 1.3; margin-bottom: .3rem; }
.nearby-card-meta { font-size: .7rem; color: var(--text-light); }

/* RESPONSIVE */
@media (max-width: 1000px) {
  .profile-body { grid-template-columns: 1fr; }
  .nearby-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .gallery-hero { grid-template-columns: 1fr; grid-template-rows: 280px; }
  .gallery-thumb { display: none; }
  .quick-facts { grid-template-columns: 1fr 1fr; }
  .amenities-grid { grid-template-columns: 1fr 1fr; }
  .nearby-grid { grid-template-columns: 1fr; }
}
