/* ========================================
   BARANGAY OFFICIALS MODAL
   ======================================== */

/* --- MODAL OVERLAY --- */
.officials-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(10px);
    z-index: 1200;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.officials-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* --- MODAL CONTAINER --- */
.officials-modal {
    background: linear-gradient(145deg, #141414 0%, #1a1a2e 60%, #111827 100%);
    border: 1px solid rgba(224, 208, 160, 0.18);
    border-radius: 28px;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 50px 120px rgba(0, 0, 0, 0.75),
        0 0 0 1px rgba(44, 87, 229, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transform: translateY(50px) scale(0.92);
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.35s ease;
    opacity: 0;
}

.officials-overlay.active .officials-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* --- TOP ACCENT BAR --- */
.officials-modal::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, #2c57e5, #e0d0a0, #2c57e5);
    flex-shrink: 0;
    border-radius: 28px 28px 0 0;
}

/* --- PHOTO CAROUSEL AREA --- */
.officials-photo-area {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    flex-shrink: 0;
    background: #0d0d1a;
}

/* Gradient overlay at bottom for smooth text blend */
.officials-photo-area::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, transparent, #141414);
    z-index: 2;
    pointer-events: none;
}

/* Individual photo slides */
.officials-photo-slide {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.officials-photo-slide.active {
    opacity: 1;
}

.officials-photo-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Changed from cover to contain to show full body */
    object-position: bottom center; /* Anchors the half-body to the bottom */
    filter: brightness(0.95) saturate(0.95);
    transition: transform 6s ease;
    padding-top: 20px; /* Gives a little breathing room at the top */
}

.officials-photo-slide.active img {
    transform: scale(1.04);
}

/* Fallback placeholder when no image */
.officials-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #1a1a1a, #0d0d2e);
    font-size: 7rem;
    opacity: 0.35;
}

/* --- PHOTO DOTS INDICATOR --- */
.officials-photo-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}

.officials-photo-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.officials-photo-dot.active {
    background: #e0d0a0;
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(224, 208, 160, 0.6);
}

/* --- MODAL CONTENT --- */
.officials-modal-content {
    padding: 28px 36px 32px;
    overflow-y: auto;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(44, 87, 229, 0.4) transparent;
}

.officials-modal-content::-webkit-scrollbar {
    width: 5px;
}
.officials-modal-content::-webkit-scrollbar-thumb {
    background: rgba(44, 87, 229, 0.4);
    border-radius: 3px;
}

/* --- NAME & POSITION --- */
.officials-modal-name {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #ffffff, #e0d0a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
    line-height: 1.2;
}

.officials-modal-position {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #2c57e5;
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.officials-modal-position::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 2px;
    background: #2c57e5;
    border-radius: 2px;
}

/* --- DIVIDER --- */
.officials-modal-divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(224, 208, 160, 0.3), transparent);
    margin-bottom: 20px;
}

/* --- BIO TEXT --- */
.officials-modal-bio {
    font-size: 0.95rem;
    line-height: 1.85;
    color: rgba(204, 204, 204, 0.8);
    font-weight: 300;
}

/* --- DETAIL BADGES --- */
.officials-modal-details {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.officials-detail-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(44, 87, 229, 0.1);
    border: 1px solid rgba(44, 87, 229, 0.25);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.77rem;
    color: #a0b4ff;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* --- CLOSE BUTTON --- */
.officials-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    color: #cccccc;
    transition: all 0.25s ease;
    z-index: 10;
    backdrop-filter: blur(6px);
}

.officials-modal-close:hover {
    background: rgba(255, 107, 107, 0.18);
    border-color: rgba(255, 107, 107, 0.45);
    color: #ff6b6b;
    transform: rotate(90deg);
}

/* --- PREV / NEXT PHOTO ARROWS --- */
.officials-photo-prev,
.officials-photo-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    color: #fff;
    z-index: 4;
    transition: all 0.25s ease;
    backdrop-filter: blur(4px);
}

.officials-photo-prev { left: 14px; }
.officials-photo-next { right: 14px; }

.officials-photo-prev:hover,
.officials-photo-next:hover {
    background: rgba(44, 87, 229, 0.45);
    border-color: rgba(44, 87, 229, 0.6);
    transform: translateY(-50%) scale(1.1);
}

/* --- HOVER EFFECT ON OFFICIAL CARDS (cursor pointer cue) --- */
.official-card {
    cursor: pointer;
}

.official-card::after {
    content: 'View Profile';
    position: absolute;
    bottom: 14px;
    right: 16px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #2c57e5;
    opacity: 0;
    transform: translateY(4px);
    transition: all 0.25s ease;
}

.official-card:hover::after {
    opacity: 1;
    transform: translateY(0);
}

/* --- RESPONSIVE --- */
@media (max-width: 600px) {
    .officials-modal {
        border-radius: 20px;
    }

    .officials-photo-area {
        height: 230px;
    }

    .officials-modal-content {
        padding: 20px 22px 24px;
    }

    .officials-modal-name {
        font-size: 1.55rem;
    }

    .officials-modal-close {
        top: 14px;
        right: 14px;
    }
}

