/* Public landing map — matches Map Park admin preview; scoped under .landing-map-section */

.landing-map-section {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Vertical rhythm when the section is not inside .landing-extra (e.g. root index.php before The Park) */
.landing-body-root .landing-map-section,
.landing-body .landing-map-section {
    padding-top: clamp(2.5rem, 5vw, 5rem);
    padding-bottom: clamp(2.5rem, 4vw, 4rem);
}

/* Title + intro: full page width (viewport-aligned padding) */
.landing-map-section .landing-map-text-fullwidth {
    width: 100%;
    max-width: none;
    margin: 0 0 1rem;
    padding: 0 clamp(16px, 3vw, 28px);
    box-sizing: border-box;
}

.landing-map-section .landing-map-text-fullwidth .landing-map-lead,
.landing-map-section .landing-map-text-fullwidth .landing-map-lead-rich {
    max-width: none;
    width: 100%;
}

.landing-map-section .landing-map-card.map-admin-preview-card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(var(--primary-rgb, 26, 95, 74), 0.14);
    border-radius: var(--radius-lg, 24px);
    box-shadow: var(--shadow-md, 0 4px 20px rgba(0, 0, 0, 0.1));
    padding: clamp(18px, 2.5vw, 22px) clamp(18px, 3vw, 24px);
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    box-sizing: border-box;
}

.landing-map-section .map-admin-preview-title {
    margin: 0 0 10px;
    font-size: clamp(1.2rem, 2.2vw, 1.35rem);
    color: var(--primary, #1a5f4a);
    letter-spacing: 0.02em;
    font-weight: 700;
}

.landing-map-section .landing-map-lead {
    margin: 0 0 18px;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text-light, #6b7280);
}

.landing-map-section .landing-map-lead-rich p,
.landing-map-section .landing-map-empty-rich p {
    margin: 0 0 0.5em;
}
.landing-map-section .landing-map-lead-rich p:last-child,
.landing-map-section .landing-map-empty-rich p:last-child {
    margin-bottom: 0;
}
.landing-map-section .landing-map-empty-rich {
    text-align: center;
    max-width: 36rem;
    margin: 0 auto;
}
.landing-map-section .landing-map-lead-rich h3,
.landing-map-section .landing-map-lead-rich h4 {
    font-size: 1rem;
    margin: 0.75em 0 0.35em;
    color: var(--text-dark, #1a1a2e);
}

.landing-map-section .landing-map-lead .muted,
.landing-map-section .map-admin-preview-legend-title .muted {
    font-weight: 500;
    color: var(--text-light, #6b7280);
}

/* Map + legend: legend on the right on wide screens */
.landing-map-section .landing-map-map-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, min(32vw, 300px));
    gap: clamp(14px, 2vw, 22px);
    align-items: stretch;
}

@media (max-width: 960px) {
    .landing-map-section .landing-map-map-row {
        grid-template-columns: 1fr;
    }

    .landing-map-section .landing-map-legend-aside {
        max-height: none;
    }
}

/* Same structure as panel Map Park preview — image scales with container width */
.landing-map-section .map-admin-preview-stage {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border, rgba(0, 0, 0, 0.1));
    background: rgba(255, 255, 255, 0.65);
    line-height: 0;
    min-width: 0;
}

.landing-map-section .landing-map-stage-fit {
    width: 100%;
}

/* Same scaling as Map Park admin preview: width follows container, height from image aspect ratio */
.landing-map-section .map-admin-preview-bg {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: top;
    background: rgba(var(--primary-rgb, 26, 95, 74), 0.06);
}

.landing-map-section .map-admin-preview-logo {
    position: absolute;
    top: 14px;
    right: 14px;
    max-height: 72px;
    max-width: min(42%, 200px);
    width: auto;
    height: auto;
    object-fit: contain;
    z-index: 2;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.22));
    pointer-events: none;
}

/* Decorative map items (same geometry as back office preview). */
.landing-map-section .map-overlay-item-btn {
    position: absolute;
    z-index: 2;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    line-height: 0;
    cursor: pointer;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    filter: drop-shadow(0 1px 6px rgba(0, 0, 0, 0.2));
    box-sizing: border-box;
}

.landing-map-section .map-overlay-item-btn:focus-visible {
    outline: 2px solid var(--primary-light, #2d8a6e);
    outline-offset: 2px;
}

.landing-map-section .map-overlay-item-btn-img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    pointer-events: none;
    vertical-align: top;
    object-fit: contain;
}

.landing-map-section .map-overlay-item-btn.is-static {
    cursor: default;
}

.landing-map-section .map-admin-preview-pin,
.landing-map-section button.map-admin-preview-pin {
    position: absolute;
    left: 8%;
    z-index: 3;
    transform: translate(-50%, -50%);
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--gradient-1, linear-gradient(135deg, #1a5f4a 0%, #2d8a6e 100%));
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    line-height: 32px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
    border: 2px solid #fff;
    box-sizing: border-box;
    font-family: inherit;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.18s ease, box-shadow 0.2s ease, filter 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
}

.landing-map-section button.map-admin-preview-pin:hover {
    transform: translate(-50%, -50%) scale(1.07);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.32);
}

.landing-map-section button.map-admin-preview-pin:focus-visible {
    outline: 3px solid rgba(var(--primary-light-rgb, 45, 138, 110), 0.85);
    outline-offset: 2px;
}

.landing-map-section .map-admin-preview-placeholder {
    min-height: 260px;
    line-height: normal;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(var(--primary-rgb, 26, 95, 74), 0.08), rgba(212, 168, 83, 0.1));
}

.landing-map-section .map-admin-preview-placeholder-inner {
    text-align: center;
    padding: 28px 20px;
    max-width: 400px;
    color: var(--text-light, #6b7280);
    font-size: 14px;
}

.landing-map-section .map-admin-preview-placeholder-inner .icofont {
    font-size: 42px;
    color: var(--primary, #1a5f4a);
    opacity: 0.65;
    display: block;
    margin-bottom: 12px;
}

.landing-map-section .map-admin-preview-legend {
    margin-top: 0;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border, rgba(0, 0, 0, 0.1));
    background: rgba(255, 255, 255, 0.9);
    align-self: stretch;
}

.landing-map-section .landing-map-legend-aside {
    max-height: min(85vh, 100%);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.landing-map-section .map-admin-preview-legend-title {
    margin: 0 0 10px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark, #1a1a2e);
}

.landing-map-section .map-admin-preview-ol {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.landing-map-section .map-admin-preview-ol .map-admin-preview-ol-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark, #1a1a2e);
}

.landing-map-section .map-admin-preview-legend-name {
    flex: 1;
    min-width: 0;
    line-height: 1.35;
}

.landing-map-section .map-admin-preview-legend-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    border-radius: 8px;
    background: rgba(var(--primary-rgb, 26, 95, 74), 0.12);
    color: var(--primary, #1a5f4a);
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
    border: 1px solid transparent;
}

/* —— POI dialog —— */
.landing-map-dialog {
    width: calc(100% - 32px);
    max-width: 520px;
    padding: 0;
    border: none;
    border-radius: 20px;
    background: transparent;
    box-shadow: none;
}

.landing-map-dialog::backdrop {
    background: rgba(12, 32, 28, 0.48);
    backdrop-filter: blur(6px);
}

.landing-map-dialog-shell {
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 28px 70px rgba(8, 28, 24, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.landing-map-dialog-accent {
    height: 4px;
    background: var(--gradient-1, linear-gradient(90deg, #1a5f4a 0%, #2d8a6e 45%, #d4a853 100%));
}

.landing-map-dialog-inner {
    padding: 22px 22px 20px;
}

.landing-map-dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.landing-map-dialog-head-text {
    min-width: 0;
}

.landing-map-dialog-kicker {
    margin: 0 0 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--primary, #1a5f4a);
    opacity: 0.85;
}

.landing-map-dialog-title {
    margin: 0;
    font-size: clamp(1.2rem, 3vw, 1.45rem);
    font-weight: 700;
    color: var(--text-dark, #1a1a2e);
    line-height: 1.25;
    font-family: inherit;
}

.landing-map-dialog-close {
    flex-shrink: 0;
    min-width: 36px;
    min-height: 36px;
    margin-right: 0;
    color: var(--text-dark, #1a1a2e);
    border-color: rgba(0, 0, 0, 0.08);
    background: rgba(var(--primary-rgb, 26, 95, 74), 0.06);
}

.landing-map-dialog-close:hover {
    background: rgba(var(--primary-rgb, 26, 95, 74), 0.12);
    color: var(--primary, #1a5f4a);
}

.landing-map-dialog-close .icofont {
    font-size: 16px;
    line-height: 1;
}

.landing-map-dialog-body {
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(var(--primary-rgb, 26, 95, 74), 0.04) 0%, transparent 48%);
    padding: 14px;
    margin: 0 -6px;
}

.landing-map-dialog-gallery {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.landing-map-dialog-gallery .landing-map-dialog-feature {
    margin: 0;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #fff;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
}

.landing-map-dialog-gallery .landing-map-dialog-feature img {
    display: block;
    width: 100%;
    height: auto;
    max-height: min(52vh, 360px);
    object-fit: contain;
    object-position: center center;
    vertical-align: top;
    background: rgba(var(--primary-rgb, 26, 95, 74), 0.04);
}

.landing-map-dialog-gallery .landing-map-dialog-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 10px;
}

.landing-map-dialog-gallery .landing-map-dialog-thumb {
    margin: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.07);
    aspect-ratio: 1;
    cursor: default;
}

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

.landing-map-dialog-empty {
    margin: 0;
    padding: 20px 16px;
    text-align: center;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-light, #6b7280);
    border-radius: 12px;
    border: 1px dashed rgba(var(--primary-rgb, 26, 95, 74), 0.22);
    background: rgba(255, 255, 255, 0.7);
}
