/* Remutaka Cycle Trail Map page */

.remutaka-map-page {
    min-height: 100vh;
    color: rgba(255, 255, 255, 0.92);
    padding-top: 1.5rem;
}

.remutaka-map-seo {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 1.5rem;
}

.remutaka-map-intro,
.remutaka-map-guide {
    margin-bottom: 1.75rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
}

.remutaka-map-intro h2,
.remutaka-map-guide h2 {
    font-family: "Bebas Neue", sans-serif;
    font-size: 2rem;
    letter-spacing: 0.4px;
    color: #fff;
    margin: 0 0 0.85rem;
}

.remutaka-map-intro p,
.remutaka-map-guide p {
    margin: 0 0 1rem;
    max-width: none;
    font-size: 1.05rem;
}

.remutaka-map-guide ul {
    margin: 0 0 1rem;
    padding-left: 1.2rem;
    max-width: none;
}

.remutaka-map-guide li {
    margin-bottom: 0.45rem;
}

.remutaka-map-seo a {
    color: #7a9e06;
    text-decoration: none;
}

.remutaka-map-seo a:hover {
    color: #9bc40d;
}

.remutaka-map-listing-cta {
    margin: 0.5rem 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.92rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.72);
}

.remutaka-map-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.25rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 2.5rem;
    align-items: start;
}

.remutaka-map-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: 1.25rem;
}

.remutaka-map-panel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    padding: 1.1rem 1.2rem;
}

.remutaka-map-panel h2 {
    font-family: "Bebas Neue", sans-serif;
    font-size: 1.35rem;
    margin: 0 0 0.85rem;
    color: #fff;
    letter-spacing: 0.4px;
}

.remutaka-map-tip {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin: 0 0 0.9rem;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    background: rgba(122, 158, 6, 0.15);
    border: 1px solid rgba(122, 158, 6, 0.35);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.86rem;
    line-height: 1.45;
}

.remutaka-map-tip i {
    color: #7a9e06;
    margin-top: 0.15rem;
}

.remutaka-elevation-panel {
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    padding: 1rem 1.1rem 0.75rem;
}

.remutaka-elevation-panel[hidden] {
    display: none !important;
}

.remutaka-elevation-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.remutaka-elevation-panel__header h3 {
    margin: 0;
    font-family: "Bebas Neue", sans-serif;
    font-size: 1.45rem;
    letter-spacing: 0.4px;
    color: #fff;
}

.remutaka-elevation-meta {
    margin: 0.25rem 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.88rem;
}

.remutaka-elevation-close {
    border: none;
    background: transparent;
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.2rem;
}

.remutaka-elevation-chart {
    width: 100%;
    height: 220px;
}

.remutaka-map-layers {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.remutaka-map-layers label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.remutaka-map-layers input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    background: transparent;
    position: relative;
    cursor: pointer;
}

.remutaka-map-layers input[type="checkbox"]:checked {
    background: #7a9e06;
    border-color: #7a9e06;
}

.remutaka-map-layers input[type="checkbox"]:checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #fff;
    font-size: 11px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.remutaka-map-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.remutaka-map-panel-header h2 {
    margin-bottom: 0;
}

.remutaka-map-bulk-actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

.remutaka-map-bulk-btn {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.remutaka-map-bulk-btn:hover {
    background: rgba(122, 158, 6, 0.25);
    border-color: #7a9e06;
}

.remutaka-map-layers .route-swatch {
    width: 18px;
    height: 6px;
    border-radius: 999px;
    flex-shrink: 0;
}

.remutaka-map-layers .layer-letter {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    border: 1.5px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.layer-letter--facilities {
    background: #4ea1d5;
}

.layer-letter--accommodation {
    background: #9b59b6;
}

.layer-letter--poi {
    background: #e67e22;
}

.remutaka-map-sections {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.remutaka-map-sections li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.88);
}

.remutaka-map-sections .swatch {
    width: 22px;
    height: 6px;
    border-radius: 999px;
    flex-shrink: 0;
}

.swatch-hutt { background: #7a9e06; }
.swatch-rail { background: #4ea1d5; }
.swatch-western { background: #e0a106; }
.swatch-wild { background: #d4573c; }

.remutaka-map-status {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

.remutaka-photo-loading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.remutaka-photo-loading[hidden] {
    display: none !important;
}

.remutaka-photo-loading__spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #7a9e06;
    border-radius: 50%;
    flex-shrink: 0;
    animation: remutaka-spin 0.8s linear infinite;
}

.remutaka-map-main {
    min-width: 0;
}

.remutaka-trail-map {
    position: relative;
    height: calc(100vh - 180px);
    min-height: 520px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.remutaka-map-page .map-loading {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 5;
    color: #fff;
    transition: opacity 0.3s ease;
}

.remutaka-map-page .map-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.remutaka-map-page .map-loading-spinner {
    width: 46px;
    height: 46px;
    border: 4px solid rgba(255, 255, 255, 0.25);
    border-top-color: #7a9e06;
    border-radius: 50%;
    animation: remutaka-spin 1s linear infinite;
    margin-bottom: 0.85rem;
}

@keyframes remutaka-spin {
    to { transform: rotate(360deg); }
}

.remutaka-map-page .admin-notice {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    background: rgba(212, 87, 60, 0.2);
    border: 1px solid rgba(212, 87, 60, 0.45);
    color: #fff;
}

/* InfoWindow content */
.remutaka-iw {
    color: #1a1a1a;
    max-width: 260px;
    font-family: "Raleway", sans-serif;
}

.remutaka-iw h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    color: #222;
}

.remutaka-iw p {
    margin: 0 0 0.5rem;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #444;
}

.remutaka-iw .layer-tag {
    display: inline-block;
    margin-bottom: 0.4rem;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    background: rgba(122, 158, 6, 0.15);
    color: #5f7c05;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.remutaka-iw img {
    display: block;
    width: 100%;
    border-radius: 6px;
    margin-top: 0.4rem;
    cursor: zoom-in;
}

.remutaka-iw--poi {
    max-width: 260px;
}

.remutaka-iw__image {
    margin: 0.45rem 0 0.65rem;
    cursor: default;
    max-height: 140px;
    object-fit: cover;
}

.remutaka-iw__meta {
    margin: 0 0 0.35rem;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #444;
}

.remutaka-iw__meta strong {
    display: block;
    margin-bottom: 0.1rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #777;
    font-weight: 600;
}

.remutaka-iw__actions {
    margin: 0.65rem 0 0;
}

.remutaka-iw__booking {
    display: inline-block;
    padding: 0.4rem 0.7rem;
    border-radius: 4px;
    background: #7a9e06;
    color: #fff !important;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
}

.remutaka-iw__booking:hover {
    background: #688706;
}

.remutaka-iw a {
    color: #7a9e06;
    font-size: 0.85rem;
}

/* Photo marker */
.remutaka-photo-pin {
    position: absolute;
    transform: translate(-50%, calc(-100% + 2px));
    cursor: pointer;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35));
    transition: transform 0.15s ease;
}

.remutaka-photo-pin:hover,
.remutaka-photo-pin:focus-visible {
    transform: translate(-50%, calc(-100% + 2px)) scale(1.08);
    outline: none;
}

.remutaka-photo-pin__head {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    border: 2.5px solid #fff;
    background: #7a9e06;
    box-sizing: border-box;
}

.remutaka-photo-pin__head img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.remutaka-photo-pin__badge {
    position: absolute;
    top: -4px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: #2f80ed;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    border: 2px solid #fff;
    box-sizing: border-box;
}

.remutaka-photo-pin__tip {
    width: 0;
    height: 0;
    margin-top: -1px;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 11px solid #fff;
}

.remutaka-iw--photo h3 {
    display: none;
}

.remutaka-iw--gallery {
    min-width: 220px;
    max-width: 280px;
}

.remutaka-photo-gallery__title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #222;
    margin: 0 0 0.65rem;
}

.remutaka-photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 0.45rem;
}

.remutaka-photo-gallery__item {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    padding: 0;
    border: none;
    border-radius: 6px;
    overflow: hidden;
    cursor: zoom-in;
    background: #ddd;
}

.remutaka-photo-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0;
}

.remutaka-photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.remutaka-photo-lightbox[hidden] {
    display: none !important;
}

.remutaka-photo-lightbox img {
    max-width: min(96vw, 1100px);
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

.remutaka-photo-lightbox__close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2.4rem;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 992px) {
    .remutaka-map-seo {
        padding: 0 1rem 1rem;
    }

    .remutaka-map-intro h2,
    .remutaka-map-guide h2 {
        font-size: 1.65rem;
    }

    .remutaka-map-intro p,
    .remutaka-map-guide p {
        font-size: 0.95rem;
    }

    .remutaka-map-layout {
        grid-template-columns: 1fr;
        padding: 0 1rem 2rem;
    }

    .remutaka-map-sidebar {
        position: static;
        order: 2;
    }

    .remutaka-map-main {
        order: 1;
    }

    .remutaka-trail-map {
        height: 65vh;
        min-height: 420px;
    }

    .remutaka-map-page {
        padding-top: 1rem;
    }
}
