/* ============================================
   CDHome – Csapatunk oldal
   ============================================ */

/* ============================================
   HERO SZEKCIÓ – háttérképes verzió (index.php stílus)
   ============================================ */
.team-hero {
    min-height: 680px;
    margin-bottom: 0;
}

.team-hero .hero-overlay {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.45) 60%,
        rgba(5, 2, 2, 0.82) 100%
    );
}

/* A hero alján a fade bézs/meleg háttérbe megy át, mint a stats szekció */
.team-hero.hero-with-image::after {
    background: linear-gradient(to top, #f5f0eb 0%, rgba(245, 240, 235, 0.55) 40%, transparent 100%) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    mask-image: none !important;
    -webkit-mask-image: none !important;
    height: 110px !important;
}

.team-hero-accent {
    background: linear-gradient(90deg, #f0d48a, #d4a853);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   STATISZTIKÁK SÁV
   ============================================ */
.team-stats {
    background: var(--bg-warm);
    padding: 3rem 0 5rem;
    position: relative;
    overflow: hidden;
    margin-top: -2px;
}

.team-stats::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 15% 50%, rgba(153,0,0,0.04) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 50%, rgba(212,168,83,0.06) 0%, transparent 55%);
    pointer-events: none;
}

/* Gradient átmenet a kártyák szekció felé (bézs → bg-light) */
.team-stats::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent, var(--bg-light));
    z-index: 2;
    pointer-events: none;
}

.team-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    position: relative;
    z-index: 1;
    padding-bottom: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem 1rem;
    border-right: 1px solid var(--border);
}

.stat-item:last-child {
    border-right: none;
}

.team-stat-number {
    font-family: 'Poppins', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ============================================
   CSAPAT KÁRTYÁK SZEKCIÓ
   ============================================ */
.team-grid-section {
    padding: 4rem 0 6rem;
    background: var(--bg-light);
}

.team-section-badge {
    display: inline-block;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(153,0,0,0.18);
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    margin-bottom: 1rem;
}

.team-section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    letter-spacing: -0.3px;
}

.team-section-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 580px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

/* ---- KÁRTYA ---- */
.team-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), box-shadow 0.4s cubic-bezier(0.4,0,0.2,1);
    background: #fff;
    border: 1px solid var(--border);
    height: 100%;
    display: flex;
    flex-direction: column;
    outline: none;
}

.team-card:hover,
.team-card:focus-visible {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.team-card:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* Fénykép konténer */
.team-card-photo {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: linear-gradient(135deg, #2d0000, #700000);
}

.team-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}

.team-card:hover .team-card-photo img {
    transform: scale(1.07);
}

/* Initial fallback */
.team-card-initial {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: 800;
    color: rgba(255,255,255,0.9);
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #4a0000 0%, #990000 60%, #b8860b 100%);
    letter-spacing: -0.03em;
    transition: transform 0.5s ease;
}

.team-card:hover .team-card-initial {
    transform: scale(1.06);
}

/* Overlay – blur glassmorphism */
.team-card-overlay {
    position: absolute;
    inset: 0;
    /* Enyhe sötét alap + erős blur */
    background: rgba(10, 0, 0, 0.45);
    backdrop-filter: blur(12px) saturate(1.4);
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1.2rem;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 0.38s cubic-bezier(0.4,0,0.2,1),
                transform 0.38s cubic-bezier(0.4,0,0.2,1);
    text-align: center;
    /* Vékony arany keret belül */
    box-shadow: inset 0 0 0 1px rgba(212,168,83,0.2);
}

.team-card:hover .team-card-overlay,
.team-card.overlay-active .team-card-overlay {
    opacity: 1;
    transform: scale(1);
}

.team-card-bio {
    color: rgba(255,255,255,0.92);
    font-size: 0.83rem;
    line-height: 1.65;
    margin-bottom: 1.1rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.team-card-detail-btn {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #d4a853, #b8860b);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.55rem 1.3rem;
    border-radius: 50px;
    letter-spacing: 0.03em;
    box-shadow: 0 4px 15px rgba(184,134,11,0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.team-card:hover .team-card-detail-btn {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(184,134,11,0.45);
}


/* Info sáv */
.team-card-info {
    padding: 1.2rem 1.2rem 1.3rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--bg-light);
    border-top: 1px solid var(--border-light);
}

.team-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.team-card-position {
    display: inline-block;
    background: var(--bg-warm);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.8rem;
    border-radius: 50px;
    letter-spacing: 0.03em;
    margin-bottom: 0.9rem;
    border: 1px solid var(--border);
}

.team-card-contacts {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    margin-top: auto;
}

.team-card-contacts a {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-warm);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 1px solid var(--border-light);
}

.team-card-contacts a:hover {
    background: linear-gradient(135deg, #990000, #4a0000);
    color: #fff;
    border-color: transparent;
    transform: scale(1.12);
    box-shadow: 0 4px 12px rgba(100,0,0,0.2);
}

/* ============================================
   AGENT MODAL
   ============================================ */
.team-modal-content {
    border: none;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(50,0,0,0.25);
}

.team-modal-header {
    position: relative;
    padding: 2.5rem 1.5rem 3.5rem;
    background: var(--gradient);
    text-align: center;
    overflow: hidden;
}

.team-modal-header-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 60%, rgba(255,255,255,0.06) 0%, transparent 50%),
        radial-gradient(circle at 85% 25%, rgba(212,168,83,0.10) 0%, transparent 50%);
    pointer-events: none;
}

.team-modal-avatar-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-modal-avatar-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.35);
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}

.team-modal-avatar-initial {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 3px solid rgba(255,255,255,0.35);
    color: #fff;
    font-size: 3rem;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.team-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 5;
    opacity: 0.75;
}

.team-modal-close:hover {
    opacity: 1;
}

.team-modal-body {
    padding: 1.8rem 2rem 2rem;
    text-align: center;
    background: var(--bg-light);
    margin-top: -1.5rem;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    position: relative;
    z-index: 2;
}

.team-modal-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.team-modal-position {
    display: inline-block;
    background: var(--bg-warm);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.3rem 1rem;
    border-radius: 50px;
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
    letter-spacing: 0.03em;
}

.team-modal-contacts {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
}

.team-modal-contact-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.65rem 1rem;
    background: var(--bg-warm);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    text-align: left;
}

.team-modal-contact-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #990000, #4a0000);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.team-modal-contact-row a {
    color: var(--text-body);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.team-modal-contact-row a:hover {
    color: var(--primary);
}

.team-modal-bio {
    text-align: left;
    background: var(--bg-warm);
    border-radius: var(--radius-sm);
    padding: 1rem 1.2rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-light);
    border-left: 3px solid var(--primary);
}

.team-modal-bio-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.6rem;
}

.team-modal-bio p {
    color: var(--text-body);
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0;
}

.team-modal-actions {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-modal-call {
    display: inline-flex;
    align-items: center;
    background: var(--gradient);
    color: #fff;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.7rem 1.4rem;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.btn-modal-call:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: #fff;
    background: var(--gradient-hover);
}

.btn-modal-email {
    display: inline-flex;
    align-items: center;
    background: var(--bg-warm);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.7rem 1.4rem;
    border-radius: 50px;
    text-decoration: none;
    border: 1.5px solid var(--border);
    transition: all 0.3s ease;
}

.btn-modal-email:hover {
    background: var(--gradient);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}


/* ============================================
   CTA SZEKCIÓ
   ============================================ */
.team-cta-section {
    position: relative;
    padding: 7rem 0 8rem;
    overflow: hidden;
    text-align: center;
}

.team-cta-bg {
    position: absolute;
    top: -15%;
    left: 0;
    right: 0;
    bottom: -15%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    will-change: transform;
}

.team-cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to bottom, var(--bg-light), transparent);
    z-index: 3;
    pointer-events: none;
}

.team-cta-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(45, 0, 0, 0.65) 0%,
        rgba(30, 0, 0, 0.70) 82%,
        #1a1a1a 100%
    );
    z-index: 1;
}

.team-cta-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.team-cta-subtitle {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.78);
    line-height: 1.7;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
}

.team-cta-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.btn-cta-primary {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #d4a853, #b8860b);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.9rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 8px 28px rgba(184,134,11,0.35);
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
}

.btn-cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 38px rgba(184,134,11,0.45);
    color: #fff;
}

.btn-cta-outline {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.4);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.88rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    backdrop-filter: blur(6px);
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
}

.btn-cta-outline:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.7);
    color: #fff;
    transform: translateY(-3px);
}

/* ============================================
   FADE-IN ANIMÁCIÓK
   ============================================ */
.fade-in-up {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes teamFadeDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes teamFadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes teamParticleFloat {
    0%, 100% { transform: translateY(0) translateX(0) scale(1); }
    25%       { transform: translateY(-30px) translateX(15px) scale(1.05); }
    50%       { transform: translateY(-15px) translateX(-20px) scale(0.97); }
    75%       { transform: translateY(-40px) translateX(10px) scale(1.03); }
}

/* ============================================
   RESZPONZÍV
   ============================================ */
@media (max-width: 991px) {
    .team-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
    }
    .stat-item {
        border-right: none;
        border-bottom: 1px solid rgba(212,168,83,0.12);
    }
    .stat-item:nth-child(odd) {
        border-right: 1px solid rgba(212,168,83,0.12);
    }
    .stat-item:nth-last-child(-n+2) {
        border-bottom: none;
    }
    .team-hero-content h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 575px) {
    .team-hero {
        min-height: 72vh;
        padding: 6rem 0 4rem;
    }
    .team-stats {
        padding-top: 2rem;
    }
    .team-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .team-stats-wave svg {
        height: 60px;
    }
    .team-stat-number {
        font-size: 2.2rem;
    }
    .team-modal-body {
        padding: 1.5rem;
    }
    .team-cta-btns {
        flex-direction: column;
        align-items: center;
    }
    .btn-cta-primary,
    .btn-cta-outline {
        width: 100%;
        justify-content: center;
    }
}
