/**
 * Team Archive - Modal Based Presentation
 * Modern Chic Styling
 */

/* ======================================
   CSS Custom Properties
   ====================================== */
.team-archive-wrapper {
    --team-card-radius: 0;
    --team-card-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --team-card-shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.12);
    --team-accent: var(--default-primary-color, #1a1a2e);
    --team-accent-light: var(--default-secondary-color, #c9a86c);
    --team-text: var(--default-body-color, #2d2d2d);
    --team-text-muted: #6b6b6b;
    --team-bg-light: #fafaf9;
    --team-border: rgba(0, 0, 0, 0.06);
    --team-transition: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ======================================
   Archive Wrapper
   ====================================== */
.team-archive-wrapper {
    padding: 60px 0 100px;
    background: linear-gradient(180deg, #ffffff 0%, var(--team-bg-light) 100%);
    position: relative;
}

.team-archive-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--team-border), transparent);
}

/* ======================================
   Team Grid
   ====================================== */
.team-grid {
    margin-top: 0;
}

.team-grid .row {
    --bs-gutter-x: 2rem;
    --bs-gutter-y: 3rem;
}

@media (min-width: 1200px) {
    .team-grid .row {
        --bs-gutter-x: 2.5rem;
        --bs-gutter-y: 4rem;
    }
}

/* ======================================
   Team Card
   ====================================== */
.team-card {
    height: 100%;
    position: relative;
}

.team-card__trigger {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: center;
    transition: transform 0.5s var(--team-transition);
}

.team-card__trigger:focus {
    outline: none;
}

.team-card__trigger:focus-visible {
    outline: 2px solid var(--team-accent-light);
    outline-offset: 4px;
    border-radius: 4px;
}

/* Image Container */
.team-card__image-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.team-card__image-inner {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f4 0%, #e8e8e6 100%);
}

.team-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--team-transition), filter 0.5s ease;
    filter: grayscale(0);
}

.team-card__trigger:hover .team-card__image {
    transform: scale(1.08);
    filter: grayscale(0);
}

/* Image Placeholder */
.team-card__image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--team-accent) 0%, #2d3748 100%);
}

.team-card__image-placeholder span {
    font-family: 'GT Sectra Display', Georgia, serif;
    font-size: 4rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
}

/* Overlay */
.team-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: linear-gradient(180deg, rgba(26, 26, 46, 0) 0%, rgba(26, 26, 46, 0.85) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.team-card__trigger:hover .team-card__overlay {
    opacity: 1;
}

.team-card__view-text {
    font-family: 'Averta', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #fff;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.5s var(--team-transition), opacity 0.4s ease;
}

.team-card__trigger:hover .team-card__view-text {
    transform: translateY(0);
    opacity: 1;
}

.team-card__arrow {
    color: var(--team-accent-light);
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.5s var(--team-transition) 0.05s, opacity 0.4s ease 0.05s;
}

.team-card__trigger:hover .team-card__arrow {
    transform: translateY(0);
    opacity: 1;
}

/* Card Content */
.team-card__content {
    padding: 0 0.5rem;
}

.team-card__name {
    font-family: 'GT Sectra Display', Georgia, serif;
    font-size: 1.375rem;
    font-weight: 500;
    color: var(--team-accent);
    margin: 0 0 0.375rem;
    line-height: 1.3;
    transition: color 0.3s ease;
}

@media (min-width: 768px) {
    .team-card__name {
        font-size: 1.5rem;
    }
}

.team-card__trigger:hover .team-card__name {
    color: var(--team-accent-light);
}

.team-card__position {
    display: block;
    font-family: 'Averta', sans-serif;
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--team-text-muted);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* ======================================
   Team Modal
   ====================================== */
.team-modal .modal-dialog {
    max-width: 960px;
    margin: 1rem;
}

@media (min-width: 576px) {
    .team-modal .modal-dialog {
        margin: 1.75rem auto;
    }
}

.team-modal .modal-content {
    border: none;
    border-radius: 0;
    background: #fff;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* Close Button */
.team-modal__close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 10;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--team-border);
    border-radius: 50%;
    background: #fff;
    color: var(--team-accent);
    cursor: pointer;
    transition: all 0.3s ease;
}

.team-modal__close:hover {
    background: var(--team-accent);
    border-color: var(--team-accent);
    color: #fff;
    transform: rotate(90deg);
}

@media (min-width: 768px) {
    .team-modal__close {
        top: 1.5rem;
        right: 1.5rem;
    }
}

/* Modal Body */
.team-modal .modal-body {
    padding: 0;
}

/* Modal Grid */
.team-modal__grid {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100%;
}

@media (min-width: 768px) {
    .team-modal__grid {
        grid-template-columns: 1fr 1.2fr;
    }
}

/* Image Column */
.team-modal__image-col {
    position: relative;
    background: var(--team-bg-light);
}

.team-modal__image-wrapper {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

@media (min-width: 768px) {
    .team-modal__image-wrapper {
        aspect-ratio: auto;
        height: 100%;
        min-height: 500px;
    }
}

.team-modal__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-modal__image-placeholder {
    width: 100%;
    height: 100%;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--team-accent) 0%, #2d3748 100%);
}

.team-modal__image-placeholder span {
    font-family: 'GT Sectra Display', Georgia, serif;
    font-size: 6rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.15);
    text-transform: uppercase;
}

/* Content Column */
.team-modal__content-col {
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .team-modal__content-col {
        padding: 4rem 3rem;
    }
}

@media (min-width: 992px) {
    .team-modal__content-col {
        padding: 5rem 4rem;
    }
}

/* Modal Header */
.team-modal__header {
    margin-bottom: 2rem;
}

.team-modal__label {
    display: inline-block;
    font-family: 'Averta', sans-serif;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--team-accent-light);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--team-accent-light);
}

.team-modal__name {
    font-family: 'GT Sectra Display', Georgia, serif;
    font-size: 2rem;
    font-weight: 500;
    color: var(--team-accent);
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .team-modal__name {
        font-size: 2.5rem;
    }
}

@media (min-width: 992px) {
    .team-modal__name {
        font-size: 2.75rem;
    }
}

.team-modal__position {
    display: block;
    font-family: 'Averta', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: var(--team-text-muted);
    letter-spacing: 0.02em;
}

/* Bio Section */
.team-modal__bio {
    flex: 1;
}

.team-modal__bio-divider {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, var(--team-accent-light), transparent);
    margin-bottom: 1.5rem;
}

.team-modal__bio-content {
    font-family: 'Averta', sans-serif;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--team-text);
}

.team-modal__bio-content p {
    margin-bottom: 1rem;
}

.team-modal__bio-content p:last-child {
    margin-bottom: 0;
}

/* ======================================
   Modal Animations
   ====================================== */
.team-modal.fade .modal-dialog {
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.4s var(--team-transition), opacity 0.3s ease;
}

.team-modal.show .modal-dialog {
    transform: scale(1);
    opacity: 1;
}

.team-modal .modal-content {
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.5s var(--team-transition) 0.1s, opacity 0.4s ease 0.1s;
}

.team-modal.show .modal-content {
    transform: translateY(0);
    opacity: 1;
}

/* Backdrop */
.modal-backdrop {
    background-color: rgba(26, 26, 46, 0.7);
    backdrop-filter: blur(4px);
}

.modal-backdrop.show {
    opacity: 1;
}

/* ======================================
   Responsive Adjustments
   ====================================== */
@media (max-width: 575.98px) {
    .team-archive-wrapper {
        padding: 40px 0 60px;
    }

    .team-card__name {
        font-size: 1.25rem;
    }

    .team-card__position {
        font-size: 0.75rem;
    }

    .team-modal__content-col {
        padding: 2rem 1.5rem;
    }

    .team-modal__name {
        font-size: 1.75rem;
    }

    .team-modal__close {
        width: 40px;
        height: 40px;
        top: 1rem;
        right: 1rem;
    }

    .team-modal__close svg {
        width: 18px;
        height: 18px;
    }
}

/* ======================================
   Print Styles
   ====================================== */
@media print {
    .team-modal {
        display: none !important;
    }
}

