.officials {
    text-align: center;
    color: var(--color);
    width: 100%;
    height: 100%;
}

.officials .heading {
    margin-top: 1rem;
    padding-top: 1rem;
}

.officials-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px;
}

.councilor-level {
    width: 100%;
    display: grid; /*binago*/
    justify-content: center;
    flex-wrap: wrap;
    row-gap: 40px; /* binago dating gap: 20px */
    padding-top: 40px; /*dinagdag */
    position: relative;
    grid-template-columns: repeat(4, 1fr);
    column-gap: 25px; /*dinagdag */
    max-width: 1200px;

}

/* Chairman-Treasurer-Secretary Level - Fixed Order Layout */
.chairman-treasurer-secretary-level {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 25;
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    align-items: start;
    justify-items: center;
    padding-top: 45px; /*dinagdag*/
    position: relative;
}

/* Fixed positioning for the three main officials */
.chairman-treasurer-secretary-level .official-card.chairman {
    grid-column: 2;
    grid-row: 1;
    order: 1;
    transform: scale(1.1);
}

.chairman-treasurer-secretary-level .official-card.secretary {
    grid-column: 1;
    grid-row: 1;
    order: 2;
}

.chairman-treasurer-secretary-level .official-card.treasurer {
    grid-column: 3;
    grid-row: 1;
    order: 3;
}

.official-card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(43, 143, 65, 0.15);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 200px;
    max-width: 250px;
    min-height: 330px; /*binago ko dating 280*/
    border: 2px solid rgba(43, 143, 65, 0.1);
}

.official-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--color), transparent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.official-card:hover::before {
    transform: scaleX(1);
}

.official-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(43, 143, 65, 0.25);
    border-color: rgba(43, 143, 65, 0.3);
}

.official-card img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 4px solid rgba(43, 143, 65, 0.2);
    box-shadow: 0 4px 15px rgba(43, 143, 65, 0.1);
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeInImage 0.5s ease-in-out forwards;
}

.official-card:hover img {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(43, 143, 65, 0.2);
    border-color: rgba(43, 143, 65, 0.4);
}

.photo-placeholder {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(43, 143, 65, 0.1), rgba(43, 143, 65, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: rgba(43, 143, 65, 0.6);
    font-size: 3rem;
    border: 4px solid rgba(43, 143, 65, 0.2);
    box-shadow: 0 4px 15px rgba(43, 143, 65, 0.1);
    transition: all 0.3s ease;
}

.official-card:hover .photo-placeholder {
    transform: scale(1.05);
    background: linear-gradient(135deg, rgba(43, 143, 65, 0.15), rgba(43, 143, 65, 0.08));
    color: rgba(43, 143, 65, 0.8);
    border-color: rgba(43, 143, 65, 0.4);
}

/* Chairman Card */
.official-card.chairman {
    background: linear-gradient(135deg, #f0f9f2, #e8f5ea);
    border: 2px solid var(--color);
    color: var(--color);
    box-shadow: 0 4px 15px rgba(43, 143, 65, 0.15), 0 0 20px rgba(43, 143, 65, 0.05);
}

.official-card.chairman::before {
    background: linear-gradient(90deg, transparent, #1e5f2b, transparent);
}

.official-card.chairman:hover {
    transform: scale(1.15) translateY(-10px);
    box-shadow: 0 12px 35px rgba(43, 143, 65, 0.3), 0 0 30px rgba(43, 143, 65, 0.1);
}

.official-card.chairman img {
    border-color: var(--color);
}

.official-card.chairman .photo-placeholder {
    background: linear-gradient(135deg, rgba(43, 143, 65, 0.2), rgba(43, 143, 65, 0.1));
    border-color: var(--color);
    color: var(--color);
}

.official-card.chairman h3 {
    font-size: 1.4rem;
    font-weight: 700;
}

/* Secretary Card */
.official-card.secretary {
    background: linear-gradient(135deg, #f7fcf8, #f0f9f2);
    border: 2px solid #4caf50;
    color: #2e7d32;
}

.official-card.secretary::before {
    background: linear-gradient(90deg, transparent, #4caf50, transparent);
}

.official-card.secretary:hover {
    transform: scale(1.05) translateY(-8px);
    box-shadow: 0 12px 35px rgba(76, 175, 80, 0.25);
}

.official-card.secretary img {
    border-color: #4caf50;
}

.official-card.secretary .photo-placeholder {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(76, 175, 80, 0.08));
    border-color: #4caf50;
    color: #4caf50;
}

.official-card.secretary h3,
.official-card.secretary p {
    color: #2e7d32;
}

.official-card.secretary h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Treasurer Card */
.official-card.treasurer {
    background: linear-gradient(135deg, #f7fcf8, #f0f9f2);
    border: 2px solid #4caf50;
    color: #2e7d32;
}

.official-card.treasurer::before {
    background: linear-gradient(90deg, transparent, #4caf50, transparent);
}

.official-card.treasurer:hover {
    transform: scale(1.05) translateY(-8px);
    box-shadow: 0 12px 35px rgba(76, 175, 80, 0.25);
}

.official-card.treasurer img {
    border-color: #4caf50;
}

.official-card.treasurer .photo-placeholder {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(76, 175, 80, 0.08));
    border-color: #4caf50;
    color: #4caf50;
}

.official-card.treasurer h3,
.official-card.treasurer p {
    color: #2e7d32;
}

.official-card.treasurer h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Councilor Cards */
.official-card.councilor {
    background: linear-gradient(135deg, #f7fcf8, #f0f9f2);
    border: 2px solid #4caf50;
    color: #2e7d32;
}

.official-card.councilor::before {
    background: linear-gradient(90deg, transparent, #4caf50, transparent);
}

.official-card.councilor img {
    border-color: #4caf50;
}

.official-card.councilor .photo-placeholder {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(76, 175, 80, 0.08));
    border-color: #4caf50;
    color: #4caf50;
}

/* SK Chairman Card - Now styled like councilors but with slight distinction */
.official-card.sk-chairman {
    background: linear-gradient(135deg, #f7fcf8, #f0f9f2);
    border: 2px solid #4caf50;
    color: #2e7d32;
    padding: 20px; /* dinagdag */
    min-height: 280px;
}

.official-card.sk-chairman::before {
    background: linear-gradient(90deg, transparent, #4caf50, transparent);
}

.official-card.sk-chairman img {
    border-color: #4caf50;
}

.official-card.sk-chairman .photo-placeholder {
    background: linear-gradient(135deg, rgba(139, 195, 74, 0.15), rgba(139, 195, 74, 0.08));
    border-color: #4caf50;
    color: #8bc34a;
}

.official-card h3 {
    color: #1b5e20;
    margin-bottom: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.3;
    position: relative;
}

.official-card h3::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--color);
    transition: width 0.3s ease;
}

.official-card:hover h3::after {
    width: 80%;
}

.official-card:hover h3 {
    color: #1b5e20;
    transform: translateY(-2px);
    background: linear-gradient(45deg, #1b5e20, #2e7d32, #43a047);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.official-card p {
    color: #2e7d32;
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0 0 5px 0;
}

.official-card:hover p {
    color: #2e7d32;
}

/* Chairmanship styling */
.official-card .chairmanship {
    color: #1b5e20;
    font-size: 0.85rem;
    font-weight: 600;
    font-style: italic;
    background: linear-gradient(135deg, rgba(43, 143, 65, 0.1), rgba(43, 143, 65, 0.05));
    padding: 5px 10px;
    border-radius: 15px;
    margin: 8px 0 0 0;
    border: 1px solid rgba(43, 143, 65, 0.2);
    transition: all 0.3s ease;
}

.official-card:hover .chairmanship {
    background: linear-gradient(135deg, rgba(43, 143, 65, 0.15), rgba(43, 143, 65, 0.08));
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(43, 143, 65, 0.2);
    border-color: rgba(43, 143, 65, 0.3);
    color: #1b5e20;
}

.officials .sub-heading {
    font-size: 2em;
    margin-bottom: 30px;
}

/* No official message styling */
.no-official-message {
    background: linear-gradient(135deg, #f0f9f2, #e8f5ea);
    border: 2px dashed rgba(43, 143, 65, 0.3);
    border-radius: 15px;
    padding: 40px 20px;
    color: #2e7d32;
    font-style: italic;
    font-size: 1.1rem;
    text-align: center;
    min-width: 250px;
    transition: all 0.3s ease;
}

.no-official-message:hover {
    background: linear-gradient(135deg, #e8f5ea, #dcedc8);
    transform: translateY(-2px);
    border-color: rgba(43, 143, 65, 0.4);
}

/* Section labels */
.chairman-treasurer-secretary-level::before {
    content: 'Barangay Officials';
    position: absolute;
    top: -50px; 
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    font-weight: 600;
    color: #1b5e20;
    background: linear-gradient(135deg, #f0f9f2, #e8f5ea);
    padding: 10px 15px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(43, 143, 65, 0.15);
    border: 2px solid var(--color);
}

.councilor-level::before {
    content: 'Councilors and SK Chairman';
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    font-weight: 600;
    color: #1b5e20;
    background: linear-gradient(135deg, #f1f8e9, #e8f5e8);
    padding: 5px 15px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(43, 143, 65, 0.15);
    border: 2px solid #4caf50;
}
/* Adjust spacing for section labels */
.officials-container > div:first-child {
    margin-top: 20px;
    position: relative;
}

.councilor-level {
    margin-top: 20px;
    position: relative;
}

/* Image loading animation */
@keyframes fadeInImage {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Focus styles for accessibility */
.official-card:focus {
    outline: 3px solid var(--color);
    outline-offset: 2px;
}

.official-card:focus-visible {
    outline: 3px solid var(--color);
    outline-offset: 3px;
    transform: translateY(-5px);
}

/* Enhanced hover effects */
.official-card {
    cursor: pointer;
}
/*another media responsive layout */
@media (max-width: 1024px) {
    .councilor-level {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 768px) {
    .councilor-level {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .councilor-level {
        grid-template-columns: 1fr;
    }
}


/* Tablet Responsive (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
    .chairman-treasurer-secretary-level {
        grid-template-columns: 1fr 1fr;
        gap: 25px;
        max-width: 600px;
    }
    
    .chairman-treasurer-secretary-level .official-card.chairman {
        grid-column: 1 / -1;
        grid-row: 1;
        order: 1;
        transform: scale(1.05);
        justify-self: center;
    }
    
    .chairman-treasurer-secretary-level .official-card.secretary {
        grid-column: 1;
        grid-row: 2;
        order: 2;
    }
    
    .chairman-treasurer-secretary-level .official-card.treasurer {
        grid-column: 2;
        grid-row: 2;
        order: 3;
    }
    
    .official-card {
        min-width: 180px;
        max-width: 220px;
        min-height: 260px;
        padding: 15px;
    }
    
    .official-card img,
    .photo-placeholder {
        width: 120px;
        height: 120px;
    }
    
    .photo-placeholder {
        font-size: 2.5rem;
    }
    
    .official-card h3 {
        font-size: 1.1rem;
    }
    
    .official-card.chairman h3 {
        font-size: 1.3rem;
    }
    
    .official-card p {
        font-size: 0.9rem;
    }
    
    .chairmanship {
        font-size: 0.8rem !important;
        padding: 5px 10px !important;
    }
}

/* Mobile Responsive (481px - 767px) */
@media (max-width: 767px) and (min-width: 481px) {
    .chairman-treasurer-secretary-level {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 300px;
    }
    
    .chairman-treasurer-secretary-level .official-card.chairman {
        grid-column: 1;
        grid-row: 1;
        order: 1;
        transform: scale(1.05);
    }
    
    .chairman-treasurer-secretary-level .official-card.secretary {
        grid-column: 1;
        grid-row: 2;
        order: 2;
    }
    
    .chairman-treasurer-secretary-level .official-card.treasurer {
        grid-column: 1;
        grid-row: 3;
        order: 3;
    }
    
    .official-card {
        width: 100%;
        max-width: 250px;
        min-width: 200px;
        min-height: 280px;
        padding: 15px;
        margin: 0 auto;
    }
    
    .official-card img,
    .photo-placeholder {
        width: 130px;
        height: 130px;
    }
    
    .photo-placeholder {
        font-size: 2.8rem;
    }
    
    .official-card h3 {
        font-size: 1.1rem;
    }
    
    .official-card.chairman h3 {
        font-size: 1.3rem;
    }
    
    .official-card p {
        font-size: 0.9rem;
    }
    
    .chairmanship {
        font-size: 0.8rem !important;
        padding: 5px 10px !important;
    }
    
    .officials .heading {
        font-size: 2.2rem;
        margin-top: 0.5rem;
        padding-top: 1.5rem;
    }
    
    .no-official-message {
        padding: 30px 15px;
        min-width: 200px;
        font-size: 1rem;
    }
}

/* Small Mobile Responsive (320px - 480px) */
@media (max-width: 480px) {
    .chairman-treasurer-secretary-level {
        grid-template-columns: 1fr;
        gap: 15px;
        max-width: 280px;
        padding: 0 10px;
    }
    
    .chairman-treasurer-secretary-level .official-card.chairman {
        grid-column: 1;
        grid-row: 1;
        order: 1;
        transform: scale(1.02);
    }
    
    .chairman-treasurer-secretary-level .official-card.secretary {
        grid-column: 1;
        grid-row: 2;
        order: 2;
    }
    
    .chairman-treasurer-secretary-level .official-card.treasurer {
        grid-column: 1;
        grid-row: 3;
        order: 3;
    }
    
    .official-card {
        width: 100%;
        max-width: 220px;
        min-width: 180px;
        min-height: 260px;
        padding: 12px;
        margin: 0 auto;
    }
    
    .official-card img,
    .photo-placeholder {
        width: 110px;
        height: 110px;
    }
    
    .photo-placeholder {
        font-size: 2.2rem;
    }
    
    .official-card h3 {
        font-size: 1rem;
    }
    
    .official-card.chairman h3 {
        font-size: 1.2rem;
    }
    
    .official-card p {
        font-size: 0.85rem;
    }
    
    .chairmanship {
        font-size: 0.75rem !important;
        padding: 4px 8px !important;
        margin: 6px 0 0 0 !important;
    }
    
    .officials .heading {
        font-size: 2rem;
        margin-top: 0.5rem;
        padding-top: 1rem;
    }
    
    .officials .sub-heading {
        font-size: 1.5rem;
    }
    
    .no-official-message {
        padding: 25px 12px;
        min-width: 160px;
        font-size: 0.9rem;
    }
    
    .chairman-treasurer-secretary-level::before,
    .councilor-level::before {
        font-size: 1rem;
        top: -30px;
        padding: 3px 10px;
    }
    
    .officials-container > div:first-child,
    .councilor-level {
        margin-top: 35px;
    }
}

/* Very Small Mobile (max-width: 360px) */
@media (max-width: 360px) {
    .chairman-treasurer-secretary-level {
        max-width: 250px;
        gap: 12px;
    }
    
    .official-card {
        max-width: 200px;
        min-width: 160px;
        min-height: 240px;
        padding: 10px;
    }
    
    .official-card img,
    .photo-placeholder {
        width: 100px;
        height: 100px;
    }
    
    .photo-placeholder {
        font-size: 2rem;
    }
    
    .official-card h3 {
        font-size: 0.95rem;
    }
    
    .official-card.chairman h3 {
        font-size: 1.1rem;
    }
    
    .official-card p {
        font-size: 0.8rem;
    }
    
    .chairmanship {
        font-size: 0.7rem !important;
        padding: 3px 6px !important;
    }
    
    .officials .heading {
        font-size: 1.8rem;
    }
    
    .no-official-message {
        padding: 20px 10px;
        min-width: 140px;
        font-size: 0.85rem;
    }
}

/* Large Desktop (min-width: 1200px) */
@media (min-width: 1200px) {
    .chairman-treasurer-secretary-level {
        max-width: 1000px;
        gap: 40px;
    }
    
    .official-card {
        min-width: 220px;
        max-width: 280px;
        min-height: 300px;
        padding: 25px;
    }
    
    .official-card img,
    .photo-placeholder {
        width: 160px;
        height: 160px;
    }
    
    .photo-placeholder {
        font-size: 3.2rem;
    }
    
    .official-card h3 {
        font-size: 1.3rem;
    }
    
    .official-card.chairman h3 {
        font-size: 1.5rem;
    }
    
    .official-card p {
        font-size: 1rem;
    }
    
    .chairmanship {
        font-size: 0.9rem !important;
        padding: 7px 14px !important;
    }
}

/* Print styles */
@media print {
    .official-card {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
        min-height: auto;
        background: white !important;
    }
    
    .official-card::before {
        display: none;
    }
    
    .chairman-treasurer-secretary-level::before,
    .councilor-level::before {
        color: #000;
        background: transparent;
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .chairmanship {
        background: transparent !important;
        border: 1px solid #ccc !important;
        color: #000 !important;
    }
    
    .chairman-treasurer-secretary-level {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 20px;
    }
}

/* Smooth transitions for all elements */
.official-card,
.official-card *,
.official-card::before,
.official-card::after {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading skeleton animation */
.official-card.loading {
    background: linear-gradient(90deg, #f0f9f2 25%, #e8f5ea 50%, #f0f9f2 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Enhanced chairman special effects */
.official-card.chairman {
    position: relative;
    overflow: hidden;
}

.official-card.chairman::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(43, 143, 65, 0.05) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.5s ease;
    pointer-events: none;
}

.official-card.chairman:hover::after {
    transform: scale(1);
}

/* Pulse animation for chairman card */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(43, 143, 65, 0.15);
    }
    50% {
        box-shadow: 0 8px 25px rgba(43, 143, 65, 0.25);
    }
    100% {
        box-shadow: 0 4px 15px rgba(43, 143, 65, 0.15);
    }
}

.official-card.chairman {
    animation: pulse 3s infinite;
}

.official-card.chairman:hover {
    animation: none;
}

/* Subtle animation for secretary and treasurer cards */
.official-card.secretary,
.official-card.treasurer {
    position: relative;
}

.official-card.secretary::after,
.official-card.treasurer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(76, 175, 80, 0.1), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.official-card.secretary:hover::after,
.official-card.treasurer:hover::after {
    left: 100%;
}

/* Committee Toggle Button and Details Styling */
.toggle-committee-btn {
    background: linear-gradient(135deg, #2e7d32, #388e3c);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    min-width: 180px;
    justify-content: center;
}

.toggle-committee-btn:hover {
    background: linear-gradient(135deg, #1b5e20, #2e7d32);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.toggle-committee-btn i {
    transition: transform 0.3s ease;
}

.committee-details {
    margin-top: 15px;
    background: linear-gradient(135deg, #f7fcf8, #f0f9f2);
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    padding: 15px;
    animation: slideDown 0.3s ease-out;
}

.committee-info h4 {
    color: #2e7d32;
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 2px solid #4caf50;
    padding-bottom: 5px;
}

.committee-description {
    color: #1b5e20;
}

.committee-description p {
    margin: 0 0 8px 0;
    font-weight: 600;
}

.committee-description ul {
    margin: 0;
    padding-left: 20px;
    list-style-type: disc;
}

.committee-description li {
    margin-bottom: 5px;
    color: #388e3c;
    font-size: 0.9rem;
    line-height: 1.4;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 300px;
        transform: translateY(0);
    }
}

/* Committee Members Tree Structure */
.committee-members-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #c8e6c9;
}

.committee-members-section h5 {
    color: #2e7d32;
    margin: 0 0 10px 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-members-btn {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    min-width: 140px;
    justify-content: center;
}

.toggle-members-btn:hover {
    background: linear-gradient(135deg, #388e3c, #4caf50);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(76, 175, 80, 0.3);
}

.committee-members-tree {
    background: #f7fcf8;
    border: 1px solid #e8f5e8;
    border-radius: 6px;
    padding: 10px;
    animation: slideDown 0.3s ease-out;
}

.members-tree {
    list-style: none;
    margin: 0;
    padding: 0;
}

.member-item {
    margin-bottom: 8px;
    position: relative;
}

.member-item::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 25px;
    bottom: -8px;
    width: 2px;
    background: #c8e6c9;
}

.member-item:last-child::before {
    display: none;
}

.member-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: white;
    border: 1px solid #e0f2e0;
    border-radius: 6px;
    margin-left: 20px;
    position: relative;
    transition: all 0.2s ease;
}

.member-info::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    width: 18px;
    height: 2px;
    background: #c8e6c9;
    transform: translateY(-50%);
}

.member-info:hover {
    background: #f1f8e9;
    border-color: #4caf50;
    transform: translateX(3px);
}

.member-icon {
    color: #4caf50;
    font-size: 1.1rem;
}

.member-name {
    font-weight: 600;
    color: #2e7d32;
    font-size: 0.9rem;
}

.member-role {
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
    margin-left: auto;
    background: #e8f5e8;
    padding: 2px 8px;
    border-radius: 12px;
}

/* Sub-members styling */
.sub-members {
    list-style: none;
    margin: 8px 0 0 40px;
    padding: 0;
}

.sub-member-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    margin-bottom: 4px;
    background: #f8fdf8;
    border: 1px solid #e8f5e8;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
}

.sub-member-item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    width: 18px;
    height: 2px;
    background: #c8e6c9;
    transform: translateY(-50%);
}

.sub-member-item:hover {
    background: #f1f8e9;
    border-color: #81c784;
    transform: translateX(2px);
}

.sub-member-item .member-icon {
    font-size: 0.9rem;
    color: #66bb6a;
}

.sub-member-item .member-name {
    font-size: 0.85rem;
    font-weight: 500;
}

.sub-member-item .member-role {
    font-size: 0.75rem;
    background: #e0f2e0;
    padding: 1px 6px;
}

.no-members {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
    margin: 0;
}

/* Tree connector lines */
.members-tree > .member-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 8px;
    top: 25px;
    bottom: -8px;
    width: 2px;
    background: #c8e6c9;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .member-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .member-role {
        margin-left: 0;
        align-self: flex-start;
    }
    
    .sub-members {
        margin-left: 20px;
    }
}

/* SK (Sangguniang Kabataan) Section Styling */
.sk-section {
    margin-top: 60px;
    padding: 40px 20px;
    background: linear-gradient(135deg, #e8f5e8, #f0f9f2);
    border-radius: 12px;
    border: 2px solid #4caf50;
}

.section-heading {
    text-align: center;
    color: #2e7d32;
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-subheading {
    text-align: center;
    color: #388e3c;
    font-size: 1.1rem;
    font-style: italic;
    margin: 0 0 40px 0;
    font-weight: 500;
}

.sk-chairman-level {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.sk-councilors-level {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* SK specific card styling */
.official-card.sk-chairman {
    background: linear-gradient(135deg, #81c784, #66bb6a);
    border: 1px solid #4caf50;
    color: white;
    
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

.official-card.sk-chairman:hover {
    transform: scale(1.15) translateY(-8px);
    box-shadow: 0 15px 40px rgba(76, 175, 80, 0.5);
}

.official-card.sk-chairman h3,
.official-card.sk-chairman p {
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.official-card.sk-chairman .chairmanship {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.official-card.sk-councilor {
    background: linear-gradient(135deg, #a5d6a7, #81c784);
    border: 2px solid #66bb6a;
    color: white;
}

.official-card.sk-councilor:hover {
    transform: scale(1.05) translateY(-8px);
    box-shadow: 0 12px 35px rgba(129, 199, 132, 0.4);
}

.official-card.sk-councilor h3,
.official-card.sk-councilor p {
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.official-card.sk-councilor .chairmanship {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

/* SK Photo placeholder styling */
.official-card.sk-chairman .photo-placeholder,
.official-card.sk-councilor .photo-placeholder {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.4);
    color: rgba(255,255,255,0.8);
}

/* SK Committee toggle buttons */
.official-card.sk-chairman .toggle-committee-btn,
.official-card.sk-councilor .toggle-committee-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.official-card.sk-chairman .toggle-committee-btn:hover,
.official-card.sk-councilor .toggle-committee-btn:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
}

.official-card.sk-chairman .toggle-members-btn,
.official-card.sk-councilor .toggle-members-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.official-card.sk-chairman .toggle-members-btn:hover,
.official-card.sk-councilor .toggle-members-btn:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
}

/* Responsive adjustments for SK section */
@media (max-width: 768px) {
    .sk-section {
        margin-top: 40px;
        padding: 20px 10px;
    }
    
    .section-heading {
        font-size: 1.8rem;
    }
    
    .section-subheading {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    .sk-chairman-level,
    .sk-councilors-level {
        flex-direction: column;
        align-items: center;
    }
    
    .official-card.sk-chairman {
        transform: scale(1);
        margin-bottom: 20px;
    }
    
    .official-card.sk-chairman:hover {
        transform: scale(1.02) translateY(-4px);
    }
}
