/* ==========================================================
   LEADERSHIP TEAM SECTION - LIGHT LUXURY THEME
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,400&family=Jost:wght@300;400;500;600&display=swap');

:root {
    --bg-alabaster: #fcfbf8;
    --surface-white: #ffffff;
    --text-primary: #1a221f;
    --text-secondary: #5c6b65;
    --gold-primary: #d7a84f;
    --gold-dark: #b88a38;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(215, 168, 79, 0.2);
    --shadow-soft: 0 15px 35px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 25px 50px rgba(0, 0, 0, 0.08);
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Jost', system-ui, sans-serif;
    --ease-lux: cubic-bezier(0.165, 0.84, 0.44, 1);
    --ease-slow: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-standard: all 0.5s var(--ease-lux);
}

/* --- Container & Baseline --- */
.team-main {
    background-color: var(--bg-alabaster);
    color: var(--text-primary);
    font-family: var(--font-body);
    padding: 100px 5%;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* View State Animations */
.team-section {
    position: absolute;
    width: 90%;
    max-width: 1400px;
    left: 50%;
    transform: translateX(-50%);
    transition: opacity 0.7s var(--ease-lux), transform 0.7s var(--ease-lux), visibility 0.7s;
}

.active-view {
    opacity: 1;
    transform: translate(-50%, 0);
    visibility: visible;
    z-index: 10;
}

.hidden-view {
    opacity: 0;
    transform: translate(-50%, 30px);
    visibility: hidden;
    z-index: 1;
    pointer-events: none;
}

/* --- Tab Navigation --- */
.team-header {
    margin-bottom: 60px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.tab-navigation {
    display: flex;
    gap: 40px;
    overflow-x: auto;
    scrollbar-width: none;
}

.tab-navigation::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    padding-bottom: 16px;
    cursor: pointer;
    position: relative;
    transition: color 0.4s ease;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gold-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s var(--ease-lux);
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--text-primary);
}

.tab-btn.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* --- Grid View & Cards --- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 40px;
}

.team-card {
    background: var(--surface-white);
    border-radius: 8px;
    height: 460px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.03);
    box-shadow: var(--shadow-soft);
    transition: transform 0.6s var(--ease-lux), box-shadow 0.6s var(--ease-lux);
    position: relative;
}

.team-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: var(--gold-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s var(--ease-lux);
    z-index: 5;
}

.team-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.team-card:hover::before {
    transform: scaleX(1);
}

.card-info {
    padding: 45px 30px 20px;
    text-align: center;
    z-index: 2;
}

.card-info h2 {
    font-family: var(--font-display);
    font-size: 2.6rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 8px;
    transition: color 0.4s ease;
}

.card-info p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 500;
}

.team-card:hover .card-info h2 {
    color: var(--gold-dark);
}

.card-image {
    width: 100%;
    height: 300px;
    margin-top: auto;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    filter: grayscale(100%) contrast(1.05);
    transform: scale(1.02);
    transition: filter 0.8s var(--ease-slow), transform 0.8s var(--ease-slow);
}

.team-card:hover .card-image img {
    filter: grayscale(0%) contrast(1);
    transform: scale(1.08);
}

.card-image::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 40px;
    background: linear-gradient(to top, rgba(255,255,255,0.05), transparent);
    pointer-events: none;
}

/* ==========================================================
   DETAIL VIEW - REDESIGNED EXECUTIVE PROFILE
   ========================================================== */

.detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0 60px;
    animation: fadeIn 0.6s var(--ease-lux) forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Back Button */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 50px;
    padding: 8px 0;
    transition: color 0.3s ease;
}

.back-link span {
    font-size: 1.5rem;
    line-height: 1;
    transition: transform 0.3s ease;
}

.back-link:hover {
    color: var(--gold-dark);
}

.back-link:hover span {
    transform: translateX(-4px);
}

/* Main Grid */
.detail-grid {
    display: grid;
    grid-template-columns: minmax(300px, 440px) 1fr;
    gap: 70px;
    align-items: start;
}

/* --- Left Column: Square Image --- */
.detail-image-col {
    display: flex;
    justify-content: center;
}

.image-frame-square {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 440px;
    overflow: hidden;
    border-radius: 2px;
    background: var(--surface-white);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.1);
}

/* Outer gold border */
.image-frame-square::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(215, 168, 79, 0.35);
    z-index: 2;
    pointer-events: none;
}

/* Inner matte border */
.image-frame-square::after {
    content: '';
    position: absolute;
    top: 14px; left: 14px; right: 14px; bottom: 14px;
    border: 1px solid rgba(215, 168, 79, 0.18);
    z-index: 2;
    pointer-events: none;
}

.image-frame-square img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s var(--ease-slow);
}

.image-frame-square:hover img {
    transform: scale(1.04);
}

/* --- Right Column: Content --- */
.detail-content-col {
    padding-top: 10px;
}

.detail-header {
    margin-bottom: 32px;
}

.detail-header h1 {
    font-family: var(--font-display);
    font-size: 3.6rem;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.1;
    margin: 0 0 14px 0;
}

.profile-title {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gold-dark);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin: 0 0 20px 0;
}

.title-divider {
    width: 60px;
    height: 2px;
    background: var(--gold-primary);
    border-radius: 2px;
}

/* Bio */
.bio-content {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text-secondary);
    font-weight: 300;
    margin-bottom: 40px;
}

.bio-content p {
    margin-bottom: 18px;
}

.bio-content p:last-child {
    margin-bottom: 0;
}

/* Meta Cards (Contact + Highlights) */
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 35px;
}

.meta-card {
    flex: 1;
    min-width: 260px;
    background: var(--surface-white);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: var(--transition-standard);
}

.meta-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    transform: translateY(-3px);
}

.meta-card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(215, 168, 79, 0.25);
}

.meta-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
    margin: 0 0 14px 0;
    opacity: 0.8;
}

.meta-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meta-link {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    padding: 6px 0;
    transition: color 0.3s ease;
    word-break: break-word;
}

.meta-link:hover {
    color: var(--gold-dark);
}

/* Highlights injected content */
.highlights-content {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

.highlights-content ul {
    margin: 0;
    padding-left: 18px;
}

.highlights-content li {
    margin-bottom: 8px;
}

.highlights-content p {
    margin-bottom: 10px;
}

.highlights-content p:last-child {
    margin-bottom: 0;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 12px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: var(--surface-white);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition-standard);
}

.social-icon:hover {
    background: var(--text-primary);
    color: var(--surface-white);
    border-color: var(--text-primary);
    transform: translateY(-3px);
}

/* --- Keyframe Animations --- */
@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(40px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes slideRightFade {
    0% { opacity: 0; transform: translateX(-40px); }
    100% { opacity: 1; transform: translateX(0); }
}

/* Staggered Grid Load */
.team-grid > .team-card {
    animation: slideUpFade 0.8s var(--ease-lux) backwards;
}
.team-grid > .team-card:nth-child(1) { animation-delay: 0.1s; }
.team-grid > .team-card:nth-child(2) { animation-delay: 0.2s; }
.team-grid > .team-card:nth-child(3) { animation-delay: 0.3s; }
.team-grid > .team-card:nth-child(4) { animation-delay: 0.4s; }

/* ================= RESPONSIVE ================= */
@media (max-width: 1024px) {
    .detail-grid {
        gap: 50px;
    }
    
    .detail-header h1 {
        font-size: 3rem;
    }
}

@media (max-width: 900px) {
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .detail-image-col {
        justify-content: center;
    }
    
    .image-frame-square {
        max-width: 320px;
    }
    
    .detail-header {
        text-align: center;
    }
    
    .title-divider {
        margin: 0 auto;
    }
    
    .detail-header h1 {
        font-size: 2.6rem;
    }
    
    .bio-content {
        text-align: center;
        font-size: 1rem;
    }
    
    .detail-meta {
        flex-direction: column;
    }
    
    .meta-card {
        min-width: 100%;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .team-main {
        padding: 60px 5%;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .team-card {
        height: 400px;
    }
    
    .card-info {
        padding: 30px 20px 15px;
    }
    
    .detail-header h1 {
        font-size: 2.2rem;
    }
    
    .back-link {
        margin-bottom: 30px;
    }
    
    .detail-container {
        padding-bottom: 40px;
    }
}
