/* ========================================
   Public Pendeta Directory & Profile
   LinkedIn-like styling for GKI pastors
   ======================================== */

:root {
    --pd-primary: #1e3a5f;
    --pd-primary-light: #2d5a8e;
    --pd-accent: #d4a853;
    --pd-bg: #f0f2f5;
    --pd-card-bg: #ffffff;
    --pd-text: #1d1d1f;
    --pd-text-muted: #65676b;
    --pd-border: #e4e6eb;
    --pd-shadow: 0 1px 3px rgba(0,0,0,0.08);
    --pd-shadow-lg: 0 4px 12px rgba(0,0,0,0.12);
    --pd-radius: 12px;
    --pd-radius-sm: 8px;
}

/* ---- DIRECTORY PAGE ---- */

.pd-page {
    background: var(--pd-bg);
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
    color: var(--pd-text);
}

/* Hero */
.pd-hero {
    background: linear-gradient(135deg, var(--pd-primary) 0%, var(--pd-primary-light) 100%);
    padding: 48px 24px;
    text-align: center;
    color: #fff;
}
.pd-hero-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.9;
}
.pd-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 8px;
}
.pd-hero p {
    font-size: 1.1rem;
    opacity: 0.85;
    margin: 0;
}

/* Search & Filters */
.pd-filters-wrap {
    max-width: 1100px;
    margin: -28px auto 24px;
    padding: 0 16px;
    position: relative;
    z-index: 2;
}
.pd-filters {
    background: var(--pd-card-bg);
    border-radius: var(--pd-radius);
    box-shadow: var(--pd-shadow-lg);
    padding: 20px 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.pd-search-input {
    flex: 1;
    min-width: 200px;
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius-sm);
    padding: 10px 14px 10px 38px;
    font-size: 15px;
    background: var(--pd-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2365676b'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.44.156a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") no-repeat 12px center;
    outline: none;
    transition: border-color 0.2s;
}
.pd-search-input:focus {
    border-color: var(--pd-primary);
}
.pd-filter-select {
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius-sm);
    padding: 10px 14px;
    font-size: 14px;
    background: var(--pd-bg);
    min-width: 140px;
    outline: none;
}
.pd-filter-btn {
    background: var(--pd-primary);
    color: #fff;
    border: none;
    border-radius: var(--pd-radius-sm);
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.pd-filter-btn:hover {
    background: var(--pd-primary-light);
}

/* Results */
.pd-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px 48px;
}
.pd-count {
    font-size: 14px;
    color: var(--pd-text-muted);
    margin-bottom: 16px;
    font-weight: 500;
}

/* Directory Grid */
.pd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

/* Pendeta Card */
.pd-card {
    background: var(--pd-card-bg);
    border-radius: var(--pd-radius);
    box-shadow: var(--pd-shadow);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}
.pd-card:hover {
    box-shadow: var(--pd-shadow-lg);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.pd-card-banner {
    height: 72px;
    background: linear-gradient(135deg, var(--pd-primary) 0%, var(--pd-primary-light) 100%);
    position: relative;
}
.pd-card-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #fff;
    object-fit: cover;
    position: absolute;
    bottom: -40px;
    left: 20px;
    background: #e4e6eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.pd-card-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #fff;
    position: absolute;
    bottom: -40px;
    left: 20px;
    background: var(--pd-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.pd-card-body {
    padding: 48px 20px 20px;
}
.pd-card-name {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 2px;
    color: var(--pd-text);
}
.pd-card-headline {
    font-size: 13px;
    color: var(--pd-text-muted);
    margin: 0 0 8px;
    line-height: 1.4;
}
.pd-card-jemaat {
    font-size: 12px;
    color: var(--pd-text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
}
.pd-card-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.pd-skill-tag {
    font-size: 11px;
    background: #eef3ff;
    color: var(--pd-primary);
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
}
.pd-card-footer {
    border-top: 1px solid var(--pd-border);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.pd-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
}
.pd-badge-pendeta { background: #dbeafe; color: #1e40af; }
.pd-badge-penatua { background: #d1fae5; color: #065f46; }
.pd-badge-tpg { background: #fef3c7; color: #92400e; }
.pd-badge-emeritus { background: #e5e7eb; color: #374151; }
.pd-card-link {
    font-size: 13px;
    color: var(--pd-primary);
    font-weight: 600;
}

/* Empty state */
.pd-empty {
    text-align: center;
    padding: 64px 24px;
    color: var(--pd-text-muted);
}
.pd-empty i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}


/* ---- PROFILE PAGE ---- */

.pp-page {
    background: var(--pd-bg);
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
    color: var(--pd-text);
}

.pp-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 16px 48px;
}

/* Profile Header Card */
.pp-header {
    background: var(--pd-card-bg);
    border-radius: var(--pd-radius);
    box-shadow: var(--pd-shadow);
    overflow: hidden;
    margin-bottom: 16px;
}
.pp-banner {
    height: 120px;
    background: linear-gradient(135deg, var(--pd-primary) 0%, var(--pd-primary-light) 60%, var(--pd-accent) 100%);
    position: relative;
}
.pp-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #fff;
    object-fit: cover;
    position: absolute;
    bottom: -60px;
    left: 32px;
    background: #e4e6eb;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.pp-avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #fff;
    position: absolute;
    bottom: -60px;
    left: 32px;
    background: var(--pd-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 42px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.pp-header-body {
    padding: 68px 32px 24px;
}
.pp-name {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 4px;
}
.pp-headline {
    font-size: 15px;
    color: var(--pd-text-muted);
    margin: 0 0 8px;
    line-height: 1.5;
}
.pp-location {
    font-size: 13px;
    color: var(--pd-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.pp-location-dot {
    width: 3px;
    height: 3px;
    background: var(--pd-text-muted);
    border-radius: 50%;
}
.pp-contact-row {
    margin-top: 16px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.pp-contact-btn {
    font-size: 13px;
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid var(--pd-primary);
    color: var(--pd-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}
.pp-contact-btn:hover {
    background: var(--pd-primary);
    color: #fff;
    text-decoration: none;
}

/* Section Cards */
.pp-section {
    background: var(--pd-card-bg);
    border-radius: var(--pd-radius);
    box-shadow: var(--pd-shadow);
    padding: 24px 32px;
    margin-bottom: 16px;
}
.pp-section-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pp-section-title i {
    color: var(--pd-primary);
}
.pp-bio {
    font-size: 15px;
    line-height: 1.7;
    white-space: pre-wrap;
    color: var(--pd-text);
}

/* Skills Tags */
.pp-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pp-skill-tag {
    font-size: 13px;
    background: #eef3ff;
    color: var(--pd-primary);
    padding: 6px 14px;
    border-radius: 16px;
    font-weight: 500;
}

/* Timeline */
.pp-timeline {
    position: relative;
    padding-left: 24px;
}
.pp-timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: var(--pd-border);
}
.pp-timeline-item {
    position: relative;
    padding-bottom: 20px;
}
.pp-timeline-item:last-child {
    padding-bottom: 0;
}
.pp-timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--pd-primary);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--pd-primary);
    position: absolute;
    left: -24px;
    top: 4px;
}
.pp-timeline-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 2px;
}
.pp-timeline-sub {
    font-size: 13px;
    color: var(--pd-text-muted);
    margin: 0;
}

/* Back Link */
.pp-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--pd-primary);
    text-decoration: none;
    font-weight: 600;
    padding: 16px 0;
}
.pp-back:hover {
    text-decoration: underline;
    color: var(--pd-primary);
}

/* Footer */
.pd-footer, .pp-footer {
    text-align: center;
    padding: 24px;
    font-size: 13px;
    color: var(--pd-text-muted);
}

/* Responsive */
@media (max-width: 600px) {
    .pd-hero h1 { font-size: 1.4rem; }
    .pd-filters { flex-direction: column; }
    .pd-grid { grid-template-columns: 1fr; }
    .pp-banner { height: 80px; }
    .pp-avatar, .pp-avatar-placeholder {
        width: 90px; height: 90px;
        bottom: -45px; left: 20px;
        font-size: 32px;
    }
    .pp-header-body { padding: 52px 20px 20px; }
    .pp-section { padding: 20px; }
    .pp-name { font-size: 1.3rem; }
}
