/* ==========================================================================
   Citadel Council / Team Page Styles (Castle Man Studio)
   Theme: Studio Leadership & Development Team Showcase
   ========================================================================== */

/* 0. Section Base Reset for Team Page (Strict Compact Spacing) */
.team-hero-section,
.team-roster-section,
.team-cta-section {
    min-height: auto !important;
    display: block !important;
    padding: 2.5rem 0 !important; /* Compact py-10 md:py-14 spacing */
    position: relative;
    z-index: 5;
    background: transparent !important;
}

/* 1. Hero Section */
.team-hero-section {
    padding: 7rem 0 2rem 0 !important;
    text-align: center;
}

.team-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    background: rgba(201, 169, 109, 0.1);
    border: 1px solid rgba(201, 169, 109, 0.35);
    padding: 0.4rem 1.15rem;
    border-radius: 0px !important; /* Sharp bordered pill / tag */
    margin-bottom: 1.3rem;
}

.team-status-badge span {
    font-size: 0.74rem;
    letter-spacing: 0.26em;
    color: #ffffff;
    font-weight: 600;
}

.team-hero-title {
    font-size: clamp(2.4rem, 5vw, 4rem);
    letter-spacing: 0.12em;
    line-height: 1.15;
    margin-bottom: 1.2rem;
    color: #ffffff;
    text-shadow: 0 4px 25px rgba(0, 0, 0, 0.9);
    max-width: 950px;
    margin-left: auto;
    margin-right: auto;
}

.team-hero-subtitle {
    font-size: clamp(1.05rem, 1.7vw, 1.2rem);
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.82);
    max-width: 860px;
    margin: 0 auto;
}

/* 2. Team Carousel Slider Section & Container */
.team-roster-section {
    padding: 2rem 0 3.5rem 0 !important;
    position: relative;
    z-index: 5;
}

.team-roster-section .container {
    max-width: 1440px;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

@media (min-width: 768px) {
    .team-roster-section .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.team-carousel-outer {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    margin-top: 1rem;
}

/* Side Navigation Arrows (Sharp Rectangles, 2px Solid White Border) */
.team-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 48px;
    height: 48px;
    background: #16181D;
    border: 2px solid #ffffff;
    border-radius: 0px !important;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7);
    transition: background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
                color 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.25s ease,
                box-shadow 0.25s ease;
}

.team-nav-arrow:hover:not(:disabled) {
    background: #ffffff;
    color: #0E1013;
    border-color: #ffffff;
    transform: translateY(-50%) scale(1.06);
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.35), 0 10px 30px rgba(0, 0, 0, 0.8);
}

.team-nav-arrow:active:not(:disabled) {
    transform: translateY(-50%) scale(0.96);
}

.team-nav-arrow:disabled {
    opacity: 0.25;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: none;
}

.team-nav-prev {
    left: -24px;
}

.team-nav-next {
    right: -24px;
}

@media (min-width: 1280px) {
    .team-nav-prev {
        left: -32px;
    }
    .team-nav-next {
        right: -32px;
    }
}

/* Horizontal Carousel Track with Native Smooth Scroll-Snap */
.team-carousel-track {
    display: flex;
    gap: 1.8rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 1.5rem 0.5rem;
    width: 100%;
    scrollbar-width: none; /* Hide default scrollbar on Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.team-carousel-track::-webkit-scrollbar {
    display: none; /* Hide scrollbar on Chrome/Safari */
}

/* 3. Team Card Surface & Wide Horizontal Split Layout */
.team-card {
    flex: 0 0 calc(50% - 0.9rem); /* Exactly 2 wide cards in view on desktop */
    min-width: 480px;
    max-width: 640px;
    scroll-snap-align: start;
    background: #16181D;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0px !important; /* Strict sharp rectangular corners */
    position: relative;
    display: flex;
    flex-direction: row; /* Horizontal split: Image Left, Content Right */
    align-items: stretch;
    padding: 0; /* Padding moved inside columns for clean edge-to-edge photo */
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    min-height: 380px;
}

@media (min-width: 1400px) {
    .team-card {
        flex: 0 0 calc(50% - 1rem); /* Keep 2 wide cards in view with generous width */
        min-width: 540px;
        max-width: 680px;
    }
}

.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(201, 169, 109, 0.8), transparent);
    opacity: 0.6;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.team-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7), 0 0 25px rgba(255, 255, 255, 0.06);
}

.team-card:hover::before {
    opacity: 1;
}

/* 4. Left Column: Full-Height Portrait Container (Zero Decapitation) */
.team-portrait-wrapper {
    flex: 0 0 40%; /* 40% width on left column */
    width: 40%;
    min-width: 180px;
    max-width: 250px;
    height: auto;
    min-height: 100%;
    aspect-ratio: auto; /* Allow image to fill full vertical height of the card */
    overflow: hidden;
    position: relative;
    background: #0E1013;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0px !important;
    margin-bottom: 0;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.team-portrait-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center; /* CRITICAL: object-top anchors heads and hair clearly */
    filter: grayscale(100%) contrast(105%);
    transition: filter 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: block;
}

/* Placeholder Portrait Framing */
.team-portrait-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    background: radial-gradient(circle at center, rgba(30, 34, 42, 0.9) 0%, rgba(14, 16, 19, 0.98) 100%);
    border: none;
    color: rgba(255, 255, 255, 0.45);
    transition: color 0.4s ease;
}

.team-portrait-placeholder i {
    font-size: 2.8rem;
    margin-bottom: 0.8rem;
    opacity: 0.5;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.team-card:hover .team-portrait-wrapper {
    border-right-color: rgba(255, 255, 255, 0.2);
}

.team-card:hover .team-portrait-img {
    filter: grayscale(0%);
    transform: scale(1.04);
}

.team-card:hover .team-portrait-placeholder {
    color: rgba(255, 255, 255, 0.85);
}

.team-card:hover .team-portrait-placeholder i {
    opacity: 0.85;
    transform: scale(1.08);
}

/* 5. Right Column: Content & Bio Area */
.team-member-info {
    flex: 1 1 60%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.6rem 1.6rem 1.4rem 1.6rem;
    overflow: hidden;
}

.team-member-name {
    font-size: clamp(1.35rem, 1.8vw, 1.65rem);
    letter-spacing: 0.08em;
    color: #ffffff;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.team-member-role {
    font-family: 'Cinzel', serif;
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #c9a96d; /* Forge Gold Accent */
    margin-bottom: 0.85rem;
    line-height: 1.45;
    font-weight: 600;
}

.team-member-bio {
    font-family: 'Playfair Display', serif;
    font-size: 0.88rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.team-member-bio p {
    font-size: 0.88rem;
    line-height: 1.65;
    margin-bottom: 0.6rem;
    opacity: 0.88;
}

.team-member-bio p:last-child {
    margin-bottom: 0;
}

/* Optional Skill Tags */
.team-skill-tags {
    list-style: none;
    padding: 0;
    margin: 0.6rem 0 0.3rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.team-skill-tags li {
    font-family: 'Cinzel', serif;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.75);
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.team-skill-tags li::before {
    content: '•';
    color: #c9a96d;
    font-size: 0.85rem;
}

/* 6. Social / Connector Icons Row */
.team-social-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: auto;
}

.team-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0px !important; /* Strict sharp rectangle icon buttons */
    color: #ffffff;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.team-social-btn:hover {
    background: #ffffff;
    color: #0E1013;
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.35);
}

.team-social-btn svg,
.team-social-btn i {
    color: inherit;
    transition: color 0.25s ease;
}

.team-social-label {
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-left: auto;
}

/* 7. Bottom Call to Action Card */
.team-cta-section {
    padding: 2.5rem 0 4.5rem 0 !important;
}

.team-cta-card {
    background: #16181D;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0px !important;
    padding: 3.5rem 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5);
}

.team-cta-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(201, 169, 109, 0.8), transparent);
}

.team-cta-heading {
    font-size: clamp(1.8rem, 3.2vw, 2.5rem);
    letter-spacing: 0.12em;
    color: #ffffff;
    margin-bottom: 1rem;
    line-height: 1.25;
}

.team-cta-subtext {
    font-size: 1.05rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.82);
    max-width: 740px;
    margin: 0 auto 2.2rem auto;
}

.team-cta-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    width: 100%;
}

@media (min-width: 640px) {
    .team-cta-actions {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 1.5rem;
    }
}

/* Master Button Styling (Strict 2px Solid White Border, Rounded-none, Inversion) */
.btn-sharp-primary,
.btn-sharp-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    background: transparent;
    color: #ffffff;
    padding: 0.95rem 2.4rem;
    min-height: 48px;
    border-radius: 0px !important;
    border: 2px solid #ffffff;
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    will-change: transform, box-shadow;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
                color 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-sharp-primary::after,
.btn-sharp-secondary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -160%;
    width: 80%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.5) 50%,
        transparent 100%
    );
    transform: skewX(-25deg);
    pointer-events: none;
    z-index: 5;
    transition: none;
}

.btn-sharp-primary:hover::after,
.btn-sharp-secondary:hover::after {
    left: 180%;
    transition: left 0.75s ease-in-out;
}

.btn-sharp-primary:hover,
.btn-sharp-secondary:hover {
    background: #ffffff;
    color: #0E1013;
    border-color: #ffffff;
    box-shadow: 0 0 35px rgba(255, 255, 255, 0.35), 0 15px 30px rgba(0, 0, 0, 0.7);
    transform: translateY(-2px);
}

.btn-sharp-primary svg,
.btn-sharp-primary i,
.btn-sharp-secondary svg,
.btn-sharp-secondary i {
    color: inherit;
    transition: color 0.25s ease;
}

/* 8. Responsive Breakpoints */
@media (max-width: 1024px) {
    .team-card {
        flex: 0 0 calc(70% - 0.9rem);
        min-width: 380px;
    }

    .team-nav-arrow {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .team-nav-prev {
        left: -14px;
    }

    .team-nav-next {
        right: -14px;
    }
}

/* 8. Desktop vs Mobile Display Controllers */
.team-desktop-view {
    display: block;
    width: 100%;
}

.team-mobile-view {
    display: none;
    width: 100%;
}

@media (max-width: 768px) {
    .team-desktop-view {
        display: none !important;
    }

    .team-mobile-view {
        display: flex !important;
        flex-direction: column;
        gap: 1.75rem; /* space-y-6 equivalent */
        width: 100%;
        margin-top: 0.75rem;
    }

    .team-hero-section {
        padding: 5.5rem 0 1.5rem 0 !important;
    }

    /* 9. Dedicated Mobile Card Design (Self-Contained & Proportional) */
    .team-mobile-card {
        background: #16181D;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 16px !important; /* rounded-2xl smooth modern dark stone card */
        padding: 1.75rem 1.25rem 1.5rem 1.25rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        position: relative;
        overflow: hidden;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
        transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    }

    .team-mobile-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 2px;
        background: linear-gradient(90deg, transparent, rgba(201, 169, 109, 0.7), transparent);
        opacity: 0.8;
    }

    /* Centered Gilded/Framed Portrait Badge */
    .team-mobile-portrait-wrapper {
        width: 130px;
        height: 130px;
        min-width: 130px;
        min-height: 130px;
        border-radius: 50% !important; /* Gilded Round Badge format */
        overflow: hidden;
        margin: 0 auto 1.25rem auto;
        border: 2px solid rgba(201, 169, 109, 0.75); /* 2px gilded accent border */
        box-shadow: 0 0 18px rgba(201, 169, 109, 0.2), 0 8px 24px rgba(0, 0, 0, 0.7);
        position: relative;
        background: #0E1013;
    }

    .team-mobile-portrait-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: top center;
        display: block;
        filter: grayscale(15%) contrast(105%);
    }

    /* Calibrated Headshot Alignments for Mobile View */
    .team-mobile-avatar-ayush {
        object-fit: cover !important;
        object-position: center 72% !important;
        transform: scale(1.35) !important;
        transform-origin: center center !important;
    }

    .team-mobile-avatar-karthik {
        object-fit: cover !important;
        object-position: center 30% !important;
        transform: scale(1.15) !important;
        transform-origin: center top !important;
    }

    .team-mobile-avatar-yash {
        object-position: center 20% !important;
    }

    .team-mobile-placeholder-wrap {
        border-radius: 50% !important;
        background: radial-gradient(circle at center, rgba(30, 34, 42, 0.95) 0%, rgba(14, 16, 19, 1) 100%);
    }

    .team-mobile-placeholder {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: #c9a96d;
        padding: 0.5rem;
    }

    .team-mobile-placeholder i {
        font-size: 2.2rem;
        margin-bottom: 0.35rem;
        opacity: 0.8;
    }

    /* Mobile Content Stack */
    .team-mobile-content {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .team-mobile-name {
        font-size: 1.45rem;
        letter-spacing: 0.08em;
        color: #ffffff;
        margin-bottom: 0.35rem;
        line-height: 1.2;
    }

    .team-mobile-role {
        font-family: 'Cinzel', serif;
        font-size: 0.68rem;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        color: #d4af37; /* Heraldic / Gold accent */
        font-weight: 600;
        margin-bottom: 0.85rem;
        line-height: 1.4;
        max-width: 320px;
    }

    .team-mobile-bio {
        font-family: 'Playfair Display', serif;
        font-size: 0.88rem;
        line-height: 1.6;
        color: rgba(255, 255, 255, 0.78);
        margin-bottom: 1.15rem;
        max-width: 380px;
        text-align: center;
    }

    .team-mobile-bio p {
        font-size: 0.88rem;
        line-height: 1.6;
        margin-bottom: 0;
    }

    .team-mobile-social-row {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
        flex-wrap: wrap;
        width: 100%;
        padding-top: 0.4rem;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }

    .team-mobile-social-badge {
        font-family: 'Cinzel', serif;
        font-size: 0.62rem;
        letter-spacing: 0.18em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.45);
        display: inline-block;
        margin-left: 0.25rem;
    }

    .team-cta-card {
        padding: 2.2rem 1.25rem;
        border-radius: 16px !important;
    }

    .team-cta-actions {
        flex-direction: column;
        width: 100%;
    }

    .team-cta-actions .btn-sharp-primary,
    .team-cta-actions .btn-sharp-secondary {
        width: 100%;
        text-align: center;
    }
}

