/**
 * Team Page Styles
 * Cube Rebar Detailing & Estimation Services
 * 
 * Premium, Modern, Creative Design
 * Note: This file extends style.css - uses existing variables and base styles
 */

/* =========================================
   TEAM HERO SECTION
   Uses same classes as index.php hero
   - Inherits all styles from .hero in style.css
   - No additional overrides needed
   ========================================= */

/* =========================================
   TEAM STATS STRIP
   ========================================= */
.team-stats-strip {
    background: #fff;
    padding: 40px 0;
    position: relative;
    z-index: 5;
    margin-top: -40px;
}

.stats-strip-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: 30px 50px;
    background: linear-gradient(135deg, #f8fafc 0%, #fff 100%);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(196, 30, 58, 0.1);
    border-radius: 16px;
    color: var(--color-secondary);
    transition: all 0.3s ease;
}

.stat-icon svg {
    width: 28px;
    height: 28px;
}

.stat-item:hover .stat-icon {
    background: var(--color-secondary);
    color: #fff;
    transform: scale(1.1);
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 50px;
    background: rgba(0, 0, 0, 0.1);
}

/* =========================================
   TEAM INTRODUCTION SECTION
   ========================================= */
.team-intro-section {
    background: #fff;
    padding: 100px 0;
}

.team-intro-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.team-intro-content {
    padding-right: 40px;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(196, 30, 58, 0.1);
    border-radius: 50px;
    color: var(--color-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.section-label-light {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.team-intro-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1.2;
    margin-bottom: 24px;
}

.team-intro-title span {
    color: var(--color-secondary);
}

.team-intro-text {
    font-size: 1.05rem;
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.team-intro-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 30px;
}

.intro-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    color: var(--color-text);
    font-weight: 500;
}

.intro-feature svg {
    color: var(--color-secondary);
    flex-shrink: 0;
}

/* Team Intro Visual */
.team-intro-visual {
    position: relative;
}

.intro-image-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    /*grid-template-rows: repeat(2, 1fr);*/
    gap: 20px;
    position: relative;
    z-index: 2;
}

.intro-image-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.intro-image-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
}

.intro-image-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.intro-image-card:hover img {
    transform: scale(1.1);
}

.intro-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.intro-image-card:hover .intro-card-overlay {
    opacity: 1;
    transform: translateY(0);
}

.intro-card-name {
    display: block;
    font-size: 1rem;
    font-weight: 700;
}

.intro-card-role {
    display: block;
    font-size: 0.8rem;
    opacity: 0.8;
}

.intro-card-1 {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.intro-card-1 img {
    height: 100%;
    min-height: 420px;
}

.intro-card-2 {
    grid-column: 2;
    grid-row: 1;
}

.intro-card-3 {
    grid-column: 2;
    grid-row: 2;
}

/* Decorative Elements */
.intro-deco {
    position: absolute;
    border-radius: 50%;
    background: var(--color-secondary);
    opacity: 0.1;
}

.intro-deco-1 {
    width: 200px;
    height: 200px;
    top: -50px;
    right: -50px;
}

.intro-deco-2 {
    width: 100px;
    height: 100px;
    bottom: -30px;
    left: -30px;
}

/* =========================================
   TEAM MEMBERS SECTION
   ========================================= */
.team-members-section {
    position: relative;
    background: var(--color-primary);
    padding: 150px 0;
    overflow: hidden;
}

.team-members-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.team-gradient-1 {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(196, 30, 58, 0.3) 0%, transparent 70%);
    filter: blur(80px);
}

.team-gradient-2 {
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
    filter: blur(80px);
}

.team-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
}

.team-members-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

.team-members-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
}

.team-members-title span {
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.team-members-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 500px;
    margin: 0 auto;
}

/* Team Members Grid */
.team-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    position: relative;
    z-index: 2;
}

/* Team Card - 3D Flip Effect */
.team-card {
    perspective: 1000px;
    height: 380px;
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: calc(var(--card-index) * 0.1s);
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Inner wrapper - rotates on hover */
.team-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.team-card:hover .team-card-inner,
.team-card.flipped .team-card-inner {
    transform: rotateY(180deg);
}

/* Shared face styles */
.team-card-front,
.team-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
    background: #1e1e2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 36px 24px 24px;
    text-align: center;
}

/* Back face is pre-rotated */
.team-card-back {
    transform: rotateY(180deg);
    justify-content: center;
}

/* Top Accent Bar */
.team-card-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 20px 20px 0 0;
}

/* Front: Initial Avatar */
.team-card-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    transition: transform 0.3s ease;
}

.team-card-avatar span {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}

/* Department Badge */
.team-card-dept {
    display: inline-block;
    padding: 4px 14px;
    border: 1px solid;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
}

/* Name */
.team-card-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

/* Role */
.team-card-role {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    margin-bottom: 14px;
}

/* Contact Button */
.team-card-contact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 22px;
    border-radius: 50px;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.team-card-contact:hover {
    filter: brightness(1.15);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Flip Hint */
.team-card-flip-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    margin-top: auto;
    transition: color 0.3s ease;
}

.team-card:hover .team-card-flip-hint {
    color: rgba(255, 255, 255, 0.7);
}

/* ---- BACK SIDE ---- */
.team-card-back-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.team-card-back-avatar span {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1;
}

.team-card-back-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

.team-card-back-divider {
    width: 40px;
    height: 3px;
    border-radius: 2px;
    margin-bottom: 14px;
    opacity: 0.7;
}

/* Bio - full text on back */
.team-card-bio {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.65;
    margin: 0 0 16px;
    flex-grow: 1;
}

/* =========================================
   VALUES SECTION
   ========================================= */
.values-section {
    background: #f8fafc;
    padding: 100px 0;
}

.values-header {
    text-align: center;
    margin-bottom: 60px;
}

.values-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 16px;
}

.values-title span {
    color: var(--color-secondary);
}

.values-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.value-card {
    background: #fff;
    padding: 40px 30px;
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: calc(var(--value-index) * 0.1s);
    opacity: 0;
}

.value-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(196, 30, 58, 0.15);
    border-color: var(--color-secondary);
}

.value-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(196, 30, 58, 0.1);
    border-radius: 20px;
    color: var(--color-secondary);
    transition: all 0.3s ease;
}

.value-icon svg {
    width: 40px;
    height: 40px;
}

.value-card:hover .value-icon {
    background: var(--color-secondary);
    color: #fff;
    transform: scale(1.1) rotate(-5deg);
}

.value-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.value-description {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* =========================================
   PROCESS SECTION
   ========================================= */
.team-process-section {
    position: relative;
    background: var(--color-primary);
    padding: 150px 0;
    overflow: hidden;
}

.process-bg {
    position: absolute;
    inset: 0;
}

.process-gradient {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(196, 30, 58, 0.15) 0%, transparent 60%);
    filter: blur(60px);
}

.process-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
}

.process-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

.process-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
}

.process-title span {
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.process-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 500px;
    margin: 0 auto;
}

/* Process Flow Layout - Snake/Zigzag Pattern */
.process-flow {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: relative;
    z-index: 2;
}

/* Each row: 3 steps + 2 connectors in a horizontal line */
.process-row {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0;
}

.process-step {
    position: relative;
    text-align: center;
    padding: 28px 16px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 0;
}

.process-step:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    border-color: rgba(196, 30, 58, 0.3);
    box-shadow: 0 10px 30px rgba(196, 30, 58, 0.15);
}

.process-step-number {
    width: 50px;
    height: 50px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-secondary);
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 8px 25px rgba(196, 30, 58, 0.4);
    position: relative;
    z-index: 2;
}

.process-step-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.process-step-desc {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    margin: 0;
}

/* Horizontal Connector (right-pointing arrow) */
.process-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    flex-shrink: 0;
    align-self: center;
}

/* Solid line instead of dashed */
.connector-line {
    width: 22px;
    height: 2px;
    background: rgba(196, 30, 58, 0.7);
    position: relative;
    animation: connectorPulse 2s ease-in-out infinite;
}

/* Right-pointing arrow */
.connector-arrow {
    color: var(--color-secondary);
    display: flex;
    align-items: center;
    animation: connectorArrowBounce 1.5s ease-in-out infinite;
}

/* Left-pointing arrow (for reversed row) */
.connector-arrow-left {
    color: var(--color-secondary);
    display: flex;
    align-items: center;
    animation: connectorArrowBounceLeft 1.5s ease-in-out infinite;
}

/* Vertical Row Connector (down arrow between rows) */
.process-row-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 0;
}

.connector-down-right {
    align-self: flex-end;
    margin-right: 15%;
}

.connector-down-left {
    align-self: flex-start;
    margin-left: 15%;
}

.connector-line-vertical {
    width: 2px;
    height: 20px;
    background: rgba(196, 30, 58, 0.7);
    animation: connectorPulse 2s ease-in-out infinite;
}

.connector-arrow-down {
    color: var(--color-secondary);
    display: flex;
    align-items: center;
    animation: connectorArrowBounceDown 1.5s ease-in-out infinite;
}

/* Animations */
@keyframes connectorPulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

@keyframes connectorArrowBounce {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(3px);
    }
}

@keyframes connectorArrowBounceLeft {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(-3px);
    }
}

@keyframes connectorArrowBounceDown {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(3px);
    }
}

/* =========================================
   RESPONSIVE STYLES
   ========================================= */
@media (max-width: 1200px) {
    .team-members-grid {
        grid-template-columns: repeat(3, 1fr);
    }


}

@media (max-width: 991px) {
    .team-intro-wrapper {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .team-intro-content {
        padding-right: 0;
        text-align: center;
    }

    .team-intro-features {
        align-items: center;
    }

    .intro-image-grid {
        max-width: 500px;
        margin: 0 auto;
    }

    .stats-strip-wrapper {
        flex-wrap: wrap;
        gap: 30px;
        padding: 30px;
    }

    .stat-divider {
        display: none;
    }

    .team-members-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .team-stats-strip {
        margin-top: 0;
    }

    .stats-strip-wrapper {
        flex-direction: column;
        text-align: center;
    }

    .stat-item {
        flex-direction: column;
        text-align: center;
    }

    .intro-image-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .intro-card-1 {
        grid-column: 1;
        grid-row: 1;
    }

    .intro-card-1 img {
        height: 250px;
        min-height: auto;
    }

    .team-members-grid {
        grid-template-columns: 1fr;
        max-width: 350px;
        margin: 0 auto;
    }

    .process-row {
        flex-direction: column;
        align-items: center;
    }

    .process-step {
        width: 100%;
        max-width: 400px;
    }

    .process-connector {
        transform: rotate(90deg);
        width: 40px;
        margin: 4px 0;
    }

    .process-row-connector {
        display: none;
    }

    .values-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .team-intro-title {
        font-size: 1.75rem;
    }

    .team-members-title,
    .values-title,
    .process-title {
        font-size: 1.75rem;
    }

    .value-card {
        padding: 30px 20px;
    }

    .value-icon {
        width: 60px;
        height: 60px;
    }

    .value-icon svg {
        width: 30px;
        height: 30px;
    }
}