/* ============================================================
   aerial-photos.css — Aerial Photo Explorer page styles
   ============================================================ */

/* Page wrapper */
.aerialmap {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 60px);
    background: #f5f5f0;
    font-family: var(--font-body, sans-serif);
}

/* Header */
.aerialmap__header {
    padding: 20px 20px 12px;
    background: #fff;
    border-bottom: 1px solid #e0ddd5;
    text-align: center;
}

.aerialmap__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 6px;
}

.aerialmap__subtitle {
    font-size: 0.875rem;
    color: #555;
    margin: 0 auto 14px;
    max-width: 700px;
    line-height: 1.5;
}

/* Search bar */
.aerialmap__search-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.aerialmap__search-row {
    display: flex;
    gap: 8px;
    max-width: 360px;
    margin: 0 auto;
}

.aerialmap__search-input {
    flex: 1;
    padding: 9px 12px;
    border: 1.5px solid #ccc;
    border-radius: 6px;
    font-size: 0.9375rem;
    outline: none;
    transition: border-color 0.15s;
}

.aerialmap__search-input:focus {
    border-color: #2a7a2a;
}

.aerialmap__search-btn {
    padding: 9px 18px;
    background: #2a7a2a;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.aerialmap__search-btn:hover {
    background: #225f22;
}

/* Filter / legend bar */
.aerialmap__filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    border-bottom: 1px solid #e0ddd5;
    flex-wrap: wrap;
}

.aerialmap__filter-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #444;
    white-space: nowrap;
}

.aerialmap__filter-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.aerialmap__filter-btn {
    padding: 5px 14px;
    border: 1.5px solid #ccc;
    border-radius: 20px;
    background: #fff;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    color: #444;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.aerialmap__filter-btn:hover {
    border-color: #2a7a2a;
    color: #2a7a2a;
}

.aerialmap__filter-btn--active {
    background: #2a7a2a;
    border-color: #2a7a2a;
    color: #fff;
}

.aerialmap__count {
    margin-left: auto;
    font-size: 0.8125rem;
    color: #666;
    white-space: nowrap;
}

/* Legend */
.aerialmap__legend {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 6px 20px;
    background: #fafaf7;
    border-bottom: 1px solid #e8e6de;
    flex-wrap: wrap;
}

.aerialmap__legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #555;
}

.aerialmap__legend-swatch {
    display: inline-block;
    width: 20px;
    height: 12px;
    border-radius: 2px;
    border: 1px solid rgba(0,0,0,0.15);
}

.aerialmap__legend-swatch--40s { background: rgba(230, 140, 20, 0.55); border-color: #b06010; }
.aerialmap__legend-swatch--50s { background: rgba(30, 100, 200, 0.45); border-color: #1050b0; }
.aerialmap__legend-swatch--60s { background: rgba(100, 60, 160, 0.4); border-color: #5a2a90; }

/* Map */
.aerialmap__map {
    flex: 1;
    min-height: 480px;
    background: #e8e0d0;
}

/* Leaflet popup styling */
.aerialmap-popup {
    max-width: 260px;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.aerialmap-popup__thumb {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 8px;
    background: #ddd;
    display: block;
}

.aerialmap-popup__title {
    font-weight: 700;
    font-size: 0.875rem;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.aerialmap-popup__meta {
    color: #555;
    margin-bottom: 2px;
}

.aerialmap-popup__meta strong {
    color: #333;
}

.aerialmap-popup__link {
    display: inline-block;
    margin-top: 8px;
    padding: 5px 12px;
    background: #2a7a2a;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: background 0.15s;
}

.aerialmap-popup__link:hover {
    background: #225f22;
    color: #fff;
}


/* ── Info panel (slides up below map on footprint click) ── */
.aerialmap__panel {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 20px 16px;
    background: #fff;
    border-top: 3px solid #2a7a2a;
    overflow: hidden;
    max-height: 220px;
    transition: max-height 0.3s ease, padding 0.3s ease, border-top-width 0.3s ease;
    position: relative;
}

.aerialmap__panel--hidden {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-top-width: 0;
    overflow: hidden;
}

.aerialmap__panel-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1rem;
    color: #666;
    cursor: pointer;
    padding: 4px 6px;
    line-height: 1;
    border-radius: 3px;
}

.aerialmap__panel-close:hover {
    background: #f0f0f0;
    color: #333;
}

.aerialmap__panel-thumb {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
    background: #e0e0e0;
    border: 1px solid #ccc;
}

.aerialmap__panel-body {
    flex: 1;
    min-width: 0;
}

.aerialmap__panel-title {
    font-weight: 700;
    font-size: 1rem;
    color: #1a1a1a;
    margin: 0 0 6px;
}

.aerialmap__panel-meta {
    font-size: 0.8125rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 10px;
}

.aerialmap__panel-meta strong {
    color: #333;
}

.aerialmap__panel-link {
    display: inline-block;
    padding: 8px 16px;
    background: #2a7a2a;
    color: #fff !important;
    border-radius: 5px;
    text-decoration: none !important;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background 0.15s;
}

.aerialmap__panel-link:hover {
    background: #225f22;
    color: #fff !important;
    text-decoration: none !important;
}

@media (max-width: 600px) {
    .aerialmap__panel {
        flex-direction: column;
        max-height: 340px;
        padding: 12px 14px 14px;
    }
    .aerialmap__panel-thumb {
        width: 100%;
        height: 160px;
    }
}


/* ── Info panel (slides up below map on footprint click) ── */
.aerialmap__panel {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 20px 16px;
    background: #fff;
    border-top: 3px solid #2a7a2a;
    overflow: hidden;
    max-height: 220px;
    transition: max-height 0.3s ease, padding 0.3s ease, border-top-width 0.3s ease;
    position: relative;
}

.aerialmap__panel--hidden {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-top-width: 0;
    overflow: hidden;
}

.aerialmap__panel-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1rem;
    color: #666;
    cursor: pointer;
    padding: 4px 6px;
    line-height: 1;
    border-radius: 3px;
}

.aerialmap__panel-close:hover {
    background: #f0f0f0;
    color: #333;
}

.aerialmap__panel-thumb {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
    background: #e0e0e0;
    border: 1px solid #ccc;
}

.aerialmap__panel-body {
    flex: 1;
    min-width: 0;
}

.aerialmap__panel-title {
    font-weight: 700;
    font-size: 1rem;
    color: #1a1a1a;
    margin: 0 0 6px;
}

.aerialmap__panel-meta {
    font-size: 0.8125rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 10px;
}

.aerialmap__panel-meta strong {
    color: #333;
}

.aerialmap__panel-link {
    display: inline-block;
    padding: 8px 16px;
    background: #2a7a2a;
    color: #fff !important;
    border-radius: 5px;
    text-decoration: none !important;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background 0.15s;
}

.aerialmap__panel-link:hover {
    background: #225f22;
    color: #fff !important;
    text-decoration: none !important;
}

@media (max-width: 600px) {
    .aerialmap__panel {
        flex-direction: column;
        max-height: 340px;
        padding: 12px 14px 14px;
    }
    .aerialmap__panel-thumb {
        width: 100%;
        height: 160px;
    }
}

/* Footer */
.aerialmap__footer {
    padding: 16px 20px;
    background: #fff;
    border-top: 1px solid #e0ddd5;
    font-size: 0.8125rem;
    color: #666;
    line-height: 1.6;
}

.aerialmap__footer p {
    margin: 0 0 6px;
}

.aerialmap__footer a {
    color: #2a7a2a;
    text-decoration: none;
}

.aerialmap__footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
    .aerialmap__header { padding: 14px 14px 10px; }
    .aerialmap__filter-bar { padding: 8px 14px; }
    .aerialmap__legend { padding: 6px 14px; }
    .aerialmap__map { min-height: 380px; }
    .aerialmap__footer { padding: 12px 14px; }
    .aerialmap__count { margin-left: 0; width: 100%; }
}

/* ── Aerial photos educational section ──────────────────── */
.aerialmap__edu {
    background: #f8f9fa;
    padding: 3rem 1.5rem;
    margin-top: 2.5rem;
}
.aerialmap__edu-container {
    max-width: 860px;
    margin: 0 auto;
}
.aerialmap__edu-h2 {
    font-size: 1.35rem;
    color: #1a2b4a;
    margin: 0 0 0.9rem;
}
.aerialmap__edu-h2:not(:first-child) {
    margin-top: 2.2rem;
}
.aerialmap__edu-container p {
    color: #374151;
    line-height: 1.75;
    margin-bottom: 1rem;
}
.aerialmap__edu-container a {
    color: #2563eb;
    text-decoration: underline;
}
.aerialmap__edu-steps {
    color: #374151;
    line-height: 1.75;
    padding-left: 1.4rem;
    margin-bottom: 1rem;
}
.aerialmap__edu-steps li {
    margin-bottom: 0.55rem;
}

/* ── Intro strip ── */

.aerialmap__intro {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    padding: 12px 24px;
}

.aerialmap__intro-inner {
    max-width: 760px;
    margin: 0 auto;
}

.aerialmap__intro-inner p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.7;
    color: #555;
}


/* ── Intro strip ── */

.aerialmap__intro {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    padding: 12px 24px;
}

.aerialmap__intro-inner {
    max-width: 760px;
    margin: 0 auto;
}

.aerialmap__intro-inner p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.7;
    color: #555;
}

