/* =========================================================
   MUNKATÁRSAINK — team hub page
   ========================================================= */
.fm-team {
    --fm-green: #799c86;
    --fm-green-dark: #5a7a66;
    --fm-green-tint: rgba(121, 156, 134, 0.10);
    --fm-green-tint-strong: rgba(121, 156, 134, 0.18);
    --fm-cream: #f8f5ee;
    --fm-ink: #2c3a33;
    --fm-ink-soft: #5d6b63;
    --fm-line: rgba(121, 156, 134, 0.22);

    font-family: 'Montserrat', sans-serif;
    color: var(--fm-ink);
    background: #fff;
    overflow: hidden;
}

.fm-team * { box-sizing: border-box; }

.fm-team__container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 28px;
}

/* ─────── HERO ─────── */
.fm-team__hero {
    position: relative;
    padding: 110px 0 70px;
    text-align: center;
    background: #fff;
    overflow: hidden;
}
.fm-team__hero::before,
.fm-team__hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: var(--fm-green-tint);
    z-index: 0;
    pointer-events: none;
}
.fm-team__hero::before {
    width: 420px; height: 420px;
    top: -180px; left: -120px;
    filter: blur(20px);
}
.fm-team__hero::after {
    width: 320px; height: 320px;
    bottom: -160px; right: -80px;
    filter: blur(20px);
}

.fm-team__hero > * { position: relative; z-index: 1; }

.fm-team__hero-eyebrow {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--fm-green-dark);
    margin-bottom: 18px;
}

.fm-team__hero-title {
    font-family: 'Marcellus', serif;
    font-size: clamp(42px, 6vw, 64px);
    font-weight: 400;
    line-height: 1.05;
    color: var(--fm-ink);
    margin: 0 0 22px;
    letter-spacing: -0.01em;
}

.fm-team__hero-lead {
    max-width: 680px;
    margin: 0 auto;
    font-size: 17px;
    line-height: 1.65;
    color: var(--fm-ink-soft);
}

.fm-team__hero-divider {
    width: 56px;
    height: 2px;
    background: var(--fm-green);
    margin: 36px auto 0;
    border-radius: 2px;
}

/* ─────── GRID ─────── */
.fm-team__grid-wrap {
    padding: 80px 0 100px;
    background: #fff;
}

.fm-team__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 36px;
}

@media (max-width: 860px) {
    .fm-team__grid { grid-template-columns: 1fr; gap: 28px; }
    .fm-team__hero { padding: 80px 0 50px; }
    .fm-team__grid-wrap { padding: 50px 0 80px; }
}

/* ─────── CARD ─────── */
.fm-team-card {
    position: relative;
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(60, 80, 70, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.10);
    transition: transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s ease, border-color 0.3s ease;
    opacity: 0;
    transform: translateY(24px);
    animation: fmFadeUp 0.7s cubic-bezier(.2,.8,.2,1) forwards;
    animation-delay: calc(var(--card-index, 0) * 120ms + 80ms);
}

.fm-team-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("../img/widget-pattern-wave.svg");
    background-size: 130% 100%;
    background-position: -10% 50%;
    background-repeat: no-repeat;
    opacity: 0.7;
    pointer-events: none;
    z-index: 0;
    -webkit-mask-image: linear-gradient(135deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0.8) 50%, rgba(0,0,0,0.4) 80%, transparent 100%);
    mask-image: linear-gradient(135deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0.8) 50%, rgba(0,0,0,0.4) 80%, transparent 100%);
    transition: opacity 0.4s ease;
}

.fm-team-card:hover::before {
    opacity: 0.85;
}

@keyframes fmFadeUp {
    to { opacity: 1; transform: translateY(0); }
}

.fm-team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 22px 48px rgba(60, 80, 70, 0.14);
    border-color: rgba(0, 0, 0, 0.18);
}

.fm-team-card__link {
    display: block;
    text-decoration: none !important;
    color: inherit;
    position: relative;
    z-index: 1;
}
.fm-team-card__link:focus-visible {
    outline: 3px solid var(--fm-green);
    outline-offset: 4px;
    border-radius: 22px;
}

/* photo block — circular avatar */
.fm-team-card__photo-wrap {
    position: relative;
    padding: 56px 24px 32px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.fm-team-card__photo-circle {
    position: relative;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    box-shadow:
        0 30px 60px -18px rgba(60, 80, 70, 0.28),
        0 12px 24px -10px rgba(60, 80, 70, 0.12),
        inset 0 0 0 1px rgba(121, 156, 134, 0.14);
    transition: transform 0.5s cubic-bezier(.2,.8,.2,1), box-shadow 0.4s ease;
}

.fm-team-card__photo-circle::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 1px dashed rgba(121, 156, 134, 0.28);
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.5s ease;
    pointer-events: none;
}

.fm-team-card:hover .fm-team-card__photo-circle {
    transform: translateY(-6px) scale(1.03);
    box-shadow:
        0 40px 70px -18px rgba(60, 80, 70, 0.34),
        0 16px 30px -10px rgba(60, 80, 70, 0.16),
        inset 0 0 0 1px rgba(121, 156, 134, 0.22);
}
.fm-team-card:hover .fm-team-card__photo-circle::after {
    opacity: 1;
    transform: scale(1.04);
}

.fm-team-card__photo {
    position: absolute;
    top: var(--photo-top, 4%);
    left: 50%;
    transform: translateX(-50%);
    height: var(--photo-scale, 120%);
    width: auto;
    max-width: none;
    object-fit: contain;
    object-position: top center;
    transition: transform 0.6s cubic-bezier(.2,.8,.2,1);
}
.fm-team-card:hover .fm-team-card__photo {
    transform: translateX(-50%) scale(1.04);
}

@media (max-width: 860px) {
    .fm-team-card__photo-wrap { padding: 44px 20px 24px; }
    .fm-team-card__photo-circle { width: 240px; height: 240px; }
}

/* body */
.fm-team-card__body {
    padding: 32px 32px 36px;
    background: #fff;
    position: relative;
}

.fm-team-card__name {
    font-family: 'Marcellus', serif;
    font-size: 30px;
    font-weight: 400;
    line-height: 1.15;
    color: var(--fm-ink);
    margin: 0 0 8px;
}

.fm-team-card__role {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--fm-green-dark);
    margin-bottom: 24px;
}

.fm-team-card__tagline {
    font-style: italic;
    font-size: 16px;
    line-height: 1.55;
    color: var(--fm-ink);
    margin: 0 0 14px;
    padding-left: 14px;
    border-left: 3px solid var(--fm-green);
}

.fm-team-card__highlight {
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--fm-ink-soft);
    margin: 0 0 22px;
}

.fm-team-card__tags {
    list-style: none;
    margin: 0 0 26px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.fm-team-card__tags li {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--fm-green-dark);
    background: var(--fm-green-tint);
    padding: 6px 12px;
    border-radius: 999px;
    letter-spacing: 0.01em;
}

.fm-team-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--fm-green-dark);
    text-transform: uppercase;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.25s ease, color 0.25s ease, gap 0.3s ease;
}
.fm-team-card:hover .fm-team-card__cta {
    border-bottom-color: var(--fm-green);
    gap: 14px;
}
.fm-team-card__arrow {
    transition: transform 0.3s ease;
}
.fm-team-card:hover .fm-team-card__arrow {
    transform: translateX(4px);
}

/* ─────── CLOSING ─────── */
.fm-team__closing {
    background: linear-gradient(135deg, var(--fm-green) 0%, var(--fm-green-dark) 100%);
    padding: 72px 0;
    color: #fff;
    text-align: center;
}
.fm-team__closing-title {
    font-family: 'Marcellus', serif;
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 400;
    margin: 0 0 16px;
    color: #fff;
}
.fm-team__closing-lead {
    max-width: 580px;
    margin: 0 auto 30px;
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.92);
}
.fm-team__closing-btn {
    display: inline-block;
    background: #fff;
    color: var(--fm-green-dark);
    padding: 14px 32px;
    border-radius: 999px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.fm-team__closing-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
    color: var(--fm-green-dark);
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .fm-team-card,
    .fm-team-card__photo,
    .fm-team-card__photo-bg,
    .fm-team-card__cta,
    .fm-team-card__arrow {
        animation: none !important;
        transition: none !important;
    }
    .fm-team-card { opacity: 1; transform: none; }
}
