/* ============================================================
   Opportunities Page — volunteer.css
   Full-viewport discover-app redesign
   ============================================================ */

/* ── Page Shell ──────────────────────────────────────────── */
.opp-page {
    height: calc(100vh - var(--nav-height));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f1f5f9;
}

/* ── Hero ────────────────────────────────────────────────── */
.opp-hero {
    /* no extra margin — nav overlaps hero background naturally */
}

/* ── Info Strip ──────────────────────────────────────────── */
.opp-info-section {
    background: #fff;
    padding: 28px 0 26px;
    border-bottom: 1px solid var(--border-color);
}

.opp-info-strip {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}

.opp-info-item {
    flex: 1;
    min-width: 180px;
    padding: 0 24px;
    border-right: 1px solid var(--border-color);
}
.opp-info-item:first-child { padding-left: 0; }
.opp-info-item:last-child {
    border-right: none;
    padding-right: 0;
}

.opp-info-item-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    margin-bottom: 3px;
}

.opp-info-item-text {
    font-size: 0.88rem;
    color: var(--text-dark);
    line-height: 1.5;
}

.opp-info-item-text a {
    color: var(--primary-blue);
    text-decoration: none;
}
.opp-info-item-text a:hover { text-decoration: underline; }

.opp-info-safety {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #dc2626;
    text-decoration: none;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 5px 12px;
    transition: background 0.15s;
}
.opp-info-safety:hover { background: #fee2e2; }
.opp-info-safety i { font-size: 0.8rem; }

@media (max-width: 860px) {
    .opp-info-strip { flex-direction: column; align-items: flex-start; gap: 14px; }
    .opp-info-item { border-right: none; border-bottom: 1px solid var(--border-color); padding: 0 0 14px; width: 100%; min-width: unset; }
    .opp-info-item:last-child { border-bottom: none; padding-bottom: 0; }
}



/* ── Topbar ──────────────────────────────────────────────── */
.opp-topbar {
    flex-shrink: 0;
    height: 62px;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 20px;
    z-index: 50;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

.opp-topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.opp-topbar-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #1e3a8a, var(--primary-blue));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.opp-topbar-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1;
}

.opp-topbar-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.01em;
}

.opp-topbar-region {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Search */
.opp-topbar-search {
    flex: 1;
    max-width: 540px;
    position: relative;
    margin: 0 auto;
}

.opp-topbar-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.82rem;
    pointer-events: none;
}

.opp-topbar-search input {
    width: 100%;
    padding: 9px 16px 9px 38px;
    border: 1.5px solid var(--border-color);
    border-radius: 100px;
    font-size: 0.88rem;
    background: var(--surface-gray);
    color: var(--text-dark);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.opp-topbar-search input::placeholder { color: #94a3b8; }

.opp-topbar-search input:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(74,143,231,0.1);
}

/* Actions right side */
.opp-topbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
    margin-left: auto;
}

.opp-topbar-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.opp-topbar-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.opp-topbar-stat strong {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.opp-topbar-stat span {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    font-weight: 600;
    line-height: 1;
}

.opp-stat-sep {
    width: 1px;
    height: 26px;
    background: var(--border-color);
}

/* Student pill button */
.opp-student-pill,
.student-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    background: linear-gradient(135deg, #1e3a8a, var(--primary-blue));
    color: #fff;
    border: none;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s ease, transform 0.15s ease;
    letter-spacing: 0.01em;
}

.opp-student-pill:hover,
.student-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.opp-student-pill.student-btn--active,
.student-btn.student-btn--active {
    background: linear-gradient(135deg, #059669, #10b981);
}

/* Connect Your School button override for topbar */
.opp-connect-btn {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

/* ── Explore area ────────────────────────────────────────── */
.opp-explore {
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;
}

/* ── Map container ───────────────────────────────────────── */
.map-container {
    --opps-panel-width: clamp(300px, 30vw, 400px);
    position: relative;
    width: 100%;
    height: 100%;
}

/* ── Map ─────────────────────────────────────────────────── */
.map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* ── Opportunities Panel ─────────────────────────────────── */
.opps-panel {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--opps-panel-width);
    z-index: 10;
    background: #fff;
    border-right: 1px solid var(--border-color);
    box-shadow: 4px 0 24px rgba(15,23,42,0.08);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
    overflow: hidden;
}

.opps-panel--open { transform: translateX(0); }

.opps-panel-header {
    flex-shrink: 0;
    padding: 14px 16px 11px;
    border-bottom: 1px solid var(--border-color);
    background: #fff;
}

.opps-panel-header h3 {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    font-weight: 700;
    margin: 0 0 10px;
}

/* Search inside panel */
.opps-panel-search {
    position: relative;
    width: 100%;
}

.opps-panel-search i {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.78rem;
    pointer-events: none;
}

.opps-panel-search input {
    width: 100%;
    padding: 8px 12px 8px 32px;
    border: 1.5px solid var(--border-color);
    border-radius: 100px;
    font-size: 0.84rem;
    background: var(--surface-gray, #f8fafc);
    color: var(--text-dark);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.opps-panel-search input::placeholder { color: #94a3b8; }

.opps-panel-search input:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(74,143,231,0.1);
}



/* ── Panel toggle tab ────────────────────────────────────── */
.opps-panel-tab {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 11;
    background: #fff;
    border: 1px solid var(--border-color);
    border-left: none;
    border-radius: 0 10px 10px 0;
    padding: 10px 10px 10px 8px;
    cursor: pointer;
    box-shadow: 3px 0 12px rgba(15,23,42,0.1);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-dark);
    transition: left 0.28s cubic-bezier(0.4,0,0.2,1), background 0.15s ease;
    letter-spacing: 0.01em;
}

.map-container.opps-panel-open .opps-panel-tab {
    left: calc(var(--opps-panel-width) - 1px);
}

.opps-panel-tab:hover { background: var(--surface-gray); }
.opps-panel-tab i { font-size: 0.65rem; }

/* ── Fullscreen ──────────────────────────────────────────── */
.map-fullscreen-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 6;
    width: 34px;
    height: 34px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.82rem;
    color: var(--text-dark);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.map-fullscreen-btn:hover {
    background: var(--surface-gray);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.opp-explore.map-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 2000;
    height: 100vh !important;
}

.opp-explore.map-fullscreen .map-container {
    width: 100%;
    height: 100%;
}

/* ── Cards List ──────────────────────────────────────────── */
.opportunities-grid {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    overscroll-behavior: contain;
}

.opportunity-item {
    padding: 11px 13px;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.opportunity-item:hover {
    border-color: rgba(74,143,231,0.4);
    box-shadow: 0 2px 10px rgba(74,143,231,0.08);
    background: #fafcff;
}

.opportunity-item.active {
    border-color: var(--primary-blue);
    background: rgba(74,143,231,0.04);
    box-shadow: 0 0 0 3px rgba(74,143,231,0.12);
}

.opp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.opp-header h3 {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-dark);
    font-weight: 700;
    flex: 1;
    line-height: 1.3;
}

.opportunity-item.active .opp-header h3 { color: var(--primary-blue); }

.opp-details {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 10px;
}

.opp-detail {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.opp-detail i {
    color: #c0cfe0;
    font-size: 0.68rem;
    width: 13px;
    flex-shrink: 0;
}

.opportunity-item.active .opp-detail i { color: rgba(74,143,231,0.6); }

.opp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 1px;
}

.opp-tag {
    background: rgba(74,143,231,0.08);
    color: var(--primary-blue);
    font-size: 0.65rem;
    padding: 2px 7px;
    border-radius: 6px;
    font-weight: 600;
}

.opp-hot-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.63rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    background: #fff0f0;
    color: #e63946;
}
.opp-hot-tag i { font-size: 0.58rem; }

.opp-student-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.63rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    background: #d1fae5;
    color: #059669;
}
.opp-student-tag i { font-size: 0.58rem; }

.opp-partner-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.63rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    background: #ede9fe;
    color: #7c3aed;
}
.opp-partner-tag i { font-size: 0.58rem; }

.opp-type-badge {
    display: inline-block;
    font-size: 0.57rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 7px;
    border-radius: 6px;
    color: #fff;
    flex-shrink: 0;
    white-space: nowrap;
}
.opp-type-badge--volunteers { background: #22c55e; }
.opp-type-badge--default { background: #6366f1; }

.opp-tag-pill {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 7px;
    border-radius: 6px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.detail-tags .opp-tag-pill {
    font-size: 0.67rem;
    padding: 3px 9px;
    border-radius: 8px;
}

/* Action buttons */
.opp-actions {
    display: flex;
    gap: 5px;
    margin-top: 3px;
}

.action-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 7px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.1s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.action-btn:hover { filter: brightness(0.92); transform: translateY(-1px); }
.interested-btn { background: #10b981; color: #fff; }
.more-info-btn { background: var(--primary-blue); color: #fff; }
.email-btn { background: #4dabf7; color: #fff; }
.action-btn i { font-size: 0.7rem; }

/* Locked cards */
.opportunity-item--locked {
    position: relative;
    overflow: hidden;
    min-height: 110px;
}

.opportunity-item--locked .opp-locked-content {
    filter: blur(5px);
    user-select: none;
    pointer-events: none;
    opacity: 0.45;
}

.opp-lock-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    z-index: 2;
    background: rgba(255,255,255,0.4);
}

.opp-lock-overlay > i { font-size: 1.4rem; color: #10b981; }
.opp-lock-overlay > span { font-size: 0.8rem; font-weight: 600; color: #059669; }
.student-login-btn { background: #10b981 !important; color: #fff !important; border-radius: 7px !important; }
.student-login-btn:hover { background: #059669 !important; }

.opportunity-location, .opportunity-date {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.opportunity-location i, .opportunity-date i { color: #c0cfe0; font-size: 0.68rem; }

/* ── Mapbox popup ────────────────────────────────────────── */
.mapboxgl-popup-content {
    padding: 0;
    border-radius: 14px;
    overflow: visible;
    box-shadow: 0 8px 28px rgba(0,0,0,0.14);
    min-width: 200px;
    max-width: 240px;
}

.mapboxgl-popup-close-button {
    font-size: 1.1rem;
    color: #bbb;
    right: 6px;
    top: 6px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0,0,0,0.04);
    transition: background 0.15s, color 0.15s;
    line-height: 1;
    padding: 0;
}
.mapboxgl-popup-close-button:hover { background: rgba(0,0,0,0.1); color: #444; }
.mapboxgl-popup-tip { border-top-color: #fff; }

/* ── Map Popup Card ─────────────────────────────────────── */
.popup-card {
    padding: 14px 15px 12px;
    min-width: 220px;
    max-width: 260px;
}

.popup-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.popup-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 8px;
    border-radius: 20px;
    color: #fff;
}
.popup-badge--volunteers { background: #22c55e; }
.popup-badge--default { background: var(--primary-blue); }
.popup-badge--student { background: #f59e0b; }
.popup-badge--hot { background: #ef4444; }

.popup-card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.35;
    margin-bottom: 9px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popup-card-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 9px;
}
.popup-card-meta span {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.popup-card-meta i { color: var(--primary-blue); font-size: 0.65rem; flex-shrink: 0; width: 11px; text-align: center; }

.popup-card-partner {
    margin-bottom: 10px;
}
.popup-partner-link {
    font-size: 0.72rem;
    font-weight: 600;
    color: #7c3aed;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}
.popup-partner-link:hover { text-decoration: underline; }
.popup-partner-link--nolink { cursor: default; }
.popup-partner-link--nolink:hover { text-decoration: none; }

.popup-more-btn {
    width: 100%;
    padding: 8px 10px;
    background: var(--primary-blue);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.15s ease;
    letter-spacing: 0.01em;
}
.popup-more-btn:hover { background: var(--primary-blue-hover); }

.popup-blurred { filter: blur(4px); user-select: none; pointer-events: none; }
.popup-card-lock {
    text-align: center;
    padding: 10px 0 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}


/* ── Map Markers ─────────────────────────────────────────── */
.volunteer-marker {
    background: var(--primary-blue);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.volunteer-marker--volunteers { background: #22c55e; }
.volunteer-marker--student { background: #f59e0b; }
.volunteer-marker:hover { transform: scale(1.15); box-shadow: 0 4px 14px rgba(74,143,231,0.4); }
.volunteer-marker--volunteers:hover { box-shadow: 0 4px 14px rgba(34,197,94,0.4); }
.volunteer-marker.active { transform: scale(1.2); box-shadow: 0 4px 14px rgba(0,0,0,0.35); }

/* ── Interest Modal ──────────────────────────────────────── */
.modal {
    display: none;
    position: fixed;
    z-index: 2500;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.modal-content {
    background: #fff;
    margin: 6% auto;
    padding: 28px;
    border-radius: 14px;
    width: 90%;
    max-width: 440px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    animation: modalIn 0.22s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(-16px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--primary-blue);
}
.modal-header h2 { margin: 0; color: var(--text-dark); font-size: 1.25rem; }
.modal-close { font-size: 1.8rem; font-weight: bold; cursor: pointer; color: #aaa; border: none; background: none; padding: 0; line-height: 1; transition: color 0.15s; }
.modal-close:hover { color: #333; }

.modal-form { display: flex; flex-direction: column; gap: 14px; }
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field label { font-weight: 600; color: var(--text-dark); font-size: 0.9rem; }
.form-field input[type="text"],
.form-field input[type="email"] {
    padding: 9px 12px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}
.form-field input:focus { outline: none; border-color: var(--primary-blue); box-shadow: 0 0 0 3px rgba(74,143,231,0.1); }

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--surface-gray);
    border-radius: 8px;
}
.checkbox-field input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }
.checkbox-field label { margin: 0; cursor: pointer; font-size: 0.9rem; }

.error-message {
    color: #dc3545;
    font-size: 0.87rem;
    padding: 9px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 7px;
    display: none;
}

.modal-buttons { display: flex; gap: 8px; margin-top: 16px; }
.modal-btn { flex: 1; padding: 11px 18px; border: none; border-radius: 8px; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: filter 0.15s; }
.modal-btn-submit { background: var(--primary-blue); color: #fff; }
.modal-btn-submit:hover { filter: brightness(0.92); }
.modal-btn-cancel { background: #e5e7eb; color: var(--text-dark); }
.modal-btn-cancel:hover { background: #d1d5db; }

/* ── Detail Modal ────────────────────────────────────────── */
/* ── Detail Modal ────────────────────────────────────────── */
.detail-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2500;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.detail-overlay.active { display: flex; }

.detail-panel {
    background: #fff;
    border-radius: 18px;
    max-width: 480px;
    width: 100%;
    padding: 28px 30px 24px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: detailUp 0.22s ease;
    max-height: 85vh;
    overflow-y: auto;
}

@keyframes detailUp {
    from { opacity: 0; transform: translateY(14px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.detail-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: #f3f4f6;
    border: none;
    font-size: 1.2rem;
    color: #6b7280;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
}
.detail-close:hover { background: #e5e7eb; color: #111; }

.detail-header { margin-bottom: 14px; }

.detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.detail-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 10px;
    border-radius: 20px;
    color: #fff;
}
.detail-badge--volunteers { background: #22c55e; }
.detail-badge--default { background: var(--primary-blue); }
.detail-badge--hot { background: #ef4444; }
.detail-badge--student { background: #f59e0b; }

.detail-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0 0 8px;
    line-height: 1.3;
    padding-right: 36px;
}

/* Partner box — shown at bottom of modal */
.detail-partner-box {
    margin: 0 0 16px;
    padding: 12px 14px;
    background: #f5f3ff;
    border: 1px solid #ede9fe;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.detail-partner-box-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #7c3aed;
    display: flex;
    align-items: center;
    gap: 5px;
}

.detail-partner-box-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-dark);
}

.detail-partner-box-url {
    font-size: 0.8rem;
    margin-top: 2px;
}

.detail-partner-website {
    color: #7c3aed;
    text-decoration: none;
    word-break: break-all;
}
.detail-partner-website:hover { text-decoration: underline; }
.detail-partner-website i { font-size: 0.68rem; margin-left: 3px; }

.detail-info {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 14px 0;
    padding: 12px 14px;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}
.detail-info-row {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.86rem;
    color: #444;
}
.detail-info-row i { color: var(--primary-blue); font-size: 0.8rem; width: 15px; text-align: center; flex-shrink: 0; }

.detail-divider { height: 1px; background: #e5e7eb; margin: 16px 0 14px; }
.detail-body {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.7;
    margin: 0 0 22px;
    white-space: pre-wrap;
}

.detail-interest-btn {
    width: 100%;
    padding: 13px;
    background: var(--primary-blue);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.01em;
    transition: background 0.15s ease, transform 0.1s ease;
}
.detail-interest-btn:hover { background: var(--primary-blue-hover); transform: translateY(-1px); }
.detail-interest-btn:active { transform: translateY(0); }


/* ── School / Student Modal ──────────────────────────────── */
.gi-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.gi-modal-overlay.active { display: flex; }

.gi-modal-box {
    background: #fff;
    border-radius: 14px;
    max-width: 460px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: modalIn 0.22s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.gi-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
    border-radius: 14px 14px 0 0;
}
.gi-modal-header h2 { font-size: 1.1rem; color: var(--text-dark); display: flex; align-items: center; gap: 9px; margin: 0; }
.gi-modal-header h2 i { color: var(--primary-blue); }
.gi-modal-close { background: none; border: none; font-size: 1.5rem; color: var(--text-muted); cursor: pointer; padding: 0 4px; line-height: 1; transition: color 0.15s; }
.gi-modal-close:hover { color: var(--text-dark); }
.gi-modal-body { padding: 22px; }

/* Student form fields */
.student-field { margin-bottom: 13px; }
.student-field label { display: block; font-size: 0.83rem; font-weight: 600; color: #555; margin-bottom: 4px; }
.student-field input,
.student-field select {
    width: 100%;
    padding: 9px 11px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    box-sizing: border-box;
    background: #fff;
    transition: border-color 0.2s;
}
.student-field input:focus,
.student-field select:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16,185,129,0.1);
}

.student-login-submit {
    width: 100%;
    padding: 10px;
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: filter 0.15s;
    margin-top: 4px;
}
.student-login-submit:hover { filter: brightness(0.92); }

.student-feedback {
    padding: 9px 11px;
    border-radius: 7px;
    font-size: 0.83rem;
    margin-bottom: 11px;
    display: none;
}
.student-feedback.error { display: block; background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.student-feedback.success { display: block; background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }

.school-not-found { margin-top: 14px; text-align: center; }
.school-not-found p { font-size: 0.83rem; color: #888; }
.school-not-found a { color: #10b981; text-decoration: none; font-weight: 600; }
.school-not-found a:hover { text-decoration: underline; }

.school-search-results {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 210px;
    overflow-y: auto;
    margin-top: 7px;
}

.school-search-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 9px 12px;
    background: var(--surface-gray);
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.88rem;
    color: var(--text-dark);
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, border-color 0.15s;
}
.school-search-item i { color: var(--primary-blue); flex-shrink: 0; }
.school-search-item:hover { background: #eef4fc; border-color: var(--primary-blue); }

.school-step2-school {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 14px;
    background: #eef4fc;
    border: 1px solid #d6e4f5;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 14px;
}
.school-step2-school i { color: var(--primary-blue); }

.school-step2-actions { display: flex; justify-content: center; gap: 18px; margin-top: 12px; }

.school-step-link {
    background: none; border: none; color: var(--text-muted);
    font-size: 0.8rem; font-weight: 500; cursor: pointer; padding: 4px 0; transition: color 0.15s;
}
.school-step-link i { margin-right: 3px; }
.school-step-link:hover { color: var(--primary-blue); }

.school-connected-info { display: flex; flex-direction: column; align-items: center; gap: 7px; margin-bottom: 18px; }
.school-connected-icon { color: #10b981; font-size: 1.9rem; }
.school-connected-info p { font-size: 0.95rem; color: var(--text-dark); margin: 0; }
.school-connected-actions { display: flex; gap: 10px; justify-content: center; }

.school-action-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.83rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: filter 0.15s;
    border: none;
}
.school-action-btn:hover { filter: brightness(0.92); }
.school-signout-btn { background: #dc3545; color: #fff; }
.school-exit-btn { background: var(--surface-gray); color: var(--text-dark); border: 1px solid var(--border-color) !important; }
.school-connected-meta { font-size: 0.62rem; color: rgba(0,0,0,0.1); text-align: right; margin-top: 14px; margin-bottom: 0; }

/* ── Responsive ──────────────────────────────────────────── */
@media (min-width: 1400px) {
    .map-container { --opps-panel-width: clamp(340px, 28vw, 440px); }
}

@media (max-width: 900px) {
    .opp-topbar-stats { display: none; }
    .opp-topbar-brand .opp-topbar-text { display: none; }
    .opp-topbar-search { margin: 0; }
}

@media (max-width: 768px) {
    .opp-topbar { gap: 10px; padding: 0 14px; }
    .opp-topbar-search input { font-size: 0.85rem; padding: 8px 14px 8px 36px; }
    .map-container { --opps-panel-width: min(86vw, 340px); }
    .opp-student-pill span, .student-btn span { display: none; }
    .opp-student-pill, .student-btn { padding: 8px 12px; }
    .opp-connect-btn span { display: inline; }
}

@media (max-width: 480px) {
    .opp-topbar { height: 54px; }
    .opp-page { height: calc(100vh - var(--topbar-height) - var(--nav-height)); }
    .opp-topbar-icon { display: none; }
    .map-container { --opps-panel-width: min(92vw, 320px); }
    .opp-actions { flex-direction: column; }
}

/* ── Partnerships Section ────────────────────────────────── */
.opp-partnerships {
    background: #F8FAFC;
    padding: 90px 0;
    border-top: 1px solid var(--border-color);
}

.opp-partnerships-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.opp-partnerships-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
    background: #EFF6FF;
    padding: 5px 12px;
    border-radius: 50px;
}

.opp-partnerships-text h2 {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.25;
    margin: 0 0 18px;
}

.opp-partnerships-text p {
    font-size: 0.97rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.opp-partnerships-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.opp-partnerships-cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.opp-partnerships-card {
    background: #fff;
    border-radius: 14px;
    padding: 22px 22px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.opp-partnerships-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.opp-pcard-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.opp-pcard-icon--blue  { background: #DBEAFE; color: var(--primary-blue); }
.opp-pcard-icon--green { background: #D1FAE5; color: #059669; }
.opp-pcard-icon--coral { background: #FFE4E6; color: #E11D48; }

.opp-partnerships-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 5px;
}

.opp-partnerships-card p {
    font-size: 0.87rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0;
}

@media (max-width: 900px) {
    .opp-partnerships-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .opp-partnerships { padding: 60px 0; }
}

