/* General Styles */
.top-leadership {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 50px;
}

/* Common Section Styles */
.top-leadership{
    padding-top: 50px;
}

/* Common Card Styles */
.president-card,
.deputy-card,
.committee-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 400px;
    margin: 0 auto;
}

/* Update container layouts */
.president-card {
    margin: 0 auto 3rem;
}

.deputy-leaders,
.committee-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Common image styles */
.president-card .leader-image,
.deputy-card .leader-image,
.member-image {
    width: 100%;
    height: auto;
    margin: 0 0 20px;
    border-radius: 12px;
}

.president-card .leader-image img,
.deputy-card .leader-image img,
.member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Common text styles */
.president-card .leader-info h2,
.deputy-card .leader-info h2,
.member-details h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.president-card .leader-info h3,
.deputy-card .leader-info h3,
.member-position {
    font-size: 1rem;
    color: var(--mbdi-blue);
    margin-bottom: 15px;
}

.president-card .leader-info p,
.deputy-card .leader-info p,
.member-bio {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

/* Section title styles */
.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

/* Contact and social links styles */
.leader-contact,
.member-contact {
    margin-top: auto;
    width: 100%;
}

.social-links {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.social-link {
    margin: 0 10px;
    transition: color 0.3s;
}

.social-link:hover {
    color: #0066cc; /* Change color on hover */
}

.social-link i {
    font-size: 1.2rem;
}

.social-link.facebook {
    color: #1877f2;
}

.social-link.twitter {
    color: #000000;
}

.social-link.instagram {
    color: #e4405f;
}

.social-link.linkedin {
    color: #0077b5;
}

/* Media Queries */
@media (max-width: 992px) {
    /* Styles for devices with max-width 992px */
    .top-leadership {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    /* Styles for devices with max-width 768px */
    .president-card,
    .deputy-leaders {
        flex-direction: row;
        justify-content: space-around;
    }
}

@media (max-width: 576px) {
    /* Styles for devices with max-width 576px */
    .top-leadership {
        padding: 20px;
    }
}

/* Update only the card styles, keep other styles unchanged */

.leader-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 15px;
    text-align: center;
    max-width: 320px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.leader-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.leader-card .card-body {
    padding: 1rem;
    width: 100%;
}

.leader-card .leader-image {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 20px auto;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.leader-card:hover .leader-image {
    transform: none;
}

.leader-card .leader-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.3s ease;
}

.leader-card:hover .leader-image img {
    transform: none;
}

.leader-card .leader-info {
    text-align: center;
    width: 100%;
}

.leader-card .leader-info h2 {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.leader-card .leader-info h3 {
    font-size: 1.1rem;
    color: var(--mbdi-blue);
    margin-bottom: 1rem;
    font-weight: 600;
    display: inline-block;
}

.leader-card .bio {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 1rem 0;
    line-height: 1.6;
}

.leader-card .contact-info {
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.leader-card .contact-info a {
    color: var(--mbdi-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

.leader-card .contact-info a:hover {
    color: #0056b3;
}

/* Grid layout for all cards */
.deputy-leaders {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Remove president card specific styles to make it same as others */
.president-card {
    margin: 0 auto;
}

@media (max-width: 992px) {
    .deputy-leaders {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .deputy-leaders {
        grid-template-columns: 1fr;
    }
    
    .leader-card {
        max-width: 320px;
    }

    .leader-card .leader-image {
        width: 180px;
        height: 180px;
    }
}

/* Add these styles for committee section */

.committee-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.committee-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 15px;
    text-align: center;
    max-width: 320px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.committee-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Committee image container */
.committee-card .committee-image {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 3/4;
    background: #f5f5f5;
    margin-bottom: 15px;
}

.committee-card .committee-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s ease;
}

.committee-card:hover .committee-image img {
    transform: none;
}

/* Committee social links */
.committee-card .social-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 15px 0;
}

.committee-card .social-link {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mbdi-blue);
    color: white;
    transition: all 0.3s ease;
}

.committee-card .social-link:hover {
    transform: translateY(-3px);
    background: #0056b3;
    box-shadow: 0 4px 10px rgba(0, 102, 204, 0.2);
}

/* Committee text content */
.committee-card .committee-content {
    padding: 10px 5px;
}

.committee-card h3 {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 700;
}

.committee-card .committee-role {
    font-size: 1.1rem;
    color: var(--mbdi-blue);
    margin-bottom: 12px;
    font-weight: 600;
}

/* Update responsive styles to include committee section */
@media (max-width: 992px) {
    .deputy-leaders,
    .committee-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .deputy-leaders,
    .committee-container {
        grid-template-columns: 1fr;
    }
    
    .leader-card {
        max-width: 320px;
    }

    .committee-card {
        max-width: 280px;
    }
    
    .committee-card h3 {
        font-size: 1.3rem;
    }
    
    .committee-card .committee-role {
        font-size: 1rem;
    }
}

/* Update the top leadership section and president card layout */
.top-leadership {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 5rem; /* Add explicit margin to the whole section */
}

.president-section {
    width: 100%;
    margin-bottom: 5rem; /* Add explicit margin after president */
    display: flex;
    justify-content: center;
}

.president-card {
    margin: 0;
}

.deputy-section {
    width: 100%;
}

.deputy-leaders {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (max-width: 992px) {
    .deputy-leaders {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .deputy-leaders {
        grid-template-columns: 1fr;
    }
    
    .leader-card {
        max-width: 320px;
    }
}

@media (max-width: 576px) {
    .leader-card .leader-image {
        width: 150px;
        height: 150px;
    }
}

/* Contact Info Styles */
.contact-info {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    background: rgba(0, 0, 0, 0.03);
}

.info-item:hover {
    background: rgba(0, 102, 204, 0.1);
    color: var(--mbdi-blue);
    transform: translateX(5px);
}

.info-item i {
    font-size: 1rem;
    color: var(--mbdi-blue);
    width: 20px;
    text-align: center;
}

.info-item span {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .info-item {
        padding: 6px 10px;
    }
    
    .info-item span {
        font-size: 0.85rem;
    }
}

.social-media-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #0066cc;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s;
}

.social-media-btn:hover {
    background-color: #0052a3;
}

.social-links-popup {
    display: none;
    position: absolute;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 4px;
    padding: 10px;
    z-index: 1000;
}

.social-links-popup a {
    display: block;
    padding: 8px 16px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s;
}

.social-links-popup a:hover {
    background-color: #f5f5f5;
}

.show-social-links {
    display: block;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.section-title h2 {
    font-size: 2em;
    color: #333;
    margin: 0;
    padding: 0 0 15px;
    position: relative;
    display: inline-block;
}

.section-title h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: #0066cc;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.president-section,
.deputy-section {
    margin-bottom: 60px;
}

.committee-leaders {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (max-width: 768px) {
    .section-title h2 {
        font-size: 1.5em;
    }
    
    .deputy-leaders,
    .committee-leaders {
        grid-template-columns: 1fr;
    }
}

.partner-org {
    background-color: #f8f9fa;
    border-radius: 20px;
    padding: 4px 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    color: #495057;
    border: 1px solid #e9ecef;
    margin: 8px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.partner-org i {
    color: #0066cc;
    font-size: 0.9em;
}

.partner-org:hover {
    background-color: #e9ecef;
    transition: all 0.3s ease;
}

/* Make sure the partner org text doesn't overflow */
.leader-info .partner-org {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.social-links {
    margin-top: 15px;
}

.social-links a {
    color: #333;
    margin-right: 15px;
    font-size: 1.2em;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #0066cc;
}

/* Bio preview and speech button */
.bio-preview {
    margin-bottom: 15px;
    color: #555;
    line-height: 1.6;
}

.bio-empty {
    color: #888;
    font-style: italic;
    margin-bottom: 15px;
}

.read-speech-btn {
    background-color: #0066cc;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.read-speech-btn:hover {
    background-color: #0055aa;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.read-speech-btn i {
    font-size: 0.8rem;
}

/* Speech Modal */
.speech-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.speech-modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 30px;
    border-radius: 15px;
    width: 80%;
    max-width: 700px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideIn 0.4s ease;
    max-height: 70vh;
    overflow-y: auto;
}

.close-speech-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-speech-modal:hover {
    color: #333;
}

#speechModalTitle {
    color: #0066cc;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
    font-size: 1.8rem;
}

#speechModalContent {
    line-height: 1.8;
    color: #444;
}

#speechModalContent p {
    margin-bottom: 15px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) { 
    /* Styles for tablets */
    .speech-modal-content {
        width: 90%; /* Responsive width */
        margin: 15% auto; /* Centering the modal */
        padding: 20px; /* Padding for content */
    }
    
    #speechModalTitle {
        font-size: 1.5rem; /* Title font size */
    }
}

@media (max-width: 480px) { 
    /* Styles for mobile devices */
    .speech-modal-content {
        width: 95%; /* Responsive width */
        margin: 20% auto; /* Centering the modal */
        padding: 15px; /* Padding for content */
    }
    
    .read-speech-btn {
        padding: 6px 12px; /* Button padding */
        font-size: 0.85rem; /* Button font size */
    }
    
    #speechModalTitle {
        font-size: 1.3rem; /* Title font size */
        margin-bottom: 15px; /* Margin below title */
    }
}