/* 
 * AHGCC Huruma — Pastoral Team Redesign
 */

/* Color Palette Variables */
:root {
    --team-navy: #0a192f;
    --team-navy-light: #112240;
    --team-gold: #d4af37;
    --team-gold-hover: #b5952f;
    --team-white: #fdfbf7;
    --team-text-dark: #2d3748;
    --team-text-muted: #718096;
    
    /* Tier Badge Colors */
    --badge-bishop: #6b46c1;      /* Purple */
    --badge-senior: #2f855a;      /* Green */
    --badge-pastor: #3182ce;      /* Blue */
    --badge-deacon: #d69e2e;      /* Amber */
    
    --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Base Team Section Styles */
.team-section {
    background-color: var(--team-white);
    padding-bottom: 4rem;
}

/* Tier Dividers */
.tier-divider {
    display: flex;
    align-items: center;
    margin: 4rem 0 2rem;
}

.tier-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-left: 1rem;
}

.tier-divider h3 {
    font-family: var(--font-display, sans-serif);
    font-size: 1.5rem;
    color: var(--team-navy);
    font-weight: 600;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Common Card Styles */
.team-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.team-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.team-card-image-wrap {
    overflow: hidden;
    position: relative;
}

.team-card img {
    width: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.team-card:hover img {
    transform: scale(1.05);
}

/* Role Badges */
.role-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    margin-bottom: 0.75rem;
}

.badge-bishop { background-color: var(--badge-bishop); }
.badge-senior { background-color: var(--badge-senior); }
.badge-pastor { background-color: var(--badge-pastor); }
.badge-deacon { background-color: var(--badge-deacon); }

/* --- Tier 1: Bishop (Feature Card) --- */
.tier-bishop .team-card {
    flex-direction: row;
    max-width: 900px;
    margin: 0 auto;
}

.tier-bishop .team-card-image-wrap {
    flex: 0 0 45%;
}

.tier-bishop img {
    height: 100%;
    min-height: 400px;
}

.tier-bishop .team-card-content {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tier-bishop h2 {
    font-size: 2.5rem;
    color: var(--team-navy);
    margin-bottom: 1rem;
}

/* --- Tier 2: Senior Pastor (Medium Horizontal) --- */
.tier-senior .team-card {
    flex-direction: row;
    max-width: 800px;
    margin: 0 auto;
}

.tier-senior .team-card-image-wrap {
    flex: 0 0 40%;
}

.tier-senior img {
    height: 100%;
    min-height: 300px;
}

.tier-senior .team-card-content {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tier-senior h2 {
    font-size: 2rem;
    color: var(--team-navy);
    margin-bottom: 1rem;
}

/* --- Tier 3: Pastors (2-Column Grid) --- */
.tier-pastor {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.tier-pastor img {
    height: 350px;
}

.tier-pastor .team-card-content {
    padding: 2rem;
}

.tier-pastor h2 {
    font-size: 1.5rem;
    color: var(--team-navy);
    margin-bottom: 0.75rem;
}

/* --- Tier 4: Deacons (3-Column Grid with Hover Overlay) --- */
.tier-deacon {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.tier-deacon .team-card {
    position: relative;
    border-radius: 8px;
}

.tier-deacon img {
    height: 300px;
    display: block;
}

/* Overlay for Deacons */
.tier-deacon .team-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 25, 47, 0.9) 0%, rgba(10, 25, 47, 0.4) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    color: #fff;
}

.tier-deacon .team-card:hover .team-card-overlay {
    opacity: 1;
}

.tier-deacon .overlay-content {
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.tier-deacon .team-card:hover .overlay-content {
    transform: translateY(0);
}

.tier-deacon h2 {
    color: #fff;
    font-size: 1.25rem;
    margin: 0.25rem 0;
}

.tier-deacon .role-badge {
    margin-bottom: 0.5rem;
}

.tier-deacon .overlay-bio {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-top: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Base Typography for Bio */
.bio-text {
    color: var(--team-text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.team-verse {
    font-style: italic;
    color: var(--team-gold);
    border-left: 2px solid var(--team-gold);
    padding-left: 1rem;
    margin-top: auto;
    font-size: 0.95rem;
}

/* --- Entrance Animations --- */
.team-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.team-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
    .tier-pastor {
        grid-template-columns: 1fr;
    }
    .tier-deacon {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tier-bishop .team-card,
    .tier-senior .team-card {
        flex-direction: column;
    }
    
    .tier-bishop .team-card-image-wrap,
    .tier-senior .team-card-image-wrap {
        flex: none;
    }
    
    .tier-bishop img,
    .tier-senior img {
        height: 300px;
        min-height: auto;
    }
    
    .tier-bishop .team-card-content,
    .tier-senior .team-card-content {
        padding: 2rem;
    }
}

@media (max-width: 640px) {
    .tier-deacon {
        grid-template-columns: 1fr;
    }
    
    /* On mobile, keep the overlay visible or use a simpler card style */
    .tier-deacon .team-card-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(10, 25, 47, 0.95) 0%, rgba(10, 25, 47, 0) 100%);
    }
    .tier-deacon .overlay-content {
        transform: translateY(0);
    }
}
