/*
Theme Name: Sportsidioten 2.0
Theme URI: 
Author: Kjetil Moen Nettservice
Author URI: https://kjettamoen.no/
Description: 
Tags: 
Version: 2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: spospo

*/
* {
    box-sizing: border-box;
}

body {
    font-family: 'Raleway', sans-serif;
    margin: 0;
    padding: 0;
    color: #000724;
}

.disabled {
  pointer-events: none;
  opacity: 0.5; /* optional visual feedback */
}

.layout {
    /* border: 1px solid red; */
    display: grid;
    grid-template-columns: 1fr 980px 1fr;    
    gap: 20px 60px;
    margin: auto;
    width: 100%;
    max-width: 1740px;
    padding: 20px;
}

.layout > * {
  min-width: 0;       /* 🔑 prevents children from forcing overflow */
}

.mobile-placement {
    /* border: 1px solid green; */
    display: none;
    width: 100%;
    height: auto;
    min-width: 300px;    
    align-items: center;
    justify-content: center;
}

header,
footer {
    display: flex;
    margin: auto;
    width: 100%;
    
}

.mobile-placement,
.leaderboard,
.sidebar-left,
.sidebar-right {
    overflow-x: hidden; /* prevents ad from spilling out */
}

footer {
    background-color: black;
    color: white;
    margin-top: 70px;
    padding: 50px 20px
}

.change-consent {
    cursor: pointer;
}

.header-wrapper,
.footer-wrapper {
    width: 100%;
    max-width: 1740px;
    margin: auto;
    display: flex;
    flex-flow: column;
    align-items: center;
}

.page .single-view-content {
    padding-bottom: 50px;
}

.header-wrapper {
    display: grid;
    grid-template-columns: auto 1fr;
    padding: 20px;
}

a.social-link { width: 30px;}
a.social-link svg {
    fill: white;
}

main .content-div {
    min-height: 800px;
    background: white url('../spo20/assets/spinner.svg') center center no-repeat;
}

img.logo {
    width: 100%;
    max-width: 350px;
}

main .loaded {
    background: unset;
}

nav.footer-navigation {
    display: flex;
    gap: 20px;
    margin: 40px auto;
}

h1.site-title {
    display: none;
}

footer a {
    color: white;
    text-decoration: underline;
    text-underline-offset: 5px;
    font-size: 14px;
}


#FirstBatch a.blue-nav-link {
    display: none;
}

/* Default styles (desktop first) */
.main-content {
    width: 980px;
    height: auto;
    /* min-height: 600px; */
    /* padding: 20px; */
    /* border: 1px solid blue; */
    margin: auto;
}

.artikkel-item-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 45px;
}

img {
    width: auto;
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: #000724;
}

.list-group-date {
    font-size: 16px;
}

h2 {
    font-size: 20px;
}

/* .artikkel-item {
    height: 100%;
} */

a.cat-link {
    color: #d8244a;
    font-weight: bold;
    font-size: 14px;
    margin-top: auto;
}

.category a.cat-link {
    display: none;
}

.category-resultater .sorting h2,
.category div#LastResults h3.section-heading { margin-top: 0; }

.pages-wrapper h3,
.categories-wrapper h3,
.category-resultater .sorting h2{
    line-height: 2;
    border-bottom: 2px solid #F7E60B;    
    width: fit-content;
}

section.ticker {
    grid-column: 1/-1;
    margin-top: 40px;
    font-size: 16px;
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    align-items: center;
}

.menu-expanded-wrapper {
    grid-column: 1/-1;
    display: none;
}

.fades-in {
    display: block;
    animation: fade-in 500ms;
}


@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}


.menu-expanded-container {
    width: 100%;
    max-width: 980px;
    margin: 50px auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    position: relative;
}

.menu-expanded-container .fa-xmark {
    cursor: pointer;
    width: 30px;
    height: 30px;
    position: absolute;
    top: 0;
    right: 0;
}

.link-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px 20px;
    max-width: 300px;
}



section.category-ticker {
    display: flex;
    flex-flow: row wrap;
    gap: 5px 15px;
    justify-content: center;
    margin: 20px 0;
    line-height: 1.5;
}

section.category-ticker a.ticker-link {
    padding: 0;
}


section.oslo-sportslager-top-content section.category-ticker {
    justify-content:flex-start;
    margin: 20px 0 0 0;
}

section.category-top-content img.logo{
    max-height: 150px;
    object-fit: scale-down;
    width: auto;
}

section.category-top-content span {
    font-size: 18px;
    font-weight: bold;    
}

a.ticker-link {
    color: #d8244a;
    font-weight: bold;
    padding: 5px 10px;
}

a.artikkel-lenke {
    display: block;
}

nav.menu{
    justify-content: end;
    display: flex;
    align-items: center;    
    gap: 10px;
}

nav.menu a.regular-link {
    margin: 0 10px;
}

nav.menu a.header-resultater-link {
    margin-left: 25px;
}

.artikkel-item,
.artikkel-item-text {
    height: 100%;
    display: flex;
    flex-flow: column;
}

.leaderboard {
    width: 100%;
    height: auto;
    min-width: 980px;
    /* min-height: 150px; */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 50px auto 50px auto;
}

h3.section-heading {
    line-height: 2;
    border-bottom: 2px solid #F7E60B;    
    font-size: 24px;
}

.sidebar-left,
.sidebar-right {
    width: 100%;
    max-width: 300px;
    min-width: 160px;
    display: block;
    position: sticky;
    top: 25px;
    align-self: flex-start;
    height: fit-content;
    }

/* p.adtype {
    font-size: 20px;
    padding: 15px;
} */

ul {
    padding-inline-start: 0px;
    list-style-type: none;
    -ms-word-break: break-all;
    word-break: break-all;
    word-break: break-word;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    hyphens: auto;    
}


.single-view-content h2 {
    font-size: 23px;
}


.single-view-content h3 {
    font-size: 20px;
}

.single-view-content h4 {
    font-size: 18px;
}

.single-view-content ol {
    padding-inline-start: 20px;
}

.single-view-content ul {
    list-style-type: disc;
    padding-inline-start: 20px;
}

.single-view-content ul li {
    line-height: 1.5;
}

.list-group {
    margin-bottom: 30px;
}

.blue-nav-link{
    margin: 10px 0;
    background-color: black;
    color: white;
    padding: 12px 14px;
    border-radius: 5px;
    display: inline-block;
    cursor: pointer;
}

.blue-nav-link svg {
    margin-left: 10px;
}

p.no-more-results {
    font-style: italic;
    font-size: 18px;
    color: #d8244a;
    font-weight: bold;
}

.list-group a {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
}

img.featured-img {
    width: 100%;              /* take full width of column */
    height: 210px;            /* fixed height (you decide) */
    object-fit: cover;        /* crop to fit, keeps aspect ratio */
    object-position: center;  /* center the focus */
    display: block;           /* removes bottom whitespace */    
}

main section.padindent {
    padding: 0 75px;
}



.single-meta {
    font-size: 14px;
    margin-bottom: 30px;
    display: block;
}

.single-meta a {
    color: #d8244a;
    font-weight: bold;
}

section.category-top-content,
section.top-content {
    background-color: black;
    color: white;
    padding: 0 50px;
    grid-column: 1/-1;
    text-align: center;
    margin-bottom: 40px;
    border-radius: 6px;
}

section.category-top-content {
    padding: 20px 50px;
}

section.oslo-sportslager-top-content div {
    display: flex;
    flex-flow: column;    
}

section.oslo-sportslager-top-content {
    background-color: unset;
    color: black;
    display: grid;
    grid-template-columns: 1fr 4fr;
    gap: 60px;
    border: 1px solid;
    border-radius: 6px;
    padding: 30px 60px !important;    
    text-align: unset;
}

section.category-top-content a.ticker-link {
    color: white;
    text-decoration: underline;    
}

section.oslo-sportslager-top-content a.ticker-link {
    color: black;
}

.single-post section.single-view-content {
    font-family: 'Cabin', sans-serif;
    /* margin-bottom: 50px; */
    padding-bottom: 50px;
}

.page section.single-view-content p,
.single-post section.single-view-content p {
    font-size: 18px;
    line-height: 2;
    max-width: 800px;
}



.single-post section.single-view-content .cat-description {
    font-size: 26px;
    line-height: 1.3;
    margin-bottom: 30px;
    font-weight: 600;
    margin-top: 0;
    font-family: 'Raleway';
}


.table-container {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;              /* horizontal scroll when wide */
  overflow-y: hidden;            /* change to auto if you want vertical scroll too */
  -webkit-overflow-scrolling: touch; /* momentum scrolling on iOS */
  overscroll-behavior: contain;  /* avoid scroll chaining */
  border: 1px solid #e5e7eb;     /* optional: visual boundary */
  border-radius: 0px;
  max-width: 800px;
}

/* Let table grow if needed, but never smaller than the container */
.table-container > table {
  border-collapse: collapse;
  word-break: break-word;
  min-width: 100%;
  width: auto;            /* table grows to fit content */
  /* Optionally: table-layout: fixed;  (use when you prefer equal-width columns) */
}

/* Cells */
.table-container th,
.table-container td {
    padding: 4px;
    border: 1px solid black;
    /* border-bottom: 1px solid #f0f0f0; */
    vertical-align: top;
    font-size: 15px;

    text-align: center;
  /* Scroll-first behavior: keep on one line; container scrolls horizontally */
  /* white-space: nowrap; */
}





 


.single-post main .content-div {
    min-height: 200px;
}

.search .cat-description,
.page section.single-view-content a,
.single-post section.single-view-content a {
    color: #d8244a;
}

.resultater-wrapper {
    display: grid;
    grid-template-columns: 1fr 4fr;
    padding: 0 75px;
}

.page-id-1400 section.single-view-content a { 
    /*ARKIV*/
    color: #000724;
}

.pagination {
    display: flex;
    gap: 10px;
    color: #d8244a;    
}

input#searchQuery {
    font-size: 40px;
    margin: 50px auto;
    border-radius: 5px;
    border: none;
    padding: 10px 30px;
    width: 100%;
    max-width: 800px;
}

label {
    cursor: pointer;
}

.search main h3 {
    font-size: 18px;
    margin: 15px 0;
}

.sort-inputs-mobile {
    display: none;
}


.sort-inputs-mobile select {
    width: 100%;
    padding: 10px;
    margin-bottom: 30px;
    /* -webkit-appearance:none; */
}

.sort-inputs-desktop {
    display: block;
}

.search main h3 span {
    font-weight: 300;
}

.sorting {
    line-height: 1.5;
    position: sticky;
    top: 15px;
    align-self: flex-start;
    height: fit-content;
    padding: 10px;
}

.sort-input-wrapper label {
    margin-left: 10px;
}

a.prev,
a.next {
    color: #d8244a !important;
}


section.category-top-content h1,
section.top-content h1 {
    font-size: 50px;
}

section.category-top-content h1 {
    margin: 20px 0;
}


.mobile-links-wrapper {
    display: none;
}

.sport-pa-tv-widget iframe {
    width: fit-content;
    width: max-content;
    max-width: 100%;
}

.sport-pa-tv-widget {
    width: auto !important;
    max-width: 100%;
}

.pasted-iframes iframe {
    /* width: 100%; */
    max-width: 100%;
    max-width: 800px;
}


.iframe-container {
  overflow: hidden;
  padding-bottom: 56.25%;
  position: relative;
  padding-top: 30px;
  height: 0;
}

.iframe-container iframe {
  border: 0;
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
  max-width: 100%;
}

.big-menu-icon {
    display: none;
}


section.oslo-sportslager-top-content img.avlang {
    display: none;
}

section.oslo-sportslager-top-content img.kvadrat {
    display: block;
}


@media (max-width: 1460px) {

    .layout {
        display: grid;
        grid-template-columns: 1fr;    
    }

    img.logo {
        max-width: 250px;
    }



    .sidebar-left,
    .sidebar-right {
        display: none;
    }



}

@media (max-width: 1020px) {

    .pasted-iframes iframe {
        /* width: 100%; */
        max-width: 100%;
    }




    .list-group-date {
        font-size: 13px;
    }


    nav.menu {
        display: none;
    }

    .menu-expanded-container {
        margin: 0;
    }



    .mobile-links-wrapper,
    .categories-wrapper,
    .pages-wrapper {
        display: grid;
        justify-content: center;
    }

    .link-container {
        min-width: 300px;
    }

    .mobile-links-wrapper .link-container {
        grid-template-columns: auto auto;
        min-width: auto;
    }

    .mobile-links-wrapper {
        min-width: 300px;
        justify-content: flex-start;
        margin: auto;
    }

    .header-wrapper {
        grid-template-columns: auto auto;
        gap: 20px;
    }

    .big-menu-icon {
        display: block;
        height: 35px;
        width: auto;
        margin-left: auto;
        cursor: pointer;
        margin-right: 20px;
    }


    .resultater-wrapper {
        grid-template-columns: 1fr;
        padding: unset;
    }

    .sorting {
        position: relative;
        padding: 0;
    }

    .sort-inputs-desktop {
        display: none;
    }

    .sort-inputs-mobile {
        display: block;
    }

    #FirstBatch a.blue-nav-link {
        display: block;
        grid-column: 1 / -1;
        width: fit-content;
        margin: auto;        
    }

    .artikkel-item h2 {
        font-size: 17px;
    }

    h3.section-heading {
        font-size: 18px;
    }

    main section.padindent {
        padding: unset;
    }

    footer {
        margin-top: 20px;
    }

    section.category-top-content h1, section.top-content h1 {
        font-size: 26px;
    }

    section.category-top-content, section.top-content {
        padding: 0 25px;
        margin-bottom: 0;
    }

    .single-post section.single-view-content .cat-description {
        font-size: 18px;
    }
    

    .artikkel-item-text p {
        font-size: 14px;
    }

    section.ticker { 
        font-size: 14px;
        line-height: 1.3;
        margin-top: 0;
    }

    .page section.single-view-content p, .single-post section.single-view-content p {
        font-size: 16px;
        line-height: 1.5;
    }

    input#searchQuery {
        font-size: 18px;
        margin: 0;
        border: 1px solid;
        max-width: unset;
    }

    .search section.top-content {
        padding: 0;
    }

    .search main h3,
    .list-group a {
        font-size: 16px;
    }

    .main-content {
        width: 100%;
    }

    .leaderboard {
        display: none;
    }

    .mobile-placement {
        display: flex;
        grid-column: 1 / -1;
        width: fit-content;
        margin: 20px auto;        
    }

    .artikkel-item-wrapper {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    img.featured-img {
        height: 240px;
    }

    .header-wrapper img.logo {
        max-height: 60px;
        object-fit: scale-down;
        width: auto;
    }
}

@media (max-width: 768px) {
    /* tablets and smaller */

    .table-container th,
    .table-container td {
        font-size: 13px;

        /* Scroll-first behavior: keep on one line; container scrolls horizontally */
        /* white-space: nowrap; */
    }


    .table-container::-webkit-scrollbar {
        width: 1em;
        height:8px;
    }
    
    .table-container::-webkit-scrollbar-track {
        -webkit-box-shadow: inset 0 0 3px rgba(0,0,0,0.3);
    }
    
    .table-container::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.212);
    outline: 1px solid #F7E60B;
    } 
    


    section.oslo-sportslager-top-content img.avlang {
        display: block;
    }
    section.oslo-sportslager-top-content img.kvadrat {
        display: none;
    }

    section.oslo-sportslager-top-content {
        padding: 25px 15px !important;    
    }


    section.oslo-sportslager-top-content {
        grid-template-columns: 1fr;
        gap: 20px;
        justify-items: center;
        text-align: center;
    }

    section.oslo-sportslager-top-content section.category-ticker {
        margin: unset;
        justify-content: center;
    }

    .menu-expanded-container {
        grid-template-columns: 1fr;
    }

    .artikkel-item-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    img.featured-img {
        height: 340px;
    }

    /* nav {
        display: unset !important;
        
    } */

    nav.menu,
    nav.footer-navigation {
        flex-flow: row wrap;
        justify-content: center;
    }

    section.ticker {
        display: flex;
        flex-flow: row wrap;
        justify-content: center;
        align-items: center;
    }

}

@media (max-width: 480px) {
    /* phones */
    img.featured-img {
        height: 240px;
    }


    .table-container th,
    .table-container td {
        /* Scroll-first behavior: keep on one line; container scrolls horizontally */
        white-space: nowrap;
    }

}

/* 
@media (min-width: 1440px) {

    .sidebar-left,
    .sidebar-right {
        width: 100%;
        max-width: 300px;
        min-width: 160px;
        display: block;
        border: 1px solid green;
    }
} */