/**
 * Scientific Team Accordion Styles
 * * Prefix: scite- (Scientific Team)
 * Logic: Uses CSS Grid for smooth height transitions (0fr to 1fr).
 * Support: RTL, Modern Browsers, Responsive.
 */

.scite-accordion-section {
    
    
    /* Fluid vertical padding based on viewport width */
}

.scite-accordion-section__container {
    /* max-width: 1200px; */
    margin-inline: auto;
    border-bottom: 2px solid #C8DAD9;
    padding-block: clamp(40px, 8vw, 20px);
    padding-inline: clamp(20px, 8vw, 60px);
}

.scite-accordion-section__header {
    margin-bottom: 25px;
    color: #404040;
    font-size: 48px;
}

/* Individual Accordion Item */
.scite-item {
    margin-bottom: 8px;
    border-bottom: 2px solid transparent; /* Optional divider */
}

/* Summary Trigger */
.scite-item__summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Aligns content to the right edge */
    cursor: pointer;
    user-select: none;
    padding: 4px 0;
}

/* Hide default disclosure triangle in Safari */
.scite-item__summary::-webkit-details-marker {
    display: none;
}

.scite-item__title {
    font-size: clamp(20px, 2.5vw, 32px);
    font-weight: 700;
    color: #404040;
    order: 1; /* Appears first from the right */
}

/* Circular Icon based on Staff.jpg */
.scite-item__icon {
    width: 32px;
    height: 32px;
    background-color: #ebf1f2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-inline-end: 15px; /* Spacing between icon and title */
    order: 0; /* Positioned to the left of the title in RTL */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Icon Rotation on Open State */
.scite-item[open] .scite-item__icon {
    transform: rotate(180deg);
}

/**
 * ANIMATION LOGIC
 * Using CSS Grid for height: auto transitions
 */
.scite-item__content {
    display: grid;
    grid-template-rows: 0fr; /* Initial state: collapsed */
    transition: grid-template-rows 0.3s ease-out, padding 0.3s ease;
    overflow: hidden;
    padding-inline-start: 47px; /* Padding remains 0 on vertical axis when closed */
}

.scite-item[open] .scite-item__content {
    grid-template-rows: 1fr; /* Open state: auto-height calculation */
    padding-block-start: 10px;
    padding-inline-start: clamp(1.25rem, 5vw + 1rem, 6rem);
    padding-block-end: 30px;
    padding-inline-end: 0;
}

.scite-staff__sub-title{
    font-size: 20px;
    font-weight: bold;
}

.scite-item__inner-text {
    min-height: 0; /* Required for the grid transition to function properly */
    font-size: 18px;
    line-height: 1.6;
    color: #444444;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.scite-item[open] .scite-item__inner-text {
    opacity: 1;
}

/* Mobile Responsive Adjustments */
@media (max-width: 600px) {
    .scite-item__title {
        font-size: 19px;
    }
    .scite-item__content {
        padding-inline-start: 15px;
    }
}


/**
 * Scientific Staff (Staff (1).jpg)
 * Prefix: scite-
 */

.scite-staff {
    direction: rtl;
    background-color: #ffffff;
    padding: 0;
}

/* Header styling */
.scite-staff__header {
    margin-bottom: 25px;
    text-align: start;
}

.scite-staff__title {
    color: #404040;
    margin-bottom: 20px;
    display: block;
    font-size: 48px;
}

.scite-staff__lead {
    font-size: clamp(24px, 3vw, 32px);
    /*font-weight: 700;*/
    line-height: 1.2;
    color: #404040;
    max-width: 1024px; /* Aligns with the design width */
    margin: 0;
}

/* List styling */
.scite-staff__list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: start;
    margin-bottom: 30px;
}

.scite-staff__item {
    font-size: clamp(16px, 1.5vw, 20px);
    line-height: 1.3;
    color: #404040;
    margin-bottom: 5px;
    position: relative;
    padding-inline-start: 0;
    transition: color 0.2s ease;
}

.scite-accordion-section__list .scite-staff__item{
    font-size: 20px;
    font-weight: 400;
    line-height: 1.3;
}

.scite-accordion-section__list .scite-staff__item a{
    text-decoration: underline;
}

.scite-staff__item:hover {
    color: #000000;
}

.scite-staff__item a{
    text-decoration: none;
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .scite-staff__lead {
        font-size: 22px;
    }
    
    .scite-staff__item {
        font-size: 17px;
        line-height: 1.6;
    }
}


/**
 * Scientific Staff Profile
 * Prefix: scite-profile
 * Note: Uses English (LTR) alignment as per Research Member.jpg
 */

.scite-profile {
    direction: ltr;
    background-color: #ffffff;
    width: 100%;
    min-height: 100vh; /* Ensures it's at least the full screen height */
    display: flex;
    flex-direction: column;
}

/* Grey Top Header */
.scite-profile__header {
    background-color: #546367;
    padding: 15px 40px;
    width: 100%;
}

.scite-profile__category {
    color: #ffffff;
    font-size: 28px;
    font-weight: 800;
    margin: 0;
    text-transform: uppercase;
}

.scite-profile__container {
    margin: 0 auto;
    padding: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    text-align: start;
}

/* Identity Section */
.scite-profile__identity {
    border-bottom: 2px solid #D1DCE0;
    padding-bottom: 20px;
    margin-bottom: 30px;
    padding: clamp(20px, 3vw, 20px) clamp(20px, 6vw, 80px);
    margin: 0;
}

.scite-profile__body{
    padding-bottom: 20px;
    margin-bottom: 30px;
    padding: clamp(20px, 3vw, 40px) clamp(20px, 6vw, 80px);
    margin: 0;
    max-width: 840px;
}

.scite-profile__name {
    font-size: clamp(24px, 4vw, 48px);
    font-weight: 800;
    color: #404040;
    margin: 0 0 5px 0;
    text-transform: uppercase;
    line-height: 1;
}

.scite-profile__position {
    font-size: 18px;
    font-weight: 700;
    color: #555555;
    margin: 0;
}

/* Content Grid */
.scite-profile__grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 0;
    flex-grow: 1;
    align-items: stretch;
}

.scite-profile__sidebar{
    border-inline-end: 2px solid #C8DAD9;
    height: 100%;
    /* QA fix #67: sidebar wasn't sticky before — it just scrolled away with the page */
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    align-self: flex-start;
    max-height: 100vh;
    overflow-y: auto;
}

.scite-profile__image-box {
    width: 100%;
    margin-bottom: 20px;
    height: 400px;
}

.scite-profile__img {
    width: 100%;
    height: auto;
    display: block;
    height: 100%;
    object-fit: cover;
}

.scite-profile__contact {
    font-size: 20px;
    line-height: 1;
    color: #404040;
    text-align: start;
    padding: clamp(20px, 3vw, 20px) clamp(20px, 6vw, 40px);
    font-weight: 400;
}

.scite-profile__contact a {
    color: #404040;
    text-decoration: none;
}

.scite-profile__contact a:hover {
    text-decoration: underline;
}



.scite-profile__role,
.scite-profile__secondary-role {
    font-weight: 600;
    font-size: clamp(20px, 1.5vw + 1rem, 26px); 
    line-height: 1.2;
    color: #404040;
    margin: 0;
}

.scite-profile__links {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: clamp(20px, 3vw, 20px) clamp(20px, 6vw, 40px);
    padding-top: 0;
}

.scite-profile__link {
    font-weight: 700;
    font-size: clamp(18px, 1.2vw + 1rem, 24px);
    line-height: 110%;
    letter-spacing: -0.02em;
    font-variant: small-caps;
    text-decoration: underline !important;
    color: #404040;
    display: block;
    text-transform: uppercase;
}

.scite-profile__link:hover {
    color: #000;
}

.scite-profile__contact {
    margin-bottom: 20px;
    font-size: 20px;
    line-height: 1;
    font-weight: 400;
    border-bottom: 2px solid #C8DAD9;
    padding-top: 0;
}

.scite-profile__body p {
    font-size: clamp(18px, 4vw, 26px);
    /* line-height: 1; */
    color: #404040;
    margin-bottom: 20px;
    font-weight: 300;
}

/* Mobile Responsiveness */
@media (max-width: 850px) {
    .scite-profile__grid {
        grid-template-columns: 1fr;
    }
    
    .scite-profile__sidebar {
        max-width: 100%;
        border: 0;
    }
}



/* הגדרות כלליות לעמוד הלובי */
.staff-lobby {
    margin: 0 auto;
    padding: 0;
    max-width: 1920px;
}

.staff-lobby__header {
    width: 100%;
    padding: 40px 10px;
    border-bottom: 2px solid #C8DAD9; /* BG-Research-Green */
    margin-bottom: 0;
    border-top: 2px solid #C8DAD9;
}

.staff-lobby__title {
    font-weight: 700;
    font-size: clamp(24px, 3vw, 32px);
    line-height: 90%;
    letter-spacing: -2%;
    text-align: center;
    font-variant: small-caps;
    color: #404040;
    margin: 0;
}

/* הגריד של הכרטיסים */
.staff-lobby__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-inline-start: 2px solid #EBF1F2; /* מתאים את עצמו לכיוון השפה */
    /* border-top: 2px solid #EBF1F2; */
}

/* כרטיס בודד */
.staff-card {
    background: #FFFFFF;
    border-inline-end: 2px solid #C8DAD9;
    border-bottom: 2px solid #C8DAD9;
    min-height: 366px;
    display: flex;
    flex-direction: column;
    position: relative;
    /* Transition חלק לכל השינויים */
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                box-shadow 0.3s ease, 
                border-color 0.3s ease;
    z-index: 1;
}



.staff-card__image {
    width: 100%;
    height: 300px;
    overflow: hidden;
}
.staff-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    object-position: top;
    transition: transform 0.5s ease;
}

.staff-card:hover .staff-card__image img {
    transform: scale(1.05);
}

.staff-card__content {
    padding: 20px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
}

.staff-card__name {
    font-weight: 700;
    font-size: 24px;
    line-height: 110%;
    letter-spacing: -2%;
    font-variant: small-caps;
    color: #404040;
    margin-bottom: 8px;
}

.staff-card:hover .staff-card__name {
    color: #000;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.staff-card__role {
    font-weight: 400;
    font-size: 16px;
    line-height: 125%;
    font-variant: small-caps;
    color: #000000;
    margin-bottom: 15px;
}

.staff-card__tag {
    background: #DAE3E5; /* Light Green */
    font-weight: 400;
    font-size: 16px;
    padding: 6px;
    margin-top: auto; /* הצמדה לתחתית הכרטיס */
    width: fit-content;
    width: 200px;
    color: #404040;
    margin-top: 12px;
    transition: background 0.3s ease, color 0.3s ease;
    border-top: 2px #C8DAD9 solid;
    background: #ffffff;
}

.staff-card:hover .staff-card__tag {
    /*background: #C8DAD9;*/
}

/* קישור Overlay */
.staff-card__link-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 10;
}

/* רספונסיביות */
@media (max-width: 1024px) {
    .staff-lobby__grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        box-sizing: border-box;
    }

    .staff-card {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .staff-card * {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}

@media (max-width: 768px) {
    .scite-staff__title {
        font-size: 32px;
        font-weight: 700;
    }
    .scite-item__title {
        font-size: 24px;
    }
    .scite-accordion-section__list .scite-staff__item {
        font-size: 18px;
    }
    .scite-item .scite-item__content {
        padding-inline: 0;
    }
    .scite-item[open] .scite-item__content {
        padding-inline: 0;
    }
    .staff-card__name {
        font-size: 20px;
    }
    .staff-card__role {
        font-size: 14px;
    }
    .staff-card__tag {
        font-size: 14px;
        width: auto;
    }
    .staff-card__image {
        width: 100%;
        aspect-ratio: 1 / 1;
        overflow: hidden;
        height: auto;
    }

    .staff-card__image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
}

