/* Officials page — captain cards & map modal */
.captains-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    align-items: stretch;
}

.captain-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 32px 24px 28px;
    text-align: center;
    height: 100%;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.captain-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 20px 40px rgba(255, 215, 0, 0.2);
}

.captain-card:focus {
    outline: 2px solid #FFD700;
    outline-offset: 2px;
}

.captain-photo {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    background: linear-gradient(135deg, #1e3a8a 0%, #FFD700 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    color: #fff;
    box-shadow: 0 8px 24px rgba(30, 58, 138, 0.35);
}

.captain-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #FFD700;
    margin-bottom: 10px;
    line-height: 1.35;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.captain-card .captain-name {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: auto;
    padding-bottom: 12px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.45;
}

.captain-card .captain-name-pending {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    font-weight: 500;
}

.captain-card .position {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
    margin-top: auto;
}

.captain-card .view-map-hint {
    margin-top: 14px;
    font-size: 12px;
    color: #FFD700;
    font-weight: 600;
}

#barangayMapModal .modal-content {
    background: linear-gradient(180deg, #243f8f 0%, #1e3a8a 100%);
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 16px;
    color: #fff;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

#barangayMapModal .modal-header {
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.03);
}

#barangayMapModal .modal-title {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
}

#barangayMapModal .modal-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
    margin: 6px 0 0;
}

#barangayMapModal .close { color: #fff; opacity: 0.85; font-size: 28px; }

#barangayMapModal .modal-body { padding: 0; }

#barangayDetailMap {
    width: 100%;
    height: 420px;
    border-radius: 0 0 16px 16px;
    z-index: 1;
}

.leaflet-popup-content-wrapper {
    background: rgba(30, 58, 138, 0.95);
    color: #fff;
    border-radius: 10px;
}

.leaflet-popup-tip { background: rgba(30, 58, 138, 0.95); }

@media (max-width: 1200px) {
    .captains-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 992px) {
    .captains-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (max-width: 768px) {
    .captains-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
    #barangayDetailMap { height: 320px; }
}
