/* =============================================================
 * global.css — Nordisk Bergteknik child theme
 * Generell sajt-CSS. Enqueuas via inc/enqueue.php.
 * Sektioner:
 *   1. Misc / Komponenter
 *   2. Hero
 *   3. Bakgrundspositionering
 *   4. Navigation
 *   5. Breadcrumbs
 *   6. Typografi & listor
 *   7. Swiper-slider
 *   8. Tabeller
 *   9. Animeringar
 *  10. Horisontell scroll
 *  11. Footer / CTA
 *  12. Newsletter
 *  13. Hjälpklasser
 *  14. [TODO: Ta bort med Cision] Cision-specifikt
 * ============================================================= */


/* 1. Misc / Komponenter
============================================ */
.gradient {
    background: rgb(0, 0, 0);
    background: linear-gradient(180deg, rgba(0, 0, 0, 1) 10%, rgba(73, 169, 187, 1) 100%);
}

.accordion-title .icon {
    background: #F5F4ED;
    text-align: center;
    border-radius: 10em;
    width: 32px;
}

.fr-profile-card-bravo .brx-submenu-toggle button {
    margin-top: -2rem;
    width: 3.2rem;
    height: 3.2rem;
}

.fr-feature-card-hotel__overlay.brxe-block::before,
.fr-article-card-alpha__media-wrapper.brxe-div::before {
    mix-blend-mode: multiply;
}

.fr-feature-card-hotel__overlay.brxe-block:hover,
.fr-article-card-alpha__media-wrapper.brxe-div:hover {
    transition: 1s background-color ease-in-out;
}

.fr-feature-card-hotel__overlay.brxe-block::before,
.fr-article-card-alpha__media-wrapper.brxe-div::before {
    background-color: linear-gradient(rgba(28, 28, 28, 0.2), rgba(28, 28, 28, 0.8));
}


/* 2. Hero
============================================ */
.hero-blur::before {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.brx-dropdown-content {
    top: 3.5rem;
}


/* 3. Bakgrundspositionering (hero / template-sidor)
============================================ */
[data-bg-position="Left Top"]    { background-position: 20% 20% !important; }
[data-bg-position="Left Center"] { background-position: 20% 50% !important; }
[data-bg-position="Left Bottom"] { background-position: 20% 80% !important; }
[data-bg-position="Center Top"]    { background-position: 50% 20% !important; }
[data-bg-position="Center Center"] { background-position: 50% 50% !important; }
[data-bg-position="Center Bottom"] { background-position: 50% 80% !important; }
[data-bg-position="Right Top"]    { background-position: 80% 20% !important; }
[data-bg-position="Right Center"] { background-position: 80% 50% !important; }
[data-bg-position="Right Bottom"] { background-position: 80% 80% !important; }


/* 4. Navigation
============================================ */
.brx-submenu-toggle button {
    width: 1.8rem;
    height: 1.8rem;
    border: 1px solid white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    vertical-align: middle;
    background-color: white;
    line-height: 1;
    font-size: 1rem;
}

.brx-submenu-toggle button .fa-chevron-down:before {
    color: black;
}

.brxe-dropdown:hover:not(.brx-submenu-toggle button i) {
    text-decoration: none;
}

.brx-submenu-toggle button[aria-expanded="true"] > i {
    color: #F5F4ED !important;
}

.brxe-xslidemenu .menu-item a {
    align-content: center;
}

.x-slide-menu_dropdown-icon {
    color: var(--neutral);
    background-color: #F5F4ED;
    width: 1em;
    height: 1em;
    display: flex;
    border-radius: 50%;
    border: 1px solid #F5F4ED;
}

.x-popover .tippy-content {
    padding: 20px 0px 20px 20px;
}

.tippy-arrow:before,
.tippy-box[data-placement^=left] > .tippy-arrow:before {
    color: white;
}


/* 5. Breadcrumbs
============================================ */
#bc-nav a {
    font-size: 1.8rem;
    color: white;
}

.rank-math-breadcrumb span.separator {
    font-size: 1.4rem;
    padding-left: 0.4em;
    padding-right: 0.4em;
}


/* 6. Typografi & listor
============================================ */

/* Tvåkolumns-lista */
.brxe-text ul {
    column-count: 2;
}

@media screen and (max-width: 480px) {
    .brxe-text ul {
        column-count: 1;
    }
}

/* Sidspecifika överskrivningar */
.page-id-1073 .brxe-text ul,
.page-id-1082 .brxe-text ul,
.page-id-1102 .brxe-text ul,
.page-id-5721 .brxe-text ul {
    column-count: 1;
}


/* 7. Swiper-slider
============================================ */
.swiper-slide-visible,
.swiper-slide.swiper-slide-prev,
.swiper-slide.swiper-slide-next {
    transform: translate3d(0px) !important;
    transform: rotate(0deg) !important;
}

.swiper-slide.swiper-slide-prev,
.swiper-slide.swiper-slide-next {
    transform: scale(0.85) !important;
}

.swiper-slide.swiper-slide-prev:before,
.swiper-slide.swiper-slide-next:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.7;
    z-index: 100;
}

.swiper-slide.swiper-slide-prev:before {
    background: linear-gradient(90deg, rgba(245, 244, 237, 1) 30%, rgba(255, 255, 255, 0.9) 100%);
}

.swiper-slide.swiper-slide-next:before {
    background: linear-gradient(-90deg, rgba(245, 244, 237, 1) 30%, rgba(255, 255, 255, 0.9) 100%);
}


/* 8. Tabeller
============================================ */
#ownership {
    width: 100%;
}

@media screen and (max-width: 480px) {
    #ownershipTabs .nav-item {
        width: 100%;
    }
}

.table-striped.autowidth th {
    white-space: break-space;
}

table {
    border-collapse: collapse;
    width: 100%;
    background: #fff;
    table-layout: fixed;
}

table td,
table th {
    padding: 0.6em 1em;
}

table td {
    font-size: 1.8rem;
    width: 50%;
    word-wrap: break-word;
}

table th {
    background-color: #F5F4ED;
    font-weight: 600;
    color: var(--primary-dark);
    white-space: nowrap;
}

table tbody th {
    background-color: #F5F4ED;
}

table tbody tr:nth-child(odd) {
    background-color: var(--white-trans-50);
}

/* TableWrapper — horisontell scroll med visuella indikatorer */
.tableWrapper {
    width: 100%;
    overflow: auto;
    max-width: 1600px;
    margin: 0 auto;
}

.tableWrapper table {
    background: none;
    table-layout: unset;
}

.tableWrapper table th {
    background-color: transparent;
}

.tableWrapper table td {
    width: auto;
}

.page-id-1094 .tableWrapper table td {
    width: 200px;
}

.tableWrapper.scrollRight {
    background: linear-gradient(to right, rgba(187, 187, 187, 0) 95%, rgba(187, 187, 187, 1) 100%);
}

.tableWrapper.scrollLeft {
    background: linear-gradient(to right, rgba(187, 187, 187, 1) 0%, rgba(187, 187, 187, 0) 5%);
}

.tableWrapper.scrollLeft.scrollRight {
    background: linear-gradient(to right, rgba(187, 187, 187, 1) 0%, rgba(187, 187, 187, 0) 5%, rgba(187, 187, 187, 0) 95%, rgba(187, 187, 187, 1) 100%);
}

.tableWrapper::-webkit-scrollbar {
    width: 5px;
    height: 5px;
    background-color: rgba(0, 0, 0, 0.1);
}

.tableWrapper::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Responsiva tabeller */
.responsive-table table {
    overflow-x: auto;
}

.responsive-table table a img {
    display: inline-block;
}

.table-striped table th,
.responsive-table table th {
    white-space: inherit !important;
}

@media only screen and (max-width: 768px) {
    .responsive-table table {
        width: var(--width-xxl);
        overflow-x: scroll;
    }
}

.table > thead > tr > th,
.table > tbody > tr > td {
    text-align: left;
}

.table > tbody > tr > td,
.table > tbody > tr > th,
.table > tfoot > tr > td,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > thead > tr > th {
    font-size: 1.6rem;
}

[colspan]:nth-child(odd) {
    background-color: transparent;
}

/* Sidspecifika tabellöverskrivningar */
.page-id-1083 table td[data-title="Innehåll"] {
    text-align: center;
}

.page-id-1068 table.autowidth table th {
    white-space: nowrap;
}

.text-muted {
    font-size: 1.4rem;
    margin: var(--space-xs) var(--space-xs) 0 var(--space-xs);
}


/* 9. Animeringar
============================================ */

/* Länkpil (animated arrow link) */
.arrow-link {
    position: relative;
    display: inline-block;
    color: var(--neutral);
    padding-right: 15px;
    transition: padding-right 0.3s;
    text-decoration: underline;
}

.arrow-link i {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.arrow-link:hover {
    padding-right: 30px;
}

.arrow-link:hover i {
    opacity: 1;
}


/* 10. Horisontell scroll-wrapper
============================================ */
.horizontal-scroll-wrapper {
    cursor: grab;
    overflow: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--space-l);
}

.horizontal-scroll-wrapper p {
    white-space: break-spaces;
}

.horizontal-scroll-wrapper .card {
    display: inline-block;
}


/* 11. Footer / CTA
============================================ */
.cta-footer__content h3 {
    font-size: var(--h2);
    font-weight: 400;
    margin-bottom: 0 !important;
}

.cta-footer__content h4 {
    font-size: var(--h4);
    margin-top: 0 !important;
}

.cta-footer__content p {
    margin-top: 0 !important;
}


/* 12. Newsletter
============================================ */
#newsletter {
    background-color: var(--primary-light);
}

#newsletter .form-control {
    padding: 24px 10px;
    border: 1px solid #fff;
    margin-bottom: var(--space-xs);
}

#newsletter span {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.3rem;
    line-height: 1.2;
    display: block;
}

#newsletter input[type="checkbox"] {
    display: none;
}

#newsletter label {
    color: var(--neutral);
    display: inline-block;
    cursor: pointer;
    padding-left: 34px;
    margin-right: var(--space-s);
    position: relative;
}

#newsletter label:before {
    content: "";
    display: inline-block;
    width: 26px;
    height: 26px;
    text-align: center;
    line-height: 26px;
    margin-right: 0;
    position: absolute;
    left: 0;
    top: 0;
    border-radius: 4px;
    background-color: #fff;
}

#newsletter input[type="checkbox"]:checked + label:before {
    content: "✓";
    font-size: 1.6rem;
    color: #fff;
    background-color: var(--primary-dark);
    border-color: #fff;
    border-width: 2px;
}

#newsletter label:hover:before {
    border-color: var(--primary);
}


/* 13. Hjälpklasser
============================================ */
.hidden {
    display: none;
}

.visible {
    visibility: visible;
    opacity: 1;
}

.table-striped.autowidth th {
    white-space: break-space;
}


/* 14. [TODO: Ta bort med Cision]
============================================ */

/* Pressmeddelanden-sida (Cision-arkiv) */
.blog .wrap {
    overflow: hidden;
}

.blog .wrap h1 {
    font-size: var(--h2);
    margin-bottom: var(--space-s);
}

.blog .wrap section {
    max-width: 80rem;
    margin: 0 auto;
    padding-top: var(--space-xxl);
    padding-bottom: var(--space-xxl);
}

.blog .wrap p:first-child {
    font-size: var(--text-l);
}

/* Cision single-post typografi */
.cision-post-template-default ul {
    column-count: 1;
}

.cision-post-template-default ul li,
.cision-post-template-default ol li {
    font-family: "IBM Plex Sans" !important;
    font-size: var(--text-m) !important;
}

@media screen and (max-width: 960px) {
    .cision-post-template-default ul li,
    .cision-post-template-default ol li {
        font-size: 1.6rem !important;
    }
}

/* Cision arkiv-sidors rubriker */
.page-id-1093 h2,
.page-id-4348 h2,
.page-id-4354 h2,
.page-id-4356 h2 {
    font-size: var(--h2);
}

/* Cision feed-kort */
.cision-press-card h2:hover {
    text-decoration: underline;
}

.cision-feed-item .cision-feed-regulatory {
    background-color: var(--accent);
    display: inline-block !important;
    padding: 4px 12px !important;
    font-size: 1.6rem;
    font-weight: 600;
    margin-top: var(--space-s);
    margin-bottom: var(--space-s);
}

.cision-feed-item time {
    color: var(--neutral);
    font-weight: 700;
    font-size: 1.8rem;
}

.cision-feed-item p {
    margin-bottom: var(--space-m);
}

.cision-feed-item a {
    color: var(--neutral);
    text-decoration: underline;
}

/* Dölj CTA på Cision single-posts */
.single-cision-post .cta-question {
    display: none;
}

/* Cision-filer (bifogade dokument) */
.cision_files {
    padding: 10px;
    font-size: 1.6rem;
    margin-top: 4rem;
    border-top: 2px dashed #ccc;
    padding-top: 4rem;
}

.cision_files a {
    display: block;
    text-decoration: none !important;
}


/* MFN taxonomi-taggar — separata chips
============================================ */
.mfn-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.6rem;
}

.mfn-tag {
    display: inline-block;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.3rem 0.8rem;
    background: var(--accent, #f5c842);
    color: var(--text-dark);
    border-radius: 0;
}
