/* =======================
	FÄRGER & ROOT-VARIABLER
======================= */
:root {
    --color-bg: #234B9A;
    --color-accent: #FCBD00;
    --color-accent2: #fff;
    --color-text: #000;
    --color-light: #FCBD00;
    --header-height: 9em;
}


/* ===================
	GRUNDLÄGGANDE RESET
=================== */
body, html { 
    margin: 0; 
    padding: 0;
    font-family: 'Segoe UI', 'Arial', sans-serif;
	height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex-grow: 1;
    /* eller flex-grow: 1; */
	margin-top:9em;
}



/* =====================
	SIDHUVUD / HEADER
===================== */

/* Generell sidhuvudstitel */
.page-header {
    margin-left: 0.1em;
    color: var(--color-bg);
	margin-top:1em;
	font-size:1.8em;
	font-family: 'Fjalla One', Arial, sans-serif;
}

.fjalla {
	font-family: 'Fjalla One', Arial, sans-serif;
}

.site-header {
    position: fixed;
    top: 0; left: 0; width: 100%; z-index: 50;
    background: var(--color-bg);
    color: var(--color-text);
    box-shadow: 0 2px 12px #0002;
    display: flex;
    align-items: flex-start; /* ändrad */
    justify-content: space-between;
    padding: 0;
    min-height: var(--header-height);
    height: auto;
    font-family: 'Fjalla One', Arial, sans-serif;
	box-shadow: 0 4px 12px #0005;
	
}

/* Header layout */
.header-corner {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    min-width: 62px;
    width: 66px;
    padding-top: 0.45em;
    padding-left: 0.35em;
    padding-right: 0.35em;
    height: 100%;
    box-sizing: border-box;
}
.header-center {
    flex: 1 1 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: .6em 0 .3em 0;
    min-width: 220px;
}
.header-left {
    justify-content: flex-start;
    align-items: flex-start;
    padding-top: 0.45em;
    padding-left: 0.5em;
}
.header-right {
    justify-content: flex-end;
    align-items: flex-start;
    padding-top: 0.45em;
    padding-right: 0.5em;
}

/* Sidhuvudets titel */
.header-title {
    font-size: 3.3em;
    font-weight: 600;
    color: var(--color-accent2);
    letter-spacing: 0em;
    user-select: none;
    text-align: center;
    margin-top: 0.1em;
    margin-bottom: 0.1em;
    font-family: 'Fjalla One', Arial, sans-serif;
    line-height: 1.08;
}

.header-title a {
	text-decoration: none !important; 
    color: inherit;
}

/* Sökfält i headern */
.header-searchbox {
    width: 38%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1em 0 0.5em 0;
    position: relative;
}
#header-search {
    font-size: 1em; 
    padding: 0.49em 1.4em 0.49em 1em; 
    border-radius: 1.1em; 
    border: none; 
    background: #fff; 
    width: 300px; 
    color: #333; 
    transition: box-shadow .14s;
}
#header-search:focus { 
    outline: 2px solid var(--color-accent); 
    box-shadow: 0 2px 9px #1239c335; 
}
/* Sökförslag dropdown */
.header-suggest-list { 
    position: absolute; top: 115%; left: 0; right: 0; 
    background: #fff; color: #1a2540; 
    border-radius: 0 0 0.7em 0.7em; 
    box-shadow: 0 6px 28px #1239c33a; 
    z-index: 110; 
    font-size: 1.02em; 
    display: none; 
    list-style: none; 
    padding: 0.22em 0 0.28em 0; 
    margin: 0; 
    max-height: 290px; 
    overflow-y: auto;
}
.header-suggest-list img { 
    width: 28px; height: 28px; border-radius: 50%; 
    vertical-align: middle; margin-right: 0.6em; background: #eee; object-fit: cover;
}
.header-suggest-list li { 
    padding: 0.56em 1em; 
    cursor: pointer; 
    border-bottom: 1px solid #e8eafd; 
    transition: background .11s;
}
.header-suggest-list li:last-child { border-bottom:none; }
.header-suggest-list li:hover, .header-suggest-list li.active { 
    background: #e7ecfa; 
    color: #193974;
}

.site-header.shrink {
    min-height: 56px;
    transition: min-height 0.25s, padding 0.25s, background 0.25s;
    padding-top: 0.7em;
    padding-bottom: 0em;
    box-shadow: 0 4px 12px #0005;
	margin-top: -0.3em;
    /* Glasmorph-effekt */
    background: color-mix(in srgb, var(--color-bg) 85%, transparent);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
	border-bottom: 1px solid var(--color-bg);
}

.site-header.shrink .header-title {
    font-size: 2.1em;
    transition: font-size 0.22s, transform 0.22s;
    text-align: left;
    margin-left: 0.5em;
}

.site-header.shrink .header-center {
    flex-direction: row;
    align-items: center;
    gap: 2em;           /* eller det mellanrum du vill ha */
    justify-content: flex-start;
    padding: 0.2em 0;
}

.site-header.shrink .header-suggest-list { 
    position: absolute; top: 115%; left: -40%; right: 0; 
	width:500px;
}

.site-header.shrink .header-left,
.site-header.shrink .header-corner {
    padding-top: 0.15em;
}

.site-header .header-title {
    transition: font-size 0.22s, margin-left 0.22s, text-align 0.22s;
	margin-bottom: 0;   /* ta bort ev. extra space under loggan */
}

.site-header.shrink .header-searchbox {
    margin: 0 0 0 1em;   /* lagom avstånd till höger om loggan */
    width: auto;
}
.site-header.shrink #header-search {
    width: 270px;
    font-size: 0.98em;
}
.site-header.shrink .hamburger {
    width: 34px;
    height: 34px;
    margin-top: 5;              /* Ta bort ev. toppmarginal */
    transition: width 0.18s, height 0.18s;
    align-items: center;
    justify-content: center;
}

.site-header.shrink .hamburger span {
    width: 18px;
    height: 2px;
    margin: 3px 0;
    transition: width 0.18s, height 0.18s;
}

/* Vertikalcentrera hela vänstra hörnet */
.site-header.shrink .header-corner,
.site-header.shrink .header-left {
    align-items: center !important;
    padding-top: 0;
    padding-bottom: 0;
    height: 100%;
}
.site-header.shrink + nav.header-menu {
    top: 64px;
}

/* ========================
	HAMBURGER & SIDMENY
======================== */
/* Hamburgerknapp */
.hamburger {
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-top: 1em;
    margin-left: 0;
    position: relative;
}
.hamburger span {
    display: block;
    width: 28px;
    height: 3.3px;
    background: var(--color-accent);
    border-radius: 2.5px;
    margin: 4.4px 0;
    transition: 0.23s cubic-bezier(.86,.01,.32,1.42);
    box-shadow: 0 1px 2px #0003;
}
/* Hamburger till X-ikon animation */
.hamburger.open .bar1 {
    transform: rotate(45deg) translate(6px, 6px);
}
.hamburger.open .bar2 {
    opacity: 0;
}
.hamburger.open .bar3 {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Sidomeny */
.header-menu {
    position: fixed; 
    top: var(--header-height); 
    left: -280px;
    width: 235px; 
    height: calc(100vh - var(--header-height));
    background: #fff; 
    color: #1a2540;
    box-shadow: 4px 0 16px #234b9a15; 
    z-index: 199;
    display: flex; 
    flex-direction: column;
    padding: 1.7em 1.3em 2.5em 1.5em;
    transition: left 0.25s cubic-bezier(.6,-0.19,.41,1.17);
    border-radius: 0 1.7em 1.7em 0;
}
.header-menu.open { left: 0; }
.header-menu a {
    font-size: 1em; font-weight: 600; 
    color: var(--color-text); text-decoration: none; letter-spacing: .01em;
    border-bottom: 1.2px solid #f4f4f4; display: block;
    transition: background .12s; border-radius: 1em;
    padding-top: .5em;
    padding-bottom: .5em;
    padding-left: .5em;
}
.header-menu a:hover { background: #f2f7ff; color: #113b7b; }
.header-menu-close {
    position: absolute; top: .3em; right: .3em; background:none;
    border:none; color:#234B9A; font-size:2.1em; cursor:pointer; z-index:30;
}

/* ========================
	KLUBBMÄRKEN I HEADERN
======================== */
.header-clubs {
    display: flex;
    align-items: center;
    gap: .8em;
    margin-left: 1.5em;
    margin-top: 2em;
}
.club-badge {
    cursor: pointer; width: 46px; height: 46px; background: #fff;
    border-radius: 50%; border: 2.2px solid var(--color-bg);
    padding: 2px; object-fit: contain; margin-left: -5px;
    transition: border .13s, box-shadow .13s;
    box-shadow: 0 2px 6px #234b9a22;
}
.club-badge.active {
    border: 2.7px solid var(--color-light);
    box-shadow: 0 4px 14px #234b9a33;
}



/* =====================
	SPELARSEKTION & KORT
===================== */
.player-section { 
    max-width: 800px; margin: 0 auto 3em auto;
	font-size:0.9em;

}
.player-cards-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(180px, max-content)); 
    gap: 1em; 
    justify-items: center; 
    justify-content: center; 
    align-items: start;
	margin-left:.6rem;
}
.player-card { 
    background: #f6f7fa; border-radius: 1em; 
    box-shadow: 0 2px 8px #0002; 
    border: 1px solid #ececf0; 
    display: flex; flex-direction: column; align-items: center; 
    padding: 1em 0.7em 1.1em 0.7em; width: 160px; 
    transition: transform 0.16s cubic-bezier(.67,-0.34,.27,1.25), box-shadow .14s; 
    margin-bottom: 0em; position: relative;
}
.player-card:hover { 
    background: #f1f3f8; 
    transform: translateY(-3px) scale(1.03); 
    box-shadow: 0 6px 24px #1a65b81a;
}
.player-card a, .player-card a:visited, .player-card a:hover, .player-card a:active { 
    text-decoration: none !important; 
    color: inherit;
}
.player-card a * { text-decoration: none !important; }
.player-card a { 
    display: flex; flex-direction: column; align-items: center; width: 100%;
}
.player-img { 
    border-radius: 50%; width: 106px; height: 106px; object-fit: cover; background: #e0e0e0; margin-bottom: 0.5em; box-shadow: 0 0 0 2px #cdd0d4; display:block; margin-left:auto; margin-right:auto;
}
.player-info { text-align: center; width: 100%; }
.player-name { 
    font-size: 1.09em; font-weight: 600; margin-bottom: 0.4em; margin-top: 0.2em; color: var(--color-bg); letter-spacing: .01em;
}
.captain-badge { 
    display: inline-block; font-size: 0.67em; background: #e6ebf5; color: #1a65b8; padding: 0.24em 1em 0.17em 1em; border-radius: 2em; margin-left: 0.36em; font-weight: 700; border: 1px solid #d1d4db; text-shadow: 0 1px 2px #fff9;
}
.player-club img { height: 3em; margin: 0.1em 0 0.2em 0; vertical-align: middle; }
.player-stats { 
    margin-top: 0.45em; margin-left: -.7em; display: flex; gap: 1em; justify-content: center; font-size: 0.88em; color: var(--color-bg); font-weight: 500;
}
.stat-label { 
    display: block; font-size: 0.79em; color: var(--color-bg); letter-spacing: 0.01em;
}
.star-player { 
    border: 1.7px solid #1a65b8; box-shadow: 0 0 0 2px #1a65b822; position: relative;
}
.star-player::after { 
    content: "★"; position: absolute; top: 0.65em; right: 0.8em; color: #1a65b8; font-size: 1.2em; opacity: 0.35; pointer-events: none;
}


/* ========================
	SPELARFILTER & SUMMERING
======================== */
.player-filters { 
    display: flex;
    flex-wrap: wrap;
    gap: 1.2em 1.2em;
    background: #f9fbff;
    border-radius: 1.3em;
    box-shadow: 0 2px 14px #234b9a17;
    padding: 1.5em 1.6em 1em 1.6em;
    margin: 0 auto 2em auto;
    font-size: 1.08em;
    max-width: 820px;
    align-items: flex-end;
    border: 1px solid #e0e6f3;
}

.player-filters label { 
    display: flex;
    flex-direction: column;
    gap: 0.24em;
    font-weight: 600;
    color: #1a2540;
    letter-spacing: 0.01em;
    font-size: 1em;
}

.player-filters select,
.player-filters input[type="search"] { 
    border-radius: 0.65em;
    border: 1.5px solid #d4daf0;
    padding: 0.55em 1em;
    font-size: 1em;
    background: #fff;
    color: #21325b;
    max-width: 230px;
    margin-top: 0.13em;
    box-shadow: 0 1px 6px #e5eaf5;
    transition: border 0.18s, box-shadow 0.18s;
}

.player-filters select:focus,
.player-filters input:focus { 
    border: 1.7px solid #3061ad;
    outline: none;
    box-shadow: 0 0 0 2px #fcbd0033;
}

.player-filters button { 
    border-radius: 0.8em;
    padding: 0.56em 1.45em;
    font-weight: 700;
    border: none;
    background: var(--color-bg);
    color: #fff;
    cursor: pointer;
    font-size: 1em;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 8px #234b9a12;
    transition: background 0.19s, transform 0.12s, box-shadow 0.19s;
}

/* Spelarsummering - renare kortkänsla */

.player-summary-card, #match-summary { 
    background: #f9fafc;
    border: 1.7px solid #e7eaf4;
    border-radius: 1.3em;
    box-shadow: 0 3px 14px #1239c31a;
    max-width: 820px;
    margin: 0 auto 2em auto;
    font-size: 1.15em;
    font-weight: 600;
    color: #2a3e66;
    padding: 1.3em 2.2em;
    text-align: center;
	display: none;
}
#match-summary {
	display: block;
}

.no-players-box { 
    color: #415380;
    background: #f4f8fd;
    border: 1.2px solid #e5eaf5;
    border-radius: 0.8em;
    font-size: 1.14em;
    text-align: center;
    margin: 2.7em 0 1em 0; 
    padding: 1.2em 0.5em;
    box-shadow: 0 2px 7px #1239c30b;
}



/* =====================
	SIDFOT / FOOTER
===================== */
.site-footer {
    background: var(--color-bg);
    color: #fff;
    padding: 3em 0 1.3em 0;
    margin-top: 5em;
    font-size: 1em;
    font-family: 'Segoe UI', Arial, sans-serif;
    box-shadow: 0 -2px 16px #1239c319;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2.3fr 1.3fr 1.2fr;
    gap: 2em;
    align-items: start;
    padding: 0 1em;
}
.footer-content a {
    color: var(--color-accent2);
}
.footer-brand {
    display: flex;
    gap: 1.2em;
    align-items: flex-start;
}
.footer-logo {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: #fff;
    border: 2.5px solid var(--color-accent);
    box-shadow: 0 2px 16px #0b1a3913;
    object-fit: contain;
}
.footer-brand h2 {
    font-family: 'Fjalla One', Arial, sans-serif;
    font-size: 1.5em;
    margin: 0 0 0.3em 0;
    color: var(--color-accent2);
    letter-spacing: 0.01em;
}
.footer-brand p {
    margin: 0;
    color: #e7e7fa;
    font-size: 1.08em;
    line-height: 1.4;
}
.footer-links h3, .footer-social h3 {
    font-size: 1.1em;
    margin-bottom: 0.7em;
    font-family: 'Fjalla One', Arial, sans-serif;
    color: var(--color-accent2);
	margin-top:0em;
}
.footer-links ul, .tab-panel ul {
    list-style: none;
    margin: 0; padding: 0;
}
.footer-links ul li {
    margin-bottom: 0.3em;
}
.footer-links ul li a {
    color: #fffb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.16s;
}
.footer-links ul li a:hover {
    color: var(--color-accent);
    text-decoration: underline;
}
.footer-social .social-icons {
    display: flex;
    gap: 1.2em;
    margin-top: 0.2em;
}
.footer-social .social-icons a img {
    width: 28px;
    height: 28px;
    filter: brightness(92%) drop-shadow(0 1px 1.5px #112e5a36);
    transition: filter .15s, transform .14s;
    border-radius: 50%;
    background: #fff1;
    padding: 3px;
}
.footer-social .social-icons a:hover img {
    filter: brightness(1.2) drop-shadow(0 2px 8px #fcbd0023);
    transform: scale(1.13) rotate(-6deg);
    background: #fff2;
}
.footer-bottom {
    border-top: 1.2px solid #fffa;
    margin-top: 2.5em;
    text-align: center;
    color: #ece7c6;
    font-size: 0.98em;
    padding-top: 1em;
    letter-spacing: 0.03em;
}

.info-box {
	padding-bottom:1em;
}


/* ====================
	RESPONSIV DESIGN
==================== */

/* Tablet-fot */
@media (max-width: 950px) {
    .footer-content { grid-template-columns: 1fr 1fr; gap: 2em 1em; }
    .footer-social { margin-top: 2em; }
}
/* Mobilfot */
@media (max-width: 600px) {
    .site-footer { padding: 2.1em 0 0.7em 0;}
    .footer-content { grid-template-columns: 1fr; gap: 1.5em; }
    .footer-brand { flex-direction: row; }
    .footer-brand h2 { font-size: 1.25em;}
}
@media (max-width: 400px) {
    .footer-brand { flex-direction: column; gap: 0.6em; align-items: center;}
    .footer-logo { width: 44px; height: 44px;}
    .footer-brand h2 { font-size: 1em;}
}

/* Header/Spelare grid etc. responsivt */
@media (max-width: 820px) { 
    :root { --header-height: 7em; }
    .player-cards-grid { 
        display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, max-content)); gap: 1em; justify-items: center; justify-content: center; align-items: start;
	}
    .player-card { max-width: 100vw; min-width: 0; }
    .header-title {
        font-size: 200%;
        margin-top: .2em;
        margin-bottom: 0.05em;
        line-height: 1.08;
	}
    .header-searchbox {
        width: 95%;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0.5em 0 0.5em 0;
        position: relative;
	}
    .header-clubs { gap: .5em; margin-right: .5em; }
    .header-menu { left: -300px; }
    .page-header { margin-left:0.5em; color: var(--color-bg); font-size:2em; }
	.header-suggest-list { 
		position: absolute; top: 115%; left: -14%; right: 0; 
		width:110vw;
	}
}

@media (max-width: 600px) {    
    :root { --header-height: 6.4em; }
    .site-header { max-height:100px; }
    .header-menu { width: 96vw; min-width: 160px; position: fixed; top: var(--header-height); left: -270px; }
    .header-center { min-width: 100px; padding: .23em 0; }
    .header-corner { width: 43px; min-width: 32px; }
    .player-cards-grid { grid-template-columns: 1fr 1fr; gap: 1em; }
    .player-card { padding: 1em 0.3em 0.7em 0.3em; max-width: 99vw; }
    .player-img { width: 94px; height: 94px; }
    .header-title { font-size: 200%; margin-top: .2em; margin-bottom: 0.05em; line-height: 1.08; }
    .header-searchbox { width: 85%; display: flex; justify-content: center; align-items: center; margin: 0.5em 0 0.5em 0; position: relative; }
    #header-search { font-size: .88em; padding: 0.49em 1.4em 0.49em 1em; border-radius: 1.1em; border: none; background: #fff; width: 300px; color: #333; transition: box-shadow .14s;}
    .header-clubs { display: flex;
		align-items: center;
		gap: .8em;
		margin-left: 3.5em;
	margin-top: 2em; }
    .club-badge { cursor: pointer; width: 25px; height: 25px; background: #fff; border-radius: 50%; border: 2.2px solid var(--color-accent); padding: 2px; object-fit: contain; margin-left: -5px; transition: border .13s, box-shadow .13s; box-shadow: 0 2px 6px #234b9a22; }
    .club-badge.active { border: 2.7px solid var(--color-accent2); box-shadow: 0 4px 14px #234b9a33; }
    .hamburger { margin-top: 0em; }
    .hamburger span { height: 3.3px; margin: 2.4px 0; }
    .header-menu { position: fixed; top: var(--header-height); left: -18em; width: 235px; height: calc(100vh - var(--header-height)); padding: 1.7em 1.3em 2.5em 1.5em; }
	.header-suggest-list { 
		position: absolute; top: 115%; left: -25%; right: 0; 
		width:600px;
	}
}
@media (max-width: 360px) {
    .header-title { font-size: 160%; margin-top: .4em; }    
	.header-suggest-list { 
		position: absolute; top: 115%; left: 10; right: 10; 
		width:340;
	}
}
@media (max-width: 250px) {
    .header-title { font-size: 120%; margin-top: .8em; }    
}


/* ========================
	COOKIE-CONSENT MODAL
======================== */
#cookie-consent-box {
    position: fixed;
    z-index: 5000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cookie-consent-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(30,40,85, 0.48);
    backdrop-filter: blur(2px);
}
.cookie-consent-modal {
    position: relative;
    z-index: 2;
    background: #fff;
    border-radius: 1.6em;
    padding: 2em 2.1em 1.4em 2.1em;
    max-width: 380px;
    box-shadow: 0 6px 42px #234b9a44;
    color: #1a2540;
    text-align: center;
    font-size: 1.09em;
}
.cookie-consent-modal h3 {
    margin-top: 0; margin-bottom: .6em; font-size: 1.33em;
}
#cookie-consent-accept {
    margin-top: 1.4em;
    border-radius: .8em;
    padding: .59em 2.3em;
    font-size: 1.12em;
    font-weight: 600;
    border: none;
    background: #234B9A;
    color: #fff;
    cursor: pointer;
    transition: background .17s;
}
#cookie-consent-accept:hover {
    background: #192b57;
}

/* Nollställning av label och select */
.match-filters label,
.match-filters button,
.match-filters select {
	all: unset;
	box-sizing: border-box;
}

/* Grundläggande layout och stil */
.match-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 1.2em;
	background: #f7f9fc;
	border-radius: 1.2em;
	padding: 1.3em 1em 0.7em 1em;
	box-shadow: 0 2px 8px rgba(0,0,0,0.05);
	margin: 0 auto 2em auto;
	font-size: 1.07em;
	max-width: 800px;
}



/* Label styling */
.match-filters label {
	display: flex;
	flex-direction: column;
	gap: 0.3em;
	font-weight: 500;
	color: #2b3857;
	font-size: 1em;
	margin-bottom: 0.1em;
	letter-spacing: 0.02em;
}

/* Select styling */
.match-filters select {
	border-radius: 0.55em;
	border: 1px solid #b3b9cc;
	padding: 0.6em 1.5em 0.6em 0.7em;
	font-size: 1em;
	background: #fff;
	min-width: 130px;
	margin-top: 0.3em;
	color: #222c48;
	transition: border 0.18s, box-shadow 0.18s;
	box-shadow: 0 1px 3px rgba(51, 61, 85, 0.04);
	cursor: pointer;
	text-align: left;
}

.match-filters select:focus {
	border: 1.5px solid #4770d9;
	outline: none;
	box-shadow: 0 0 0 2px #b4cdfc;
}

/* Anpassning för små skärmar */
@media (max-width: 600px) {
	.match-filters {
		flex-direction: column;
		gap: 0.7em;
		padding: 1em 0.5em 0.5em 0.5em;
	}
	.match-filters label {
		font-size: 1.05em;
	}
	
}


.match-group {
    margin-bottom: 2.5em;
}
.match-group-title {
    font-size: 1.2em;
    font-weight: 700;
    color: #222;
    margin-bottom: 0.4em;
    margin-top: 1.8em;
    letter-spacing: .06em;
    text-align: left;
}
.match-list-u {
    display: flex;
    flex-direction: column;
    gap: .5em;
}

.match-row-u {
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: .55em 1em;
    position: relative;
    border: 1px solid #ececf0;
    border-radius: 0.7em;
    background: #f6f7fa;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.match-row-u:hover {
    background: #f1f3f8;
}
.match-date-u {
    min-width: 85px;
    color: #41415e;
    font-weight: 500;
    font-size: 1em;
    text-align: left;
    letter-spacing: 0.02em;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.match-date-u-spelarsida {
	min-width: 85px;
    color: #41415e;
    font-weight: 500;
    font-size: 1em;
    text-align: left;
    letter-spacing: 0.02em;
    display: flex;
    flex-direction: column;
    justify-content: center;
	background: #f6f7fa;
}
.match-competition-u {
    color: #71758b;
    font-size: .97em;
    margin-right: .7em;
    min-width: 90px;
    white-space: nowrap;
    font-weight: 400;
    min-width: 150px; 
    max-width: 150px; 
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}
.match-teams-u {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: .6em;
    font-size: 1.09em;
    font-weight: 400;
    color: black;
    min-width: 360px;
}

strong {
	font-weight: 500;
	color: black;
}
.match-team-left {
    text-align: right;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.4em;
}

.match-team-right {
    text-align: left;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.4em;
}
.match-team-left,
.match-team-right {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-wrap: nowrap;
}
.match-team-left,
.match-team-right {
    display: flex;
    align-items: center;
    gap: 0.4em;
    flex: 1;
}
.match-row-u .toggle-events,
.match-row-u a,
.match-row-u .future-label {
    cursor: pointer; /* för att länkar och pil fortfarande ska kännas klickbara */
}
.team-col {
    display: flex;
    align-items: center;
    min-width: 0;
}
.team-col-left,
.team-col-right {
    flex: 1 1 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.team-col-center {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 58px; 
}
.team-name-u {
    margin: 0 0.15em;
    
}
.team-col-left .team-badge-u {
    margin-right: 0.3em;
}
.team-col-right .team-badge-u {
    margin-left: 0.3em;
}
.result-badge-u {
    min-width: 58px;
    text-align: center;
    padding: .13em .49em;
    border-radius: 0.7em;
    font-family: 'Fira Code', monospace;
    font-weight: 700;
    font-size: 1.07em;
    letter-spacing: -0.1em;
}
.team-badge-u {
    max-width: 44px;
    max-height: 44px;
    margin: 0 0.17em;
}
.team-badge-u-padding {
	margin-top:-0.1em;
	padding-left:0.1em;
	padding-right:0.1em;
}
.result-badge-u.win { background: black; color: #fff; }
.result-badge-u.loss { background: black; color: #fff; }
.result-badge-u.draw { background: black; color: #fff; }
.result-badge-u.future { background: black; color: #fff; }
.match-review-u {
    color: var(--color-bg);
    font-weight: 600;
    margin-left: 1em;
    font-size: .97em;
    display: flex;
    align-items: center;
    gap: .2em;
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: text-decoration .13s;
}
.match-review-u:hover { text-decoration: underline; }
.future-label {
    color: #1a65b8;
    font-size: .98em;
    background: #e8f0ff;
    padding: .10em .75em;
    border-radius: 1em;
    margin-left: .7em;
    font-weight: 500;
    display: inline-block;
}


.match-events {
    background: #fff;
    border: 1px solid #e2e2e2;
    border-top: none;
    border-radius: 0 0 0.7em 0.7em;
    font-size: 0.95em;
    padding: 1em;
    margin-top: -0.4em;
	
}

.event-grid {
    display: grid;
    grid-template-columns: minmax(90px, 1fr) auto minmax(90px, 1fr);
    column-gap: 0.7em;
    align-items: start;
    margin-top: 0.5em;
    margin-left:-2.5em;
}
.event-col.left {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
    font-size: 0.92em;
    line-height: 1.2;
    color: black;
    text-align: right;
    align-items: flex-end;
    justify-self: end;
}
.event-col.center {
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    color: #333;
    font-size: 0.88em;
    white-space: nowrap;
    min-width: 60px;
    justify-self: center;
	
}
.event-col.right {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
    font-size: 0.92em;
    line-height: 1.2;
    color: black;
    text-align: left;
    align-items: flex-start;
    justify-self: start;
}


.event-item {
    display: flex;
    align-items: center;
    gap: 0.3em;
    font-weight:500;
    
}


.match-event-inner {
    display: flex;
    flex-direction: column;
    gap: 0.3em;
}
.event {
    display: flex;
    justify-content: space-between;
}
.event.left {
    justify-content: flex-start;
}
.event.right {
    justify-content: flex-end;
    text-align: right;
}
.event span {
    font-weight: 500;
}
.hidden {
    display: none;
}

.match-header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
}

/* Knapp som pil */
/* Neutraliserar global button-stil på expander-pil */
.toggle-events {
    all: unset;               /* Rensar ALLA ärvda stilar utom display! */
    display: inline-block;    /* Behåll inline-block */
    font-size: .4em;
    color: gray;
    background: transparent;
    cursor: pointer;
    padding: 0.2em 0.4em;
    border-radius: 50%;
    line-height: 1;
    border: none;
    transition: transform 0.3s ease, background 0.15s;
    text-align: center;
    user-select: none;
    margin-right:-2.4em;
    margin-top:-1.8em;
}

.toggle-events.active {
    transform: rotate(180deg);
    background: #f1f3f8;
}
.toggle-events:focus {
    outline: 2px solid #1a65b8;
    outline-offset: 2px;
    background: #e8f0ff;
}
.toggle-events:hover {
    background: #fff;
}


.match-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.results-small {
	visibility: hidden;
	display: none;
}

.name-small {
	width: 100%; 
	overflow: visible;
}


@media (max-width: 800px) {
    
    html, body {
		max-width: 100vw;
		overflow-x: hidden;
	}
	
    /* Hindra att något element klipper text på mobil */
    .match-row-u,
    .match-teams-u,
    .match-team-left,
    .match-team-right {
		min-width: 0 !important;
		overflow: hidden !important;
		text-overflow: ellipsis;
		word-break: break-word;
	}
	
	.match-row-u {
		flex-direction: column;
		align-items: center;
		padding: 1.1em 0.5em;
		gap: 0.8em;
		background: #f8fafc;
		border-radius: 1.1em;
		position: relative;
	}
	
	.match-date-u {
		text-align: center;
		font-size: 1.07em;
		color: #222;
		margin-bottom: 0.2em;
		margin-top: 0;
		min-width: 0;
		order: 1;
		width: 100%;
		font-weight: 600;
		letter-spacing: 0.02em;
	}
	
	
	
	.match-team-left, .match-team-right {
		display: flex;
		flex-direction: row;
		align-items: center;
		gap: 0.35em;
		min-width: 0;
		font-size: 1.12em;
		font-weight: 500;
		color: #222;
		justify-content: center;
		text-align: center;
		flex: 1;
	}
	
	.match-team-left strong, .match-team-right strong {
		font-weight: 600;
	}
	
	.team-badge-u {
		width: 40px;
		height: 40px;
		max-width: 100px;
		max-height: 100px;
		object-fit: contain;
	}
	
	.result-badge-u {
		font-size: 1.42em;
		background: #1a222e;
		color: #fff;
		min-width: 56px;
		padding: 0.1em 0.6em;
		border-radius: 0.7em;
		text-align: center;
		font-family: 'Fira Code', monospace;
		font-weight: 700;
		letter-spacing: 0.07em;
		display: flex;
		align-items: center;
		justify-content: center;
	}
	
	.results-small {
		visibility: visible;
		display: inline;
	}
	
	.name-small {
		width: 0; 
		overflow: hidden;
	}
	
	
	
}

.player-profile, .opponent-profile {
	font-size:0.9em;
	max-width: 820px;
	margin: 3em auto;
	background: #fff;
	border-radius: 1.5em;
	box-shadow: 0 3px 18px #1a254033;
	padding: 2.3em 2em 2em 2em;
}



.player-profile-header {
	display: flex;
	gap: 2.2em;
	align-items: flex-start;
	margin-bottom: 1.7em;
}
.player-profile-name img {
    vertical-align: middle;
    margin-right: 0.25em;
    height: 1.4em; /* ev. justera för att matcha textstorleken */
}

.player-header-info a {
    text-decoration: none;
    color: var(--color-bg);
}

.player-header-info a:hover {
    text-decoration: none;
    color: var(--color-accent);
}

.player-img-rect {
	flex-shrink: 0;
	width: 250px;
	max-height: 350px;
	background: #f3f3f6;
	border-radius: 0.4em;
	box-shadow: 0 3px 18px #1a254033;
	overflow: hidden;
	display: flex;
	object-fit: cover;
    object-position: top;	
}
.player-img-rect img {
	width: 100%;
	height: 100%;
	object-fit: cover;
    object-position: top;
	border-radius: 0.4em;
	display: block;
	
	
}

.player-header-info {
	flex: 1 1 0;
}

.player-profile-name {
	font-size: 2.3em;
	font-family: 'Fjalla One', Arial, sans-serif;
	margin-top: 0.1em;
	margin-bottom: 0.35em;
	color: var(--color-bg);
}

.player-profile-facts {
	font-size: 1.06em;
	color: #222;
	margin-bottom: 0.7em;
	line-height: 1.44;
}

/* Tabs */
.player-tabs, .match-tabs {
	display: flex;
	gap: 0em;
	margin-bottom: 1.2em;
}

.tab-btn {
	background: #f3f3f6;
	color: var(--color-text);
	border: none;
	font-size: 1em;
	font-family: 'Fjalla One', Arial, sans-serif;
	padding: 0.6em 1.2em;
	font-weight: 400;
	cursor: pointer;
	transition: background .14s, color .14s;
	margin-bottom: -2px;
	outline: none;
}
.tab-btn:first-child {
	/* Stil för första tabben */
	border-radius: 0.9em 0 0 0.9em; /* Endast vänster hörn rundade */
}

.tab-btn:last-child {
	/* Stil för sista tabben */
	border-radius: 0 0.9em 0.9em 0; /* Endast höger hörn rundade */
}

.tab-btn:last-child {
	/* Stil för sista tabben */
	border-radius: 0 0.9em 0.9em 0; /* Endast höger hörn rundade */
}

.player-tabs .tab-btn:only-child {
	border-radius: 0.9em;
}


.tab-btn:hover {
	color: var(--color-accent);
}
.tab-btn.active, .tab-btn:focus {
	background: var(--color-bg);
	color: #fff;
}

.player-tab-content {
	
	min-height: 240px;
	
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.match-profile {
	font-size:0.9em;
	max-width: 820px;
	margin: 3em auto;
	background: #fff;
	border: 1px solid #eeeeee;
	border-radius: 1.5em;
	box-shadow: 0 3px 18px #1a254033;
	padding: 2.3em 2em 2em 2em;
}

.team-shortname { display: none; }
.team-fullname { display: inline; }
@media (max-width: 600px) {
	.team-fullname { display: none; }
	.team-shortname { display: inline; }
}


/* Responsiv för mobil */
@media (max-width: 600px) {
	.player-profile-header {
		flex-direction: column;
		align-items: center;
		gap: 1em;
	}
	.player-img-rect {
		width: 95vw;
		max-width: 330px;
		height: 90vw;
		max-height: 470px;
		
	}
	.player-img-rect img {
		object-position: 70% 30%;
	}
	.player-profile-name {
		font-size: 1.55em;
	}
	/* Tabs */
	.player-tabs {
		display: flex;
		gap: 0em;
		margin-bottom: 1.2em;
	}
	
	.tab-btn {
		background: #f3f3f6;
		color: var(--color-text);
		border: none;
		font-size: 1em;
		font-family: 'Fjalla One', Arial, sans-serif;
		padding: 0.5em 1em;
		font-weight: 500;
		cursor: pointer;
		transition: background .14s, color .14s;
		margin-bottom: -2px;
		outline: none;
	}
	.player-profile, .opponent-profile, .match-profile {
		font-size:0.9em;
		margin-top:-3em;
		padding-top:2em;
		border-radius: 0;
		margin-left:0em;
		box-shadow: 0 0px 0px #1a254033;
	}
	
	.top {
		margin-top:-5em;
	}
	.top2 {
		margin-top:-3em;
	}
	
}


.match-profile-header {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.2em;
	margin-bottom: 1.7em;
}

/* Centrera resultatet robust (vänster | mitten | höger) */
.match-profile-teams {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr auto 1fr; /* vänster | mitten | höger */
  align-items: center; /* ser till att allt ligger på samma höjd */
  font-size: 2em;
  font-family:'Fjalla One', Arial, sans-serif;
}

/* Vänster och höger trycks ut till sina kanter */
.team-left  { grid-column: 1; justify-self: start; }
.team-right { grid-column: 3; justify-self: end;   }

.team-left .team-text {
  text-align: left;
  align-items: flex-start;
}

.team-right .team-text {
  text-align: right;        /* gör texten högerställd */
  align-items: flex-end;    /* se till att blocket fäster i högerkanten */
}


/* Resultat alltid centrerat */
.match-center {
  grid-column: 2;
  justify-self: center;
  text-align: center;
}



.match-team {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  max-width: 100%;
}


.match-team a {
	color: black;
	text-decoration: none;
}

.match-profile-meta {
	text-align: center;
	color: 000;
	font-size: 1em;
	line-height: 1.2;
	margin-top: 0.2em;
}

.match-profile-date {
	font-weight: 500;
	color: 000;
	font-size: 1.1em;
}
.match-profile-place,
.match-profile-audience,
.match-profile-referee,
.match-profile-competition {
	color: 000;
	font-size: 1em;
	
}

.match-profile-content {
	margin-top: 1em;
	margin-bottom: 1em;
}

.match-section-title {
	color: var(--color-bg);
	font-size: 1.32em;
	margin-bottom: 0.8em;
	font-family: 'Fjalla One', Arial, sans-serif;
}

.match-events-list {
	list-style: none;
	padding: 0;
	margin: 0;
	font-size: 1em;
	display: flex;
	flex-direction: column;
	gap: 0.7em;
}
.match-events-list li {
	background: #f7f9fd;
	border-radius: 0.7em;
	padding: 0.45em 1.1em;
	display: flex;
	align-items: center;
	gap: 0.2em;
	box-shadow: 0 2px 6px #1239c30a;
	font-weight: 500;
	color: #1a2540;
}

.match-event-minute {
	min-width: 2.1em;
	color: #888;
	font-size: 0.99em;
	text-align: right;
	font-variant-numeric: tabular-nums;
}
.match-event-icon {
	font-size: 1em;
	margin-right: 0.5em;
}
.match-event-player {
	color: #1a65b8;
}
.match-event-info {
	color: #556690;
	font-size: 0.9em;
	margin-left: 0.3em;
}

.match-profile-footer {
	margin-top: 2.4em;
	text-align: center;
}
.back-link {
	color: var(--color-bg);
	font-weight: 600;
	text-decoration: none;
	transition: color 0.14s;
}
.back-link:hover {
	color: var(--color-accent);
	text-decoration: underline;
}
/* Gör att målgörare linjerar med klubbnamn */

.team-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  max-width: 100%;        /* blocket får aldrig skjuta iväg */
}
/* Målgörare under namnet */
.team-scorers {
  margin-top: .2em;
  font-size: .45em;
  line-height: 1.3;
  color: #1a2540;

  /* låt rader brytas tidigt i stället för att pressa bredden */
  overflow-wrap: break-word;
  word-break: break-word;

  /* viktig: fyll bara den plats som finns i .team-text */
  max-width: 100%;
  white-space: normal;
}

.team-right .team-scorers {
  text-align: right;
}

/* Resultat och HT-rad oförändrat men stabilt i mitten */
.match-score{
  justify-self:center;
  display:flex;
  flex-direction:column;
  align-items:center;
  line-height:1;
  font-size:1.4em;
  margin-top:-0.2em;
  padding-left:0.2em;
  padding-right:0.2em;

}
.match-score-ht{ margin-top:.15rem; font-size:.4em; color:#6b7280; }

/* Ta bort eventuell tidigare fast 55%-begränsning */
.team-scorers{ /* rensa ev. äldre regel */ }
/* Responsiv för mobil */
@media (max-width: 600px) {
	
	.match-profile-header {
		gap: .2em;
		margin-bottom: .7em;
	}
	
	.match-profile-teams {
		font-size: 1.5em;
		
		gap: 0.2em;
	}
	
	
	.match-profile-teams img {
		width: 24px;
		height: 24px;
		padding:0px;
		margin:0px;
		display:none;
	}
	.match-team {
		gap: 0.1em;
	}
	
}
.match-events-list.pretty {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.7em;
}
.match-events-list.pretty li {
	display: flex;
	align-items: center;
	gap: 0.6em;
	background: #f7fafd;
	border-radius: 1.1em;
	box-shadow: 0 2px 10px #234b9a07;
	padding: 0.6em 1.3em 0.6em 1em;
	font-size: 1.18em;
	font-family: 'Segoe UI', Arial, sans-serif;
	font-weight: 500;
	color: #234b9a;
	min-height: 2.1em;
	transition: box-shadow .14s, background .14s;
}
.match-events-list.pretty li:hover {
	box-shadow: 0 6px 22px #1239c126;
	background: #f0f6fe;
}

.match-event-minute {
	color: #bcc8e0;
	font-size: 1em;
	min-width: 2.4em;
	font-family: 'Fira Code', monospace;
	text-align: right;
	margin-right: 0.18em;
	font-weight: 600;
	letter-spacing: 0.02em;
}
.match-event-icon {
	font-size: 1.09em;
	color: #f2b600;
	margin-right: 0.04em;
}

.event-score {
	font-size: 1.04em;
	color: #2265b6;
	font-weight: 700;
	background: #e9f1fb;
	border-radius: 0.7em;
	padding: 0.09em 0.75em 0.09em 0.6em;
	margin-right: 0.13em;
	margin-left: 0.05em;
	font-family: 'Fira Code', monospace;
	letter-spacing: 0.01em;
	box-shadow: 0 1px 6px #bbd0ff17;
	display: inline-block;
}

.match-event-player {
	font-weight: 700;
	color: #234b9a;
	margin-right: 0.25em;
	margin-left: 0.18em;
	font-family: 'Segoe UI', Arial, sans-serif;
}

.match-event-info {
	color: #949fbf;
	font-size: 0.92em;
	font-weight: 500;
	margin-left: 0.3em;
}

.match-row-tiny {
	font-size: 0;
	margin-top:1.7em;
	text-align: center;
	margin-bottom:0;
} 

@media (max-width: 600px) {
	
	.match-row-tiny {
		font-size: 1.1em;
		color: black;
	} 
}
.lineup-section-flex {
	display: flex;
	gap: 2.5em;
	justify-content: center;
	flex-wrap: wrap;
}
.lineup-section {
	flex: 1 1 340px;
	max-width: 420px;
	min-width: 220px;
	background: #f9fafc;
	border-radius: 1.1em;
	box-shadow: 0 2px 14px #1239c310;
	margin-bottom: 2em;
	padding: 1.7em 1.2em 1.1em 1.2em;
}
.lineup-section h2 {
	color: var(--color-bg);
	font-size: 1.15em;
	font-family: 'Fjalla One', Arial, sans-serif;
	margin-top: 0;
}
.lineup-list {
	list-style: none;
	padding: 0;
	margin: 0;
}
.lineup-list li {
	display: flex;
	align-items: center;
	gap: 0.45em;
	padding: 0.43em 0;
	border-bottom: 1px solid #e4e8f0;
	font-size: 1.07em;
}
.lineup-list li:last-child {
	border-bottom: none;
}
.lineup-pos {
	min-width: 2.2em;
	color: #2265b6;
	font-weight: 700;
	font-family: 'Fira Code', monospace;
}
.lineup-player {
	font-weight: 700;
	color: #234b9a;
	text-decoration: none;
	transition: color 0.12s;
}
.lineup-player:hover { color: var(--color-accent); }
.lineup-goal { color: #1c7c2b; font-weight: 700; margin-left: 0.3em; }
.lineup-assist { color: #2550a6; font-weight: 700; margin-left: 0.3em; }
.lineup-yellow { color: #d9bc19; font-size: 1.05em; margin-left: 0.3em; }
.lineup-red { color: #b12d2d; font-size: 1.05em; margin-left: 0.3em; }
.lineup-sub { color: #888; font-size: 0.93em; margin-left: 0.15em; }
.lineup-detail { color: #7b8db1; font-size: 0.97em; margin-left: 0.15em; }
.lineup-section-flex.single {
	display: flex;
	justify-content: center;
}
.lineup-section-flex.single .lineup-section {
	flex: 1 1 600px;
	max-width: 650px;
}
.match-nav-links {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 2em;
	margin: .4em 0 1.5em 0;
	margin-top:-1em;
	margin-bottom:2em;
}
.match-nav-prev, .match-nav-next, .match-nav-all {
	color: var(--color-bg);
	font-weight: 600;
	text-decoration: none;
	padding: 0.55em 1em;
	padding-bottom: 0.75em;
	border-radius: 2em;
	background: #f7fafd;
	transition: background 0.14s, color 0.14s;
	box-shadow: 0 2px 7px #234b9a0d;
	font-size: 1.06em;
	min-width:16%;
	text-align: center;
}
.match-nav-prev:hover, .match-nav-next:hover, .match-nav-all:hover {
	background: var(--color-accent);
	color: var(--color-accent2);
}

@media (max-width: 600px) {
	.match-nav-links {
		
		gap: 0.3em;
	}
	
	.match-nav-prev, .match-nav-next, .match-nav-all {
		font-weight: 500;
		text-decoration: none;
		padding: 0.35em;
		border-radius: 2em;
		transition: background 0.14s, color 0.14s;
		box-shadow: 0 2px 7px #234b9a0d;
		font-size: .8em;
	}
	
}


@media (max-width: 900px) {
	.lineup-section-flex {
		flex-direction: column;
		gap: 1.5em;
	}
}

.match-photo-section {
	margin: 1.5em 0 2em 0;
	text-align: center;
}
.match-main-photo img {
	width: 100%;
	max-width: 100%;
	max-height: 300px;
	object-fit: cover;
	border-radius: 16px;
	box-shadow: 0 2px 18px rgba(40,60,110,0.09);
}

.match-main-photo-start img {
	width: 100%;
	max-height: 340px;
	object-fit: cover;
	border-radius: 16px;
	box-shadow: 0 2px 18px rgba(40,60,110,0.09);
}
.match-photo-thumbs {
	margin-top: 0.6em;
	display: flex;
	justify-content: center;
	gap: 7px;
	flex-wrap: wrap;
}
.match-photo-thumbs img {
	width: 154px;
	height: 65px;
	object-fit: cover;
	border-radius: 7px;
	box-shadow: 0 1px 7px rgba(30,40,70,0.07);
	border: 2px solid #f5f7fa;
	transition: box-shadow .15s;
}
.match-photo-thumbs img:hover  {
	box-shadow: 0 2px 14px rgba(50,90,160,0.16);
	border-color:  var(--color-bg);
	
}
#lightbox-overlay {
	display: none;
	position: fixed;
	z-index: 3000;
	left: 0; top: 0; width: 100vw; height: 100vh;
	background: rgba(14,18,31, 0.91);
	align-items: center;
	justify-content: center;
	flex-direction: column;
	animation: fadein .2s;
}
#lightbox-overlay.active { display: flex; }

#lightbox-img {
	max-width: 94vw;
	max-height: 80vh;
	border-radius: 13px;
	box-shadow: 0 6px 40px rgba(30,50,90,0.17);
	background: #fff;
	transition: box-shadow .15s;
}
#lightbox-close {
	color: #f8f9ff;
	font-size: 3em;
	font-weight: bold;
	position: absolute;
	top: 18px; right: 40px;
	cursor: pointer;
	z-index: 3010;
	text-shadow: 0 2px 18px #20283a88;
	transition: color .12s;
}
#lightbox-close:hover { color: #bed8ff; }
@keyframes fadein {
	from { opacity: 0; }
	to   { opacity: 1; }
}
#lightbox-caption {
	color: #fff;
	background: rgba(25,32,54, 0.83);
	margin-top: 12px;
	padding: 0.6em 1.2em;
	border-radius: 8px;
	font-size: 1.11em;
	max-width: 90vw;
	box-shadow: 0 2px 11px #001f2a2f;
	text-align: center;
}
.photo-caption {
	color: #3d4863;
	background: #f1f4fa;
	border-radius: 6px;
	padding: 0.36em 1.1em;
	display: inline-block;
	margin: 0.5em auto 0.7em auto;
	font-size: 1em;
}
.photo-caption a {
	color: var(--color-bg);
	text-decoration: underline;
}
.player-card-link { display:block; text-decoration:none; color:inherit; }
.margin-top {
	margin-top:2em;
}
.opponent-header {
	display:flex;
	align-items:center;
	gap:1em;
}
.opponent-header h1 {
	font-size: 2.3em;
	font-family: 'Fjalla One', Arial, sans-serif;
	margin-top: 0.1em;
	margin-bottom: 0.35em;
	color: var(--color-bg);
}

.opponent-link {
    color: black;
    text-decoration: none;
}

.opponent-link:hover {
    color: var(--color-bg);
    text-decoration: underline;
}

.opponent-details {
	padding: 1em 0 1em 0;
}

.lineup-pitches-flex {
	display: flex;
	gap: 2.5em;
	gap: 2.5em;
	justify-content: center;
	align-items: flex-center;
	flex-wrap: wrap;
	margin-bottom: 0em;
	margin-left:2em;
}
.lineup-pitch-235 { 
	max-width: 375px; 
	width: 375px; 
	flex: 1 1 300px;
	
	margin-bottom: 1em;
}

.lineup-pitch-235 h2 { 
	text-align:center;
	font-family: 'Fjalla One', Arial, sans-serif;
}
.pitch {
	position: relative;
	width: 90%;
	aspect-ratio: 2/3;
	
	background: url('../images/pitch.jpg') no-repeat center center;
	-webkit-background-size: cover;
        -moz-background-size: cover;
        -o-background-size: cover;
        background-size: cover;
	border: 2.5px solid #bdd0ef;
	border-radius: 1.5em;
	min-height: 330px;
	box-shadow: 0 3px 18px #234b9a10;
	margin-bottom: 0em;
	overflow: visible;
	
}


.pitch .player-link img {
	width: 48px; height: 48px;
	object-fit: cover; border-radius: 50%;
	border: 2px solid #fff; box-shadow: 0 2px 9px #234b9a11;
	margin-bottom: 1px;
	transition: border-color 0.18s, box-shadow 0.18s;
	z-index:2;
}
.pitch .player-link:hover img {
	border: 3px solid;
	border-color: var(--color-bg);
	box-shadow: 0 2px 12px #00339922;
}
.player-link .player-name {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-top: 1px;
	
}
.player-link .player-fname {
	font-size: 0.9em;
	color: white;
	font-weight: 400;
	line-height: 1.1;
	letter-spacing:-0.06em;
}
.player-link .player-lname {
	font-size: 1.15em;
	color: var(--color-light);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	font-family: 'Fjalla One', Arial, sans-serif;
	text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}
.player-icons {
	font-family: 'Fjalla One', Arial, sans-serif;
	color: var(--color-bg);
}
.player-link:hover .player-lname {
	color: #fcb900;
}

.pitch .player-link:hover .player-lname {
	color: var(--color-light);
	text-shadow: 0 2px 9px #234b9a11;
}
.pitch {
	position: relative;
	z-index: 0;  /* <---- Viktigt */
	overflow: visible; /* (Eller hidden om du vill klippa utanför) */
	
}

.pitch:after {
	z-index: 1;
	position: absolute;
}

.player-link {
	position: absolute;
	z-index: 2;
}

.player-on-pitch {
	position: absolute;
	transform: translate(-50%, -50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	z-index: 22;
}
.player-on-pitch img {
	width: 48px; height: 48px;
	object-fit: cover; border-radius: 50%;
	border: 2px solid #fff; box-shadow: 0 2px 9px #234b9a11;
	margin-bottom: 1px;
	z-index:2;
}
.player-on-pitch .num {
	display: none;
	font-size: 0.92em;
	background: #123b77;
	color: #fff;
	border-radius: 1em;
	padding: 1px 7px;
	margin-bottom: 2px;
	margin-top: 1px;
	font-weight: 700;
	box-shadow: 0 1px 5px #234b9a18;
}
.player-on-pitch .player-name {
	font-size: 0.92em;
	color: #234b9a;
	background: #e6eefcC0;
	border-radius: 7px;
	padding: 2px 8px;
	margin-top: 1px;
	white-space: nowrap;
	font-weight: 600;
	box-shadow: 0 2px 7px #bed8ff28;
}
@media (max-width: 900px) {
	.lineup-pitches-flex {
		flex-direction: column;
		gap: 2em;
		align-items: center;
		margin-left:1em;
	}
	
	.lineup-pitch-235 { max-width: 90vw;  margin-left:-.6em;}
	
	.opponent-header h1 {
		font-size: 1.8em;
		font-family:Arial, sans-serif;
		margin-top: 0.1em;
		margin-bottom: 0.35em;
		color: var(--color-bg);
	}
	.opponent-header img {
		max-height:40px;
		margin:0px;
		padding:0px;
	}
}



@media (max-width: 900px) {
    
    .matcher {
		margin-bottom:-2em;
	}
    html, body {
		max-width: 100vw;
		overflow-x: hidden;
	}
    .match-section {
		padding: 0 0.3em;
		width:100vw;
		
		
		margin-left:-1.5em;
		overflow: hidden;
		
	}
    .match-group {
		margin-bottom: 0.5em;
		
		
	}
    .match-group-title {
		font-size: 1.1em;
		text-transform: uppercase;
		font-stretch: condensed;
		
		margin-bottom: 0.7em;
		margin-left: 0.2em;
		margin-top: 2.6em;
	}
    
    .match-list-u {
		display: flex;
		flex-direction: column;
		gap: .5em;
		background: #white;
		border: 0px;
		margin-left:.6em;
		
		
	}
	
	
    .match-row-u {
		flex-direction: column;
		align-items: stretch;
		padding: .55em .5em .55em .5em;
		gap: 0em;
		min-height: 130px;
		width: 90vw;
		background: white;
		border-radius: 1.3em;
		box-shadow: 0 2px 14px #234b9a17;
		border: 1px solid #e0e6f3;
		margin-bottom: .51em;
		margin-left: .51em;
		margin-top: -0.51em;
		
		overflow: hidden;
		
		
		
	}
	.match-wrapper {
		width: 90vw;
		background-color: white;
		margin-left:-.5em;
	}
    
    .match-row-u:hover {
		background: white;
	}
    
    .match-date-u {
		min-width: 120%;
		font-size: .95em;
		background: #f6f7fa;
		padding:0.4em;
		padding-left:1em;
		color: black;
		font-weight: 500;
		text-align: left;
		overflow: hidden;
		margin-left:-1em;
		position:absolute;
		top:0em;
	}
    .match-competition-u {
		min-width: 0;
		max-width: 95vw;
		color: black;
		font-size: 1em;
		margin-right: 0;
		margin-bottom: 0.15em;
		display: hidden;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		margin-left:90px;
		margin-top:-1.5em;
		
		
	}
    
    .match-teams-u {
		min-width: 0;
		width: 100%;
		font-size: 1em;
		grid-template-columns: 1fr auto 1fr;
		align-items: center;
		gap: 0.04em;
		margin-bottom: 0.07em;
		margin-top: .4em;
		overflow: hidden;
		padding-top:0%;
	}
    .match-team-left,
    .match-team-right {
		min-width: 0;
		flex-wrap: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		align-items: center;
		font-size: 0;
	}
	
    .result-badge-u {
		min-width: 1.4em;
		font-size: 1.1em;
		letter-spacing: -0.2em;
		margin: 0 0.12em;
		padding: .13em .49em;
		padding-right: .7em;
		border-radius: 1em;
		box-shadow: 0 1px 2px rgba(0,0,0,0.08);
	}
    
    .match-links-row {
		margin-top: 0.32em;
		width: 100%;
		display: flex;
		align-items: center;
		gap: 0.6em;
		flex-wrap: nowrap;
		justify-content: space-between;
		margin-left:40%;
		
	}
    .match-review-u {
		margin-left: -1em;
		margin-top: 0.07em;
		font-size: 1em;
		flex: 1 1 auto;
		color: #2365c8;
		font-weight: 500;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		text-decoration: none;
		transition: color 0.2s;
	}
    .match-review-u:hover {
		color: #1a4e91;
		text-decoration: none;
	}
    .future-label {
		margin-left: 0;
		margin-top: 0.22em;
		font-size: 0.97em;
		padding: .10em .45em;
		white-space: normal;
		display: inline-block;
	}
    .toggle-events {
		margin-right: -1.4em;
		margin-top: -.9em;
		font-size: 1.35em;
		align-self: flex-end;
		position: absolute;
		top:18px;
		right:32px;
		flex: 0 0 auto;
		
		border-radius: 50%;
		padding: 0.2em 0.25em;
		box-shadow: 0 0.5px 1.5px rgba(0,0,0,0.07);
		border: none;
	}
    
    /* Hindra att något element klipper text på mobil */
    .match-row-u,
    .match-teams-u,
    .match-team-left,
    .match-team-right {
		min-width: 0 !important;
		overflow: hidden !important;
		text-overflow: ellipsis;
		word-break: break-word;
	}
    
    /* Expanderbara händelser – mindre marginal, grid mindre */
    .match-events {
		font-size: 0.75em;
		padding: 0.8em 0.1em 0.8em 0.3em;
		border-bottom: 1px solid #ccc;
		border-top: 2px solid white;
		border-radius: 0;
		margin-bottom: .5em;
		margin-top: -10px;
		margin-left:2.2em;
		background: #f6f7fa;
	}
    
    
	
    
    .event-grid {
		grid-template-columns: 1fr 38px 1fr;
		column-gap: 0.3em;
		
	}
    .event-col.left {
		margin-right:-2em;	
	}
	.event-col.center {
		
		margin-left:2em;	
	}
    .event-col.left,
    .event-col.right {
		font-size: 0.84em;
		padding: 0 0.05em;
		gap: 0.15em;
		
	}
}

.stats-summary-card, .player-summary-card {
	background: #f9fafc;
	border: 1.7px solid #e7eaf4;
	border-radius: 1.3em;
	box-shadow: 0 3px 14px #1239c31a;
	max-width: 820px;
	margin: 0 auto 2em auto;
	font-size: 1.15em;
	font-weight: 600;
	color: #2a3e66;
	padding: 1.3em 2.2em;
	text-align: center;
}
.stats-summary-flex {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 2em;
}
.stats-summary-box {
	min-width: 200px;
}
.stats-toptables-flex {
	display: flex;
	gap: 2em;
	justify-content: center;
	margin: 2.5em 0 2em 0;
	flex-wrap: wrap;
}
.stats-toptables-flex > div {
	flex: 1 1 340px;
	min-width: 260px;
	max-width: 420px;
	display: flex;
	flex-direction: column;
	align-items: center;
}
.stats-toptables-flex h2 {
	margin-top: 0;
	margin-bottom: 0.8em;
	font-size: 1.2em;
	text-align: center;
}
.stats-toptable {
	width: 100%;
	max-width: 540px;
	border-radius: 1em;
	background: #f8faff;
	box-shadow: 0 1px 6px #1239c30b;
	font-size: .9em;
	overflow: hidden;
	border: 1px solid #e3e8f4;
}
.stats-toptable th, .stats-toptable td {
	padding: 0.57em 0.8em;
	text-align: left;
}
.stats-toptable th {
	background: var(--color-light); font-family: 'Fjalla One', Arial, sans-serif; color: var(--color-bg);
}
.stats-toptable td {
	background: #fff;
	color: #293c5e;
	border-bottom: 1px solid #e6eaf2;
	font-weight: 500;
}
.stats-toptable tr:last-child td { border-bottom: none; }
.stat-namn-link {
	text-decoration: none;
	color: var(--color-bg);
	font-weight: 600;
}
.stat-namn-link:hover { text-decoration: underline; }

.stat-count {
	font-size: 2.1em;
	font-weight: 700;
	color: var(--color-bg);
	margin: 0.1em 0 0.3em 0;
}

.stat-label-stats { 
    display: block; font-size: 1.2em;  letter-spacing: 0.01em;
}
.stat-sub {
	font-size: 0.98em;
}
.stat-vinst {
	color: #1a7a36;
}
.stat-avgjort {
	color: #2c3776;
}
.stat-förlust {
	color: #c53125;
}

.stats-toptable img {
	all: unset; 
	height:1.4em;
	vertical-align: middle;
}

@media (max-width: 900px) {
	.stats-toptables-flex {
		flex-direction: column;
		gap: 1em;
		align-items: center;
	}
	.stats-toptables-flex > div {
		max-width: 100%;
	}
}
@media (max-width: 700px) {
	.stats-summary-card, .player-summary-card { padding: 1em 0.5em; }
	.stats-toptable { font-size: 0.98em; }
}
.stats-dashboard-flex {
	display: flex;
	gap: 1.7em;
	justify-content: center;
	margin: 0 auto 2.3em auto;
	flex-wrap: wrap;
	max-width: 820px;
}
.stats-dashboard-card {
	background: linear-gradient(70deg, #fff 80%, var(--color-light) 100%);
	border: 1.7px solid var(--color-light);
	border-radius: 1.2em;
	box-shadow: 0 3px 18px #fcb90014;
	min-width: 200px;
	flex: 1 1 200px;
	max-width: 320px;
	padding: 2em 1.2em 1.3em 1.2em;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
}
.stats-dashboard-card .stat-icon {
	font-size: 2.5em;
	margin-bottom: 0.2em;
	color: #234b9a;
	opacity: 0.77;
}
.stats-dashboard-card .stat-label-stats {
	font-size: 1.09em;
	color: #222;
	font-weight: 700;
	letter-spacing: 0.01em;
}
.stats-dashboard-card .stat-count {
	font-size: 2.45em;
	font-weight: 800;
	color: #234b9a;
	margin: 0.1em 0 0.32em 0;
	letter-spacing: -0.02em;
}
.stats-dashboard-card .stat-sub {
	font-size: .8em;
	color: #595959;
	font-weight: 500;
}
.stats-records-card {
    margin-top: 0rem;
    margin-bottom: 1rem;
    padding: 1.5rem 1.75rem;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.04);
}

.stats-records-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.25rem;
}

.stats-record-card {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background:
        radial-gradient(circle at top left, rgba(48,138,76,0.05), transparent 55%),
        radial-gradient(circle at bottom right, rgba(35,75,154,0.04), transparent 55%);
    border: 1px solid rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Kort som är klickbara (matchlänk) */
.stats-record-card.clickable {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.stats-record-card.clickable:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(0,0,0,0.12);
    border-color: rgba(0,0,0,0.08);
}

/* Rubriken i kortet */
.stats-record-card .stat-label-stats {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.85;
    margin-bottom: 0.35rem;
}

.stat-record-value {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
	color: var(--color-bg);
	
}

.stat-record-sub {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Länk för motståndare inne i kortet */
.record-opponent-link {
    text-decoration: underline;
    font-weight: 500;
    color: inherit;
}

.record-opponent-link:hover {
    opacity: 0.8;
}


/* När det inte finns data men vi ändå renderar länken med "#" */
.stats-record-link.is-disabled {
    pointer-events: none;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

/* --- Match stats: modern layout --- */

.match-stats-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    margin-top: 1.25rem;
}

/* Paneler */

.stats-panel {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 18px;
    padding: 1.4rem 1.6rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
    box-shadow: 0 9px 20px rgba(15, 23, 42, 0.18);
}

.stats-panel h3 {
    margin: 0 0 .6rem;
    font-size: 0.95rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #64748b;
}

.stats-panel-header {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    margin-bottom: .75rem;
}

.stats-panel-subtitle {
    font-size: .85rem;
    color: #1f2937;
    font-weight: 600;
}

/* --- Nyckeltal / jämförelser --- */

.stats-comparison-list {
    display: flex;
    flex-direction: column;
    gap: .9rem;
}

.stats-comparison-row {
    display: grid;
    grid-template-columns: minmax(0, 160px) minmax(0, 1fr);
    column-gap: 1.2rem;
    row-gap: .4rem;
    align-items: center;
}

.stats-comparison-label {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .9rem;
    font-weight: 600;
    color: #0f172a;
}

.stats-comparison-icon {
    font-size: 1.05rem;
}

.stats-comparison-body {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.stats-bar {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.stats-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: .8rem;
}

.stats-bar-team {
    font-weight: 600;
    color: #4b5563;
}

.stats-bar-value {
    font-weight: 700;
    color: var(--color-bg);
    font-size: .95rem;
}

.stats-bar-track {
    position: relative;
    width: 100%;
    height: 7px;
    border-radius: 999px;
    overflow: hidden;
    background: linear-gradient(90deg, #e5e7eb, #e5e7eb);
}

.stats-bar-fill {
    position: absolute;
    inset: 0;
    width: 0;
    border-radius: inherit;
    transition: width .35s ease-out;
}

.stats-bar--left .stats-bar-fill {
    background: var(--color-bg);
}

.stats-bar--right .stats-bar-fill {
    background: var(--color-accent);
}

/* --- Snittålder --- */

.stats-panel--age .stats-age-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.stats-age-card {
    border-radius: 14px;
    padding: .9rem 1rem;
    background: radial-gradient(circle at top left, #eff6ff, #ffffff);
    border: 1px solid rgba(129, 140, 248, 0.5);
}

.stats-age-team {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #6b7280;
    margin-bottom: .15rem;
}

.stats-age-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-bg);
}

.stats-age-label {
    font-size: .75rem;
    color: #6b7280;
}

/* --- Spelarstatistik-tabell --- */

.stats-table-wrapper {
    overflow-x: auto;
    margin-top: .4rem;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .86rem;
}

.stats-table thead {
    background: var(--color-bg);
    color: #f9fafb;
}

.stats-table thead th {
    padding: .55rem .75rem;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.stats-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

.stats-table tbody tr:nth-child(odd) {
    background: #ffffff;
}

.stats-table tbody td {
    padding: .45rem .75rem;
    border-bottom: 1px solid #e5e7eb;
}

.stats-table--players tbody td:nth-child(2),
.stats-table--players tbody td:nth-child(3) {
    text-align: center;
    font-weight: 600;
}

/* --- Kortpanel --- */

.stats-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem;
    margin-top: .4rem;
}

.stats-cards-team-name {
    font-size: .85rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: .4rem;
}

.stats-card-line {
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;
}

.stats-card-chip {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .8rem;
    padding: .28rem .55rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background: #f3f4f6;
}

.stats-card-chip--yellow {
    border-color: rgba(234, 179, 8, .55);
    background: rgba(254, 243, 199, .9);
}

.stats-card-chip--red {
    border-color: rgba(220, 38, 38, .55);
    background: rgba(254, 226, 226, .9);
}

/* --- Målminuter/diagram --- */

.stats-panel--chart .stats-chart-subtitle {
    margin: 0 0 .6rem;
    font-size: .8rem;
    color: var(--color-bg);
}

.stats-chart-container {
    position: relative;
    width: 100%;
    max-width: 640px;
}

/* --- Responsivitet --- */

@media (max-width: 768px) {
    .stats-comparison-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .stats-comparison-label {
        margin-bottom: .15rem;
    }

    .stats-panel {
        padding: 1.1rem 1.1rem;
    }

    .stats-panel--age .stats-age-grid,
    .stats-cards-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}



@media (max-width: 700px) {
	.stats-dashboard-flex { flex-direction: column; gap: 1.1em; }
	.stats-dashboard-card { max-width: 100%; }
}

.header-language-switch {
	display: grid;
	gap: 4px;
	position:absolute;
	align-items: center;
	right: .5em;
	top: .5em;
}
.header-language-switch .lang-btn {
	padding: 0;
	border: 1.7px solid #d8e3fa;
	border-radius: 7px;
	background: #f7fafc;
	max-height:1.5em;
	width:2em;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: border-color 0.17s, box-shadow 0.16s;
	box-shadow: 0 1px 7px #ccd6e330;
}
.header-language-switch .lang-btn.active,
.header-language-switch .lang-btn:hover {
	border-color: #74a7e4;
	background: #e6eefb;
}
.header-language-switch .flag-icon {
	width: 100%;
	height: 100%;
	border-radius: 5px;
	object-fit: cover;
	display: block;
	box-shadow: none;
}

/* Tacksektion */
.acknowledgements {
    margin-top: 2em;
}

.acknowledgements h2 {
    font-size: 1.2em;
    margin-bottom: 1em;
}

.thank-card {
    margin-bottom: 1.5em;
    padding: 0.5em 0;
    border-left: 3px solid #ccc;
    padding-left: 1em;
}

/* Ansvarig utgivare med ikon */
.responsible {
    margin-top: 2em;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 8px;
}

.linkedin-link img {
    width: 22px;
    height: 22px;
    vertical-align: middle;
	margin-left: -8px;
	margin-top:2px;
}
.fakta-wrapper {
    position: relative;
    margin-top: 1em;
    max-width: 100%;
	z-index:1;
}

.policy-section h2, .faq-section h2, .acknowledgements h2 {
	color: var(--color-bg);
	font-family: 'Fjalla One', Arial, sans-serif;
}

.policy-section h3, .faq-section h3 {
	
	font-family: 'Fjalla One', Arial, sans-serif;
}

.fakta-text {
    overflow: hidden;
    max-height: 5.5em; /* ca 7 rader om line-height = 1.5 */
    line-height: 1.5em;
    position: relative;
    transition: max-height 0.4s ease;
    padding-bottom: 3em; /* plats för fade-overlay */
}

.fakta-wrapper[data-state="expanded"] .fakta-text {
    max-height: 1000em;
    padding-bottom: 0;
}

.fade-overlay {
    position: absolute;
    bottom: 1.2em;
    left: 0;
    right: 0;
    height: 4.5em;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
    pointer-events: none;
    transition: opacity 0.3s ease;
	z-index:2;
}

.fakta-wrapper[data-state="expanded"] .fade-overlay {
    opacity: 0;
    pointer-events: none;
}

.fakta-toggle-btn {
    margin-top: 1em;
    background: none;
    border: none;
    color: var(--color-bg);
    cursor: pointer;
	font-family: 'Fjalla One', Arial, sans-serif;
    font-size: 1em;
    padding: 0;
    text-decoration: underline;
	z-index:3;
}
.kallor-list {
    padding-left: 1.2em;
}
.kallor-list li {
    margin-bottom: 0.3em;
}
.kallor-list a {
	color: var(--color-bg);
	text-decoration: none;
}
.kallor-list a:hover {
	color: var(--color-light);
	text-decoration: underline;
}
.standings-table {
    border-collapse: collapse;
    width: 100%;
    max-width: 600px;
}
.standings-table th, .standings-table td {
    border: 1px solid #ccc;
    padding: 6px 10px;
    text-align: center;
}
.standings-table th {
    background-color: #f0f0f0;
}
.match-theme-link {
	margin-top: 1em;
	padding-top:.5em;
	font-size: 0.95em;
	color: #555;
	border-top: 1px solid var(--color-bg);
	
}
.match-theme-link a {
	font-weight: bold;
	color: var(--color-bg);
	text-decoration: none;
}
.match-theme-link a:hover {
	color: var(--color-light);
	text-decoration: underline;
}
.timeline-table {
    width: 100%;
    margin-top: 10px;
}
.timeline-table-row {
    display: flex;
    align-items: center;
    background: #f8f9fb;
    border-radius: 8px;
    margin-bottom: 10px;
    min-height: 46px;
    padding: 0;
}
.timeline-col {
    display: flex;
    align-items: center;
    min-height: 30px;
}
.timeline-col-left {
    flex: 2 1 0;
    justify-content: flex-end;   /* <-- HÖGERSTÄLL! */
    text-align: right;           /* <-- Viktigt för radbrytning */
    padding: 0 2px 0 0;
    gap: 1px;
    display: flex;
    align-items: center;
}

.timeline-col-right {
    flex: 2 1 0;
    justify-content: flex-start; /* <-- Vänsterställd */
    text-align: left;
    padding: 0 0 0 6px;
    gap: 1px;
    display: flex;
    align-items: center;
}

.timeline-col-time {
    flex: 0 0 50px;
    justify-content: center;
    text-align: center;
    font-weight: 600;
    color: var(--color-bg);
    font-size: 1em;
}
.goal-players {
    display: inline;
    font-weight: 400;
    color: black;
    font-size: 1em;
	
    white-space: normal;
}
.goal-assist {
    font-style: normal;
    color: #577d9c;
    margin-left: 0px;
}
.goal-score {
	min-width: 50px;
    text-align: center;
	
    border-radius: 0.7em;
    font-family: 'Fira Code', monospace;
    font-weight: 700;
    font-size: 1.07em;
    letter-spacing: -0.1em;
	
}
.goal-icon {
    margin-left: 6px;
    font-size: 1em;
    vertical-align: middle;
    color: #3d80c6;
}
.goal-minute {
    font-size: 1.1em;
    color: var(--color-bg);
    font-weight: 700;
}
.timeline-table-row a {
    text-decoration: none;
    color: black;
}
.timeline-table-row a:hover {
    color: var(--color-bg);
	text-decoration: underline;
}

.timeline-table-row .red-card-icon { font-size: 1em; color: #d83b3b; margin-right: 6px; }
.timeline-table-row .sub-icon { font-size: 1em; color: #3e7bb6; margin-right: 6px; }
.timeline-table-row .sub-arrow { font-size: 1em; color: #8098b8; margin: 0 4px; }
.goal-icon i,
.red-card-icon i,
.yellow-card-icon i,
.sub-icon i {
	
	color: #282828;
}
.red-card-icon i {
    margin-right: 6px;
}
.yellow-card-icon i {
    margin-right: 6px;
}
.goal-icon {
    margin-left: 12px;
}
.sub-icon {
    margin-right: 6px;
}
.timeline-col-mobile {
    display: none;
}
i {
	margin-left:.7em;
	margin-right:.7em;
	margin-bottom:-0.3em;
}
@media (max-width: 700px) {
    .timeline-col-left,
    .timeline-col-time,
    .timeline-col-right {
        display: none;
	}
    .timeline-col-mobile {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        width: 100%;
        padding: 7px 10px;
        font-size: 1.02em;
        background: none;
        font-weight: 400;
        color: #222;
        min-height: 40px;
	}
	.goal-assist {
		display:none;
	}
}

body {
  background-image: url('/images/bg.jpg');
  background-position: center calc(50% + 29px); /* Justera mitten uppåt */
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;

  /* Lägg till färg + blend */
  background-color: rgba(255, 255, 255, 0.7); /* vit med 50% opacity */
  background-blend-mode: lighten; /* eller multiply/overlay beroende på effekt */
}