/*
Theme Name: SBDF Full Theme
Theme URI: https://sbdf.blog/
Author: Svenska Brottningsdomarförbundet
Description: Ett komplett mörkt marinblått/lila WordPress-tema för SBDF med glasytor, responsiv hero, modulstöd och global bakgrund.
Version: 1.6.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: sbdf-theme
*/

:root{
    --sbdf-site-bg-image:none;
    --sbdf-bg-1:#021126;
    --sbdf-bg-2:#071c46;
    --sbdf-bg-3:#281050;
    --sbdf-surface:rgba(6,24,57,.76);
    --sbdf-surface-strong:rgba(7,27,63,.91);
    --sbdf-surface-purple:rgba(43,22,88,.84);
    --sbdf-line:rgba(148,163,184,.20);
    --sbdf-line-strong:rgba(255,255,255,.13);
    --sbdf-text:#f8fbff;
    --sbdf-soft:#d7e3f8;
    --sbdf-muted:#9fb0ce;
    --sbdf-yellow:#f5c542;
    --sbdf-blue:#38bdf8;
    --sbdf-purple:#8b5cf6;
    --sbdf-radius-xl:30px;
    --sbdf-radius-lg:22px;
    --sbdf-radius-md:16px;
    --sbdf-shadow:0 28px 70px rgba(0,0,0,.32);
    --sbdf-width:1440px;
    --sbdf-gutter:clamp(16px,4vw,64px);
}

*,
*::before,
*::after{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
    margin:0;
    min-height:100vh;
    overflow-x:hidden;
    color:var(--sbdf-text);
    font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    background:
        radial-gradient(circle at 16% 12%,rgba(56,189,248,.13),transparent 27%),
        radial-gradient(circle at 88% 10%,rgba(139,92,246,.23),transparent 34%),
        linear-gradient(135deg,var(--sbdf-bg-1),var(--sbdf-bg-2) 48%,var(--sbdf-bg-3));
}

body.home::before,
body.front-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -3;

    background-image: var(--sbdf-site-bg-image);
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;

    opacity: 0.48;
    filter: none;
    transform: none;
}

body.home::after,
body.front-page::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;

    background:
        linear-gradient(
            90deg,
            rgba(2, 17, 38, 0.62),
            rgba(7, 28, 70, 0.42) 46%,
            rgba(40, 16, 80, 0.46)
        ),
        radial-gradient(
            circle at 25% 35%,
            rgba(255, 255, 255, 0.025),
            transparent 32%
        );
}

a{color:inherit}

img{max-width:100%;height:auto}

.sbdf-site{
    position:relative;
    min-height:100vh;
}

.sbdf-container{
    width:min(var(--sbdf-width),calc(100% - (var(--sbdf-gutter) * 2)));
    margin-inline:auto;
}

.sbdf-main{
    min-height:60vh;
}

.sbdf-section{
    padding:clamp(28px,5vw,78px) 0;
}

.sbdf-section--compact{
    padding:clamp(20px,3vw,42px) 0;
}

.sbdf-glass{
    border:1px solid var(--sbdf-line);
    border-radius:var(--sbdf-radius-xl);
    background:
        linear-gradient(135deg,rgba(8,31,70,.82),rgba(39,20,84,.80));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.07),
        var(--sbdf-shadow);
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
}

.sbdf-site-header{
    position:sticky;
    top:0;
    z-index:50;
    border-bottom:1px solid rgba(255,255,255,.07);
    background:rgba(3,17,40,.62);
    backdrop-filter:blur(18px);
    -webkit-backdrop-filter:blur(18px);
}

.sbdf-header-inner{
    min-height:78px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:24px;
}

.sbdf-brand{
    display:flex;
    align-items:center;
    gap:13px;
    text-decoration:none;
}

.sbdf-brand img,
.sbdf-brand .custom-logo{
    width:52px;
    height:52px;
    object-fit:contain;
}

.sbdf-brand-text{
    display:grid;
    gap:2px;
}

.sbdf-brand-title{
    color:#fff;
    font-size:17px;
    font-weight:950;
    line-height:1.05;
}

.sbdf-brand-tagline{
    color:#aebfdd;
    font-size:11px;
}

.sbdf-nav ul{
    display:flex;
    align-items:center;
    gap:8px;
    margin:0;
    padding:0;
    list-style:none;
}

.sbdf-nav a{
    display:inline-flex;
    align-items:center;
    min-height:40px;
    padding:0 14px;
    border-radius:999px;
    color:#eaf1ff;
    font-size:13px;
    font-weight:800;
    text-decoration:none;
}

.sbdf-nav a:hover,
.sbdf-nav .current-menu-item > a{
    background:rgba(255,255,255,.09);
}

.sbdf-menu-toggle{
    display:none;
    width:44px;
    height:44px;
    border:1px solid var(--sbdf-line);
    border-radius:13px;
    background:rgba(255,255,255,.06);
    color:#fff;
    font-size:20px;
}

.sbdf-hero{
    padding:clamp(34px,7vw,100px) 0 clamp(40px,6vw,92px);
}

.sbdf-hero-panel{
    position:relative;
    overflow:hidden;
    display:grid;
    grid-template-columns:minmax(0,1.1fr) minmax(300px,.68fr);
    align-items:center;
    gap:clamp(28px,6vw,88px);
    padding:clamp(30px,5vw,74px);
}

.sbdf-hero-panel::before{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    background:
        linear-gradient(115deg,rgba(255,255,255,.045),transparent 38%),
        radial-gradient(circle at 72% 22%,rgba(255,255,255,.06),transparent 22%);
}

.sbdf-hero-copy,
.sbdf-hero-card{position:relative;z-index:1}

.sbdf-eyebrow{
    display:inline-flex;
    align-items:center;
    gap:8px;
    min-height:28px;
    padding:0 11px;
    border:1px solid rgba(255,255,255,.16);
    border-radius:999px;
    background:rgba(255,255,255,.08);
    color:#e6efff;
    font-size:9px;
    font-weight:950;
    letter-spacing:.09em;
    text-transform:uppercase;
}

.sbdf-eyebrow::before{
    content:"";
    width:7px;
    height:7px;
    border-radius:50%;
    background:var(--sbdf-yellow);
    box-shadow:0 0 13px rgba(245,197,66,.75);
}

.sbdf-hero h1{
    max-width:760px;
    margin:14px 0 14px;
    color:#fff;
    font-size:clamp(48px,7vw,96px);
    line-height:.91;
    font-weight:950;
    letter-spacing:-.065em;
}

.sbdf-hero-lead{
    max-width:650px;
    margin:0;
    color:var(--sbdf-soft);
    font-size:clamp(15px,1.5vw,18px);
    line-height:1.7;
}

.sbdf-actions{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    margin-top:25px;
}

.sbdf-btn,
.wp-element-button,
button,
input[type="submit"]{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:46px;
    padding:0 20px;
    border:1px solid rgba(255,255,255,.14);
    border-radius:999px;
    background:rgba(255,255,255,.08);
    color:#fff;
    font:inherit;
    font-size:13px;
    font-weight:900;
    text-decoration:none;
    cursor:pointer;
    transition:transform .2s ease,background .2s ease,border-color .2s ease,box-shadow .2s ease;
}

.sbdf-btn:hover,
.wp-element-button:hover,
button:hover,
input[type="submit"]:hover{
    transform:translateY(-2px);
    background:rgba(255,255,255,.13);
}

.sbdf-btn--primary{
    border-color:transparent;
    background:linear-gradient(135deg,#f8d45d,#f1ad1c);
    color:#101827;
    box-shadow:0 12px 30px rgba(245,197,66,.28);
}

.sbdf-hero-card{
    padding:26px;
    border:1px solid rgba(255,255,255,.14);
    border-radius:24px;
    background:
        linear-gradient(145deg,rgba(255,255,255,.13),rgba(255,255,255,.06));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.10),
        0 24px 55px rgba(0,0,0,.28);
}

.sbdf-hero-icon{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:38px;
    height:38px;
    border-radius:11px;
    background:linear-gradient(135deg,#ffd85a,#f3af1e);
    color:#15213a;
    font-size:19px;
}

.sbdf-hero-card h2{
    margin:13px 0 7px;
    font-size:clamp(25px,3vw,36px);
    line-height:1;
    letter-spacing:-.035em;
}

.sbdf-hero-card p{
    margin:0;
    color:#d6e1f5;
    font-size:13px;
    line-height:1.65;
}

.sbdf-checks{
    display:grid;
    gap:8px;
    margin:16px 0 19px;
    padding:0;
    list-style:none;
}

.sbdf-checks li{
    display:flex;
    gap:9px;
    color:#f4f7ff;
    font-size:12px;
    font-weight:800;
}

.sbdf-checks li::before{
    content:"✓";
    color:var(--sbdf-yellow);
}

.sbdf-card-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:20px;
}

.sbdf-card{
    position:relative;
    overflow:hidden;
    min-height:220px;
    padding:25px;
    border:1px solid var(--sbdf-line);
    border-radius:var(--sbdf-radius-lg);
    background:
        linear-gradient(145deg,rgba(7,28,65,.87),rgba(42,22,88,.82));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.07),
        0 18px 42px rgba(0,0,0,.22);
}

.sbdf-card::before{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    background:linear-gradient(120deg,rgba(255,255,255,.035),transparent 42%);
}

.sbdf-card > *{position:relative;z-index:1}

.sbdf-card h2,
.sbdf-card h3{
    margin:0 0 10px;
    color:#fff;
    letter-spacing:-.035em;
}

.sbdf-card p{
    color:var(--sbdf-soft);
    line-height:1.65;
}

.sbdf-page-header{
    padding:58px 0 24px;
}

.sbdf-page-header h1{
    margin:0;
    font-size:clamp(38px,5vw,68px);
    line-height:.95;
    letter-spacing:-.055em;
}

.sbdf-content{
    padding:0 0 70px;
}

.sbdf-content-panel{
    padding:clamp(24px,4vw,48px);
}

.sbdf-content-panel h1,
.sbdf-content-panel h2,
.sbdf-content-panel h3{
    color:#fff;
}

.sbdf-content-panel p,
.sbdf-content-panel li{
    color:var(--sbdf-soft);
    line-height:1.75;
}

.sbdf-content-panel a{
    color:#93c5fd;
}

input,
select,
textarea{
    max-width:100%;
    border:1px solid rgba(148,163,184,.30);
    border-radius:14px;
    background:rgba(255,255,255,.95);
    color:#0f172a;
    font:inherit;
}

input,
select{min-height:46px;padding:0 14px}
textarea{padding:13px 14px}

.sbdf-site-footer{
    margin-top:0;
    border-top:1px solid rgba(255,255,255,.08);
    background:
        linear-gradient(135deg,rgba(2,17,38,.88),rgba(37,15,78,.88));
}

.sbdf-footer-inner{
    padding:44px 0 20px;
}

.sbdf-footer-grid{
    display:grid;
    grid-template-columns:1.25fr 1fr 1fr;
    gap:42px;
    padding-bottom:28px;
}

.sbdf-footer-grid h2{
    margin:0 0 13px;
    color:#fff;
    font-size:18px;
}

.sbdf-footer-grid p{
    color:#c8d5ed;
    line-height:1.65;
}

.sbdf-footer-links{
    display:grid;
    gap:11px;
}

.sbdf-footer-link{
    display:flex;
    align-items:center;
    gap:10px;
    color:#eaf1ff;
    font-size:13px;
    font-weight:750;
    text-decoration:none;
}

.sbdf-footer-symbol{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:30px;
    height:30px;
    border:1px solid rgba(148,163,184,.19);
    border-radius:10px;
    background:rgba(255,255,255,.055);
}

.sbdf-footer-bottom{
    padding-top:17px;
    border-top:1px solid rgba(255,255,255,.075);
    color:#9fb0ce;
    font-size:11px;
}

.sbdf-empty{
    padding:40px;
    text-align:center;
}



/* =========================================================
   VERSION 1.1 – BAKGRUNDSBILD OCH HERO ENDAST PÅ STARTSIDAN
========================================================= */

/* Undersidor får en ren, sammanhängande mörk bakgrund utan fotobild. */
body:not(.home):not(.front-page){
    background:
        radial-gradient(circle at 10% 8%,rgba(14,116,144,.10),transparent 28%),
        radial-gradient(circle at 92% 6%,rgba(109,40,217,.15),transparent 32%),
        linear-gradient(135deg,#031329 0%,#091c46 48%,#24104f 100%);
}

/* Inga extra temaöverlägg på undersidor. */
body:not(.home):not(.front-page)::before,
body:not(.home):not(.front-page)::after{
    content:none !important;
    display:none !important;
}

/* Undersidornas innehåll lämnas helt till sidans shortcode/modul. */
.sbdf-inner-page{
    width:100%;
    min-height:60vh;
}

.sbdf-inner-page-content{
    width:100%;
    margin:0;
    padding:0;
}

/* WordPress-standardmarginaler ska inte skapa vita eller tomma band. */
.sbdf-inner-page-content > :first-child{
    margin-top:0 !important;
}

.sbdf-inner-page-content > :last-child{
    margin-bottom:0 !important;
}

.sbdf-inner-page-content > .wp-block-shortcode,
.sbdf-inner-page-content > .wp-block-html,
.sbdf-inner-page-content > .wp-block-group,
.sbdf-inner-page-content > .alignfull{
    width:100% !important;
    max-width:none !important;
    margin-left:0 !important;
    margin-right:0 !important;
}

/* Tomma stycken och spacer-block runt en ensam modul döljs. */
.sbdf-inner-page-content > p:empty,
.sbdf-inner-page-content > .wp-block-spacer{
    display:none !important;
}

/* Ingen temarubrik eller temaglasruta på vanliga sidor. */
body.page:not(.home) .sbdf-page-header,
body.page:not(.home) .sbdf-content,
body.page:not(.home) .sbdf-content-panel{
    background:transparent !important;
    box-shadow:none !important;
    border:0 !important;
    border-radius:0 !important;
    backdrop-filter:none !important;
    -webkit-backdrop-filter:none !important;
}

/* Headern behålls kompakt och stabil på undersidor. */
body:not(.home):not(.front-page) .sbdf-site-header{
    background:rgba(3,17,40,.94);
}

/* Moduler med egen fullbreddsdesign ska kunna gå kant till kant. */
body:not(.home):not(.front-page) .sbdf-main{
    width:100%;
    max-width:none;
    margin:0;
    padding:0;
}


/* =========================================================
   VERSION 1.2 – STARTSIDANS SHORTCODES UTAN EXTRA TEMARAM
========================================================= */

/*
 * Startsidan behåller hero och bakgrund, men allt innehåll som läggs
 * i WordPress-editorn visas därefter utan container, glasruta eller
 * extra vertikala mellanrum.
 */
.sbdf-front-content{
    width:100%;
    max-width:none;
    margin:0;
    padding:0;
}

.sbdf-front-content > :first-child{
    margin-top:0 !important;
}

.sbdf-front-content > :last-child{
    margin-bottom:0 !important;
}

.sbdf-front-content > .wp-block-shortcode,
.sbdf-front-content > .wp-block-html,
.sbdf-front-content > .wp-block-group,
.sbdf-front-content > .alignfull{
    width:100% !important;
    max-width:none !important;
    margin-left:0 !important;
    margin-right:0 !important;
}

/* Tar bort WordPress block-gap runt startsidans fullbreddsmoduler. */
.sbdf-front-content,
.sbdf-front-content.is-layout-flow,
.sbdf-front-content.is-layout-constrained{
    row-gap:0 !important;
    gap:0 !important;
}

/* Tomma block och spacers ska inte skapa breda färgband. */
.sbdf-front-content > p:empty,
.sbdf-front-content > .wp-block-spacer{
    display:none !important;
}

/*
 * Moduler med egen fullbredd ska inte påverkas av temats containerregler.
 * Håll selektorerna generella eftersom varje SBDF-modul använder egen klass.
 */
.sbdf-front-content .sbdfsponsors,
.sbdf-front-content .sbdf-contest-shell,
.sbdf-front-content [class*="sbdf-"][class*="-shell"],
.sbdf-front-content [class^="sbdf"][style]{
    max-width:none;
}

/* Undvik att modulers 100vw-layout skapar horisontell förskjutning. */
.home .sbdf-front-content{
    overflow-x:clip;
}

/* Hero ska inte få någon negativ överlappning från efterföljande modul. */
.home .sbdf-hero{
    position:relative;
    z-index:2;
    margin-bottom:0;
}

.home .sbdf-front-content{
    position:relative;
    z-index:1;
}


/* =========================================================
   VERSION 1.3 – INTEGRERADE STARTSIDESMODULER
========================================================= */

.sbdf-home-modules{
    width:100%;
    max-width:none;
    margin:0;
    padding:0;
}

.sbdf-home-module{
    position:relative;
    width:100%;
    max-width:none;
    margin:0;
    padding:0;
}

.sbdf-home-module > :first-child{
    margin-top:0 !important;
}

.sbdf-home-module > :last-child{
    margin-bottom:0 !important;
}

/* Modulerna får själva styra fullbredd, färg och struktur. */
.sbdf-home-module .sbdfsponsors,
.sbdf-home-module .sbdfnews,
.sbdf-home-module .sbdf-news,
.sbdf-home-module [class*="sbdf-news"],
.sbdf-home-module [class*="sbdfnews"]{
    max-width:none !important;
}

/* Undvik vita remsor från WordPress-temat runt integrerade moduler. */
.home .sbdf-home-modules,
.home .sbdf-home-module,
.home .sbdf-home-module > section,
.home .sbdf-home-module > div{
    border-top-color:transparent;
}

/* Diskret övergång mellan hero och första integrerade modul. */
.home .sbdf-hero{
    padding-bottom:clamp(24px,4vw,54px);
}

.home .sbdf-home-modules{
    position:relative;
    z-index:2;
}

/* Valfritt redigeringsinnehåll från sidan Hem visas efter de fasta modulerna. */
.sbdf-front-extra-content{
    width:100%;
    max-width:none;
    margin:0;
    padding:0;
}

.sbdf-front-extra-content:empty{
    display:none;
}

/* Administratörsmeddelande syns bara för inloggade administratörer. */
.sbdf-module-admin-notice{
    width:min(1100px,calc(100% - 32px));
    margin:18px auto;
    padding:14px 16px;
    border:1px solid rgba(245,197,66,.35);
    border-radius:14px;
    background:rgba(245,197,66,.10);
    color:#fff4c2;
    font-size:13px;
}


/* =========================================================
   VERSION 1.4 – STARTSIDESMODULER I SAMMA DESIGN SOM HERO
========================================================= */

/*
 * Bakgrundsbilden ska vara synlig mellan och runt alla startsidesmoduler.
 * Modulerna ligger därför i samma centrala container som hero-sektionen.
 */
.home .sbdf-home-modules{
    width:100%;
    max-width:none;
    margin:0;
    padding:0 0 clamp(28px,5vw,72px);
    background:transparent !important;
}

.home .sbdf-home-module{
    width:100%;
    max-width:none;
    margin:0;
    padding:clamp(14px,2vw,24px) 0;
    background:transparent !important;
}

.home .sbdf-home-module-container{
    width:min(var(--sbdf-width),calc(100% - (var(--sbdf-gutter) * 2)));
    margin-inline:auto;
}

.home .sbdf-home-module-frame{
    position:relative;
    overflow:hidden;
    width:100%;
    padding:clamp(18px,2.8vw,34px);
    border:1px solid rgba(148,163,184,.22);
    border-radius:30px;
    background:
        linear-gradient(
            135deg,
            rgba(7,29,66,.70),
            rgba(35,20,82,.68)
        );
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08),
        0 28px 70px rgba(0,0,0,.28);
    backdrop-filter:blur(12px);
    -webkit-backdrop-filter:blur(12px);
}

.home .sbdf-home-module-frame::before{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    background:
        linear-gradient(120deg,rgba(255,255,255,.045),transparent 40%),
        radial-gradient(circle at 88% 10%,rgba(139,92,246,.13),transparent 32%);
}

.home .sbdf-home-module-frame > *{
    position:relative;
    z-index:1;
}

/* Integrerade moduler får inte bryta ut till 100vw på startsidan. */
.home .sbdf-home-module-frame .sbdfsponsors,
.home .sbdf-home-module-frame .sbdfnews,
.home .sbdf-home-module-frame .sbdf-news,
.home .sbdf-home-module-frame [class*="sbdf-news"],
.home .sbdf-home-module-frame [class*="sbdfnews"]{
    position:relative !important;
    left:auto !important;
    right:auto !important;
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
    margin-left:0 !important;
    margin-right:0 !important;
    padding:0 !important;
    background:transparent !important;
}

/* Sponsormodulens yttre fullbreddsbakgrund tas bort – korten behålls. */
.home .sbdf-home-module-frame .sbdfsponsors-shell{
    width:100% !important;
    max-width:none !important;
    min-height:0 !important;
    margin:0 !important;
    padding:clamp(14px,2vw,24px) !important;
    border:0 !important;
    border-radius:22px !important;
    background:
        linear-gradient(
            135deg,
            rgba(3,18,45,.40),
            rgba(33,18,73,.34)
        ) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.05) !important;
}

/* Nyhetsmodulens eventuella fullbreddssektion neutraliseras. */
.home .sbdf-home-module--news .sbdf-home-module-frame > section,
.home .sbdf-home-module--news .sbdf-home-module-frame > div{
    max-width:100% !important;
    margin-left:0 !important;
    margin-right:0 !important;
}

/* Ta bort färgband och helbreddsregler som moduler kan bära med sig. */
.home .sbdf-home-module-frame{
    isolation:isolate;
}

.home .sbdf-home-module-frame .alignfull,
.home .sbdf-home-module-frame [style*="100vw"]{
    width:100% !important;
    max-width:100% !important;
    margin-left:0 !important;
    margin-right:0 !important;
    left:auto !important;
    transform:none !important;
}

/* Lite större mellanrum mellan hero och första modulen. */
.home .sbdf-hero{
    padding-bottom:clamp(18px,3vw,34px);
}

/* Mobil */
@media(max-width:640px){
    .home .sbdf-home-module-frame{
        padding:12px;
        border-radius:22px;
    }

    .home .sbdf-home-module-frame .sbdfsponsors-shell{
        padding:12px !important;
        border-radius:17px !important;
    }
}


/* =========================================================
   VERSION 1.5 – TA BORT ALL INRE MODULBAKGRUND
   Endast startsidans globala bakgrund ska synas.
========================================================= */

/* Ta bort temats extra modulram helt. */
.home .sbdf-home-module-frame{
    padding:0 !important;
    border:0 !important;
    border-radius:0 !important;
    background:transparent !important;
    box-shadow:none !important;
    backdrop-filter:none !important;
    -webkit-backdrop-filter:none !important;
    overflow:visible !important;
}

.home .sbdf-home-module-frame::before,
.home .sbdf-home-module-frame::after{
    content:none !important;
    display:none !important;
}

/* Själva modulsektionen ska också vara transparent. */
.home .sbdf-home-module,
.home .sbdf-home-module-container,
.home .sbdf-home-modules{
    background:transparent !important;
    box-shadow:none !important;
    border:0 !important;
}

/* NYHETER – neutralisera modulens yttersta bakgrundslager oavsett klassvariant. */
.home .sbdf-home-module--news .sbdf-home-module-frame > *,
.home .sbdf-home-module--news .sbdf-home-module-frame > * > :first-child,
.home .sbdf-home-module--news [class*="news-shell"],
.home .sbdf-home-module--news [class*="news_shell"],
.home .sbdf-home-module--news [class*="news-wrap"],
.home .sbdf-home-module--news [class*="news_wrapper"],
.home .sbdf-home-module--news [class*="news-container"],
.home .sbdf-home-module--news [class*="news_container"]{
    background:transparent !important;
    box-shadow:none !important;
    border-color:transparent !important;
}

/* Behåll kort, sökfält och filter – ta bara bort den stora omslutande ytan. */
.home .sbdf-home-module--news article,
.home .sbdf-home-module--news input,
.home .sbdf-home-module--news select,
.home .sbdf-home-module--news button{
    background-clip:padding-box;
}

/* SPONSORER – ta bort hela den stora inre bakgrundsremsan. */
.home .sbdf-home-module--sponsors .sbdfsponsors,
.home .sbdf-home-module--sponsors .sbdfsponsors-shell,
.home .sbdf-home-module--sponsors .sbdfsponsors-track-wrap{
    background:transparent !important;
    box-shadow:none !important;
    border:0 !important;
}

/* Dekorativa bakgrundslager i sponsordelen tas bort. */
.home .sbdf-home-module--sponsors .sbdfsponsors-shell::before,
.home .sbdf-home-module--sponsors .sbdfsponsors-shell::after,
.home .sbdf-home-module--sponsors .sbdfsponsors-track-wrap::before,
.home .sbdf-home-module--sponsors .sbdfsponsors-track-wrap::after{
    content:none !important;
    display:none !important;
}

/* Ge luft mellan modulerna utan att skapa färgblock. */
.home .sbdf-home-module{
    padding:clamp(18px,3vw,34px) 0 !important;
}

/* Mobil */
@media(max-width:640px){
    .home .sbdf-home-module{
        padding:14px 0 !important;
    }
}


/* =========================================================
   VERSION 1.6 – YTTRE RAM KVAR, INRE BAKGRUND BORT
========================================================= */

/* Återställ temats yttre glasram runt varje integrerad modul. */
.home .sbdf-home-module-frame{
    position:relative !important;
    overflow:hidden !important;

    width:100% !important;
    padding:clamp(18px,2.8vw,34px) !important;

    border:1px solid rgba(148,163,184,.22) !important;
    border-radius:30px !important;

    background:
        linear-gradient(
            135deg,
            rgba(7,29,66,.42),
            rgba(35,20,82,.38)
        ) !important;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08),
        0 28px 70px rgba(0,0,0,.24) !important;

    backdrop-filter:blur(10px) !important;
    -webkit-backdrop-filter:blur(10px) !important;
}

.home .sbdf-home-module-frame::before{
    content:"" !important;
    display:block !important;

    position:absolute !important;
    inset:0 !important;

    background:
        linear-gradient(
            120deg,
            rgba(255,255,255,.035),
            transparent 42%
        ),
        radial-gradient(
            circle at 88% 10%,
            rgba(139,92,246,.10),
            transparent 32%
        ) !important;

    pointer-events:none !important;
}

.home .sbdf-home-module-frame::after{
    content:none !important;
    display:none !important;
}

.home .sbdf-home-module-frame > *{
    position:relative !important;
    z-index:1 !important;
}

/* NYHETER: ta bort endast modulens stora inre bakgrund. */
.home .sbdf-home-module--news .sbdf-home-module-frame > *,
.home .sbdf-home-module--news .sbdf-home-module-frame > * > :first-child,
.home .sbdf-home-module--news [class*="news-shell"],
.home .sbdf-home-module--news [class*="news_shell"],
.home .sbdf-home-module--news [class*="news-wrap"],
.home .sbdf-home-module--news [class*="news_wrapper"],
.home .sbdf-home-module--news [class*="news-container"],
.home .sbdf-home-module--news [class*="news_container"]{
    background:transparent !important;
    box-shadow:none !important;
    border-color:transparent !important;
}

/* Behåll nyhetskort, filter och formulär visuellt intakta. */
.home .sbdf-home-module--news article,
.home .sbdf-home-module--news input,
.home .sbdf-home-module--news select,
.home .sbdf-home-module--news button{
    box-shadow:initial;
}

/* SPONSORER: ta bort remsans inre bakgrund men behåll sponsorkorten. */
.home .sbdf-home-module--sponsors .sbdfsponsors,
.home .sbdf-home-module--sponsors .sbdfsponsors-shell,
.home .sbdf-home-module--sponsors .sbdfsponsors-track-wrap{
    background:transparent !important;
    box-shadow:none !important;
    border:0 !important;
}

.home .sbdf-home-module--sponsors .sbdfsponsors-shell::before,
.home .sbdf-home-module--sponsors .sbdfsponsors-shell::after,
.home .sbdf-home-module--sponsors .sbdfsponsors-track-wrap::before,
.home .sbdf-home-module--sponsors .sbdfsponsors-track-wrap::after{
    content:none !important;
    display:none !important;
}

/* Sponsorkorten och deras skuggor ska fortfarande synas. */
.home .sbdf-home-module--sponsors .sbdfsponsor-card{
    border:1px solid rgba(148,163,184,.22) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08),
        0 14px 34px rgba(0,0,0,.22) !important;
}

/* Mobil */
@media(max-width:640px){
    .home .sbdf-home-module-frame{
        padding:12px !important;
        border-radius:22px !important;
    }
}

/* =========================================================
   HEADER, KONTO-MENY OCH RESPONSIV LAYOUT – STÄDAD SLUTVERSION
========================================================= */

/* Header */
.sbdf-header-inner{
    position:relative;
    min-height:76px;
}

.sbdf-brand{
    min-width:0;
    flex:0 1 auto;
}

.sbdf-brand .custom-logo-link{
    display:flex;
    align-items:center;
    flex:0 0 auto;
	 
}

.sbdf-brand img,
.sbdf-brand .custom-logo{
    display:block;
    width:auto !important;
    height:clamp(54px,5vw,76px) !important;
    max-width:min(220px,32vw) !important;
    max-height:76px !important;
    object-fit:contain;
}

.sbdf-nav{
    margin-left:auto;
}

.sbdf-header-actions{
    display:flex;
    align-items:center;
    gap:9px;
}



/* Mina sidor / inloggning */
#sbdf-primary-nav a[href*="/logga-in/"],
#sbdf-primary-nav a[href*="/mina-sidor/"]{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:8px !important;
    min-height:42px !important;
    padding:10px 15px !important;
    border:1px solid rgba(96,165,250,.35) !important;
    border-radius:999px !important;
    background:rgba(59,130,246,.12) !important;
    color:#fff !important;
    white-space:nowrap !important;
    line-height:1 !important;
}

#sbdf-primary-nav a[href*="/logga-in/"]::before,
#sbdf-primary-nav a[href*="/mina-sidor/"]::before{
    content:"👤" !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:22px !important;
    height:22px !important;
    flex:0 0 22px !important;
    border-radius:50% !important;
    background:rgba(56,163,230,.18) !important;
    font-size:15px !important;
    line-height:1 !important;
}

#sbdf-primary-nav a[href*="/logga-in/"]:hover,
#sbdf-primary-nav a[href*="/mina-sidor/"]:hover{
    background:rgba(59,130,246,.24) !important;
    border-color:rgba(96,165,250,.75) !important;
    transform:translateY(-1px) !important;
}

/* Surfplatta och mobil */
@media(max-width:980px){
    .sbdf-hero-panel{
        grid-template-columns:1fr;
    }

    .sbdf-card-grid,
    .sbdf-footer-grid{
        grid-template-columns:1fr 1fr;
    }

    .sbdf-site-header{
        width:100%;
        overflow:visible;
    }

    .sbdf-header-inner{
        width:calc(100% - 24px);
        max-width:none;
        min-height:68px;
        margin:0 auto;
        padding:8px 0;
        gap:12px;
    }

    .sbdf-brand{
        min-width:0;
        max-width:calc(100% - 56px);
        flex:1 1 auto;
        gap:10px;
    }

    .sbdf-brand .custom-logo-link{
        min-width:0;
        flex:0 1 auto;
    }

    .sbdf-brand img,
    .sbdf-brand .custom-logo{
        width:auto !important;
        height:50px !important;
        max-width:150px !important;
        max-height:50px !important;
    }

    .sbdf-brand-text{
        display:none;
    }

    .sbdf-menu-toggle{
        display:inline-flex;
        align-items:center;
        justify-content:center;
        width:44px;
        height:44px;
        min-width:44px;
        flex:0 0 44px;
        margin:0;
        padding:0;
        position:static;
        z-index:1002;
    }

    .sbdf-nav{
        display:none;
        position:absolute;
        top:calc(100% + 8px);
        left:0;
        right:0;
        width:100%;
        max-width:100%;
        margin:0;
        padding:12px;
        border:1px solid var(--sbdf-line);
        border-radius:18px;
        background:rgba(3,17,40,.98);
        box-shadow:0 20px 50px rgba(0,0,0,.40);
        z-index:1001;
    }

    .sbdf-nav.is-open,
    .sbdf-nav.sbdf-nav-open{
        display:block;
    }

    .sbdf-nav ul,
    .sbdf-nav .menu{
        display:flex;
        flex-direction:column;
        align-items:stretch;
        width:100%;
        margin:0;
        padding:0;
        gap:5px;
    }

    .sbdf-nav li{
        display:block;
        width:100%;
        margin:0;
    }

    .sbdf-nav li > a{
        display:flex !important;
        align-items:center !important;
        justify-content:flex-start !important;
        width:100% !important;
        min-height:44px !important;
        padding:10px 12px !important;
        border-radius:12px !important;
        white-space:normal !important;
    }

    #sbdf-primary-nav a[href*="/logga-in/"],
    #sbdf-primary-nav a[href*="/mina-sidor/"]{
        justify-content:flex-start !important;
        border-radius:12px !important;
    }

    .sbdf-nav a[href*="facebook.com"]{
        width:100% !important;
        height:44px !important;
        min-height:44px !important;
        padding:10px 12px !important;
        justify-content:flex-start !important;
        border-radius:12px !important;
        color:#fff !important;
        font-size:13px !important;
    }

    .sbdf-nav a[href*="facebook.com"]::before{
        width:24px;
        height:24px;
        margin-right:8px;
        flex:0 0 24px;
        font-size:17px;
    }

    .sbdf-header-actions{
        display:none;
    }
}

@media(max-width:640px){
    :root{
        --sbdf-gutter:12px;
    }

    .sbdf-brand img,
    .sbdf-brand .custom-logo{
        height:46px !important;
        max-width:138px !important;
        max-height:46px !important;
    }

    .sbdf-hero{
        padding-top:18px;
    }

    .sbdf-hero-panel{
        padding:25px 18px;
        border-radius:22px;
    }

    .sbdf-hero h1{
        font-size:clamp(42px,15vw,68px);
    }

    .sbdf-actions{
        display:grid;
    }

    .sbdf-btn{
        width:100%;
    }

    .sbdf-card-grid,
    .sbdf-footer-grid{
        grid-template-columns:1fr;
    }
}



/* ==================================================
   SBDF – SLUTLIG MOBILANPASSNING
   ================================================== */

@media screen and (max-width: 700px) {

    /* Header */
    body .sbdf-site-header {
        width: 100% !important;
        overflow: visible !important;
    }

    body .sbdf-header-inner {
        position: relative !important;

        width: 100% !important;
        max-width: 100% !important;
        min-height: 66px !important;

        margin: 0 !important;
        padding: 8px 14px !important;

        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 12px !important;

        box-sizing: border-box !important;
    }

    /* Visa endast loggan i mobilheadern */
    body .sbdf-brand {
        display: flex !important;
        align-items: center !important;

        min-width: 0 !important;
        max-width: calc(100% - 58px) !important;

        flex: 1 1 auto !important;
    }

    body .sbdf-brand-text {
        display: none !important;
    }

    body .sbdf-brand .custom-logo-link {
        display: flex !important;
        align-items: center !important;

        width: auto !important;
        max-width: 100% !important;
    }

    body .sbdf-brand img,
    body .sbdf-brand .custom-logo {
        display: block !important;

        width: auto !important;
        height: 50px !important;

        max-width: 145px !important;
        max-height: 50px !important;

        object-fit: contain !important;
    }

    /* Hamburgermenyn */
    body .sbdf-menu-toggle {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;

        width: 46px !important;
        height: 46px !important;
        min-width: 46px !important;

        margin: 0 !important;
        padding: 0 !important;

        flex: 0 0 46px !important;

        position: static !important;

        border-radius: 13px !important;
        font-size: 24px !important;
        line-height: 1 !important;

        box-sizing: border-box !important;
    }

    /* Öppnad mobilmeny */
    body .sbdf-nav {
        display: none !important;

        position: absolute !important;
        top: calc(100% + 8px) !important;
        left: 12px !important;
        right: 12px !important;

        width: auto !important;
        max-width: none !important;

        margin: 0 !important;
        padding: 12px !important;

        border-radius: 16px !important;
        background: rgba(3, 17, 40, 0.98) !important;

        box-sizing: border-box !important;
        z-index: 9999 !important;
    }

    body .sbdf-nav.is-open,
    body .sbdf-nav.sbdf-nav-open {
        display: block !important;
    }

    body .sbdf-nav ul,
    body .sbdf-nav .menu {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;

        width: 100% !important;

        margin: 0 !important;
        padding: 0 !important;
        gap: 5px !important;
    }

    body .sbdf-nav li,
    body .sbdf-nav li > a {
        width: 100% !important;
        box-sizing: border-box !important;
    }

    body .sbdf-nav li > a {
        min-height: 44px !important;
        padding: 10px 12px !important;

        justify-content: flex-start !important;

        border-radius: 11px !important;
        white-space: normal !important;
    }

    /* Hero */
    body .sbdf-hero {
        padding: 16px 0 30px !important;
    }

    body .sbdf-hero-panel {
        display: block !important;

        padding: 24px 20px !important;
        border-radius: 24px !important;
    }

    body .sbdf-eyebrow {
        max-width: 100% !important;
        min-height: 28px !important;

        padding: 5px 10px !important;

        font-size: 9px !important;
        line-height: 1.25 !important;
        letter-spacing: 0.06em !important;

        white-space: normal !important;
    }

    body .sbdf-hero h1 {
        margin: 20px 0 14px !important;

        font-size: clamp(42px, 13vw, 58px) !important;
        line-height: 0.98 !important;
        letter-spacing: -0.05em !important;

        overflow-wrap: break-word !important;
    }

    body .sbdf-hero-lead {
        font-size: 17px !important;
        line-height: 1.55 !important;
    }

    /* Knappar */
    body .sbdf-actions {
        display: grid !important;
        grid-template-columns: 1fr !important;

        gap: 10px !important;
        margin-top: 22px !important;
    }

    body .sbdf-actions .sbdf-btn {
        width: 100% !important;
        min-height: 52px !important;

        padding: 0 16px !important;
        box-sizing: border-box !important;
    }

    /* Kortet Vill du bli domare */
    body .sbdf-hero-card {
        margin-top: 28px !important;
        padding: 22px 18px !important;

        border-radius: 20px !important;
    }

    body .sbdf-hero-card h2 {
        font-size: 30px !important;
        line-height: 1.05 !important;
    }

    body .sbdf-hero-card p {
        font-size: 15px !important;
        line-height: 1.6 !important;
    }

    body .sbdf-checks {
        margin: 16px 0 !important;
    }
}


.home .sbdf-site::before,
.home::before,
body.home::before {
    opacity: 0.38 !important;
    filter: blur(0.8px) !important;
    transform: scale(1.01) !important;
    background-size: cover !important;
    background-position: center center !important;
}


/* ==================================================
   HEADER – VISA HELA MENYN PÅ BREDA SKÄRMAR
   ================================================== */

@media (min-width: 1201px) {

    .sbdf-header-inner {
        width: min(1600px, calc(100% - 32px)) !important;
        margin: 0 auto !important;
        padding: 8px 0 !important;

        display: flex !important;
        align-items: center !important;
        gap: 22px !important;
    }

    .sbdf-brand {
        flex: 0 0 auto !important;
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
    }

    .sbdf-brand .custom-logo {
        width: auto !important;
        height: 58px !important;
        max-width: 100px !important;
        object-fit: contain !important;
    }

    .sbdf-brand-title {
        font-size: 24px !important;
        line-height: 1 !important;
        white-space: nowrap !important;
    }

    .sbdf-brand-tagline {
        margin-top: 4px !important;
        font-size: 13px !important;
    }

    .sbdf-nav {
        flex: 1 1 auto !important;
        margin-left: auto !important;
    }

    .sbdf-nav ul,
    .sbdf-nav .menu {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        flex-wrap: nowrap !important;
        gap: 3px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .sbdf-nav a {
        padding: 11px 10px !important;
        font-size: 14px !important;
        white-space: nowrap !important;
    }

    .sbdf-menu-toggle {
        display: none !important;
    }
}


/* ==================================================
   HEADER – HAMBURGERMENY TIDIGARE
   ================================================== */

@media (max-width: 1200px) {

    .sbdf-header-inner {
        width: calc(100% - 28px) !important;
        min-height: 76px !important;
        margin: 0 auto !important;
        padding: 8px 0 !important;

        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 14px !important;
    }

    .sbdf-brand {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        min-width: 0 !important;
    }

    .sbdf-brand .custom-logo {
        width: auto !important;
        height: 56px !important;
        max-width: 105px !important;
        object-fit: contain !important;
    }

    .sbdf-brand-title {
        font-size: clamp(18px, 3vw, 25px) !important;
        line-height: 1.05 !important;
        white-space: nowrap !important;
    }

    .sbdf-menu-toggle {
        display: inline-flex !important;
        flex: 0 0 46px !important;
        width: 46px !important;
        height: 46px !important;
        align-items: center !important;
        justify-content: center !important;
        margin-left: auto !important;
        position: relative !important;
        inset: auto !important;
    }

    .sbdf-nav {
        display: none !important;
        position: absolute !important;
        top: calc(100% + 8px) !important;
        left: 14px !important;
        right: 14px !important;
        z-index: 9999 !important;

        padding: 12px !important;
        border: 1px solid rgba(255,255,255,.16) !important;
        border-radius: 20px !important;

        background: rgba(4,20,48,.97) !important;
        box-shadow: 0 24px 60px rgba(0,0,0,.35) !important;
    }

    .sbdf-header.is-open .sbdf-nav,
    .sbdf-header.menu-open .sbdf-nav,
    .sbdf-nav.is-open,
    .sbdf-nav.open {
        display: block !important;
    }

    .sbdf-nav ul,
    .sbdf-nav .menu {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 5px !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .sbdf-nav li {
        width: 100% !important;
    }

    .sbdf-nav a {
        width: 100% !important;
        min-height: 46px !important;
        padding: 12px 15px !important;
        justify-content: flex-start !important;
        font-size: 15px !important;
        white-space: normal !important;
    }
}


/* Dölj det långa namnet endast på små mobiler */
@media (max-width: 700px) {

    .sbdf-brand-text {
        display: none !important;
    }

    .sbdf-brand .custom-logo {
        height: 52px !important;
    }
}

/* Mindre föreningsnamn i headern */
.sbdf-brand-title {
    font-size: 15px !important;
}



/* Större logga i headern */
.sbdf-brand .custom-logo {
    height: 78px !important;
    width: auto !important;
    max-width: 120px !important;
    object-fit: contain !important;
}

@media (max-width: 700px) {
    .sbdf-brand .custom-logo {
        height: 58px !important;
        max-width: 110px !important;
    }
}


/* =========================================================
   SBDF UTBILDNINGSPORTAL – STÄDAD SLUTVERSION
   Ersätter samtliga tidigare Masteriyo-regler.
========================================================= */

/* Dropdown: ikon, stabil hover-brygga och tydlig undermeny */
@media (min-width:1201px){
    .sbdf-nav .menu-item-has-children{
        position:relative !important;
        padding-bottom:12px !important;
        margin-bottom:-12px !important;
    }

    .sbdf-nav .menu-item-has-children > a::before{
        content:"🎓";
        display:inline-flex;
        align-items:center;
        justify-content:center;
        width:24px;
        height:24px;
        margin-right:7px;
        border-radius:50%;
        background:rgba(56,189,248,.14);
        font-size:14px;
        line-height:1;
    }

    .sbdf-nav .menu-item-has-children > a::after{
        content:"▾";
        margin-left:7px;
        font-size:10px;
        opacity:.75;
        transition:transform .2s ease;
    }

    .sbdf-nav .menu-item-has-children:hover > a::after,
    .sbdf-nav .menu-item-has-children:focus-within > a::after{
        transform:rotate(180deg);
    }

    .sbdf-nav .sub-menu{
        display:flex !important;
        visibility:hidden !important;
        opacity:0 !important;
        pointer-events:none !important;
        position:absolute !important;
        top:100% !important;
        left:0 !important;
        z-index:99999 !important;
        min-width:245px !important;
        margin:0 !important;
        padding:10px !important;
        flex-direction:column !important;
        align-items:stretch !important;
        gap:4px !important;
        border:1px solid rgba(148,163,184,.22) !important;
        border-radius:16px !important;
        background:linear-gradient(145deg,rgba(3,17,40,.99),rgba(31,20,70,.98)) !important;
        box-shadow:inset 0 1px 0 rgba(255,255,255,.07),0 24px 60px rgba(0,0,0,.42) !important;
        transform:translateY(6px) !important;
        transition:opacity .18s ease,visibility .18s ease,transform .18s ease !important;
    }

    .sbdf-nav .sub-menu::before{
        content:"";
        position:absolute;
        left:0;
        right:0;
        top:-18px;
        height:18px;
    }

    .sbdf-nav .menu-item-has-children:hover > .sub-menu,
    .sbdf-nav .menu-item-has-children:focus-within > .sub-menu{
        visibility:visible !important;
        opacity:1 !important;
        pointer-events:auto !important;
        transform:translateY(0) !important;
    }

    .sbdf-nav .sub-menu li{
        width:100% !important;
        margin:0 !important;
    }

    .sbdf-nav .sub-menu a{
        width:100% !important;
        min-height:44px !important;
        padding:11px 14px !important;
        justify-content:flex-start !important;
        border:1px solid transparent !important;
        border-radius:11px !important;
        background:transparent !important;
        color:rgba(255,255,255,.92) !important;
        font-size:13px !important;
        white-space:nowrap !important;
    }

    .sbdf-nav .sub-menu a:hover,
    .sbdf-nav .sub-menu .current-menu-item > a{
        background:linear-gradient(135deg,rgba(37,99,235,.88),rgba(124,58,237,.82)) !important;
        border-color:rgba(147,197,253,.32) !important;
        color:#fff !important;
        transform:translateX(3px) !important;
    }
}

/* Masteriyo-sidor: låt temat behålla header och footer i normal bredd */
body:has(.masteriyo-account) .sbdf-main,
body:has(.masteriyo-account-page) .sbdf-main,
body:has(.masteriyo-dashboard) .sbdf-main,
body:has(.masteriyo-student-dashboard) .sbdf-main{
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
    padding:24px 0 56px !important;
}

/* Yttre WordPress-innehåll */
body:has(.masteriyo-account) .sbdf-inner-page,
body:has(.masteriyo-account-page) .sbdf-inner-page,
body:has(.masteriyo-dashboard) .sbdf-inner-page,
body:has(.masteriyo-student-dashboard) .sbdf-inner-page,
body:has(.masteriyo-account) .sbdf-inner-page-content,
body:has(.masteriyo-account-page) .sbdf-inner-page-content,
body:has(.masteriyo-dashboard) .sbdf-inner-page-content,
body:has(.masteriyo-student-dashboard) .sbdf-inner-page-content{
    width:min(1600px,calc(100% - 48px)) !important;
    max-width:1600px !important;
    margin:0 auto !important;
    padding:0 !important;
}

/* Själva portalytan */
.masteriyo-account,
.masteriyo-account-page,
.masteriyo-dashboard,
.masteriyo-student-dashboard,
.masteriyo-account-wrapper{
    width:100% !important;
    max-width:none !important;
    min-height:650px !important;
    margin:0 !important;
    padding:24px !important;
    border:1px solid rgba(148,163,184,.24) !important;
    border-radius:28px !important;
    background:
        radial-gradient(circle at 12% 10%,rgba(56,189,248,.10),transparent 28%),
        radial-gradient(circle at 88% 8%,rgba(139,92,246,.16),transparent 34%),
        linear-gradient(135deg,rgba(3,17,40,.96),rgba(7,28,70,.94) 52%,rgba(40,16,80,.92)) !important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 28px 70px rgba(0,0,0,.28) !important;
    color:#fff !important;
    font-size:15px !important;
}

/* Masteriyos inre containrar ska inte skapa en ny smal ram */
.masteriyo-account .masteriyo-container,
.masteriyo-account-page .masteriyo-container,
.masteriyo-dashboard .masteriyo-container,
.masteriyo-student-dashboard .masteriyo-container{
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
    padding:0 !important;
}

/* Sidomeny */
.masteriyo-account-sidebar,
.masteriyo-dashboard-sidebar,
.masteriyo-student-dashboard-sidebar,
.masteriyo-sidebar{
    width:240px !important;
    min-width:240px !important;
    max-width:240px !important;
    padding:18px !important;
    border:1px solid rgba(255,255,255,.20) !important;
    border-radius:20px !important;
    background:linear-gradient(160deg,rgba(3,18,44,.96),rgba(17,28,72,.92)) !important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 18px 38px rgba(0,0,0,.18) !important;
}

.masteriyo-account-sidebar a,
.masteriyo-dashboard-sidebar a,
.masteriyo-student-dashboard-sidebar a,
.masteriyo-sidebar a{
    display:flex !important;
    align-items:center !important;
    gap:10px !important;
    width:100% !important;
    min-height:46px !important;
    padding:11px 14px !important;
    margin:3px 0 !important;
    border-radius:12px !important;
    color:rgba(255,255,255,.90) !important;
    font-size:14px !important;
    font-weight:750 !important;
    line-height:1.2 !important;
    text-decoration:none !important;
}

.masteriyo-account-sidebar a:hover,
.masteriyo-dashboard-sidebar a:hover,
.masteriyo-student-dashboard-sidebar a:hover,
.masteriyo-sidebar a:hover{
    background:linear-gradient(135deg,#2563eb,#7c3aed) !important;
    color:#fff !important;
}

.masteriyo-account-sidebar .active > a,
.masteriyo-dashboard-sidebar .active > a,
.masteriyo-student-dashboard-sidebar .active > a,
.masteriyo-sidebar .active > a{
    background:linear-gradient(135deg,#1d4ed8,#6d28d9) !important;
    color:#fff !important;
}

/* Rubriker och text */
.masteriyo-account h1,
.masteriyo-account h2,
.masteriyo-account h3,
.masteriyo-account-page h1,
.masteriyo-account-page h2,
.masteriyo-account-page h3,
.masteriyo-dashboard h1,
.masteriyo-dashboard h2,
.masteriyo-dashboard h3,
.masteriyo-student-dashboard h1,
.masteriyo-student-dashboard h2,
.masteriyo-student-dashboard h3{
    color:#fff !important;
    font-weight:900 !important;
    letter-spacing:-.025em !important;
}

.masteriyo-account p,
.masteriyo-account-page p,
.masteriyo-dashboard p,
.masteriyo-student-dashboard p,
.masteriyo-account span,
.masteriyo-account-page span,
.masteriyo-dashboard span,
.masteriyo-student-dashboard span{
    color:rgba(255,255,255,.90);
}

/* Statistik, kurskort och paneler */
.masteriyo-dashboard [class*="stat"],
.masteriyo-student-dashboard [class*="stat"],
.masteriyo-dashboard [class*="summary"],
.masteriyo-student-dashboard [class*="summary"],
.masteriyo-account [class*="card"],
.masteriyo-dashboard [class*="card"],
.masteriyo-student-dashboard [class*="card"]{
    border:1px solid rgba(148,163,184,.22) !important;
    border-radius:18px !important;
    background:linear-gradient(145deg,rgba(8,31,70,.78),rgba(42,22,88,.72)) !important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.07),0 16px 38px rgba(0,0,0,.18) !important;
    color:#fff !important;
}

/* Formulär och filter */
.masteriyo-account input,
.masteriyo-dashboard input,
.masteriyo-student-dashboard input,
.masteriyo-account select,
.masteriyo-dashboard select,
.masteriyo-student-dashboard select{
    min-height:48px !important;
    border:1px solid rgba(147,197,253,.34) !important;
    border-radius:12px !important;
    background:rgba(3,17,40,.62) !important;
    color:#fff !important;
    font-size:14px !important;
}

.masteriyo-account input::placeholder,
.masteriyo-dashboard input::placeholder,
.masteriyo-student-dashboard input::placeholder{
    color:rgba(255,255,255,.62) !important;
}

.masteriyo-account select option,
.masteriyo-dashboard select option,
.masteriyo-student-dashboard select option{
    background:#071c46 !important;
    color:#fff !important;
}

/* Knappar */
.masteriyo-account button,
.masteriyo-account a[class*="button"],
.masteriyo-dashboard button,
.masteriyo-dashboard a[class*="button"],
.masteriyo-student-dashboard button,
.masteriyo-student-dashboard a[class*="button"],
.masteriyo-button{
    min-height:44px !important;
    padding:0 17px !important;
    border:1px solid transparent !important;
    border-radius:999px !important;
    background:linear-gradient(135deg,#f8d45d,#f1ad1c) !important;
    color:#101827 !important;
    font-size:13px !important;
    font-weight:850 !important;
    text-decoration:none !important;
    box-shadow:0 12px 28px rgba(245,197,66,.24) !important;
}

.masteriyo-account button:hover,
.masteriyo-account a[class*="button"]:hover,
.masteriyo-dashboard button:hover,
.masteriyo-dashboard a[class*="button"]:hover,
.masteriyo-student-dashboard button:hover,
.masteriyo-student-dashboard a[class*="button"]:hover,
.masteriyo-button:hover{
    background:linear-gradient(135deg,#ffe176,#f5b728) !important;
    color:#101827 !important;
    transform:translateY(-1px);
}

/* Vanliga länkar: tydlig men inte vit hover */
.masteriyo-account a:not([class*="button"]):hover,
.masteriyo-account-page a:not([class*="button"]):hover,
.masteriyo-dashboard a:not([class*="button"]):hover,
.masteriyo-student-dashboard a:not([class*="button"]):hover{
    color:#fff !important;
}

/* Tomt kursläge */
.masteriyo-account [class*="empty"],
.masteriyo-dashboard [class*="empty"],
.masteriyo-student-dashboard [class*="empty"]{
    color:rgba(255,255,255,.88) !important;
}

/* Mobil och surfplatta */
@media(max-width:1200px){
    body:has(.masteriyo-account) .sbdf-inner-page,
    body:has(.masteriyo-account-page) .sbdf-inner-page,
    body:has(.masteriyo-dashboard) .sbdf-inner-page,
    body:has(.masteriyo-student-dashboard) .sbdf-inner-page,
    body:has(.masteriyo-account) .sbdf-inner-page-content,
    body:has(.masteriyo-account-page) .sbdf-inner-page-content,
    body:has(.masteriyo-dashboard) .sbdf-inner-page-content,
    body:has(.masteriyo-student-dashboard) .sbdf-inner-page-content{
        width:calc(100% - 28px) !important;
    }

    .masteriyo-account,
    .masteriyo-account-page,
    .masteriyo-dashboard,
    .masteriyo-student-dashboard,
    .masteriyo-account-wrapper{
        padding:18px !important;
        border-radius:22px !important;
    }
}

@media(max-width:760px){
    body:has(.masteriyo-account) .sbdf-main,
    body:has(.masteriyo-account-page) .sbdf-main,
    body:has(.masteriyo-dashboard) .sbdf-main,
    body:has(.masteriyo-student-dashboard) .sbdf-main{
        padding:14px 0 36px !important;
    }

    body:has(.masteriyo-account) .sbdf-inner-page,
    body:has(.masteriyo-account-page) .sbdf-inner-page,
    body:has(.masteriyo-dashboard) .sbdf-inner-page,
    body:has(.masteriyo-student-dashboard) .sbdf-inner-page,
    body:has(.masteriyo-account) .sbdf-inner-page-content,
    body:has(.masteriyo-account-page) .sbdf-inner-page-content,
    body:has(.masteriyo-dashboard) .sbdf-inner-page-content,
    body:has(.masteriyo-student-dashboard) .sbdf-inner-page-content{
        width:calc(100% - 20px) !important;
    }

    .masteriyo-account,
    .masteriyo-account-page,
    .masteriyo-dashboard,
    .masteriyo-student-dashboard,
    .masteriyo-account-wrapper{
        min-height:0 !important;
        padding:12px !important;
        border-radius:20px !important;
    }

    .masteriyo-account-sidebar,
    .masteriyo-dashboard-sidebar,
    .masteriyo-student-dashboard-sidebar,
    .masteriyo-sidebar{
        width:100% !important;
        min-width:0 !important;
        max-width:none !important;
        margin-bottom:18px !important;
        padding:12px !important;
    }
}

/* =========================================================
   MASTERIYO ACCOUNT – SBDF SLUTVERSION
   Endast utbildningsportalen påverkas
========================================================= */

body.masteriyo-account-page {
    background:
        radial-gradient(circle at 12% 10%, rgba(56,189,248,.10), transparent 28%),
        radial-gradient(circle at 88% 8%, rgba(139,92,246,.17), transparent 34%),
        linear-gradient(135deg, #031329 0%, #091c46 50%, #281050 100%) !important;
}

/* Endast innehållet mellan header och footer */
body.masteriyo-account-page .sbdf-main {
    width: 100% !important;
    min-height: 70vh !important;
    padding: 36px 0 70px !important;
}

/* WordPress sidbehållare */
body.masteriyo-account-page .sbdf-inner-page,
body.masteriyo-account-page .sbdf-inner-page-content,
body.masteriyo-account-page article {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

/* Masteriyos yttersta portal */
body.masteriyo-account-page #masteriyo-account-page {
    position: relative !important;

    width: min(1440px, calc(100% - 48px)) !important;
    max-width: 1440px !important;
    margin: 0 auto !important;
    padding: 0 !important;

    background: transparent !important;
    color: #fff !important;
}

/* Hero */
body.masteriyo-account-page #masteriyo-account-page::before {
    content: "Utbildningsportal\A Kurser, quiz, resultat och certifikat";
    white-space: pre-line;

    display: block;
    width: 100%;
    margin-bottom: 24px;
    padding: clamp(32px, 4vw, 54px);

    border: 1px solid rgba(148,163,184,.22);
    border-radius: 30px;

    background:
        radial-gradient(circle at 88% 22%, rgba(139,92,246,.18), transparent 30%),
        linear-gradient(
            135deg,
            rgba(8,31,70,.94),
            rgba(39,20,84,.92)
        );

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.07),
        0 28px 70px rgba(0,0,0,.28);

    color: rgba(255,255,255,.82);
    font-size: 17px;
    font-weight: 650;
    line-height: 1.6;
}

body.masteriyo-account-page #masteriyo-account-page::first-line {
    color: #fff;
    font-size: clamp(46px, 5vw, 72px);
    font-weight: 950;
    line-height: 1;
    letter-spacing: -.055em;
}

/* Masteriyos riktiga huvudcontainer */
body.masteriyo-account-page #masteriyo-account-container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;

    display: grid !important;
    grid-template-columns: 280px minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 22px !important;

    background: transparent !important;
}

/* Vänster meny */
body.masteriyo-account-page .mto-account-sidebar {
    position: sticky !important;
    top: 105px !important;

    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;

    padding: 18px !important;

    border: 1px solid rgba(148,163,184,.24) !important;
    border-radius: 22px !important;

    background:
        linear-gradient(
            155deg,
            rgba(5,24,57,.94),
            rgba(35,20,82,.88)
        ) !important;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.07),
        0 18px 42px rgba(0,0,0,.22) !important;

    color: #fff !important;
}

/* Huvudinnehållet */
body.masteriyo-account-page .mto-account-wrapper {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;

    padding: 26px !important;

    border: 1px solid rgba(148,163,184,.22) !important;
    border-radius: 22px !important;

    background:
        linear-gradient(
            145deg,
            rgba(7,28,65,.90),
            rgba(42,22,88,.84)
        ) !important;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.07),
        0 18px 42px rgba(0,0,0,.22) !important;

    color: #fff !important;
}

/* All text inne i portalen */
body.masteriyo-account-page #masteriyo-account-page h1,
body.masteriyo-account-page #masteriyo-account-page h2,
body.masteriyo-account-page #masteriyo-account-page h3,
body.masteriyo-account-page #masteriyo-account-page h4 {
    color: #fff !important;
    font-weight: 900 !important;
}

body.masteriyo-account-page #masteriyo-account-page p,
body.masteriyo-account-page #masteriyo-account-page span,
body.masteriyo-account-page #masteriyo-account-page label,
body.masteriyo-account-page #masteriyo-account-page div {
    color: rgba(255,255,255,.90);
}

/* Menylänkar */
body.masteriyo-account-page .mto-account-sidebar a {
    color: rgba(255,255,255,.88) !important;
}

body.masteriyo-account-page .mto-account-sidebar a:hover {
    background:
        linear-gradient(
            135deg,
            rgba(37,99,235,.88),
            rgba(124,58,237,.82)
        ) !important;

    color: #fff !important;
}

/* Aktivt menyval */
body.masteriyo-account-page .mto-account-sidebar [aria-current="page"],
body.masteriyo-account-page .mto-account-sidebar .active,
body.masteriyo-account-page .mto-account-sidebar [data-active="true"] {
    background:
        linear-gradient(
            135deg,
            #2563eb,
            #6d28d9
        ) !important;

    color: #fff !important;
}

/* Statistik och kurskort */
body.masteriyo-account-page .mto-dashboard-courses-progress > div,
body.masteriyo-account-page .mto-account-wrapper [class*="card"] {
    border: 1px solid rgba(148,163,184,.22) !important;
    border-radius: 18px !important;

    background:
        linear-gradient(
            145deg,
            rgba(13,44,96,.82),
            rgba(55,28,112,.76)
        ) !important;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.06),
        0 14px 32px rgba(0,0,0,.17) !important;

    color: #fff !important;
}

/* Sökfält och filter */
body.masteriyo-account-page #masteriyo-account-page input,
body.masteriyo-account-page #masteriyo-account-page select,
body.masteriyo-account-page #masteriyo-account-page textarea {
    min-height: 48px !important;

    border: 1px solid rgba(147,197,253,.34) !important;
    border-radius: 12px !important;

    background: rgba(3,17,40,.72) !important;
    color: #fff !important;
}

body.masteriyo-account-page #masteriyo-account-page input::placeholder,
body.masteriyo-account-page #masteriyo-account-page textarea::placeholder {
    color: rgba(255,255,255,.58) !important;
}

/* Knappar */
body.masteriyo-account-page #masteriyo-account-page button,
body.masteriyo-account-page #masteriyo-account-page a[role="button"] {
    border-radius: 999px !important;
    color: #fff !important;
}

/* Gula primära knappar */
body.masteriyo-account-page #masteriyo-account-page button:hover,
body.masteriyo-account-page #masteriyo-account-page a[role="button"]:hover {
    background:
        linear-gradient(
            135deg,
            #f8d45d,
            #f1ad1c
        ) !important;

    color: #101827 !important;
}

/* Masteriyos ljusa Chakra-lager görs transparenta */
body.masteriyo-account-page #masteriyo-account-page .chakra-container,
body.masteriyo-account-page #masteriyo-account-page .chakra-stack {
    color: #fff !important;
}

/* Mobil */
@media (max-width: 900px) {
    body.masteriyo-account-page #masteriyo-account-page {
        width: calc(100% - 24px) !important;
    }

    body.masteriyo-account-page #masteriyo-account-container {
        grid-template-columns: 1fr !important;
    }

    body.masteriyo-account-page .mto-account-sidebar {
        position: relative !important;
        top: auto !important;

        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
    }
}

@media (max-width: 640px) {
    body.masteriyo-account-page .sbdf-main {
        padding-top: 18px !important;
    }

    body.masteriyo-account-page #masteriyo-account-page {
        width: calc(100% - 20px) !important;
    }

    body.masteriyo-account-page #masteriyo-account-page::before {
        padding: 28px 22px;
        border-radius: 22px;
    }

    body.masteriyo-account-page .mto-account-wrapper {
        padding: 16px !important;
        border-radius: 18px !important;
    }
}

/* MASTERIYO – PROFIL OCH BILLING-TABELLER */

body.masteriyo-account-page #masteriyo-account-page table,
body.masteriyo-account-page #masteriyo-account-page tbody,
body.masteriyo-account-page #masteriyo-account-page tr,
body.masteriyo-account-page #masteriyo-account-page td,
body.masteriyo-account-page #masteriyo-account-page th {
    background: transparent !important;
    color: #ffffff !important;
}

/* Själva tabellramen */
body.masteriyo-account-page #masteriyo-account-page table {
    width: 100% !important;
    overflow: hidden !important;

    border: 1px solid rgba(148,163,184,.22) !important;
    border-radius: 18px !important;

    background:
        linear-gradient(
            145deg,
            rgba(8,31,70,.82),
            rgba(42,22,88,.76)
        ) !important;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.06),
        0 14px 34px rgba(0,0,0,.16) !important;
}

/* Rader */
body.masteriyo-account-page #masteriyo-account-page tr {
    border-bottom: 1px solid rgba(148,163,184,.14) !important;
}

body.masteriyo-account-page #masteriyo-account-page tr:last-child {
    border-bottom: 0 !important;
}

/* Celler */
body.masteriyo-account-page #masteriyo-account-page td,
body.masteriyo-account-page #masteriyo-account-page th {
    padding: 15px 18px !important;
    border: 0 !important;

    color: rgba(255,255,255,.92) !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
}

/* Första kolumnen */
body.masteriyo-account-page #masteriyo-account-page td:first-child,
body.masteriyo-account-page #masteriyo-account-page th:first-child {
    width: 38% !important;
    color: rgba(255,255,255,.68) !important;
    font-weight: 800 !important;
}

/* Chakra-komponenter som fortfarande lägger vit bakgrund */
body.masteriyo-account-page #masteriyo-account-page .chakra-table,
body.masteriyo-account-page #masteriyo-account-page .chakra-table__container,
body.masteriyo-account-page #masteriyo-account-page [class*="chakra-table"],
body.masteriyo-account-page #masteriyo-account-page [class*="profile"],
body.masteriyo-account-page #masteriyo-account-page [class*="billing"] {
    background: transparent !important;
    color: #ffffff !important;
}

/* =========================================================
   MASTERIYO – NOTIFIKATIONSRUTA I SBDF-TEMA
========================================================= */

/* Själva popup-rutan */
body.masteriyo-account-page #masteriyo-account-page [role="dialog"],
body.masteriyo-account-page #masteriyo-account-page .chakra-modal__content,
body.masteriyo-account-page #masteriyo-account-page [class*="notification"] {
    border: 1px solid rgba(148,163,184,.24) !important;
    border-radius: 18px !important;

    background:
        linear-gradient(
            145deg,
            rgba(7,28,65,.98),
            rgba(42,22,88,.96)
        ) !important;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.07),
        0 24px 60px rgba(0,0,0,.42) !important;

    color: #fff !important;
}

/* Rubrikfältet */
body.masteriyo-account-page #masteriyo-account-page .chakra-modal__header,
body.masteriyo-account-page #masteriyo-account-page [class*="notification"] h1,
body.masteriyo-account-page #masteriyo-account-page [class*="notification"] h2,
body.masteriyo-account-page #masteriyo-account-page [class*="notification"] h3 {
    color: #fff !important;
    background: transparent !important;
    border-bottom: 1px solid rgba(148,163,184,.16) !important;
}

/* Stäng-knapp */
body.masteriyo-account-page #masteriyo-account-page .chakra-modal__close-btn,
body.masteriyo-account-page #masteriyo-account-page [aria-label*="Close"],
body.masteriyo-account-page #masteriyo-account-page [aria-label*="close"] {
    color: #fff !important;
    background: rgba(255,255,255,.06) !important;
    border-radius: 10px !important;
}

body.masteriyo-account-page #masteriyo-account-page .chakra-modal__close-btn:hover,
body.masteriyo-account-page #masteriyo-account-page [aria-label*="Close"]:hover,
body.masteriyo-account-page #masteriyo-account-page [aria-label*="close"]:hover {
    background: rgba(59,130,246,.24) !important;
}

/* Flikar och filterrad */
body.masteriyo-account-page #masteriyo-account-page [class*="notification"] button,
body.masteriyo-account-page #masteriyo-account-page [class*="notification"] [role="tab"] {
    color: rgba(255,255,255,.82) !important;
    background: transparent !important;
}

body.masteriyo-account-page #masteriyo-account-page [class*="notification"] button:hover,
body.masteriyo-account-page #masteriyo-account-page [class*="notification"] [role="tab"]:hover {
    background: rgba(59,130,246,.18) !important;
    color: #fff !important;
}

/* Enskilda notifikationer */
body.masteriyo-account-page #masteriyo-account-page [class*="notification"] li,
body.masteriyo-account-page #masteriyo-account-page [class*="notification"] [class*="item"] {
    background: rgba(255,255,255,.05) !important;
    border-bottom: 1px solid rgba(148,163,184,.13) !important;
    color: #fff !important;
}

/* Texten i notifikationerna */
body.masteriyo-account-page #masteriyo-account-page [class*="notification"] p,
body.masteriyo-account-page #masteriyo-account-page [class*="notification"] span,
body.masteriyo-account-page #masteriyo-account-page [class*="notification"] strong {
    color: rgba(255,255,255,.92) !important;
}

/* Tid och sekundär information */
body.masteriyo-account-page #masteriyo-account-page [class*="notification"] time,
body.masteriyo-account-page #masteriyo-account-page [class*="notification"] small {
    color: #93c5fd !important;
}

/* Meny med tre punkter */
body.masteriyo-account-page #masteriyo-account-page [class*="notification"] [aria-haspopup="menu"] {
    color: #fff !important;
    background: rgba(255,255,255,.05) !important;
}

body.masteriyo-account-page #masteriyo-account-page [class*="notification"] [aria-haspopup="menu"]:hover {
    background: rgba(124,58,237,.24) !important;
}

/* MASTERIYO – NOTIFIKATIONSRUTANS RIKTIGA KLASS */

body.masteriyo-account-page .chakra-popover__content,
body.masteriyo-account-page .chakra-popover__body {
    background:
        linear-gradient(
            145deg,
            rgba(7,28,65,.99),
            rgba(42,22,88,.97)
        ) !important;

    color: #ffffff !important;

    border: 1px solid rgba(148,163,184,.24) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.07),
        0 24px 60px rgba(0,0,0,.42) !important;
}

/* Alla inre lager */
body.masteriyo-account-page .chakra-popover__body > div,
body.masteriyo-account-page .chakra-popover__body [class*="chakra-"] {
    background-color: transparent !important;
    color: #ffffff !important;
}

/* Rubrik, text och tid */
body.masteriyo-account-page .chakra-popover__body h1,
body.masteriyo-account-page .chakra-popover__body h2,
body.masteriyo-account-page .chakra-popover__body h3,
body.masteriyo-account-page .chakra-popover__body p,
body.masteriyo-account-page .chakra-popover__body span,
body.masteriyo-account-page .chakra-popover__body strong {
    color: rgba(255,255,255,.94) !important;
}

/* Notifikationsrader */
body.masteriyo-account-page .chakra-popover__body li,
body.masteriyo-account-page .chakra-popover__body [role="menuitem"],
body.masteriyo-account-page .chakra-popover__body [class*="notification"] {
    background: rgba(255,255,255,.05) !important;
    color: #ffffff !important;
    border-bottom-color: rgba(148,163,184,.14) !important;
}

/* Hover */
body.masteriyo-account-page .chakra-popover__body li:hover,
body.masteriyo-account-page .chakra-popover__body [role="menuitem"]:hover {
    background:
        linear-gradient(
            135deg,
            rgba(37,99,235,.34),
            rgba(124,58,237,.30)
        ) !important;
}

/* Popover-pilen */
body.masteriyo-account-page .chakra-popover__popper [data-popper-arrow-inner] {
    background: rgba(7,28,65,.99) !important;
}


/* =========================================================
   MASTERIYO KURSKORT – EXAKTA KLASSER
========================================================= */

.masteriyo-course-list-display-section {
    width: min(1440px, calc(100% - 48px)) !important;
    margin: 36px auto 70px !important;
}

.masteriyo-courses-wrapper {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 22px !important;
}

.masteriyo-col {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
}

.masteriyo-course-item--wrapper.masteriyo-course--card {
    overflow: hidden !important;
    height: 100% !important;

    border: 1px solid rgba(148,163,184,.22) !important;
    border-radius: 22px !important;

    background:
        linear-gradient(
            145deg,
            rgba(7,28,65,.94),
            rgba(42,22,88,.88)
        ) !important;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.07),
        0 18px 42px rgba(0,0,0,.24) !important;

    color: #fff !important;

    transition:
        transform .2s ease,
        border-color .2s ease,
        box-shadow .2s ease !important;
}

.masteriyo-course-item--wrapper.masteriyo-course--card:hover {
    transform: translateY(-4px) !important;
    border-color: rgba(147,197,253,.42) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.09),
        0 24px 54px rgba(0,0,0,.30) !important;
}

/* Kursbild */
.masteriyo-course--img-wrap {
    overflow: hidden !important;

    background:
        linear-gradient(
            135deg,
            rgba(3,17,40,.96),
            rgba(15,32,76,.92)
        ) !important;
}

.masteriyo-course--img-wrap > a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    height: 230px !important;
    padding: 18px !important;
}

.masteriyo-course--img-wrap img {
    display: block !important;

    width: 100% !important;
    height: 100% !important;

    object-fit: contain !important;
    object-position: center !important;

    border-radius: 0 !important;
}

/* Innehåll */
.masteriyo-course--content {
    padding: 22px 22px 10px !important;
    background: transparent !important;
    color: #fff !important;
}

.masteriyo-course--content__wrapper {
    background: transparent !important;
}

.masteriyo-course--content__title {
    margin: 0 0 16px !important;

    font-size: 22px !important;
    line-height: 1.15 !important;
    font-weight: 900 !important;
    letter-spacing: -.025em !important;
}

.masteriyo-course--content__title a {
    color: #fff !important;
    text-decoration: none !important;
}

.masteriyo-course--content__title a:hover {
    color: #f5c542 !important;
}

/* Lärare */
.masteriyo-course-author {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.masteriyo-course-author img {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;

    padding: 0 !important;

    border: 2px solid rgba(255,255,255,.18) !important;
    border-radius: 50% !important;

    object-fit: cover !important;
    background: transparent !important;
}

.masteriyo-course-author--name {
    color: rgba(255,255,255,.88) !important;
    font-size: 14px !important;
    font-weight: 750 !important;
}

/* Beskrivning */
.masteriyo-course--content__description,
.masteriyo-course-highlights,
.masteriyo-course-highlights--description {
    color: rgba(255,255,255,.76) !important;
}

/* Statistik */
.masteriyo-course--content__stats {
    display: flex !important;
    align-items: center !important;
    gap: 18px !important;

    margin-top: 18px !important;
    padding-top: 16px !important;

    border-top: 1px solid rgba(148,163,184,.14) !important;
}

.masteriyo-course-stats-students,
.masteriyo-course-stats-curriculum {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;

    color: rgba(255,255,255,.84) !important;
}

.masteriyo-course-stats-students svg,
.masteriyo-course-stats-curriculum svg {
    width: 22px !important;
    height: 22px !important;

    fill: #93c5fd !important;
}

.masteriyo-course-stats-students span,
.masteriyo-course-stats-curriculum span {
    color: rgba(255,255,255,.92) !important;
}

/* Footer och knapp */
.masteriyo-course-archive--aside,
.masteriyo-course-card-footer,
.masteriyo-course-pricing--wrapper {
    background: transparent !important;
}

.masteriyo-course-archive--aside {
    padding: 0 22px 22px !important;
}

.masteriyo-course-card-footer {
    margin-top: 18px !important;
}

.masteriyo-single-course--btn,
.masteriyo-enroll-btn,
.masteriyo-btn-continue {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    min-height: 50px !important;

    padding: 0 20px !important;

    border: 0 !important;
    border-radius: 999px !important;

    background:
        linear-gradient(
            135deg,
            #f8d45d,
            #f1ad1c
        ) !important;

    color: #101827 !important;

    font-size: 15px !important;
    font-weight: 900 !important;
    text-decoration: none !important;

    box-shadow:
        0 12px 28px rgba(245,197,66,.24) !important;
}

.masteriyo-single-course--btn:hover,
.masteriyo-enroll-btn:hover,
.masteriyo-btn-continue:hover {
    background:
        linear-gradient(
            135deg,
            #ffe176,
            #f5b728
        ) !important;

    color: #101827 !important;
    transform: translateY(-2px) !important;
}

/* Surfplatta */
@media (max-width: 1050px) {
    .masteriyo-courses-wrapper {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* Mobil */
@media (max-width: 700px) {
    .masteriyo-course-list-display-section {
        width: calc(100% - 20px) !important;
        margin: 20px auto 40px !important;
    }

    .masteriyo-courses-wrapper {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .masteriyo-course--img-wrap > a {
        height: 190px !important;
        padding: 14px !important;
    }

    .masteriyo-course--content {
        padding: 18px 18px 8px !important;
    }

    .masteriyo-course-archive--aside {
        padding: 0 18px 18px !important;
    }
}

/* =========================================================
   MASTERIYO KURSKORT – BRED OCH LÅG LAYOUT
========================================================= */

.masteriyo-courses-wrapper {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px !important;
}

/* Kortet blir liggande */
.masteriyo-course-item--wrapper.masteriyo-course--card {
    display: grid !important;
    grid-template-columns: 240px minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    align-items: stretch !important;

    min-height: 260px !important;
}

/* Bilddelen */
.masteriyo-course--img-wrap {
    grid-column: 1 !important;
    grid-row: 1 / 3 !important;

    min-height: 260px !important;
}

.masteriyo-course--img-wrap > a {
    width: 100% !important;
    height: 100% !important;
    min-height: 260px !important;

    padding: 20px !important;
}

.masteriyo-course--img-wrap img {
    width: 100% !important;
    height: 100% !important;

    object-fit: contain !important;
}

/* Textdelen */
.masteriyo-course--content {
    grid-column: 2 !important;
    grid-row: 1 !important;

    padding: 24px 24px 8px !important;
}

/* Footer med knapp */
.masteriyo-course-archive--aside {
    grid-column: 2 !important;
    grid-row: 2 !important;

    align-self: end !important;

    padding: 0 24px 24px !important;
}

/* Mindre luft och kompakt innehåll */
.masteriyo-course--content__title {
    margin-bottom: 12px !important;
    font-size: 21px !important;
}

.masteriyo-course--content__description {
    margin-bottom: 8px !important;
}

.masteriyo-course--content__stats {
    margin-top: 14px !important;
    padding-top: 13px !important;
}

.masteriyo-course-card-footer {
    margin-top: 12px !important;
}

.masteriyo-single-course--btn,
.masteriyo-enroll-btn,
.masteriyo-btn-continue {
    min-height: 46px !important;
}

/* Stora skärmar – ett riktigt brett kort */
@media (min-width: 1250px) {
    .masteriyo-course-list-display-section {
        width: min(1540px, calc(100% - 48px)) !important;
    }

    .masteriyo-courses-wrapper {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .masteriyo-course-item--wrapper.masteriyo-course--card {
        grid-template-columns: 260px minmax(0, 1fr) !important;
    }
}

/* Surfplatta */
@media (max-width: 1000px) {
    .masteriyo-courses-wrapper {
        grid-template-columns: 1fr !important;
    }

    .masteriyo-course-item--wrapper.masteriyo-course--card {
        grid-template-columns: 220px minmax(0, 1fr) !important;
    }
}

/* Mobil */
@media (max-width: 700px) {
    .masteriyo-course-item--wrapper.masteriyo-course--card {
        display: block !important;
        min-height: 0 !important;
    }

    .masteriyo-course--img-wrap {
        min-height: 0 !important;
    }

    .masteriyo-course--img-wrap > a {
        height: 190px !important;
        min-height: 190px !important;
    }

    .masteriyo-course--content {
        padding: 18px 18px 8px !important;
    }

    .masteriyo-course-archive--aside {
        padding: 0 18px 18px !important;
    }
}

/* Centrera kurskorten bättre på sidan */
.masteriyo-course-list-display-section {
    display: flex !important;
    justify-content: center !important;
}

.masteriyo-courses-wrapper {
    width: min(1280px, 100%) !important;
    margin-inline: auto !important;
}

/* Om bara ett kurskort finns */
.masteriyo-courses-wrapper:has(.masteriyo-col:only-child) {
    grid-template-columns: minmax(0, 920px) !important;
    justify-content: center !important;
}

.masteriyo-courses-wrapper:has(.masteriyo-col:only-child) .masteriyo-col {
    width: 100% !important;
    max-width: 920px !important;
    margin-inline: auto !important;
}

/* Flytta kurskorten lite längre ner och behåll dem centrerade */
.masteriyo-course-list-display-section {
    padding-top: 70px !important;
    padding-bottom: 70px !important;
}

.masteriyo-courses-wrapper {
    width: min(1280px, 100%) !important;
    margin: 0 auto !important;
}