/* Director Section Alignment Fix */
#director-section {
    padding: 60px 0;
}

#director-section .row.align-items-center {
    min-height: 400px;
}

#director-section .col-md-5 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#director-section .person {
    width: 100%;
    text-align: center !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#director-section .person img {
    border: 4px solid #f8f9fa;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    margin: 0 auto;
}

#director-section .person img:hover {
    transform: scale(1.05);
}

#director-section .person h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    margin: 20px 0 10px 0;
    text-align: center !important;
    width: 100%;
}

/* Very specific targeting for the Founder, Director text */
#director-section .person p.text-primary,
#director-section .person .text-primary,
#director-section .text-primary {
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-align: center !important;
    width: 100%;
    display: block;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    justify-self: center !important;
    align-self: center !important;
}

/* Additional centering for social links */
#director-section .ul-social-circle {
    margin: 0 auto;
    padding: 0;
    display: flex !important;
    justify-content: center !important;
    align-items: center;
    width: 100%;
}

#director-section .ul-social-circle li {
    margin: 0;
}

#director-section .ul-social-circle a {
    transition: all 0.3s ease;
    border: 2px solid #007bff;
    color: #007bff;
}

#director-section .ul-social-circle a:hover {
    background-color: #007bff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,123,255,0.3);
}

#director-section .content p {
    font-size: 1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 1.5rem;
}

#director-section .content a {
    color: #007bff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

#director-section .content a:hover {
    border-bottom-color: #007bff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #director-section .row.align-items-center {
        min-height: auto;
    }
    
    #director-section .person {
        margin-bottom: 40px;
    }
    
    #director-section .person img {
        width: 200px !important;
        height: 200px !important;
    }
}

@media (max-width: 576px) {
    #director-section .person img {
        width: 180px !important;
        height: 180px !important;
    }
    
    #director-section .person h3 {
        font-size: 1.5rem;
    }
}

/* PhD Section Blue Text in Light Mode */
/* Primary selectors with data-theme */
[data-theme="light"] #phd-section h1,
[data-theme="light"] .phd-section h5,
[data-theme="light"] .phd-section p,
[data-theme="light"] .phd-section small {
    color: #007bff !important;
}

/* Fallback selectors without data-theme for default light mode */
html:not([data-theme="dark"]) #phd-section h1,
html:not([data-theme="dark"]) .phd-section h5,
html:not([data-theme="dark"]) .phd-section p,
html:not([data-theme="dark"]) .phd-section small {
    color: #007bff !important;
}

/* PhD Section Headings */
[data-theme="light"] #phd-section .section-heading h1,
html:not([data-theme="dark"]) #phd-section .section-heading h1 {
    color: #007bff !important;
    font-weight: 600;
}

/* Team Members Heading */
[data-theme="light"] #member-section h1,
html:not([data-theme="dark"]) #member-section h1 {
    color: #007bff !important;
    font-weight: 600;
}

/* PhD Team Item Text */
[data-theme="light"] .phd-section .team-item h5,
html:not([data-theme="dark"]) .phd-section .team-item h5 {
    color: #007bff !important;
    font-weight: 600;
}

[data-theme="light"] .phd-section .team-item p,
html:not([data-theme="dark"]) .phd-section .team-item p {
    color: #0056b3 !important;
    line-height: 1.6;
}

[data-theme="light"] .phd-section .team-item small,
html:not([data-theme="dark"]) .phd-section .team-item small {
    color: #495057 !important;
    font-weight: 500;
}

/* PhD Button Text */
[data-theme="light"] #current-phds-btn,
[data-theme="light"] #alumni-phds-btn {
    font-weight: 600;
}

/* Active PhD button */
[data-theme="light"] #current-phds-btn.active,
[data-theme="light"] #alumni-phds-btn.active {
    background-color: #007bff !important;
    border-color: #007bff !important;
    color: white !important;
}

/* Inactive PhD button */
[data-theme="light"] #current-phds-btn.btn-outline-primary,
[data-theme="light"] #alumni-phds-btn.btn-outline-primary {
    color: #007bff !important;
    border-color: #007bff !important;
}

/* Ensure text remains readable on hover */
[data-theme="light"] .phd-section .team-item:hover h5,
[data-theme="light"] .phd-section .team-item:hover p {
    color: #003d82 !important;
}

/* PhD Team Item Cards */
[data-theme="light"] .phd-section .team-item {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,123,255,0.1);
    transition: all 0.3s ease;
}

[data-theme="light"] .phd-section .team-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,123,255,0.2);
}

/* PhD Links styling */
[data-theme="light"] .phd-section .team-item a {
    color: #007bff !important;
    text-decoration: none;
}

[data-theme="light"] .phd-section .team-item a:hover {
    color: #0056b3 !important;
    text-decoration: underline;
}

/* Team Section Container Fixes */
.site-section {
    position: relative;
    overflow: hidden;
}

.site-section .container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Ensure all team sections are properly contained */
#member-section,
#researchers-section,
#undergrad-section,
#alumni-section,
#collaborators-section {
    padding: 40px 0;
}

#member-section .container,
#researchers-section .container,
#undergrad-section .container,
#alumni-section .container,
#collaborators-section .container {
    background-color: rgba(248, 249, 250, 0.8);
    border-radius: 15px;
    padding: 40px 20px;
    margin: 20px auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Dark mode adjustments for containers */
[data-theme="dark"] #member-section .container,
[data-theme="dark"] #researchers-section .container,
[data-theme="dark"] #undergrad-section .container,
[data-theme="dark"] #alumni-section .container,
[data-theme="dark"] #collaborators-section .container {
    background-color: rgba(33, 37, 41, 0.8);
    color: white;
}

/* Responsive container adjustments */
@media (max-width: 768px) {
    #member-section .container,
    #researchers-section .container,
    #undergrad-section .container,
    #alumni-section .container,
    #collaborators-section .container {
        margin: 10px;
        padding: 20px 15px;
        border-radius: 10px;
    }
}
