/* SUNDE IBK – spillerkort v1. Lastes ETTER lagside.css.
   Alle bildefiler finnes i assets2/bilder/spillerkort/.
   Photoshop-lag: z1,z2,z3,spiller(z4),z5,z6,z7,z8,z9.
   Navn og draktnummer er HTML, ikke rasterbilder. */

.lagside-page .sunde-player-card {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    padding: 0;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid rgba(230,191,63,.18);
    border-radius: 16px;
    background: #0c0c0c;
    text-align: left;
    transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.lagside-page .sunde-player-card:hover {
    border-color: rgba(230,191,63,.75);
    box-shadow: 0 12px 32px rgba(0,0,0,.3);
    transform: translateY(-4px);
}
.lagside-page .sunde-player-card:focus-visible {
    outline: 2px solid var(--sunde-accent, #e6bf3f);
    outline-offset: 4px;
}
.spillerkort-layer {
    position: absolute;
    inset: 0;
    display: block;
    pointer-events: none;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}
.spillerkort-z1 { z-index: 1; background-image: url('../bilder/spillerkort/z1_v2_bakgrunn.webp'); }
/* Nummeret legges bak portrettet, over bakgrunnen. */
.spillerkort-number {
    position: absolute;
    z-index: 3;
    top: 6%; right: 5%;
    font: 900 clamp(48px, 6vw, 104px)/1 'Outfit', sans-serif;
    letter-spacing: -.065em;
    color: rgba(230,191,63,.065);
    pointer-events: none;
}
/* Overstyr den generelle img-regelen fra lagside.css. */
.lagside-page .sunde-player-card img.spillerkort-portrait {
    position: absolute;
    z-index: 4;
    inset: 0;
    display: block;
    width: 100%; height: 100%;
    object-fit: contain;
    object-position: center bottom;
    pointer-events: none;
}
.spillerkort-empty {
    position: absolute; z-index: 4; inset: 0;
    display: grid; place-items: center;
    color: rgba(255,255,255,.3);
    font-size: clamp(40px, 6vw, 90px);
}
.spillerkort-no-image::after {
    content: ''; position: absolute; z-index: 4; inset: 0;
    background: radial-gradient(ellipse at 50% 42%,rgba(230,191,63,.12),transparent 55%);
    pointer-events: none;
}
/* Gradient ligger over spilleren, men under splash og tekst. */
.spillerkort-gradient {
    position: absolute;
    z-index: 5;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent 54%, rgba(0,0,0,.12) 68%, rgba(0,0,0,.74) 100%);
}
/* Transparent splash, ett enkelt blend-lag. */
.spillerkort-z4 {
    z-index: 6;
    background-image: url('../bilder/spillerkort/z4_v2_spalsh_blend-lighten_opacity-100.webp');
    mix-blend-mode: lighten;
    opacity: .9;
}
.spillerkort-name {
    position: absolute;
    z-index: 11;
    bottom: 0; left: 0; right: 0;
    min-height: 25%;
    padding: 10% 6% 6%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 1px;
    background: none;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    letter-spacing: -.035em;
    text-shadow: 0 2px 9px rgba(0,0,0,.5);
    overflow-wrap: anywhere;
    pointer-events: none;
}
.spillerkort-firstname { display: block; font-size: clamp(12px,1.25vw,18px); font-weight: 600; line-height: 1.1; }
.spillerkort-lastname { display: block; font-size: clamp(17px,2vw,29px); font-weight: 900; line-height: 1.04; }
@media (max-width: 991.98px) {
    .spillerkort-firstname { font-size: clamp(12px,1.8vw,17px); }
    .spillerkort-lastname { font-size: clamp(16px,2.6vw,26px); }
    .spillerkort-number { font-size: clamp(45px,8vw,85px); }
}
@media (max-width: 767.98px) {
    .spillerkort-firstname { font-size: clamp(11px,2.8vw,15px); }
    .spillerkort-lastname { font-size: clamp(15px,4vw,23px); }
    .spillerkort-number { font-size: clamp(42px,12vw,70px); }
    .lagside-page .sunde-player-card:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) { .lagside-page .sunde-player-card { transition: none; } }

/* Sunde spillerprofil-modal, inspirert av den helhetlige Stavanger-layouten. */
.lagside-page .sunde-profile-modal .modal-dialog { max-width: 1120px; width: calc(100% - 32px); margin: 24px auto; }
.lagside-page .sunde-profile-modal .modal-content {
    position: relative; isolation: isolate; overflow: hidden;
    border: 1px solid rgba(230,191,63,.2); border-radius: 24px;
    background: radial-gradient(ellipse at 78% 42%, #57441a 0%, #292317 33%, #141414 75%);
    box-shadow: 0 25px 90px rgba(0,0,0,.65);
}
.sunde-profile-body { position: relative; display: grid; grid-template-columns: 53% 47%; min-height: 610px; }
.sunde-profile-info { position: relative; z-index: 3; align-self: center; padding: 70px 12px 70px 64px; min-width: 0; }
.sunde-profile-eyebrow { display: block; margin-bottom: 24px; color: #e6bf3f; font: 700 12px/1.3 'Outfit',sans-serif; text-transform: uppercase; letter-spacing: .15em; }
.sunde-profile-title { display: flex; flex-direction: column; margin: 0 0 32px; color: #fff; font: 900 clamp(38px,5vw,72px)/.99 'Outfit',sans-serif; letter-spacing: -.055em; overflow-wrap: anywhere; }
.sunde-profile-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.sunde-profile-tags > span { padding: 12px 15px; border: 1px solid rgba(255,255,255,.19); border-radius: 40px; background: rgba(255,255,255,.055); color: #c9c4b9; font: 700 11px/1.3 'Outfit',sans-serif; text-transform: uppercase; letter-spacing: .04em; }
.sunde-profile-tags strong { color: #fff; margin-left: 5px; font-size: 13px; }
.sunde-profile-description { margin-top: 32px; max-width: 460px; color: #ddd; font-size: 16px; }
.sunde-profile-art { position: relative; z-index: 1; min-height: 610px; overflow: hidden; }
.sunde-profile-big-number { position: absolute; z-index: 1; top: auto; bottom: -0.065em; left: auto; right: 0; display: block; text-align: right; white-space: nowrap; color: rgba(230,191,63,.065); font: 900 clamp(220px,31vw,440px)/1 'Outfit',sans-serif; letter-spacing: -.075em; pointer-events: none; }
.sunde-profile-art img { position: absolute; z-index: 2; display: block; width: 100%; height: 100%; inset: 0; object-fit: contain; object-position: center bottom; }
.lagside-page .sunde-profile-close { position: absolute; top: 24px; right: 24px; z-index: 5; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); background: rgba(0,0,0,.28); color: #fff; cursor: pointer; }
.lagside-page .sunde-profile-close:hover { background: rgba(230,191,63,.22); border-color: #e6bf3f; }
@media (max-width: 767.98px) {
    .lagside-page .sunde-profile-modal .modal-dialog { width: calc(100% - 20px); margin: 10px auto; }
    .lagside-page .sunde-profile-modal .modal-content { border-radius: 18px; }
    .sunde-profile-body { display: flex; flex-direction: column; min-height: 0; }
    .sunde-profile-info { align-self: stretch; padding: 60px 24px 12px; }
    .sunde-profile-eyebrow { margin-bottom: 14px; }
    .sunde-profile-title { font-size: clamp(33px,9vw,55px); margin-bottom: 20px; }
    .sunde-profile-description { margin-top: 20px; }
    .sunde-profile-art { min-height: 310px; height: 42vh; max-height: 460px; }
    .sunde-profile-big-number { top: auto; bottom: -0.065em; right: 0; left: auto; font-size: clamp(180px,48vw,300px); }
    .lagside-page .sunde-profile-close { top: 14px; right: 14px; }
}
@media (max-height: 650px) and (min-width: 768px) { .sunde-profile-body,.sunde-profile-art { min-height: 450px; } }

/* Lenke til full spillerprofil fra modal */
.sunde-profile-page-link { display:inline-flex; align-items:center; gap:12px; width:max-content; max-width:100%; margin-top:24px; padding:13px 19px; border-radius:12px; background:#e6bf3f; color:#171511 !important; font-weight:800; font-size:.84rem; text-decoration:none !important; transition:background .2s ease, transform .2s ease; }
.sunde-profile-page-link:hover,.sunde-profile-page-link:focus-visible { background:#f4d66b; transform:translateY(-2px); }
