/* ========================================
   BARANGAY OFFICIALS MODAL
   index_officials_modals.css — Green Theme (Matches index_style.css)
   ======================================== */

/* --- MODAL OVERLAY --- */
.officials-overlay {
    position: fixed;
    inset: 0;
    background: rgba(9, 31, 24, 0.92);
    backdrop-filter: blur(12px);
    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: #1a4a38;
    border: 1px solid rgba(74, 222, 128, 0.35);
    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.6),
        0 0 0 1px rgba(74, 222, 128, 0.12);
    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;
    position: relative;
}

.officials-overlay.active .officials-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* --- TOP ACCENT BAR --- */
.officials-modal::before {
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(90deg, #22c55e, #4ade80);
    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: #0d3b2e;
}

/* Gradient overlay blends into modal card color */
.officials-photo-area::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, transparent, #1a4a38);
    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;
    object-position: bottom center;
    filter: brightness(0.95) saturate(0.9);
    transition: transform 6s ease;
    padding-top: 20px;
}

.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: #0d3b2e;
    font-size: 7rem;
    opacity: 0.3;
}

/* --- 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(74, 222, 128, 0.25);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.officials-photo-dot.active {
    background: #4ade80;
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.55);
}

/* --- MODAL CONTENT --- */
.officials-modal-content {
    padding: 28px 36px 32px;
    overflow-y: auto;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(74, 222, 128, 0.4) transparent;
}

.officials-modal-content::-webkit-scrollbar {
    width: 5px;
}

.officials-modal-content::-webkit-scrollbar-thumb {
    background: rgba(74, 222, 128, 0.4);
    border-radius: 3px;
}

/* --- NAME & POSITION --- */
.officials-modal-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
    line-height: 1.2;
}

.officials-modal-position {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #4ade80;
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.officials-modal-position::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 2px;
    background: #4ade80;
    border-radius: 2px;
    flex-shrink: 0;
}

/* --- DIVIDER --- */
.officials-modal-divider {
    height: 1px;
    background: rgba(74, 222, 128, 0.2);
    margin-bottom: 20px;
}

/* --- BIO TEXT --- */
.officials-modal-bio {
    font-size: 0.95rem;
    line-height: 1.85;
    color: #c5ddd3;
    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(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.35);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.77rem;
    color: #4ade80;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
}

.officials-detail-badge:hover {
    background: rgba(74, 222, 128, 0.2);
    border-color: #4ade80;
    transform: translateY(-2px);
}

/* --- CLOSE BUTTON --- */
.officials-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(74, 222, 128, 0.2);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    color: #a3c4b5;
    transition: all 0.25s ease;
    z-index: 10;
    backdrop-filter: blur(6px);
}

.officials-modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
    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(13, 59, 46, 0.75);
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    color: #ffffff;
    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: #22c55e;
    border-color: #22c55e;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.4);
}

/* --- HOVER EFFECT ON OFFICIAL CARDS --- */
.official-card {
    cursor: pointer;
    position: relative;
}

.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: #4ade80;
    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;
    }
}