/**
 * Module: Team Archive & Cards
 * Path: assets/css/iatrics-team.css
 */

/* Remove gap above hero on team pages */
.site-main > .resource-hero.alignfull {
    margin-top: 0;
}

/* Archive Header */
.team-archive-header {
    padding-top: 80px;
    text-align: center;
}

.team-archive-header .page-title {
    color: var(--medical-heading);
    font-size: 2.8rem;
    font-weight: 800;
}

.team-archive-header .archive-description {
    color: var(--medical-body-text);
    font-size: 1.2rem;
    max-width: 700px;
    margin: 20px auto 0;
}

.team-archive-content {
    padding-top: 50px;
    padding-bottom: 100px;
}

/* Grid Layout */
.team-archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* Component: Team Card */
.team-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Image Formatting */
.team-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    border-bottom: 3px solid var(--medical-accent);
}

/* Placeholder Photo (no image uploaded) */
.team-placeholder-photo {
    width: 100%;
    aspect-ratio: 4/3;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 3px solid var(--medical-accent, #8f001a);
}

.team-placeholder-photo .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    color: #94a3b8;
}

/* Profile page placeholder (larger) */
.member-photo .team-placeholder-photo {
    aspect-ratio: 1/1;
}

.member-photo .team-placeholder-photo .dashicons {
    font-size: 80px;
    width: 80px;
    height: 80px;
}

/* Content Formatting */
.team-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.team-content h3 {
    margin: 0 0 5px 0;
    color: var(--medical-heading);
    font-size: 1.4rem;
    font-weight: 800;
}
/* Left Content */
.team-content-side {
    flex: 1;
    max-width: 550px;
}

.team-content-side .section-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--medical-heading);
    margin-bottom: 20px;
    line-height: 1.2;
}

.team-content-side .section-description {
    font-size: 1.15rem;
    color: var(--medical-body-text);
    line-height: 1.7;
    margin-bottom: 40px;
}

.team-action-wrapper {
    display: flex;
    justify-content: flex-start;
}

/* Right Image with Decorative Offset */
.team-image-side {
    flex: 1;
    position: relative;
}

.team-image-decoration {
    position: relative;
    z-index: 2;
}

/* Adds a subtle medical-colored square behind the image for depth */
.team-image-decoration::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    bottom: 20px;
    left: 20px;
    background-color: var(--medical-accent);
    border-radius: 16px;
    z-index: -1;
    opacity: 0.05; 
}

.team-group-photo {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15); /* Deep, professional shadow */
    display: block;
}


.member-specialty {
    color: var(--medical-accent);
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.member-bio-snippet {
    color: var(--medical-body-text);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.team-card-actions {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
}

.medical-link {
    color: var(--medical-accent);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: opacity 0.2s ease;
}

.medical-link:hover {
    opacity: 0.7;
}

/* --- Home Page Team Component --- */
.home-team-section {
    padding: 120px 0;
    background-color: #ffffff;
}

.home-team-section .section-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--medical-heading);
    margin-bottom: 40px;
}
.team-split-layout {
    display: flex;
    align-items: center;
    gap: 80px;
}
.team-presentation-card {
    max-width: 900px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.06); /* Restores the professional shadow */
    border: 1px solid #f1f5f9;
}

.team-group-photo {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 40px;
    display: block;
}


/* Mobile Fallback */
@media (max-width: 1024px) {
    .team-split-layout {
        flex-direction: column;
        text-align: center;
        gap: 50px;
    }
    .team-content-side { max-width: 100%; }
    .team-action-wrapper { justify-content: center; }
}

/* =========================================================
   Single Team Member Profile
   Template: single-team.php
   ========================================================= */

.team-profile {
    padding: 0 0 80px;
}

.profile-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 50px;
    align-items: start;
    padding-top: 50px;
}

/* --- Sidebar --- */
.profile-sidebar {
    position: sticky;
    top: 100px;
}

.profile-sticky-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.member-photo img {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 3px solid var(--medical-accent, #8f001a);
}

.sidebar-actions {
    padding: 25px;
}

.sidebar-actions .medical-btn-pill.full-width {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

.sidebar-contact-details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
}

.sidebar-contact-details p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--medical-body-text, #475569);
    line-height: 1.6;
}

.sidebar-contact-details a {
    color: var(--medical-accent, #8f001a);
    text-decoration: none;
    font-weight: 600;
}

.sidebar-contact-details a:hover {
    text-decoration: underline;
}

/* --- Main Content --- */
.profile-main-content {
    min-width: 0;
}

.member-header {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e2e8f0;
}

.member-header h1 {
    color: var(--medical-heading, #1e293b);
    font-size: 2.4rem;
    font-weight: 800;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.member-specialty-title {
    color: var(--medical-accent, #8f001a);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

/* --- Biography --- */
.member-bio {
    margin-bottom: 40px;
}

.member-bio .section-heading {
    color: var(--medical-heading, #1e293b);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--medical-accent, #8f001a);
    display: inline-block;
}

.member-bio .entry-content {
    color: var(--medical-body-text, #475569);
    font-size: 1.05rem;
    line-height: 1.8;
}

.member-bio .entry-content p {
    margin-bottom: 18px;
}

/* --- Credentials Sections (Fellowships, Publications) --- */
.credentials-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e2e8f0;
}

.credentials-section .section-heading {
    color: var(--medical-heading, #1e293b);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--medical-accent, #8f001a);
    display: inline-block;
}

/* Check List (Fellowships, Education) */
.check-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.check-list li {
    position: relative;
    padding: 10px 0 10px 30px;
    color: var(--medical-body-text, #475569);
    font-size: 1rem;
    line-height: 1.6;
    border-bottom: 1px solid #f1f5f9;
}

.check-list li:last-child {
    border-bottom: none;
}

.check-list li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    top: 10px;
    color: var(--medical-accent, #8f001a);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Publication List */
.publication-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pub-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.pub-item:last-child {
    border-bottom: none;
}

.pub-item .dashicons {
    color: var(--medical-accent, #8f001a);
    flex-shrink: 0;
    margin-top: 2px;
}

.pub-item p {
    margin: 0;
    color: var(--medical-body-text, #475569);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- Hero Credentials (post-nominal letters) --- */
.hero-credentials {
    display: block;
    font-size: 1.1rem;
    font-weight: 400;
    color: #cbd5e1;
    margin-top: 5px;
    letter-spacing: 0.02em;
}

/* --- Card Credentials --- */
.member-credentials {
    color: var(--medical-body-text, #475569);
    font-size: 0.8rem;
    font-style: italic;
    margin-bottom: 10px;
}

/* --- Sidebar External Profile Links --- */
.sidebar-profile-links {
    border-top: 1px solid #f1f5f9;
    padding: 15px 25px 20px;
}

.profile-link-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    color: var(--medical-heading, #1e293b);
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.profile-link-item:hover {
    background: #f1f5f9;
    border-color: var(--medical-accent, #8f001a);
}

.profile-link-item .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: var(--medical-accent, #8f001a);
}

.profile-link-item .dashicons-external,
.profile-link-item .dashicons-arrow-right-alt2 {
    margin-left: auto;
    color: #94a3b8;
    font-size: 12px;
    width: 12px;
    height: 12px;
}

/* --- Linked Publications --- */
.pub-item a.pub-link {
    color: var(--medical-accent, #8f001a);
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.5;
    transition: color 0.2s ease;
}

.pub-item a.pub-link:hover,
.pub-item a.pub-link:focus {
    color: var(--medical-accent-dark, #6b0014);
    text-decoration: underline;
}

.pub-item a.pub-link:focus-visible {
    outline: 2px solid var(--medical-accent, #8f001a);
    outline-offset: 2px;
    border-radius: 2px;
}

.pub-item .pub-external-icon {
    font-size: 12px;
    width: 12px;
    height: 12px;
    vertical-align: middle;
    margin-left: 4px;
    color: #94a3b8;
}

/* --- Profile Mobile --- */
@media (max-width: 768px) {
    .team-profile {
        padding: 0 0 60px;
    }

    .profile-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .profile-sidebar {
        position: static;
        max-width: 400px;
        margin: 0 auto;
    }

    .hero-credentials {
        font-size: 0.95rem;
    }
}