/* =========================================================
   EJ NPH Editorial Team Page
   Scoped CSS for OJS Static Page
   ========================================================= */


/* Main team page wrapper */
.ejnph-team-page {
    --ejnph-primary: #0b4258;
    --ejnph-primary-dark: #083344;
    --ejnph-accent: #d49b45;
    --ejnph-text: #1f2933;
    --ejnph-muted: #667085;
    --ejnph-border: #e4e7ec;
    --ejnph-background: #f7f9fb;
    --ejnph-card-background: #ffffff;

    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 60px;
    box-sizing: border-box;
}


/* Prevent sizing problems inside OJS */
.ejnph-team-page *,
.ejnph-team-page *::before,
.ejnph-team-page *::after {
    box-sizing: border-box;
}


/* Intro section */
.ejnph-team-intro {
    max-width: 760px;
    margin: 0 auto 42px;
    text-align: center;
}


/* Small eyebrow text */
.ejnph-team-eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--ejnph-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1.4;
    text-transform: uppercase;
}


/* Main heading */
.ejnph-team-intro h2 {
    margin: 0 0 16px;
    color: var(--ejnph-primary);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    line-height: 1.2;
}


/* Intro paragraph */
.ejnph-team-intro p {
    max-width: 650px;
    margin: 0 auto;
    color: var(--ejnph-muted);
    font-size: 16px;
    line-height: 1.8;
}


/* Team card grid */
.ejnph-team-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    align-items: stretch;
}


/* Individual team card */
.ejnph-team-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    background: var(--ejnph-card-background);
    border: 1px solid var(--ejnph-border);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
    text-align: center;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}


/* Card hover effect */
.ejnph-team-card:hover {
    transform: translateY(-6px);
    border-color: rgba(11, 66, 88, 0.25);
    box-shadow: 0 16px 34px rgba(16, 24, 40, 0.12);
}


/* Photo area */
.ejnph-team-photo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    padding: 28px 20px 22px;
    background:
        linear-gradient(
            145deg,
            rgba(11, 66, 88, 0.08),
            rgba(212, 155, 69, 0.08)
        );
}


/* Profile photo */
.ejnph-team-photo {
    display: block;
    width: 170px;
    height: 170px;
    max-width: 100%;
    object-fit: cover;
    border: 6px solid #ffffff;
    border-radius: 50%;
    box-shadow:
        0 0 0 1px rgba(11, 66, 88, 0.12),
        0 10px 24px rgba(16, 24, 40, 0.14);
}


/* Content section */
.ejnph-team-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    padding: 24px 24px 28px;
}


/* Role label */
.ejnph-team-role {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    margin-bottom: 14px;
    padding: 6px 13px;
    border: 1px solid rgba(212, 155, 69, 0.35);
    border-radius: 999px;
    background: rgba(212, 155, 69, 0.12);
    color: #8a5b18;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.7px;
    line-height: 1.3;
    text-transform: uppercase;
}


/* Member name */
.ejnph-team-content h3 {
    margin: 0 0 10px;
    color: var(--ejnph-primary);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.35;
}


/* Designation */
.ejnph-team-designation {
    margin: 0 0 8px;
    color: var(--ejnph-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
}


/* Institution */
.ejnph-team-institution {
    min-height: 48px;
    margin: 0;
    color: var(--ejnph-muted);
    font-size: 14px;
    line-height: 1.65;
}


/* Contact area */
.ejnph-team-contact {
    width: 100%;
    margin-top: auto;
    padding-top: 22px;
}


/* Email link */
.ejnph-team-contact a {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    color: var(--ejnph-primary);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    transition:
        color 0.2s ease,
        text-decoration 0.2s ease;
}


/* Email hover */
.ejnph-team-contact a:hover,
.ejnph-team-contact a:focus {
    color: var(--ejnph-accent);
    text-decoration: underline;
}


/* Tablet layout */
@media (max-width: 1024px) {

    .ejnph-team-page {
        padding: 20px 16px 50px;
    }

    .ejnph-team-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }

    .ejnph-team-photo-wrapper {
        min-height: 210px;
    }

    .ejnph-team-photo {
        width: 155px;
        height: 155px;
    }

}


/* Mobile layout */
@media (max-width: 640px) {

    .ejnph-team-page {
        padding: 10px 12px 40px;
    }

    .ejnph-team-intro {
        margin-bottom: 30px;
    }

    .ejnph-team-eyebrow {
        font-size: 11px;
        letter-spacing: 1.6px;
    }

    .ejnph-team-intro h2 {
        font-size: 29px;
    }

    .ejnph-team-intro p {
        font-size: 14px;
        line-height: 1.7;
    }

    .ejnph-team-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .ejnph-team-card {
        border-radius: 14px;
    }

    .ejnph-team-photo-wrapper {
        min-height: 200px;
        padding: 25px 16px 20px;
    }

    .ejnph-team-photo {
        width: 145px;
        height: 145px;
    }

    .ejnph-team-content {
        padding: 22px 20px 25px;
    }

    .ejnph-team-content h3 {
        font-size: 20px;
    }

    .ejnph-team-institution {
        min-height: auto;
    }

}


/* Small mobile devices */
@media (max-width: 380px) {

    .ejnph-team-page {
        padding-left: 8px;
        padding-right: 8px;
    }

    .ejnph-team-photo {
        width: 130px;
        height: 130px;
    }

    .ejnph-team-content {
        padding-left: 16px;
        padding-right: 16px;
    }

}


/* Respect reduced-motion accessibility settings */
@media (prefers-reduced-motion: reduce) {

    .ejnph-team-card,
    .ejnph-team-contact a {
        transition: none;
    }

    .ejnph-team-card:hover {
        transform: none;
    }

}


/* Dark mode support */
@media (prefers-color-scheme: dark) {

    .ejnph-team-page {
        --ejnph-primary: #8ec5d8;
        --ejnph-primary-dark: #b5e0eb;
        --ejnph-text: #e5e7eb;
        --ejnph-muted: #aab4c0;
        --ejnph-border: #344454;
        --ejnph-background: #111827;
        --ejnph-card-background: #1b2733;
    }

    .ejnph-team-card {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    }

    .ejnph-team-card:hover {
        border-color: rgba(142, 197, 216, 0.35);
        box-shadow: 0 16px 34px rgba(0, 0, 0, 0.3);
    }

    .ejnph-team-photo-wrapper {
        background:
            linear-gradient(
                145deg,
                rgba(142, 197, 216, 0.1),
                rgba(212, 155, 69, 0.1)
            );
    }

    .ejnph-team-photo {
        border-color: #243443;
    }

    .ejnph-team-role {
        color: #f0c778;
        background: rgba(212, 155, 69, 0.16);
        border-color: rgba(212, 155, 69, 0.35);
    }

}