.custom-map-banner {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
    border: 2px solid #eaeaea;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 95.8%;
    max-width: 95.8%;
    box-sizing: border-box;
    overflow-x: auto;
}

.custom-map-demo {
    margin-right: 3rem;
    flex: 0 0 auto;
    --rect-x: 175px;
    --rect-y: 175px;
    --rect-w: 150px;
    --rect-h: 150px;
    --rect-color: #e11d48;
    --handle-size: 10px;
    --cursor-size: 12px;
}

.custom-map-demo .demo-wrap {
    display: grid;
    gap: 12px;
    place-items: center;
}

.custom-map-demo .map-frame {
    position: relative;
    width: 500px;
    height: 500px;
    border-radius: 18px;
    overflow: hidden;
    background: #e9edf3;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
}

.custom-map-demo .banner-map-image {
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    max-height: none;
    display: block;
    object-fit: contain;
    object-position: center;
}

.custom-map-demo .selection-rect {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--rect-w);
    height: var(--rect-h);
    transform: translate(var(--rect-x), var(--rect-y));
    border: 2px solid var(--rect-color);
    box-sizing: border-box;
    pointer-events: none;
    z-index: 3;
}

.custom-map-demo .handle {
    position: absolute;
    width: var(--handle-size);
    height: var(--handle-size);
    background: #fff;
    border: 2px solid var(--rect-color);
    box-sizing: border-box;
}

.custom-map-demo .handle.tl { top: calc(var(--handle-size) * -0.5); left: calc(var(--handle-size) * -0.5); }
.custom-map-demo .handle.tr { top: calc(var(--handle-size) * -0.5); right: calc(var(--handle-size) * -0.5); }
.custom-map-demo .handle.bl { bottom: calc(var(--handle-size) * -0.5); left: calc(var(--handle-size) * -0.5); }
.custom-map-demo .handle.br { bottom: calc(var(--handle-size) * -0.5); right: calc(var(--handle-size) * -0.5); }

.custom-map-demo .preview-content {
    position: absolute;
    inset: 2px;
    background: #fff;
    overflow: hidden;
    opacity: 0;
    transition: opacity 300ms ease;
}

.custom-map-demo .preview-content.is-visible { opacity: 1; }
.custom-map-demo .preview-content img {
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    max-height: none;
    display: block;
    object-fit: cover;
}

.custom-map-demo .spinner {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
    z-index: 4;
}

.custom-map-demo .spinner.is-visible { opacity: 1; }
.custom-map-demo .spinner::after {
    content: "";
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 5px solid rgba(0, 0, 0, 0.2);
    border-top-color: #111;
    animation: bannerSpin 1s linear infinite;
}

.custom-map-demo .cursor {
    position: absolute;
    width: var(--cursor-size);
    height: var(--cursor-size);
    border-radius: 50%;
    background: #111;
    transform: translate(-50%, -50%);
    opacity: 0;
    z-index: 5;
    pointer-events: none;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.6);
}

.custom-map-demo .cursor.is-visible { opacity: 1; }

.custom-map-demo .demo-caption {
    font-size: 13px;
    color: #475569;
    text-align: center;
    max-width: 420px;
}

.banner-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.banner-logo a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.banner-logo img {
    max-width: 280px;
    width: 100%;
    height: auto;
    display: block;
}

.banner-text-content {
    max-width: 520px;
    text-align: center;
}

.banner-text-content h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.banner-text-content p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
    color: #555;
}

.banner-text-content .cta-button {
    display: inline-block;
    background-color: #007BFF;
    color: #fff;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    margin: 0.25rem 0.5rem 0;
}

.banner-text-content .cta-button:hover {
    background-color: #0056b3;
}

.banner-checks {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    color: #2f3b4d;
    font-size: 0.95rem;
    text-align: center;
}

.banner-checks li {
    margin: 6px 0;
}

.banner-checks li::before {
    content: "\2713";
    color: #13b981;
    font-weight: 700;
    margin-right: 8px;
}

@media (max-width: 768px) {
    .custom-map-banner {
        flex-direction: column;
        padding: 1rem;
    }

    .custom-map-demo {
        margin: 0 0 1rem 0;
    }
    .custom-map-demo .map-frame {
        width: min(100%, 420px);
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .banner-text-content,
    .banner-text-content h2,
    .banner-text-content p {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .custom-map-demo .map-frame {
        width: min(100%, 320px);
    }
}

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