/* =====================================================
   TEAM PAGE — категория ID 2
   ===================================================== */

.team-layout {
    width: 100%;
}

.team-page,
.player-page {
    --team-red: #c8102e;
    --team-red-dark: #8d071d;
    --team-black: #111114;
    --team-gold: #ffd23f;
    --team-muted: #777780;
    --team-line: #e7e7ea;
    color: var(--team-black);
}

.team-page *,
.player-page * {
    box-sizing: border-box;
}

/* HERO */
.team-hero {
    position: relative;
    min-height: 420px;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr);
    overflow: hidden;
    margin: 0 0 54px;
    border-radius: 28px;
    background:
        radial-gradient(circle at 76% 24%, rgba(255, 210, 63, .22), transparent 25%),
        linear-gradient(135deg, #92091f 0%, #c8102e 58%, #e01b38 100%);
    box-shadow: 0 28px 70px rgba(100, 0, 20, .2);
}

.team-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        118deg,
        transparent 0,
        transparent 74px,
        rgba(255,255,255,.035) 75px,
        rgba(255,255,255,.035) 76px
    );
    pointer-events: none;
}

.team-hero::after {
    content: "М";
    position: absolute;
    right: 27%;
    bottom: -170px;
    color: rgba(255,255,255,.045);
    font-size: clamp(380px, 38vw, 620px);
    font-weight: 1000;
    line-height: 1;
    pointer-events: none;
}

.team-hero__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 64px;
}

.team-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 54px;
    color: rgba(255,255,255,.72);
    font-size: 13px;
    font-weight: 700;
}

.team-breadcrumbs a {
    color: inherit;
    text-decoration: none;
}

.team-breadcrumbs a:hover {
    color: var(--team-gold);
}

.team-kicker,
.team-section-label {
    display: block;
    color: var(--team-gold);
    font-size: 12px;
    font-weight: 1000;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.team-hero h1 {
    max-width: 720px;
    margin: 13px 0 18px;
    color: #fff;
    font-size: clamp(56px, 7vw, 104px);
    font-weight: 1000;
    line-height: .87;
    letter-spacing: -.065em;
    text-transform: uppercase;
}

.team-hero h1 span {
    display: block;
    margin-top: 12px;
    color: var(--team-gold);
    font-size: .43em;
    letter-spacing: -.035em;
}

.team-hero__content > p {
    max-width: 570px;
    margin: 0;
    color: rgba(255,255,255,.82);
    font-size: 17px;
    line-height: 1.65;
}

.team-hero__visual {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
    padding: 40px;
    border-left: 1px solid rgba(255,255,255,.13);
    background: rgba(0,0,0,.1);
}

.team-hero__visual > img {
    width: min(270px, 73%);
    height: auto;
    display: block;
    filter: drop-shadow(0 25px 35px rgba(0,0,0,.35));
    transform: rotate(3deg);
}

.team-hero__number {
    position: absolute;
    left: 26px;
    bottom: 26px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 150px;
    padding: 13px 16px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 14px;
    background: rgba(15,4,8,.58);
    backdrop-filter: blur(12px);
}

.team-hero__number strong {
    color: #fff;
    font-size: 34px;
    font-weight: 1000;
    line-height: 1;
}

.team-hero__number span {
    color: rgba(255,255,255,.72);
    font-size: 10px;
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* ROSTER */
.team-roster {
    padding-bottom: 34px;
}

.team-roster__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 28px;
}

.team-roster__head h2 {
    margin: 8px 0 0;
    font-size: clamp(34px, 5vw, 58px);
    font-weight: 1000;
    line-height: .98;
    letter-spacing: -.05em;
}

.team-roster__head > p {
    max-width: 330px;
    margin: 0 0 5px;
    color: var(--team-muted);
    font-size: 14px;
    line-height: 1.55;
    text-align: right;
}

.team-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 32px;
    padding: 10px;
    border: 1px solid var(--team-line);
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15,15,20,.05);
}

.team-filter {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 16px;
    color: #505058;
    border: 0;
    border-radius: 11px;
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    transition: .2s ease;
}

.team-filter:hover {
    color: var(--team-red);
    background: #f7f7f8;
}

.team-filter.is-active {
    color: #fff;
    background: var(--team-red);
    box-shadow: 0 9px 22px rgba(200,16,46,.24);
}

.team-filter span {
    min-width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(0,0,0,.07);
    font-size: 10px;
}

.team-filter.is-active span {
    background: rgba(255,255,255,.18);
}

/* PLAYER CARDS */
.team-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.player-card {
    min-width: 0;
    animation: playerCardIn .45s both;
    animation-delay: calc(var(--player-card-index, 0) * 45ms);
}

.player-card[hidden] {
    display: none !important;
}

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

.player-card__link {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: inherit;
    border: 1px solid #e3e3e7;
    border-radius: 21px;
    background: #fff;
    text-decoration: none;
    box-shadow: 0 13px 35px rgba(15,15,20,.07);
    transition: .28s ease;
}

.player-card__link:hover {
    border-color: rgba(200,16,46,.35);
    transform: translateY(-7px);
    box-shadow: 0 25px 50px rgba(40,5,15,.16);
}

.player-card__media {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 30%, #d71d3c, transparent 31%),
        linear-gradient(145deg, #97091f, #c8102e 58%, #720315);
}

.player-card__media::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(135deg, transparent 0 46%, rgba(255,255,255,.065) 46% 47%, transparent 47% 100%);
    pointer-events: none;
}

.player-card__photo {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center top;
    transition: transform .5s cubic-bezier(.2,.8,.2,1);
}

.player-card__link:hover .player-card__photo {
    transform: scale(1.045);
}

.player-card__fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 52px;
}

.player-card__fallback img {
    width: 100%;
    max-width: 160px;
    height: auto;
    opacity: .92;
    filter: drop-shadow(0 20px 25px rgba(0,0,0,.25));
}

.player-card__shade {
    position: absolute;
    inset: auto 0 0;
    z-index: 2;
    height: 43%;
    background: linear-gradient(transparent, rgba(0,0,0,.58));
    pointer-events: none;
}

.player-card__number {
    position: absolute;
    left: 16px;
    bottom: 15px;
    z-index: 3;
    color: #fff;
    font-size: 55px;
    font-weight: 1000;
    line-height: .8;
    letter-spacing: -.07em;
    text-shadow: 0 8px 20px rgba(0,0,0,.25);
}

.player-card__open {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: #fff;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 50%;
    background: rgba(0,0,0,.32);
    font-size: 17px;
    font-weight: 900;
    backdrop-filter: blur(8px);
    transition: .2s ease;
}

.player-card__link:hover .player-card__open {
    color: var(--team-black);
    background: var(--team-gold);
    transform: rotate(8deg);
}

.player-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 20px 21px;
}

.player-card__position {
    margin-bottom: 8px;
    color: var(--team-red);
    font-size: 10px;
    font-weight: 1000;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.player-card h3 {
    margin: 0;
    font-size: 23px;
    font-weight: 1000;
    line-height: 1.02;
    letter-spacing: -.035em;
}

.player-card__details {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 21px;
    color: #77777f;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.player-card__details b {
    color: var(--team-red);
    font-size: 15px;
    transition: transform .2s ease;
}

.player-card__link:hover .player-card__details b {
    transform: translateX(4px);
}

/* EMPTY */
.team-empty {
    min-height: 310px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px;
    border: 1px dashed #d7d7dc;
    border-radius: 22px;
    text-align: center;
    background: #fff;
}

.team-empty[hidden] {
    display: none !important;
}

.team-empty img {
    width: 82px;
    margin-bottom: 20px;
    opacity: .2;
}

.team-empty strong {
    margin-bottom: 7px;
    font-size: 22px;
    font-weight: 1000;
}

.team-empty span {
    color: var(--team-muted);
    font-size: 14px;
}

/* PLAYER PROFILE */
.player-page {
    padding-bottom: 34px;
}

.player-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: #55555d;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .04em;
    text-decoration: none;
    text-transform: uppercase;
}

.player-back span {
    color: var(--team-red);
    font-size: 18px;
    transition: transform .2s ease;
}

.player-back:hover span {
    transform: translateX(-4px);
}

.player-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(330px, .84fr) minmax(0, 1.16fr);
    min-height: 610px;
    overflow: hidden;
    border-radius: 28px;
    background: var(--team-black);
    box-shadow: 0 30px 75px rgba(0,0,0,.18);
}

.player-hero__photo {
    position: relative;
    min-height: 610px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 30%, #e12544, transparent 32%),
        linear-gradient(145deg, #8e071c, #c8102e 58%, #700215);
}

.player-hero__photo > img {
    width: 100%;
    height: 100%;
    min-height: 610px;
    display: block;
    object-fit: cover;
    object-position: center top;
}

.player-hero__photo::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 36%;
    background: linear-gradient(transparent, rgba(0,0,0,.34));
}

.player-hero__fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 95px;
}

.player-hero__fallback img {
    width: 100%;
    max-width: 250px;
    opacity: .92;
    filter: drop-shadow(0 28px 40px rgba(0,0,0,.28));
}

.player-hero__shirt-number {
    position: absolute;
    left: 27px;
    bottom: 24px;
    z-index: 3;
    color: #fff;
    font-size: clamp(76px, 10vw, 145px);
    font-weight: 1000;
    line-height: .75;
    letter-spacing: -.08em;
    text-shadow: 0 15px 30px rgba(0,0,0,.25);
}

.player-hero__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 65px 68px;
}

.player-hero__club {
    margin-bottom: 42px;
    color: var(--team-gold);
    font-size: 11px;
    font-weight: 1000;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.player-hero__position {
    align-self: flex-start;
    margin-bottom: 14px;
    padding: 8px 11px;
    color: #fff;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 8px;
    background: rgba(255,255,255,.07);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.player-hero h1 {
    max-width: 720px;
    margin: 0 0 42px;
    color: #fff;
    font-size: clamp(52px, 6.3vw, 93px);
    font-weight: 1000;
    line-height: .88;
    letter-spacing: -.065em;
    text-transform: uppercase;
}

.player-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 14px;
    background: rgba(255,255,255,.1);
}

.player-fact {
    min-height: 83px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 17px 19px;
    background: rgba(17,17,20,.93);
}

.player-fact span {
    margin-bottom: 6px;
    color: rgba(255,255,255,.46);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.player-fact strong {
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.25;
}

.player-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0 54px;
}

.player-stats:empty {
    display: none;
}

.player-stat {
    min-height: 145px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 23px;
    border-radius: 18px;
    background: linear-gradient(145deg, #f8f8f9, #fff);
    box-shadow: inset 0 0 0 1px var(--team-line);
}

.player-stat strong {
    color: var(--team-red);
    font-size: 53px;
    font-weight: 1000;
    line-height: .85;
    letter-spacing: -.06em;
}

.player-stat span {
    margin-top: 12px;
    color: #55555c;
    font-size: 10px;
    font-weight: 1000;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.player-biography {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 55px;
    padding: 48px;
    border: 1px solid var(--team-line);
    border-radius: 24px;
    background: #fff;
}

.player-biography__head {
    align-self: start;
    position: sticky;
    top: 95px;
}

.player-biography__head span {
    color: var(--team-red);
    font-size: 10px;
    font-weight: 1000;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.player-biography__head h2 {
    margin: 8px 0 0;
    font-size: 43px;
    font-weight: 1000;
    line-height: .95;
    letter-spacing: -.05em;
}

.player-biography__content {
    min-width: 0;
    color: #33333a;
    font-size: 16px;
    line-height: 1.8;
}

.player-biography__content > :first-child { margin-top: 0; }
.player-biography__content > :last-child { margin-bottom: 0; }

.player-biography__content h2,
.player-biography__content h3 {
    margin: 1.5em 0 .65em;
    font-weight: 1000;
    line-height: 1.15;
    letter-spacing: -.025em;
}

.player-biography__content img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
}

.player-footer {
    display: flex;
    justify-content: center;
    padding-top: 28px;
}

.player-footer a {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 19px;
    color: #fff;
    border-radius: 12px;
    background: var(--team-red);
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: 0 12px 25px rgba(200,16,46,.22);
}

/* RESPONSIVE */
@media (max-width: 1120px) {
    .team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .team-hero__content { padding: 52px 48px; }
    .player-hero__content { padding: 55px 46px; }
}

@media (max-width: 900px) {
    .team-hero { grid-template-columns: 1fr; }
    .team-hero__visual {
        min-height: 290px;
        border-top: 1px solid rgba(255,255,255,.13);
        border-left: 0;
    }
    .team-hero__visual > img { width: min(210px, 50%); }
    .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .player-hero { grid-template-columns: 1fr; }
    .player-hero__photo,
    .player-hero__photo > img { min-height: 650px; max-height: 760px; }
    .player-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .player-biography { grid-template-columns: 1fr; gap: 26px; }
    .player-biography__head { position: static; }
}

@media (max-width: 650px) {
    .team-hero { margin-bottom: 38px; border-radius: 20px; }
    .team-hero__content { padding: 34px 25px 39px; }
    .team-breadcrumbs { margin-bottom: 40px; }
    .team-hero h1 { font-size: 52px; }
    .team-hero__content > p { font-size: 15px; }
    .team-hero__visual { min-height: 240px; padding: 28px; }
    .team-hero__number { left: 16px; bottom: 16px; }
    .team-roster__head { align-items: flex-start; flex-direction: column; gap: 13px; }
    .team-roster__head > p { text-align: left; }
    .team-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 8px;
        scrollbar-width: thin;
    }
    .team-filter { flex: 0 0 auto; }
    .team-grid { gap: 12px; }
    .player-card__body { padding: 16px; }
    .player-card h3 { font-size: 19px; }
    .player-card__number { left: 12px; bottom: 12px; font-size: 44px; }
    .player-card__open { top: 10px; right: 10px; width: 35px; height: 35px; }
    .player-hero { border-radius: 20px; }
    .player-hero__photo,
    .player-hero__photo > img { min-height: 500px; max-height: 620px; }
    .player-hero__fallback { padding: 80px; }
    .player-hero__content { padding: 39px 24px; }
    .player-hero__club { margin-bottom: 30px; }
    .player-hero h1 { margin-bottom: 31px; font-size: 49px; }
    .player-facts { grid-template-columns: 1fr; }
    .player-stats { margin-bottom: 38px; }
    .player-stat { min-height: 125px; padding: 18px; }
    .player-stat strong { font-size: 45px; }
    .player-biography { padding: 27px 23px; border-radius: 18px; }
}

@media (max-width: 430px) {
    .team-grid { grid-template-columns: 1fr; }
    .player-card__media { aspect-ratio: 4 / 4.7; }
    .player-card h3 { font-size: 24px; }
    .player-stats { gap: 8px; }
}

/* =====================================================
   COMPACT PLAYER PAGE — v1.2
   ===================================================== */

.team-layout {
    width: calc(100% - 40px) !important;
    max-width: 1180px !important;
    margin-right: auto !important;
    margin-left: auto !important;
}

.player-page {
    padding-top: 24px;
}

.player-back {
    margin-bottom: 16px;
}

.player-hero {
    grid-template-columns: minmax(330px, 43%) minmax(0, 57%);
    min-height: 470px;
    border-radius: 22px;
}

.player-hero__photo,
.player-hero__photo > img {
    min-height: 470px;
    max-height: 520px;
}

.player-hero__content {
    padding: 42px 46px;
}

.player-hero__club {
    margin-bottom: 28px;
}

.player-hero__position {
    margin-bottom: 12px;
}

.player-hero h1 {
    max-width: 620px;
    margin-bottom: 30px;
    font-size: clamp(42px, 4.7vw, 66px);
    line-height: .91;
}

.player-hero__shirt-number {
    left: 22px;
    bottom: 20px;
    font-size: clamp(66px, 7vw, 105px);
}

.player-fact {
    min-height: 70px;
    padding: 14px 16px;
}

.player-fact strong {
    font-size: 13px;
}

.player-stats {
    margin: 15px 0 38px;
}

.player-stat {
    min-height: 120px;
    padding: 19px;
}

.player-stat strong {
    font-size: 44px;
}

.player-biography {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 38px;
    padding: 36px 38px;
    border-radius: 20px;
}

.player-biography__head h2 {
    font-size: 36px;
}

.player-biography__content {
    font-size: 15px;
    line-height: 1.72;
}

/* Общая страница команды тоже становится компактнее */
.team-hero {
    min-height: 350px;
    margin-bottom: 42px;
    border-radius: 22px;
}

.team-hero__content {
    padding: 46px 50px;
}

.team-hero__visual {
    min-height: 350px;
}

.team-hero h1 {
    font-size: clamp(50px, 6vw, 82px);
}

@media (max-width: 900px) {
    .team-layout {
        width: calc(100% - 28px) !important;
    }

    .player-hero {
        grid-template-columns: 1fr;
    }

    .player-hero__photo,
    .player-hero__photo > img {
        min-height: 520px;
        max-height: 620px;
    }

    .player-biography {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .team-layout {
        width: calc(100% - 20px) !important;
    }

    .player-page {
        padding-top: 15px;
    }

    .player-hero__photo,
    .player-hero__photo > img {
        min-height: 430px;
        max-height: 520px;
    }

    .player-hero__content {
        padding: 32px 23px;
    }

    .player-hero h1 {
        font-size: 43px;
    }

    .player-biography {
        padding: 25px 22px;
    }
}
