/**
 * Vista Spots Frontend Styles
 * Minimal default styles - theme can override
 */

/* Grid Layout */
.vista-spots-grid {
    display: grid;
    gap: 2rem;
    margin: 2rem 0;
}

.vista-grid-cols-2 {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.vista-grid-cols-3 {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.vista-grid-cols-4 {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

@media (max-width: 768px) {
    .vista-spots-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Spot Card */
.vista-spot-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vista-spot-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.vista-spot-card-image {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2 aspect ratio */
    overflow: hidden;
    background: #f0f0f0;
}

.vista-spot-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vista-spot-card-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0e0e0;
    color: #999;
}

.vista-spot-card-placeholder .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
}

.vista-spot-card-categories {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.vista-spot-category-badge {
    background: rgba(255,255,255,0.9);
    color: #333;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.vista-spot-difficulty {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.vista-spot-difficulty-easy { background: #4caf50; color: #fff; }
.vista-spot-difficulty-moderate { background: #ff9800; color: #fff; }
.vista-spot-difficulty-challenging { background: #ff5722; color: #fff; }
.vista-spot-difficulty-difficult { background: #f44336; color: #fff; }

.vista-spot-card-content {
    padding: 1.5rem;
}

.vista-spot-card-title {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    line-height: 1.4;
}

.vista-spot-card-title a {
    color: #333;
    text-decoration: none;
}

.vista-spot-card-title a:hover {
    color: #007bff;
}

.vista-spot-card-location {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.vista-spot-card-location .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.vista-spot-card-excerpt {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.vista-spot-card-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #777;
}

.vista-spot-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.vista-spot-meta-item .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.vista-spot-card-button {
    display: inline-block;
    padding: 8px 20px;
    background: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.vista-spot-card-button:hover {
    background: #0056b3;
}

/* Single Spot */
.vista-spot-single {
    max-width: 1200px;
    margin: 0 auto;
}

.vista-spot-header {
    margin-bottom: 2rem;
}

.vista-spot-title {
    margin: 0 0 0.5rem;
    font-size: 2.5rem;
}

.vista-spot-location-header {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1rem;
}

.vista-spot-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── Gallery Grid — Masonry columns (spot, photographer, collection pages) ── */
.vista-spot-gallery {
    columns: 3;
    column-gap: 12px;
    margin-bottom: 2rem;
}

/* Column-count classes (auto-calculated by PHP partial) */
.vista-spot-gallery.vista-cols-2 { columns: 2; }
.vista-spot-gallery.vista-cols-3 { columns: 3; }
.vista-spot-gallery.vista-cols-4 { columns: 4; }

.vista-spot-gallery:not(.vista-cols-2):not(.vista-cols-3):not(.vista-cols-4) {
    columns: 3;
}

.vista-gallery-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    break-inside: avoid;
    page-break-inside: avoid; /* Safari */
    display: block;
    margin-bottom: 12px;
    background: #f1f5f9;
}

/* Specificity 0,2,1 — beats .elementor-kit-NNN img (0,1,1) */
.vista-spot-gallery .vista-gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
    transition: transform 0.4s ease;
}

.vista-spot-gallery .vista-gallery-item:hover img {
    transform: scale(1.03);
}

/* Owner credit overlay (visible by default; single-spot.css hides and slides up on hover) */
.vista-gallery-credit {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 0.75rem 0.6rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    transition: transform 0.3s ease;
}

.vista-gallery-credit .vista-owner-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    object-fit: cover;
    flex-shrink: 0;
}

.vista-gallery-credit .vista-owner-credit-link,
.vista-owner-credit-link {
    color: #fff;
    text-decoration: none;
}

.vista-gallery-credit .vista-owner-credit-link:hover,
.vista-owner-credit-link:hover {
    text-decoration: underline;
}

.vista-owner-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* Spot badge overlay (photographer page — links each photo back to its spot) */
.vista-gallery-spot-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 1.5rem 0.6rem 0.5rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
    color: #fff;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.3;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.vista-gallery-item:hover .vista-gallery-spot-badge {
    opacity: 1;
}

.vista-gallery-spot-badge:hover {
    color: #fff;
    text-decoration: none;
}

.vista-gallery-spot-badge .vista-spot-badge-thumb {
    width: 30px;
    height: 30px;
    border-radius: 4px; /* intentional — small square thumb */
    object-fit: cover;
    flex-shrink: 0;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
}

.vista-spot-badge-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Responsive gallery columns */
@media (max-width: 768px) {
    .vista-spot-gallery.vista-cols-4 { columns: 3; }
    .vista-spot-gallery { column-gap: 8px; }
    .vista-gallery-item { margin-bottom: 8px; }
}
@media (max-width: 480px) {
    .vista-spot-gallery.vista-cols-3,
    .vista-spot-gallery.vista-cols-4 { columns: 2; }
    .vista-spot-gallery.vista-cols-2 { columns: 2; }
    .vista-spot-gallery { column-gap: 6px; }
    .vista-gallery-item { margin-bottom: 6px; }
}

/* ----------------------------------------------------------------
   Shared credit overlay — used by gallery templates AND
   photographer/spot/collection page grids (.vista-gallery-item).
   Slides up from bottom on hover; item must have overflow:hidden.
   ---------------------------------------------------------------- */

.vgt-credit-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
    color: #fff;
    padding: 32px 12px 10px;
    transform: translateY(100%);
    transition: transform 0.32s ease;
    display: flex;
    flex-direction: column;
    gap: 5px;
    pointer-events: none;
}

.vgt-credit-overlay a {
    pointer-events: auto;
}

/* Spot name — small uppercase label above owner */
.vgt-credit-spot,
a.vgt-credit-spot,
a.vgt-credit-spot:hover,
a.vgt-credit-spot:visited,
a.vgt-credit-spot:focus {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.8;
    font-weight: 500;
    line-height: 1.2;
    color: #fff;
    text-decoration: none;
}

a.vgt-credit-spot:hover {
    color: #fff;
}

/* Owner row: avatar + name */
.vgt-credit-owner {
    display: flex;
    align-items: center;
    gap: 7px;
}

.vgt-owner-avatar {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
}

.vgt-owner-name,
.vgt-owner-name:hover,
.vgt-owner-name:visited,
.vgt-owner-name:focus {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff !important;
    text-decoration: none;
    line-height: 1.3;
}

.vgt-owner-name:hover {
    text-decoration: underline;
}

/* Reveal on hover — covers all item types */
.vista-gallery-item:hover .vgt-credit-overlay,
.vista-masonry-item:hover .vgt-credit-overlay,
.vista-classic-item:hover .vgt-credit-overlay,
.vista-flowing-item:hover .vgt-credit-overlay,
.vgea-item:hover .vgt-credit-overlay {
    transform: translateY(0);
}

/* Content Layout */
.vista-spot-content-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

@media (max-width: 768px) {
    .vista-spot-content-wrapper {
        grid-template-columns: 1fr;
    }
}

.vista-spot-intro {
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: #333;
}

.vista-spot-description {
    line-height: 1.8;
    color: #444;
}

.vista-spot-accessibility {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-left: 4px solid #007bff;
    border-radius: 4px;
}

/* Sidebar */
.vista-spot-sidebar h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.vista-spot-info-box {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.vista-info-item {
    margin-bottom: 0.75rem;
}

.vista-info-item strong {
    display: inline-block;
    min-width: 100px;
}

.vista-spot-map {
    margin-bottom: 2rem;
}

.vista-map-placeholder {
    background: #e9ecef;
    padding: 3rem;
    text-align: center;
    border-radius: 8px;
}

.vista-share-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.vista-share-btn {
    display: block;
    padding: 10px;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    transition: opacity 0.3s ease;
}

.vista-share-btn:hover {
    opacity: 0.8;
}

.vista-share-facebook { background: #1877f2; color: #fff; }
.vista-share-twitter { background: #1da1f2; color: #fff; }
.vista-share-email { background: #6c757d; color: #fff; }

/* Carousel */
.vista-carousel {
    position: relative;
    overflow: hidden;
    margin: 2rem 0;
}

.vista-carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.vista-carousel-item {
    flex: 0 0 33.333%;
    padding: 0 10px;
}

@media (max-width: 768px) {
    .vista-carousel-item {
        flex: 0 0 100%;
    }
}

.vista-carousel-item-image {
    position: relative;
    width: 100%;
    padding-top: 75%;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    overflow: hidden;
}

.vista-carousel-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(transparent 50%, rgba(0,0,0,0.8));
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    color: #fff;
    text-decoration: none;
    transition: background 0.3s ease;
}

.vista-carousel-item-overlay:hover {
    background: rgba(0,0,0,0.6);
}

.vista-carousel-item-overlay h3 {
    margin: 0;
    font-size: 1.25rem;
}

.vista-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    transition: background 0.3s ease;
    z-index: 10;
}

.vista-carousel-nav:hover {
    background: #fff;
}

.vista-carousel-prev {
    left: 10px;
}

.vista-carousel-next {
    right: 10px;
}

/* Utility Classes */
.vista-no-results {
    text-align: center;
    padding: 3rem;
    color: #777;
}

.vista-error {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
}

.vista-success {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
}

/* =========================================================
   Shared: Contributors row (used on single spot, collection, photographer pages)
   ========================================================= */

.vista-contributors-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--vista-secondary-color, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.vista-contributor-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.vista-contributor-link:hover {
    opacity: 0.75;
}

.vista-contributor-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
}

.vista-contributor-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--vista-primary-color, #2563eb);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    flex-shrink: 0;
}

.vista-contributor-name {
    font-size: 0.85rem;
    font-weight: 500;
}

/* =========================================================
   Photographer Portfolio Page — /photographer/{owner-slug}
   ========================================================= */

.vista-owner-gallery-page {
    font-family: var(--vista-body-font, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
    color: var(--vista-text-color, #1e293b);
    width: 100%;
    max-width: 100%;
    background: #fff;
}

/* Header */
.vista-owner-header {
    background: #fff;
    padding: 1.25rem 0;
}

.vista-owner-header-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 5vw, 2rem);
}

/* Profile row */
.vista-owner-profile {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

/* Avatar */
.vista-owner-avatar-wrap {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 6px;
    overflow: hidden;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vista-owner-avatar-wrap .vista-owner-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0; /* container handles rounding via overflow:hidden */
}

.vista-owner-avatar-placeholder {
    background: #e2e8f0;
}

.vista-owner-avatar-initials {
    font-size: 1.25rem;
    font-weight: 700;
    color: #64748b;
    line-height: 1;
}

/* Profile info */
.vista-owner-profile-info {
    flex: 1;
    min-width: 0;
}

.vista-owner-profile-name {
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.2rem;
    line-height: 1;
}

/* Beat .elementor-kit-NNN h1 (specificity 0,1,1) with 0,2,2 */
body.vista-photographer-page h1.vista-owner-profile-name {
    font-size: clamp(1.4rem, 2.5vw, 1.875rem);
}

/* Photo count + website on one compact line */
.vista-owner-profile-meta {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    font-size: 0.82rem;
    color: #94a3b8;
}

.vista-owner-meta-sep {
    color: #cbd5e1;
}

.vista-owner-photo-count {
    color: #94a3b8;
}

.vista-owner-website-link {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}

.vista-owner-website-link:hover {
    color: #1e293b;
}

.vista-owner-profile-bio {
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.5;
    margin: 0.35rem 0 0;
    max-width: 60ch;
}

/* Gallery content area */
.vista-owner-gallery-content {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 5vw, 2rem) 4rem;
}

/* No results */
.vista-owner-gallery-inner .vista-no-results,
.vista-collection-gallery-wrap .vista-no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--vista-secondary-color, #64748b);
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 480px) {
    .vista-owner-profile-meta {
        flex-wrap: wrap;
    }
}

/* =========================================================
   Collection Gallery Page — /gallery/collections/{spot-slug}
   ========================================================= */

.vista-collection-page {
    font-family: var(--vista-body-font, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
    color: var(--vista-text-color, #1e293b);
    width: 100%;
    max-width: 100%;
    background: #fff;
}

/* Hero with background image */
.vista-collection-hero {
    position: relative;
    width: 100%;
    min-height: 420px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
}

.vista-collection-hero-overlay {
    width: 100%;
    padding: 4rem clamp(1rem, 5vw, 3rem) 2.5rem;
    background: linear-gradient(transparent 20%, rgba(0, 0, 0, 0.75));
    color: #fff;
}

.vista-collection-hero-content {
    max-width: 1140px;
    margin: 0 auto;
}

/* Breadcrumbs in hero */
.vista-collection-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 0.85rem;
}

.vista-collection-breadcrumbs a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: color 0.2s;
}

.vista-collection-breadcrumbs a:hover {
    color: #fff;
}

.vista-collection-breadcrumbs span[aria-hidden] {
    opacity: 0.5;
}

.vista-collection-breadcrumbs .current {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
}

.vista-collection-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.5rem;
    line-height: 1.15;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.vista-collection-location {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
}

.vista-collection-location .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Plain header (no hero image) */
.vista-collection-header-plain {
    max-width: 1140px;
    margin: 2rem auto 0;
    padding: 1.5rem clamp(1rem, 5vw, 2rem) 0;
}

.vista-collection-breadcrumbs--dark {
    color: var(--vista-secondary-color, #64748b);
}

.vista-collection-breadcrumbs--dark a {
    color: var(--vista-secondary-color, #64748b);
}

.vista-collection-breadcrumbs--dark a:hover {
    color: var(--vista-primary-color, #2563eb);
}

.vista-collection-title--dark {
    color: var(--vista-text-color, #1e293b) !important;
    text-shadow: none;
}

.vista-collection-location--dark {
    color: var(--vista-secondary-color, #64748b);
}

/* Meta bar */
.vista-collection-meta-bar {
    background: #f8fafc;
    border-bottom: 1px solid #ffffff;
}

.vista-collection-meta-bar-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 1.25rem clamp(1rem, 5vw, 2rem);
}

.vista-collection-description {
    margin: 0 0 0.85rem;
    color: var(--vista-secondary-color, #64748b);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 75ch;
}

.vista-collection-meta-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.vista-collection-back-link {
    color: var(--vista-primary-color, #2563eb);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: opacity 0.2s;
}

.vista-collection-back-link:hover {
    opacity: 0.75;
}

.vista-collection-count {
    font-size: 0.82rem;
    color: var(--vista-secondary-color, #64748b);
    margin-left: auto;
}

/* Contributors in collection page */
.vista-collection-contributors {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.vista-contributors-list {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Gallery wrap */
.vista-collection-gallery-wrap {
    max-width: 1140px;
    margin: 0 auto;
    padding: 2rem clamp(1rem, 5vw, 2rem) 4rem;
}

/* Responsive */
@media (max-width: 768px) {
    .vista-collection-hero {
        min-height: 280px;
    }

    .vista-collection-meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .vista-collection-count {
        margin-left: 0;
    }
}

/* ── Sticky / fixed header offset ──────────────────────────────────────────
 * When a header height is set in Vista Spots → Display Settings, the plugin
 * outputs --vista-header-height as a CSS custom property on :root.
 * All plugin page content areas are padded down by that amount so they
 * are never hidden behind a sticky/fixed site header.
 * ────────────────────────────────────────────────────────────────────────── */
body.single-vista_spot #primary,
body.vista-photographer-page #primary,
body.vista-collection-gallery-page #primary {
    padding-top: var(--vista-header-height, 0px);
}

/* =========================================================
   Spots Archive Page — /spots/
   ========================================================= */

/* ── Page wrapper ─────────────────────────────────────────── */
.vista-spots-archive {
    font-family: var(--vista-body-font, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
    color: var(--vista-text-color, #1e293b);
    width: 100%;
    max-width: 100%;
    background: #fff;
}

body.vista-spots-archive-page #primary {
    padding-top: var(--vista-header-height, 0px);
}

/* ── Page header ──────────────────────────────────────────── */
.vista-archive-header {
    padding: 3.5rem clamp(1rem, 5vw, 3rem) 2.5rem;
    text-align: center;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
    overflow: hidden;
}

/* Hero background variant */
.vista-archive-header.has-hero-bg {
    background: var(--vista-hero-bg) center center / cover no-repeat;
    border-bottom: none;
    /* Pull up by sticky-header height so the photo starts at the very top of the viewport */
    margin-top: calc(-1 * var(--vista-header-height, 0px));
    /* Compensate inside so text isn't hidden behind the sticky header */
    padding-top: calc(3.5rem + var(--vista-header-height, 0px));
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.vista-archive-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.65) 100%);
    z-index: 0;
}

.vista-archive-header.has-hero-bg .vista-archive-header-inner {
    position: relative;
    z-index: 1;
}

.vista-archive-header.has-hero-bg h1.vista-archive-title,
body.vista-spots-archive-page .vista-archive-header.has-hero-bg h1.vista-archive-title {
    color: #fff !important;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.vista-archive-header.has-hero-bg .vista-archive-subtitle,
.vista-archive-header.has-hero-bg .vista-archive-description {
    color: rgba(255,255,255,0.88) !important;
}

.vista-archive-header-inner {
    max-width: 1140px;
    margin: 0 auto;
}

/* Override Elementor/theme h1 size — high specificity via body class */
body.vista-spots-archive-page h1.vista-archive-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    color: var(--vista-text-color, #1e293b);
    margin: 0 0 0.5rem;
    line-height: 1.15;
}

.vista-archive-subtitle {
    font-size: 1rem;
    color: var(--vista-secondary-color, #64748b);
    margin: 0 0 0.5rem;
}

.vista-archive-description {
    font-size: 1.075rem;
    color: #1e293b;
    max-width: 60ch;
    margin: 0 auto 1.25rem;
    line-height: 1.7;
}

/* ── Entrance fee ─────────────────────────────────────────── */
.vista-archive-fee {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 10px;
    padding: 10px 20px;
    margin: 0 auto 1.25rem;
}

.vista-archive-header.has-hero-bg .vista-archive-fee {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.2);
}

.vista-archive-fee-title {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(0,0,0,0.45);
}

.vista-archive-header.has-hero-bg .vista-archive-fee-title {
    color: rgba(255,255,255,0.65);
}

.vista-archive-fee-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.vista-archive-header.has-hero-bg .vista-archive-fee-price {
    color: #fff;
}

.vista-archive-fee-desc {
    font-size: 0.78rem;
    color: rgba(0,0,0,0.5);
    margin-top: 2px;
}

.vista-archive-header.has-hero-bg .vista-archive-fee-desc {
    color: rgba(255,255,255,0.6);
}

/* ── Header action buttons row ───────────────────────────── */
.vista-archive-header-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0.5rem;
}

/* Directions buttons */
.vista-directions-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 6px;
    padding: 6px 13px 6px 10px;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background .2s, transform .15s;
}

.vista-directions-google {
    background: #fff;
    color: #1e293b !important;
    border: 1.5px solid rgba(0,0,0,0.15);
}

.vista-directions-google:hover {
    background: #f1f5f9;
    transform: translateY(-1px);
}

.vista-archive-header.has-hero-bg .vista-directions-google {
    background: rgba(255,255,255,0.15);
    color: #fff !important;
    border-color: rgba(255,255,255,0.3);
}

.vista-archive-header.has-hero-bg .vista-directions-google:hover {
    background: rgba(255,255,255,0.25);
}

.vista-directions-waze {
    background: #33ccff;
    color: #fff !important;
    border: 1.5px solid transparent;
}

.vista-directions-waze:hover {
    background: #00b8e6;
    transform: translateY(-1px);
}

.vista-directions-btn svg { flex-shrink: 0; }

.vista-archive-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.92rem;
    color: var(--vista-secondary-color, #64748b);
    flex-wrap: wrap;
}

.vista-archive-stat strong {
    color: var(--vista-text-color, #1e293b);
    font-weight: 700;
}

.vista-stat-sep {
    color: #cbd5e1;
}

/* ── Category filter bar (sticky) ─────────────────────────── */
.vista-archive-filter-bar {
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    position: sticky;
    top: var(--vista-header-height, 0px);
    z-index: 100;
    box-shadow: 0 1px 0 #f1f5f9;
}

.vista-archive-filter-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0.75rem clamp(1rem, 5vw, 2rem);
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    align-items: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.vista-archive-filter-inner::-webkit-scrollbar {
    display: none;
}

.vista-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    color: var(--vista-secondary-color, #64748b);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
    white-space: nowrap;
    line-height: 1;
    flex-shrink: 0;
}

.vista-filter-pill:hover {
    border-color: var(--vista-primary-color, #2563eb);
    color: var(--vista-primary-color, #2563eb);
}

.vista-filter-pill.is-active {
    background: var(--vista-primary-color, #2563eb);
    border-color: var(--vista-primary-color, #2563eb);
    color: #fff;
}

.vista-pill-count {
    font-size: 0.72rem;
    opacity: 0.7;
    font-weight: 400;
}

.vista-filter-pill.is-active .vista-pill-count {
    opacity: 0.85;
}

/* ══════════════════════════════════════════════════════════════
   PARK MAP PANEL  (vpm- = vista park map)
   Mobile-first: stacked → two-column at 900px.
   Left col: pan/zoom map (overflow hidden, no scrollbars).
   Right col: white info panel — title, description, download, spot list.
   All classes prefixed vpm- for plugin portability across sites.
   ══════════════════════════════════════════════════════════════ */

/* ── Section + layout ─────────────────────────────────────── */
.vpm-section {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 clamp(1rem, 5vw, 2rem); /* matches other archive sections */
}

.vpm-wrap {
    display: flex;
    flex-direction: column;
    max-width: 1140px;
    margin: 0 auto;
}

@media (min-width: 900px) {
    .vpm-wrap {
        flex-direction: row;
        align-items: stretch;
        min-height: 420px;
    }
}

/* ── Left column: map ─────────────────────────────────────── */
.vpm-map-frame {
    position: relative;
    width: 100%;
    height: 60vw; /* mobile: tall enough to see the map */
    max-height: 70vh;
    overflow: hidden;
    background: #1a1a2e;
    border-radius: 10px 10px 0 0; /* mobile: top corners */
}

@media (min-width: 900px) {
    .vpm-map-frame {
        flex: 0 0 62%; /* desktop: width in row flex */
        height: auto;  /* let align-items:stretch fill the row height */
        max-height: none;
        border-radius: 10px 0 0 10px;
        margin: 1.5rem 0 1.5rem;
    }
}

/* Fullscreen state */
.vpm-map-frame.is-expanded {
    position: fixed;
    inset: 0;
    z-index: 9999;
    width: 100%;
    height: 100%;
    max-height: none;
    background: #000;
    border-radius: 0;
}

.vpm-map-frame.is-expanded .vista-svg-map {
    width: 100%;
    height: 100%;
    background: #000;
}

.vpm-map-frame.is-expanded .vpm-pin-layer {
    z-index: 10000;
}

/* ── The map viewport (no scrollbars — pan/zoom via JS) ───── */
.vista-svg-map {
    width: 100%;
    height: 100%;
    overflow: hidden;           /* no scrollbars ever */
    overscroll-behavior: none;  /* prevent scroll chaining to page */
    touch-action: none;         /* let JS own all touch/wheel input */
    position: relative;
    background-color: #f8faff;
    /* Single-level grid — scales & pans with JS via CSS custom properties */
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.15) 1px, transparent 1px);
    background-size:
        var(--vpm-grid, 40px) var(--vpm-grid, 40px),
        var(--vpm-grid, 40px) var(--vpm-grid, 40px);
    background-position:
        var(--vpm-grid-ox, 0px) var(--vpm-grid-oy, 0px),
        var(--vpm-grid-ox, 0px) var(--vpm-grid-oy, 0px);
    touch-action: none;         /* let JS handle all touch gestures */
    user-select: none;
    -webkit-user-select: none;
}

/* Pan/zoom content wrapper — JS applies transform here */
.vpm-zoom-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transform-origin: 0 0;
    cursor: grab;
    will-change: transform;
}

.vpm-zoom-content.is-dragging {
    cursor: grabbing;
}

/* Smooth transition only for button-triggered zooms */
.vpm-zoom-content.vpm-anim {
    transition: transform .22s cubic-bezier(.25,.46,.45,.94);
}

.vpm-zoom-content svg,
.vpm-zoom-content img {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none; /* JS handles clicks on SVG elements directly */
}

/* Allow pointer events on SVG paths (for [data-spot-linked]) */
.vpm-zoom-content svg * {
    pointer-events: painted;
}

/* SVG elements linked to spots */
.vista-svg-map [data-spot-linked] {
    cursor: pointer;
    transition: opacity .18s, filter .18s;
}

.vista-svg-map [data-spot-linked]:hover {
    opacity: .72;
}

.vista-svg-map [data-spot-linked].is-highlighted {
    opacity: .9;
    filter: drop-shadow(0 0 5px rgba(59,130,246,.85));
}

.vista-svg-map.has-filter [data-spot-linked] {
    opacity: .1;
    transition: opacity .25s;
}

.vista-svg-map.has-filter [data-spot-linked].is-visible {
    opacity: 1;
}

/* ── Pin layer (inside zoom-content, moves with map) ─────── */
.vpm-pin-layer {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 6;
    /* width/height set by JS to match rendered SVG size */
}

.vpm-pin {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-color: #94a3b8;
    border: 2.5px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.5);
    transform: translate(-50%, -50%);
    cursor: pointer;
    pointer-events: auto;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    z-index: 6;
    /* Drop-in animation */
    animation: vpm-pin-drop .3s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes vpm-pin-drop {
    from { transform: translate(-50%, -150%) scale(0.6); opacity: 0; }
    to   { transform: translate(-50%, -50%)  scale(1);   opacity: 1; }
}

.vpm-pin:hover,
.vpm-pin.is-highlighted {
    transform: translate(-50%, -50%) scale(1.5);
    box-shadow: 0 4px 14px rgba(0,0,0,.55);
    border-color: #3b82f6;
    z-index: 7;
}

/* One-shot pulse triggered from list hover — plays once then rests at scale(1.5) */
.vpm-pin.is-pulsing {
    animation: vpm-pin-pulse .55s cubic-bezier(.34,1.56,.64,1) both;
    border-color: #3b82f6;
    box-shadow: 0 4px 14px rgba(0,0,0,.55);
    z-index: 7;
}

@keyframes vpm-pin-pulse {
    0%   { transform: translate(-50%, -50%) scale(1);   }
    50%  { transform: translate(-50%, -50%) scale(1.65); }
    100% { transform: translate(-50%, -50%) scale(1.5);  }
}

/* ── Map controls (zoom +/−, reset, fullscreen) ───────────── */
.vpm-map-controls {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.vpm-map-frame:hover .vpm-map-controls {
    opacity: 1;
}

/* Single control button — white bg, black icon, constant colours regardless of theme */
.vpm-ctrl-btn {
    width: 32px  !important;
    height: 32px !important;
    background: #ffffff !important;
    color: #111111 !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.14) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: unset !important;
    min-height: unset !important;
    line-height: 1 !important;
    transition: background .18s ease, box-shadow .18s ease, transform .12s ease !important;
    flex-shrink: 0;
    opacity: 0;
    animation: vpm-ctrl-fadein .35s ease forwards;
}

.vpm-ctrl-btn:nth-child(1) { animation-delay: .05s; }
.vpm-ctrl-btn:nth-child(2) { animation-delay: .10s; }
.vpm-ctrl-btn:nth-child(3) { animation-delay: .15s; }
.vpm-ctrl-btn:nth-child(4) { animation-delay: .20s; }

@keyframes vpm-ctrl-fadein {
    from { opacity: 0; transform: translateX(8px); }
    to   { opacity: 1; transform: translateX(0); }
}

.vpm-ctrl-btn:hover {
    background: #f1f5f9 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.22) !important;
    transform: scale(1.08) !important;
}

.vpm-ctrl-btn:active {
    transform: scale(0.94) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,.12) !important;
}

.vpm-ctrl-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    fill: #111111;
    color: #111111;
    pointer-events: none;
}

/* Fullscreen: keep controls on top */
.vpm-map-frame.is-expanded .vpm-map-controls {
    z-index: 10001;
}

/* Exit fullscreen pill — bottom-centre, only shown while expanded */
.vpm-expand-close {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10002;
    display: none;
    align-items: center;
    gap: 7px;
    padding: 10px 22px !important;
    background: rgba(15, 23, 42, 0.82) !important;
    color: #ffffff !important;
    border: 1.5px solid rgba(255,255,255,0.25) !important;
    border-radius: 999px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    white-space: nowrap;
    cursor: pointer !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,.35) !important;
    min-width: unset !important;
    min-height: unset !important;
    width: auto !important;
    height: auto !important;
    transition: background .18s ease, transform .18s ease !important;
}

.vpm-expand-close.is-visible {
    display: flex;
}

.vpm-expand-close:hover {
    background: rgba(15, 23, 42, 0.95) !important;
    transform: translateX(-50%) scale(1.04) !important;
}

.vpm-expand-close svg {
    stroke: #ffffff !important;
    flex-shrink: 0;
}

/* ── Map pin preview card ─────────────────────────────────── */
.vista-map-preview {
    position: fixed;
    z-index: 10002;
    width: 210px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,.16), 0 2px 6px rgba(0,0,0,.08);
    overflow: hidden;
    pointer-events: auto;
}

.vista-map-preview[hidden] { display: none; }

.vista-map-preview-thumb {
    position: relative;
    width: 100%;
    height: 120px;
    background-size: cover;
    background-position: center;
    background-color: #e2e8f0;
}

.vista-map-preview-close {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 22px !important;
    height: 22px !important;
    padding: 0 !important;
    min-width: unset !important;
    min-height: unset !important;
    background: rgba(15, 23, 42, 0.55) !important;
    border: none !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background .15s !important;
    z-index: 1;
}

.vista-map-preview-close:hover {
    background: rgba(15, 23, 42, 0.85) !important;
}

.vista-map-preview-close svg {
    width: 11px;
    height: 11px;
    stroke: #ffffff;
    flex-shrink: 0;
}

.vista-map-preview-body {
    padding: .65rem .85rem .75rem;
    display: flex;
    flex-direction: column;
    gap: .45rem;
}

.vista-map-preview-title {
    font-size: .875rem;
    color: #1e293b;
    font-weight: 600;
    display: block;
    line-height: 1.35;
}

.vista-map-preview-link {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    font-size: .75rem;
    font-weight: 600;
    color: #0f172a !important;
    text-decoration: none !important;
    letter-spacing: .01em;
    transition: color .15s;
}

.vista-map-preview-link svg {
    flex-shrink: 0;
    stroke: currentColor;
}

.vista-map-preview-link:hover {
    color: #1d4ed8 !important;
}

/* ── Right column: info panel (WHITE) ─────────────────────── */
.vpm-info-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-left: 1px solid #e2e8f0;
    min-width: 0;
}

.vpm-info-inner {
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

#vpm-spot-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

#vpm-spot-list::-webkit-scrollbar { width: 4px; }
#vpm-spot-list::-webkit-scrollbar-track { background: transparent; }
#vpm-spot-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }

@media (min-width: 900px) {
    .vpm-info-inner { padding: 1.75rem 1.5rem; }
}

.vpm-title {
    font-size: 2rem !important; /* 32px */
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 .5rem;
    line-height: 1.25;
}

.vpm-desc {
    font-size: .825rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 1.1rem;
}

/* ── Download button ──────────────────────────────────────── */
.vpm-actions {
    margin-bottom: 1.1rem;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.vpm-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #1d4ed8;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 6px;
    padding: 6px 13px 6px 10px;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .02em;
    transition: background .2s, transform .15s;
    white-space: nowrap;
}

.vpm-download-btn:hover {
    background: #1e40af;
    transform: translateY(-1px);
}

.vpm-download-btn svg { width: 13px; height: 13px; flex-shrink: 0; }

/* ── Spots list ───────────────────────────────────────────── */
.vpm-spot-list-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #64748b;
    margin: 0 0 0.75rem;
    padding-bottom: 0.5rem;
}

.vpm-spot-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex: 1;
    max-height: 260px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.vpm-spot-list::-webkit-scrollbar { width: 4px; }
.vpm-spot-list::-webkit-scrollbar-track { background: transparent; }
.vpm-spot-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }

@media (min-width: 900px) {
    .vpm-spot-list { max-height: none; flex: 1; }
}

.vpm-spot-item { border-bottom: 1px solid #f1f5f9; }
.vpm-spot-item:last-child { border-bottom: none; }

.vpm-spot-item__link {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem .3rem .5rem .4rem;
    color: #1e293b;
    text-decoration: none;
    border-radius: 5px;
    transition: background .15s;
    position: relative;
}

.vpm-spot-item__link:hover,
.vpm-spot-item.is-highlighted .vpm-spot-item__link {
    background: #f8fafc;
}

.vpm-spot-item.has-map-link .vpm-spot-item__link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: #3b82f6;
    border-radius: 2px;
    transition: height .2s ease;
}

.vpm-spot-item.has-map-link .vpm-spot-item__link:hover::before,
.vpm-spot-item.has-map-link.is-highlighted .vpm-spot-item__link::before {
    height: 65%;
}

.vpm-spot-item__thumb {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: #e2e8f0;
    flex-shrink: 0;
}

.vpm-spot-item__thumb--empty { background-color: #e2e8f0; }

.vpm-spot-item__name {
    font-size: .8rem;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    transition: color .15s;
}

.vpm-spot-item__link:hover .vpm-spot-item__name,
.vpm-spot-item.is-highlighted .vpm-spot-item__name {
    color: #1d4ed8;
}

.vpm-spot-item__arrow {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
    color: #94a3b8;
    opacity: 0;
    transition: opacity .15s;
}

.vpm-spot-item__link:hover .vpm-spot-item__arrow { opacity: 1; }

/* ══ Global All-Spots List (vsl-*) ════════════════════════════
   Shared partial: templates/partials/spots-list.php
   Used on archive map panel AND single spot sidebar.
   ═══════════════════════════════════════════════════════════ */
.vsl-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.vsl-item {
    border-bottom: 1px solid #f1f5f9;
}

.vsl-item:last-child { border-bottom: none; }

.vsl-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0;
    text-decoration: none !important;
    color: #1e293b !important;
    cursor: pointer;
}

a.vsl-row:hover .vsl-title { color: #1d4ed8 !important; }

.vsl-item.is-highlighted .vsl-row { background: #eff6ff; border-radius: 4px; }

/* Photo thumbnail strip — pushed to the right */
.vsl-photos {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    margin-left: auto;
}

.vsl-photos img {
    width: 28px !important;
    height: 28px !important;
    object-fit: cover !important;
    border-radius: 3px;
    display: block !important;
    flex-shrink: 0;
}

.vsl-more {
    font-size: 0.68rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    line-height: 1;
    margin-left: 1px;
}

.vsl-title {
    font-size: 0.82rem;
    line-height: 1.3;
    color: inherit;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Current spot */
.vsl-item--current .vsl-title {
    font-weight: 700;
    color: #1d4ed8 !important;
}

/* Breadcrumb map thumbnail */
.vista-breadcrumb-map-thumb {
    width: 28px !important;
    height: 18px !important;
    object-fit: cover !important;
    border-radius: 3px;
    display: inline-block !important;
    vertical-align: middle;
    margin-right: 3px;
    opacity: 0.85;
}

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 899px) {
    .vpm-section { padding: 0; }

    /* Compact info bar: title + download button in one row, no description */
    .vpm-info-col {
        border-left: none;
        border-top: 1px solid #e2e8f0;
        flex: none;
    }

    .vpm-info-inner {
        padding: .6rem 1rem;
        flex-direction: row;
        align-items: center;
        gap: .75rem;
        flex-wrap: wrap;
        height: auto;
        overflow: visible;
    }

    .vpm-title {
        font-size: 1rem !important;
        margin: 0;
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .vpm-desc { display: none; }

    .vpm-actions { margin: 0; }

    .vpm-download-btn {
        font-size: .72rem;
        padding: 5px 10px;
    }

    /* Hide spots list on mobile — it's accessible via the spot cards below */
    .vpm-spot-list-label,
    #vpm-spot-list { display: none; }

    /* Map itself: shorter on mobile */
    .vpm-map-frame { min-height: 240px; }
}

/* ── Spots grid section ───────────────────────────────────── */
.vista-archive-grid-wrap {
    max-width: 1140px;
    margin: 0 auto;
    padding: 2.5rem clamp(1rem, 5vw, 2rem) 5rem;
}

/* Cards hidden by category filter */
.vista-spot-card.is-hidden {
    display: none;
}

/* Hide difficulty badge on the /spots/ archive page */
body.vista-spots-archive-page .vista-spot-difficulty {
    display: none;
}

/* No results message shown by JS */
.vista-filter-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--vista-secondary-color, #64748b);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .vista-archive-header {
        padding: 2.5rem 1rem 2rem;
    }

    .vista-archive-grid-wrap {
        padding: 1.5rem 1rem 3rem;
    }

    #vista-spots-grid.vista-grid-cols-3 {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 480px) {
    #vista-spots-grid.vista-grid-cols-3 {
        grid-template-columns: 1fr;
    }

    .vista-archive-stats {
        font-size: 0.82rem;
    }

    .vista-archive-filter-inner {
        flex-wrap: nowrap; /* horizontal scroll on very small screens */
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
}

/* ═══════════════════════════════════════════════════════════════
   MOSAIC TILE CARDS  (.vsm-card)
   Mobile-first: 2-col → 3-col (md) → 4-col (lg)
   Each card is a 1:1 square. Up to 3 photos cycle on hover via
   CSS custom properties (--img-1/2/3) set inline by PHP.
   The frosted-glass footer is always visible (title only) and
   expands on hover to reveal description + meta.
   ═══════════════════════════════════════════════════════════════ */

/* ── Grid ────────────────────────────────────────────────────── */
.vsm-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 0;
    margin: 0;
}

@media (min-width: 640px) {
    .vsm-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}

@media (min-width: 1024px) {
    .vsm-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
}

/* ── Card shell ──────────────────────────────────────────────── */
.vsm-card {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 10px;
    background: #1a1a2e;
    cursor: pointer;
    /* Subtle lift on hover — no translateY so layout stays stable */
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
    transition: box-shadow .3s ease, border-radius .3s ease;
}

.vsm-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,.35);
    border-radius: 12px;
}

/* Full-card link covers entire tile (accessibility: aria-hidden, pointer events) */
.vsm-card__link {
    position: absolute;
    inset: 0;
    z-index: 4;
}

/* ── Photo layers ────────────────────────────────────────────── */
.vsm-card__photo {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: opacity .55s ease, transform .55s ease;
    transform: scale(1.04);
}

/* Assign background images from inline custom properties */
.vsm-card__photo--1 { background-image: var(--img-1); opacity: 1; }
.vsm-card__photo--2 { background-image: var(--img-2); opacity: 0; }
.vsm-card__photo--3 { background-image: var(--img-3); opacity: 0; }

/* Slight zoom-in when idle */
.vsm-card__photo--1 { transform: scale(1.04); }

/* On hover: subtle de-zoom for a "zooming out to reveal" feel */
.vsm-card:hover .vsm-card__photo--1 { transform: scale(1); }

/* Photo cycling on hover — stagger with delays so they cross-fade sequentially.
   Photo 1 visible → fades to 2 (0.4s in) → fades to 3 (0.8s in)
   Only activates when the card has 2 or 3 photos (data-photo-count). */
.vsm-card[data-photo-count="2"]:hover .vsm-card__photo--1 { opacity: 0; transition-delay: .35s; }
.vsm-card[data-photo-count="2"]:hover .vsm-card__photo--2 { opacity: 1; transition-delay: .35s; }

.vsm-card[data-photo-count="3"]:hover .vsm-card__photo--1 { opacity: 0; transition-delay: .25s; }
.vsm-card[data-photo-count="3"]:hover .vsm-card__photo--2 { opacity: 1; transition-delay: .25s; }
.vsm-card[data-photo-count="3"]:hover .vsm-card__photo--3 { opacity: 0; } /* stays hidden — would need JS for full 3-cycle; 2-step is clean */

/* Dark overlay that deepens on hover for contrast */
.vsm-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to top,
        rgba(0,0,0,.72) 0%,
        rgba(0,0,0,.22) 45%,
        rgba(0,0,0,.06) 100%
    );
    transition: opacity .35s ease;
}

.vsm-card:hover::before {
    opacity: .85;
}

/* ── No-photo placeholder ────────────────────────────────────── */
.vsm-card__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a5f, #0f2027);
    color: rgba(255,255,255,.3);
}

.vsm-card__placeholder .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
}

/* ── Category badge — top-left ───────────────────────────────── */
.vsm-card__cat {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    background: rgba(255,255,255,.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.28);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
    pointer-events: none;
}

/* ── Photo count pill — top-right ───────────────────────────── */
.vsm-card__count {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: rgba(255,255,255,.9);
    font-size: .7rem;
    font-weight: 600;
    padding: 3px 8px 3px 6px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    pointer-events: none;
}

/* ── Footer (frosted glass, slides up on hover) ──────────────── */
.vsm-card__footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 0.9rem 0.85rem 0.75rem;
    /* Always-visible collapsed state shows title only */
    transform: translateY(0);
    transition: transform .35s cubic-bezier(.25,.46,.45,.94),
                background .35s ease,
                padding .35s ease;
    /* No backdrop on mobile to avoid GPU cost */
    background: transparent;
}

/* Collapsed: title always visible via gradient overlay (::before) */
.vsm-card__title {
    margin: 0 0 0.35rem;
    line-height: 1.25;
    font-weight: 700;
}

.vsm-card__title a {
    text-decoration: none;
    text-shadow: 0 1px 4px rgba(0,0,0,.6);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Spot name — always white regardless of theme link/text colors */
.vsm-card__title-text {
    color: #ffffff !important;
    font-size: clamp(0.9rem, 3vw, 1.875rem); /* scales up to ~30px */
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 1px 5px rgba(0,0,0,.65);
}

/* Desc + meta hidden by default, revealed on hover */
.vsm-card__desc,
.vsm-card__meta {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height .35s ease, opacity .3s ease .05s;
    margin: 0;
}

.vsm-card:hover .vsm-card__desc {
    max-height: 3.5rem;
    opacity: 1;
}

.vsm-card:hover .vsm-card__meta {
    max-height: 2rem;
    opacity: 1;
}

/* Frosted glass footer slides up slightly on hover */
.vsm-card:hover .vsm-card__footer {
    transform: translateY(-4px);
    background: rgba(0,0,0,.38);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.9rem 0.85rem 0.85rem;
    border-radius: 0 0 10px 10px;
}

.vsm-card__desc {
    font-size: .78rem;
    color: rgba(255,255,255,.82);
    line-height: 1.45;
    margin-bottom: 0.4rem;
}

.vsm-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.vsm-card__meta-item {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: .72rem;
    color: rgba(255,255,255,.7);
    white-space: nowrap;
}

.vsm-card__meta-item svg {
    flex-shrink: 0;
    opacity: .85;
}

/* ── Hidden by category filter ───────────────────────────────── */
.vsm-card.is-hidden {
    display: none;
}

/* ── Touch devices: keep footer expanded (no hover) ─────────── */
@media (hover: none) {
    .vsm-card__desc,
    .vsm-card__meta {
        max-height: none;
        opacity: 1;
    }

    .vsm-card__footer {
        background: rgba(0,0,0,.42);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-radius: 0 0 10px 10px;
    }
}
