/* 360° viewer in the myRelaxs look: Poppins, gold #DEAC48, ink #1D1B18, pill buttons, 12px image corners. */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --gold: #DEAC48;
    --gold-dark: #C49236;
    --gold-light: #ECC470;
    --ink: #1D1B18;
    --ink-soft: #282010;
    --text: #18130E;
    --muted: #6E6A64;
    --line: #E6E4E0;
    --creme: #F5F5F4;
    --sand: #F6F2EA;
    --white: #FFFFFF;
    --wa: #25D366;
    --glass: rgba(29, 27, 24, 0.72);
    --glass-strong: rgba(29, 27, 24, 0.88);
    --on-dark-muted: rgba(255, 255, 255, 0.72);
    --on-dark-line: rgba(255, 255, 255, 0.18);
    --r-img: 12px;
    --font: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
    --ease: cubic-bezier(.22, 1, .36, 1);
    /* kept for the admin preview, which reuses the hotspot styles */
    --accent: var(--gold);
    --border: var(--on-dark-line);
    --card: var(--ink);
}

html, body { height: 100%; }

body {
    font-family: var(--font);
    background: var(--white);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

button { font: inherit; color: inherit; }
a { color: inherit; }

/* ---------- Buttons (myRelaxs pills) ---------- */

.btn-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    padding: 0 26px;
    border-radius: 999px;
    background: var(--gold);
    color: var(--ink);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn-gold:hover { background: var(--gold-light); }
.btn-gold:active { transform: scale(0.98); }
.btn-gold-sm { height: 40px; padding: 0 18px; font-size: 14px; }

.btn-round {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { filter: brightness(1.06); }

/* ---------- Start page ---------- */

.site { min-height: 100%; display: flex; flex-direction: column; background: var(--white); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px max(20px, calc((100vw - 1320px) / 2 + 20px));
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: saturate(1.4) blur(12px);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid var(--line);
}

.site-logo { display: block; line-height: 0; }
.site-logo img { width: 56px; height: 56px; }
.site-actions { display: flex; align-items: center; gap: 10px; }

.hero {
    background: var(--ink);
    color: var(--white);
    text-align: center;
    padding: 64px 20px 72px;
}

.hero-kicker {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 14px;
}

.hero-title {
    font-size: clamp(38px, 7vw, 72px);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.05em;
    max-width: 900px;
    margin: 0 auto 20px;
}

.hero-text {
    font-size: clamp(16px, 2vw, 20px);
    font-weight: 500;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    max-width: 680px;
    margin: 0 auto;
}

.tours {
    flex: 1;
    background: var(--white);
    padding: 48px max(20px, calc((100vw - 1320px) / 2 + 20px)) 64px;
}

.tour-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: -96px;
}

.tour-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--muted);
    background: var(--creme);
    border-radius: var(--r-img);
    padding: 40px 20px;
}

.tour-empty a { color: var(--gold-dark); font-weight: 700; }

.tour-card {
    display: flex;
    flex-direction: column;
    background: var(--creme);
    border-radius: 16px;
    overflow: hidden;
    color: var(--text);
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(29, 27, 24, 0.10);
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.tour-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(29, 27, 24, 0.16); }

.tour-card-img {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #ddd center / cover no-repeat;
}

.tour-card-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--white);
    color: var(--ink);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
}

.tour-card-body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.tour-card-desc { display: flex; gap: 6px; align-items: flex-start; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.tour-card-desc svg { flex-shrink: 0; margin-top: 2px; }
.tour-card-name { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; margin-bottom: 12px; }
.tour-card-meta { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.tour-card-meta strong { color: var(--text); font-weight: 700; }
.tour-card .btn-gold { margin-top: auto; width: 100%; height: 48px; }

.tour-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tour-chip { font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 999px; background: var(--white); color: var(--ink); border: 1px solid var(--line); }
.tour-chip-more { color: var(--muted); }

.site-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 28px 20px max(28px, env(safe-area-inset-bottom));
    background: var(--ink);
    color: var(--on-dark-muted);
    font-size: 14px;
}

.site-footer a { color: var(--gold); font-weight: 600; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- Viewer ---------- */

.viewer-wrap {
    position: fixed;
    inset: 0;
    background: var(--ink);
    color: var(--white);
    overflow: hidden;
}

.panorama { width: 100%; height: 100%; }

.viewer-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: max(14px, env(safe-area-inset-top)) 16px 36px;
    background: linear-gradient(180deg, rgba(29, 27, 24, 0.7), rgba(29, 27, 24, 0));
    z-index: 10;
    pointer-events: none;
}

.viewer-top-bar > * { pointer-events: auto; }

.viewer-title-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
    pointer-events: none;
}

.viewer-tour-name {
    max-width: 100%;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.viewer-scene-title {
    max-width: 100%;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.viewer-icon-btn,
.viewer-ctrl-btn {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--on-dark-line);
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s var(--ease), color 0.2s, opacity 0.2s;
}

.viewer-icon-btn:hover,
.viewer-ctrl-btn:hover { background: var(--white); color: var(--ink); }

.viewer-ctrl-btn.active { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.viewer-ctrl-btn:disabled { opacity: 0.35; cursor: default; }
.viewer-ctrl-btn:disabled:hover { background: var(--glass); color: var(--white); }

.viewer-top-bar .btn-gold-sm { height: 44px; }

.viewer-bottom {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 40px 16px max(14px, env(safe-area-inset-bottom));
    background: linear-gradient(0deg, rgba(29, 27, 24, 0.78), rgba(29, 27, 24, 0));
    z-index: 10;
    pointer-events: none;
}

.viewer-bottom > * { pointer-events: auto; }

/* Area tabs */
.group-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 2px 10px;
    scrollbar-width: none;
}

.group-bar::-webkit-scrollbar { display: none; }

.group-tab {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--on-dark-line);
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s var(--ease), border-color 0.2s, color 0.2s;
}

.group-tab:hover { border-color: var(--gold); }
.group-tab.active { background: var(--gold); border-color: var(--gold); color: var(--ink); }

.group-tab-count {
    font-size: 11px;
    font-weight: 700;
    min-width: 22px;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    text-align: center;
}

.group-tab.active .group-tab-count { background: rgba(29, 27, 24, 0.14); }

/* Area switcher under the title */
.group-switch {
    pointer-events: auto;
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    border: none;
    background: var(--white);
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    max-width: 100%;
    text-shadow: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    transition: background 0.2s var(--ease);
}

.group-switch:hover { background: var(--gold); }
.group-switch span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-switch svg { flex-shrink: 0; }

/* Thumbnails */
.thumbnail-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
    max-height: 130px;
    transition: max-height 0.3s var(--ease), padding 0.3s, opacity 0.3s;
}

.thumbs-hidden .thumbnail-strip { max-height: 0; padding: 0; opacity: 0; overflow: hidden; }

.thumb {
    flex-shrink: 0;
    width: 112px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    background: var(--ink-soft);
    padding: 0;
    transition: border-color 0.2s, transform 0.2s var(--ease);
}

.thumb:hover { border-color: rgba(255, 255, 255, 0.7); }
.thumb.active { border-color: var(--gold); }

.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.thumb-label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px 6px 4px;
    background: linear-gradient(0deg, rgba(29, 27, 24, 0.85), rgba(29, 27, 24, 0));
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.thumb-sep {
    flex-shrink: 0;
    align-self: center;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gold-light);
    padding: 4px 2px;
    margin-left: 6px;
    border-left: 2px solid var(--gold);
    max-height: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.thumb-sep:first-child { margin-left: 0; }

.viewer-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.viewer-counter {
    min-width: 64px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--on-dark-muted);
    font-variant-numeric: tabular-nums;
}

/* Area overview (like the image tiles on myrelaxs.com) */
.group-panel {
    position: absolute;
    inset: 0;
    z-index: 40;
    background: rgba(29, 27, 24, 0.86);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
}

.group-panel-inner { width: 100%; max-width: 1080px; max-height: 100%; display: flex; flex-direction: column; }
.group-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.group-panel-head h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; letter-spacing: -0.045em; line-height: 1; }

.group-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
    overflow-y: auto;
    padding: 2px;
}

.group-card {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    padding: 0;
    border-radius: var(--r-img);
    overflow: hidden;
    border: 3px solid transparent;
    background: var(--ink-soft);
    cursor: pointer;
    text-align: left;
    transition: transform 0.35s var(--ease), border-color 0.2s;
}

.group-card:hover, .group-card:focus-visible { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.6); outline: none; }
.group-card.active { border-color: var(--gold); }

.group-card-img {
    position: absolute;
    inset: 0;
    background: center / cover no-repeat;
    transition: transform 0.6s var(--ease);
}

.group-card:hover .group-card-img { transform: scale(1.05); }

.group-card-body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 40px 16px 16px;
    background: linear-gradient(0deg, rgba(29, 27, 24, 0.85), rgba(29, 27, 24, 0));
}

.group-card-name { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; color: var(--white); }
.group-card-meta { font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, 0.85); }

.group-panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.group-panel-foot img { width: 40px; height: 40px; opacity: 0.9; }

/* ---------- Hotspots ---------- */

.custom-hotspot {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    transition: background 0.2s, transform 0.2s var(--ease);
}

.custom-hotspot::before {
    content: '';
    position: absolute;
    inset: -9px;
    border-radius: 50%;
    border: 2px solid rgba(222, 172, 72, 0.7);
    animation: hs-pulse 2s ease-out infinite;
    pointer-events: none;
}

@keyframes hs-pulse {
    from { transform: scale(1); opacity: 1; }
    to { transform: scale(1.55); opacity: 0; }
}

.custom-hotspot:hover { background: var(--gold); }

.custom-hotspot svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: var(--ink);
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hotspot-info { background: var(--gold); border-color: var(--white); }
.hotspot-info:hover { background: var(--gold-light); }
.hotspot-link { background: var(--ink); border-color: var(--gold); }
.hotspot-link svg { stroke: var(--gold); }
.hotspot-link:hover { background: var(--ink-soft); }

.hs-tip {
    position: absolute;
    bottom: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--ink);
    color: var(--white);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    padding: 8px 12px;
    border-radius: 10px;
    white-space: nowrap;
    max-width: 280px;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transition: opacity 0.2s;
}

.custom-hotspot:hover .hs-tip,
.custom-hotspot.open .hs-tip { opacity: 1; }

.hotspot-info .hs-tip { white-space: normal; width: max-content; }

/* ---------- Toast and loading ---------- */

.toast {
    position: absolute;
    left: 50%;
    top: 96px;
    transform: translate(-50%, -10px);
    background: var(--white);
    color: var(--ink);
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    transition: opacity 0.25s, transform 0.25s var(--ease);
    z-index: 50;
    max-width: calc(100% - 32px);
    overflow-wrap: anywhere;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

.loading-overlay {
    position: absolute;
    inset: 0;
    background: var(--ink);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: opacity 0.4s;
}

.loading-overlay.fade-out { opacity: 0; pointer-events: none; }

.loading-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255, 255, 255, 0.12);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

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

.loading-text { font-size: 14px; font-weight: 500; color: var(--on-dark-muted); }

.pnlm-load-box { display: none !important; }
.pnlm-container { font-family: var(--font); }

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
    .site-logo img { width: 48px; height: 48px; }
    .site-actions .btn-gold { height: 44px; padding: 0 18px; font-size: 14px; }
    .btn-round { width: 44px; height: 44px; }
    .hero { padding: 44px 20px 92px; }
    .tours { padding-top: 32px; }
    .tour-list { grid-template-columns: 1fr; margin-top: -80px; }
    .viewer-top-bar .btn-gold-sm { display: none; }
    .viewer-scene-title { font-size: 17px; }
    .viewer-icon-btn, .viewer-ctrl-btn { width: 40px; height: 40px; }
    .viewer-controls { gap: 6px; }
    .viewer-counter { min-width: 48px; font-size: 12px; }
    .thumb { width: 88px; height: 52px; }
    .group-tab { height: 36px; padding: 0 13px; font-size: 13px; }
    .group-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .group-card-name { font-size: 16px; }
    .group-card-body { padding: 28px 10px 10px; }
    .group-card-meta { font-size: 11px; }
    /* On phones the tab bar names the areas; the strip just shows a divider. */
    .thumb-sep { font-size: 0; padding: 0; margin: 4px 3px; border-left-width: 3px; border-radius: 2px; max-height: none; }
}
