/* 
    Created on : 1. okt. 2025, 16.07.01
    Author     : Michael
*/

:root { 
    --bg-color: #fff; /* backgrounds */
    --txt-color: #000;
    --bg-txt-color: #fff; 
    --bg-hover-txt-color: #e0e0e0; 
    --mg-bg-color: #f5f5f5; /* middlegrounds */
    --mg-txt-color: #000;
    --menu-bg-color: #f5f5f5; /* backgrounds menu/trees */
    --menu-txt-color: #000; /* backgrounds menu/trees */
    --menu-selected-bg-color: #d3d3d3; /* backgrounds on selected menu/trees */
    --menu-hover-bg-color: #e0e0e0; /* backgrounds menu/trees */
    --menu-hover-txt-color: #000; /* backgrounds menu/trees */
    --search-txt-color: #000;
    --search-bg-color: #f5f5f5;
    --border-color: #333;
    --table-bg: #f5f5f5;
    --header-bg: #014664;   /* dark teal */
    --header-txt: #fff;
    --row-even: #f7fafc;    /* light */
    --row-odd:  #e6f2f5;    /* slightly darker */
    --row-hover: #dbeff3;
    --border: #d0d7da;
    --txt: #0b2a33;
    --info-text-width: 60%;
    --ac-orange: #de790a;
}

.right {
    text-align: right;
}
.left {
    text-align: left;
}
.center {
    text-align: center;
}

.page-text-block img {
    max-width: 100%;
    height: auto !important;
    display: block;
    margin: 10px auto;
}

.page-text-block figure.image {
    max-width: 100%;
    margin: 0 auto 1em;
    text-align: center;
}


light-gray {
    background-color: var(--menu-bg-color);
}

html, body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0px;
    font-family: Lucida Grande, Lucida Sans, Verdana, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    text-align : left;  
}
  
html {
    box-sizing:border-box;
    -ms-text-size-adjust:100%;
    -webkit-text-size-adjust:100%;
    overflow-x:hidden;
}

body {
    background-color: var(--bg-color);
    padding-top: 90px; /* adjust to menu height + margin */    
}

*,*:before,*:after {
    box-sizing:inherit;
}

h6 {
    font-size: 13px;
    line-height: 21px;
    font-weight: normal;
    font-style: italic;
}

.vertical-center {
    margin: 20px;
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
}

.editor-menu {
    display: flex;
    position: fixed;
    gap: 5px;
    align-self: center;
    z-index: 1000;
    background-color: var(--menu-bg-color);
}    

/* Container for top menu */
.top-menu {
    display: flex;
    font-size: 18px;
    font-weight: 800;
    position: fixed;               /* stay at top */
    top: 10px;
    left: 50%;                     /* center horizontally */
    transform: translateX(-50%);
    width: 99%;                     /* same width as content */
    z-index: 1000;                  /* stay on top */
    align-items: center;
    padding: 0px 20px;
    border-radius: 12px;
    background-color: var(--menu-bg-color);
}    

/* Logo styling */
.top-menu .logo {
    height: 60px;
    margin: 0 20px 0 0;     /* keep horizontal spacing, remove vertical */
    display: block;
    align-self: center;      /* ensure vertical centering inside flex container */
    padding: 5px;
}

/* Menu items container */
.menu-items {
    display: flex;
    gap: 20px;
    flex: 1;
    align-items: center;
}

/* push Opret konto to the right */
.menu-items .ra {
    margin-left: auto;
    border: 2px solid black;
    background-color: #EFEFEF;
}

.menu-items .ra:hover {
    color: orangered;
    border-color: orangered;
    background-color: var(--menu-hover-bg-color);
}

/* Menu links */
.menu-items a {
    color: var(--menu-txt-color); 
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 8px;
}

.menu-items a:hover {
    color: var(--menu-hover-txt-color);
    background-color: var(--menu-hover-bg-color);
}  

.link_button {
    font-size: 18px;
    font-weight: 800;
    display: flex;
    gap: 20px;
    flex: 1;
    align-items: center;
    margin: 0 auto;    
}

.link_button a {
    color: var(--menu-txt-color); 
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 8px;
    border: 2px solid;
}

.link_button a:hover {
    color: var(--menu-hover-txt-color);
    background-color: var(--menu-hover-bg-color);
}  

.dropbtn {
    color: var(--menu-txt-color);
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 8px;
}

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: var(--menu-bg-color);
    min-width: 180px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    z-index: 1;
}

.dropdown-content a {
    display: block;
    color: var(--menu-txt-color);
    padding: 10px;
    text-decoration: none;
}

.dropdown-content a:hover {
    background: var(--menu-hover-bg-color);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown:hover .dropbtn {
    background: var(--menu-hover-bg-color);
}

/* Product may vary */
.pmv {
    background-color: cornsilk;
    max-width: fit-content;
    padding: 6px;
    margin-left: auto;
    position: relative;    
}

.page-text-block {
    width: var(--info-text-width);
    margin: 20px auto;
    display: block !important;
    background-color: var(--bg-color) !important;
    text-align: left;
    padding: 20px;
    font-size: 16px;
    border-radius: 20px;
}

.page-text-block ol {
    counter-reset: item;
    list-style: none;
    padding-left: 1.5em;
    margin: 0.5em;
}

.page-text-block li {
    display: list-item;
    counter-increment: item;
    margin: 0.25em 0;
}

.page-text-block li::marker {
    content: counters(item, ".") ". ";
}

.page-text-block ul ul,
.page-text-block .double-indent {
    margin-left: 1.5em;
    list-style-type: circle;
}

.page-text-block h1 {
    text-align: center;
    color: #365F91;
}

.page-text-block h2 {
    text-align: center;
    color: #365F91;
}

.page-text-block li h2 {
    text-align: left;
}

.page-text-block h3 {
    color: #365F91;
}

@media (max-width: 900px) {
   .page-text-block {
        width: 100% !important;
        margin: 0 !important;
        padding: 15px 10px !important;
        border-radius: 0 !important;
        background-color: white !important;
        font-size: 16px !important;
        line-height: 1.5 !important;
    }

    .page-text-block h1 {
        font-size: 1.75rem; /* ~28px */
        line-height: 1.3;
        text-align: center;
        word-break: break-word;
    }

    .page-text-block h2 {
        font-size: 1.5rem; /* ~24px */
        line-height: 1.35;
        text-align: center;
        word-break: break-word;
    }

    .page-text-block li h2 {
        text-align: left;
    }
    
    .page-text-block h3 {
        font-size: 1.25rem; /* ~20px */
        line-height: 1.4;
        text-align: center;
        word-break: break-word;
    }

    .page-text-block ol {
        margin: 0;
        padding-left: 20px;
    }

    .page-text-block li {
        margin-bottom: 0.5em;
        word-wrap: break-word;
    }

    .page-text-block p {
        margin-bottom: 0.7em;
    }

    .page-text-block ul {
        margin: 0.3em 0 0.7em 1.5em;
        padding: 0;
        list-style-type: disc;
        list-style-position: outside;
        word-wrap: break-word;
    }

    /* Double indent lists */
    .page-text-block ul ul,
    .page-text-block .double-indent {
        margin-left: 1.5em;
        list-style-type: circle;
    }
}

/* Image box */
.image-box {
    width: 75%;
    margin: 20px auto;
    border-radius: 12px;
    overflow: hidden;
}

.image-box img {
    width: 100%;
    display: block;
    max-width: 250px;
    max-height: 300px;
    margin: 0px auto;
}

.front-search {
    display: flex;
    flex-direction: column;
    align-items: flex-start;     /* center children horizontally */
    justify-content: center; /* center vertically */
    position: relative;
    max-width: 1440px;
    margin: 10px auto;       /* center the block itself */
    overflow: hidden;
    border-radius: 0;
    background: var(--bg-color-menu);
    width: 100%;             /* or a fixed width if you prefer */
}

/* Carousel container */
.carousel,
[class^="carousel_"] {
    position: relative;
    max-width: 1440px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 0;
    background: var(--bg-color-menu);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Carousel inner (slides wrapper) */
.carousel-inner,
[class^="carousel-inner_"] {
    display: flex;
    width: 100%;
    transition: transform 0.6s ease-in-out;
}

/* Carousel images */
.carousel-inner img,
[class^="carousel-inner_"] img {
    width: 100%;
    height: auto;
    object-fit: contain;
    flex-shrink: 1;
}

/* Navigation arrows */
.carousel button,
[class^="carousel_"] button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.5);
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    font-size: 18px;
}

.carousel button:hover,
[class^="carousel_"] button:hover {
    background-color: rgba(0,0,0,0.8);
}

/* Previous arrow */
.carousel .prev,
[class^="carousel_"] [class^="prev_"] {
    left: 10px;
}

/* Next arrow */
.carousel .next,
[class^="carousel_"] [class^="next_"] {
    right: 10px;
}
   
/* Categories section */
.categories {
    width: 90%; 
    max-width: 90%;
    margin: 20px auto;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

/* =========================================================
   CATEGORY GRID – Fixed image sizing
   ========================================================= */
.category {
    width: 300px;
    height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    background-color: var(--menu-bg-color);
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    text-decoration: none;
    color: inherit;
    padding: 10px;
    margin: 10px;
}

/* Change heading color on hover */
/* Text styling */
.category h3 {
    margin-top: auto;
    font-size: 18px;
}

.category:hover h3 {
    color: var(--menu-hover-txt-color);
}

.category:hover {
    transform: translateY(-5px);
    background-color: var(--menu-selected-bg-color);
}

/* Slight image zoom on hover */
.category:hover img {
    transform: scale(1.05);
    background-color: var(--menu-selected-bg-color);
}

.category img {
    flex: 1 1 200px;
    max-width: 100%;
    max-height: 80%;
    width: 100%;
    height: 220px;
    object-fit: contain;
    object-position: center center;
    display: block;
    background: var(--bg-color-menu);
}

/* Link states */
.category:link,
.category:visited,
.category:hover,
.category:active {
    text-decoration: none;
    color: inherit;
}

.category-name.selected {
    background-color:  var(--menu-hover-bg-color);
    border-radius: 4px;
    padding: 2px 0;
}

/* Responsive tweak for phones */
@media (max-width: 900px) {
    .categories {
        justify-content: center;
    }
    .category {
        width: 100%;
        max-width: 320px;
        height: auto;
        border-radius: 12px;
    }
    .category img {
        height: 200px;
    }

    .category:hover {
        transform: translateY(-5px);
        background-color: var(--menu-selected-bg-color);
    }

    /* Slight image zoom on hover */
    .category:hover img {
        transform: scale(1.05);
    }
}

.video-block {
    width: 100%;
    max-width: 1200px;          
    margin: 20px auto;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Keep the video fluid and proportional */
.video-block video {
    width: 100%;
    height: auto;               
    max-height: 80vh;           
    border-radius: 0;
    object-fit: contain;        
    display: block;
    margin: 0 auto;
}

/* CONTACT */

.contact-top-image { margin: 0 auto; }
.contact-profile { margin: 0 auto; }

.contact-text {
    position: relative;
    height: 15px;
    text-align: center;
    display: contents;
}

.contact-divider {
    position: relative;
    margin-top: 15px;
    margin-bottom: 15px;
    width: 100%;
}

/* =========================================================
   RESPONSIVE – Kontakt page
   ========================================================= */
.contact-top-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 12px;
}

.contact-text {
    text-align: center;
    margin: 20px auto;
    width: 80%;
    color: black;
}

.contact-text h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.contact-text h2 {
    font-size: 20px;
    font-weight: normal;
    margin-top: 0;
    line-height: 1.4;
}

.contact-profile {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.contact-card {
    background: var(--bg-color);
    border-radius: 12px;
    text-align: center;
    max-width: 360px;
    width: 100%;
    padding: 20px;
}

.profile-photo {
    width: 100%;
    height: auto;
    max-width: 360px;
    border-radius: 12px;
    display: block;
    margin: 0 auto;
}

.contact-info {
    margin-top: 15px;
}

.contact-info h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 10px 0 0;
}

.contact-info h6 {
    font-size: 1rem;
    margin: 5px 0 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

.contact-links p {
    margin: 5px 0;
}

.contact-links img {
    vertical-align: middle;
    margin-right: 5px;
}

/* --- Mobile adjustments --- */
@media (max-width: 900px) {
    .contact-top-image img {
        border-radius: 0;
        max-height: none;
    }

    .contact-text {
        width: 95%;
        margin: 10px auto;
    }

    .contact-text h1 {
        font-size: 22px;
        margin-bottom: 5px;
    }

    .contact-text h2 {
        font-size: 16px;
        line-height: 1.3;
    }

    .contact-card {
        border-radius: 0;
        padding: 15px 10px;
        max-width: 100%;
    }

    .profile-photo {
        border-radius: 0;
        max-width: 100%;
    }

    .contact-info h4 {
        font-size: 18px;
    }

    .contact-info h6 {
        font-size: 14px;
        letter-spacing: 1px;
    }
}

/* Footer styling */
.site-footer {
    font-size: 15px;
    background-color: var(--bg-color);
    color: var(--bg-txt-color);
    padding: 20px 0;
    margin-top: 40px;
    text-align: center;
    border-radius: 12px 12px 0 0;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    flex-shrink: 0;
}

.site-footer a {
    background-color: var(--bg-color);
    color: var(--txt-color);
    text-decoration: none;
    margin: 0 5px;
    transition: color 0.3s;
}

.site-footer a:hover { 
    background-color: var(--bg-hover-txt-color); 
}

.site-footer h3 { font-size: 10px; }

.footer-content { max-width: 100%; margin: 0 auto; }

/* Info Block Above Footer */
.info-block {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    background-color: var(--bg-color); 
    padding: 30px 20px;
    border-radius: 12px;
    margin: 20px auto;
    width: 98%;
}

.info-block p {
    display: block;
    margin-block-start: 0px;
    margin-block-end: 10px;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    unicode-bidi: isolate;
}

.info-column {
    flex: 1 1 100px;       
    min-width: 120px;      
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0px;
}

.info-column a {
    color: var(--menu-txt-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: color 0.3s;
}

.info-column p {
    word-break: break-word;
    overflow-wrap: anywhere;
    text-align: left;
}

.info-column a:hover { color: var(--menu-hover-txt-color); }

/* Logo Column */
.logo-column { align-items: center; }
.info-logo { max-width: 100px; height: auto; }

/* Social Icons */
.social-column { flex-direction: column; gap: 10px; }
.social-column .social-icon { width: 32px; height: 32px; margin-right: 10px; }

/* Links Column */
.links-column { color: var(--menu-txt-color); }

/* Responsive adjustments */
@media screen and (max-width: 900px) {
    .info-block {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .info-column { 
        align-items: center; 
    }

    .info-column p {
        word-break: break-word;
        overflow-wrap: anywhere;
        text-align: center;
    }    
    
    .social-column { 
        justify-content: center; 
    }
}

.bottom-block {
    display: flex;
    align-items: flex-start; /* or center, depending on your design */
    width: 100%;
}

.bottom-block .left-part {
    display: flex;
    position: relative;
    width: 50%;
    max-width: 50%;
    overflow: hidden;
    border-radius: 12px;
    justify-content: center;
    align-items: center;
    height: auto;
    margin-top: 30px;
}

.bottom-block .left-part img{
    margin-right: 5px; 
    border: 2px;
    border-style: solid;
    border-color: black;
}    

.bottom-block .description {
    display: block;
    margin-left: 30px;
    text-align: left;
    margin-top: 30px;
    max-width: 50%;
    width: 50%
}

.thumb {
  border: 1px solid #ccc;
  background: var(--bg-color);
  padding: 2px;
  overflow: hidden;
}

.thumb img {
  display: block;
  width: 100%;
  height: auto;
}

.thumb:hover img {
  transform: scale(1.05);
  opacity: 0.9;
}

.active-thumb { border-color: #2bad70; }

.amounts {
    font-size: 18px;
    display: grid;
    grid-template-columns: auto auto;
    margin-bottom: 20px;
}

/* =============================
   Opret Konto Form
   ============================= */
body.opret-konto-page {
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.opret-konto-wrapper {
    background: var(--bg-color);
    border-radius: 10px;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 50px;
    flex: 1;
}

.opret-konto-wrapper h2 {
    text-align: center;
    color: #0056b3;
    font-size: 2rem;
    margin-bottom: 0.3em;
}

.opret-konto-wrapper .intro {
    text-align: center;
    margin-bottom: 2em;
    color: #444;
    font-size: 1rem;
}


/* =========================================================
   RESPONSIVE – Opret konto page overflow fix
   ========================================================= */
@media (max-width: 900px) {
    body.opret-konto-page {
        padding-top: 80px;
    }

    .opret-konto-wrapper {
        max-width: 95%;
        margin: 10px auto;
        padding: 20px;
        border-radius: 0;
    }

    .opret-konto-wrapper h2 {
        font-size: 22px;
    }

    .form-grid input,
    .form-grid textarea {
        font-size: 15px;
        padding: 8px;
    }

    .send-btn {
        padding: 8px 25px;
        font-size: 15px;
    }
}

/* Slight desktop optimization to reduce overflow */
@media (min-width: 901px) {
    .opret-konto-wrapper {
        max-height: calc(100vh - 140px);
        overflow-y: auto;
    }
}

.form-section { margin-bottom: 2em; }

.form-section h3 {
    color: #0056b3;
    border-bottom: 2px solid #0056b3;
    padding-bottom: 4px;
    margin-bottom: 1em;
    font-size: 1.2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px 30px;
}

.form-group { display: flex; flex-direction: column; }

.form-group.full-row { grid-column: 1 / -1; }

label {
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}

input[type="text"],
input[type="email"],
textarea {
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 10px;
    font-size: 0.95rem;
    width: 100%;
    box-sizing: border-box;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.cvr-row { display: flex; gap: 10px; }

.lookup-btn {
    background-color: var(--menu-bg-color);
    color: var(--menu-txt-color);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.lookup-btn:hover { background-color: var(--menu-hover-bg-color); }

.error-text {
    color: red;
    font-size: 0.9rem;
    margin-top: 5px;
}

.form-actions { text-align: center; margin-top: 30px; }

.send-btn {
    background-color: var(--menu-bg-color);
    color: var(--menu-txt-color);
    border: none;
    margin-bottom: 10px;
    border-radius: 8px;
    padding: 10px 40px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.send-btn:hover { background-color: var(--menu-hover-bg-color); }

@media (max-width: 768px) {
    .form-grid { grid-template-columns: 1fr; }
    .opret-konto-wrapper { padding: 30px 20px; }
}

/* =============================
   Opret Konto – Checkboxes
   ============================= */
.form-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.form-checkboxes label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    line-height: 1.4;
}

.form-checkboxes a { color: #0056b3; text-decoration: underline; }

.form-checkboxes a:hover { color: #003f8a; }

@media (min-width: 768px) {
    .form-checkboxes {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* =========================================================
   RESPONSIVE – Topmenu (hamburger)
   ========================================================= */
.menu-toggle {
    display: none;
    margin-left: auto;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--menu-bg-color);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

@media (max-width: 900px) {
    /* Comfortable reading on phones */
    body { font-size: 16px; }

    .top-menu {
        gap: 10px;
        padding: 6px 12px;
        z-index: 1100;
    }

    .menu-toggle { display: block; }

    .menu-items {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        background: var(--menu-bg-color);
        padding: 12px 16px;
        margin: 0 10px;
        border-radius: 12px;
        z-index: 1001;
    }
    .menu-items.open { display: flex; }

    .menu-items a {
        padding: 10px 8px;
        border-radius: 8px;
    }

    .menu-items .ra {
        position: static;
        right: auto;
        align-self: stretch;
    }

    body.menu-open { overflow: hidden; }

    body { padding-top: 100px; }

    input[type="text"],
    input[type="email"],
    textarea {
        font-size: 16px;
    }
}

/* Images/carousels full width on phones */
@media (max-width: 900px) {
    .carousel,
    [class^="carousel_"],
    .image-box { width: 100%; }
    .category { height: auto; }
    .category img { width: 100%; max-height: 60vh; }
}

/* Category tree takes full width on phones */
@media (max-width: 900px) {
    #tree { max-width: 100%; width: 100%; }
}

/* =========================================================
   Opret Konto – Form banner (auto-hide + responsive + final)
   ========================================================= */

.opret-konto-wrapper {
    background: var(--bg-color);
    border-radius: 10px;
    max-width: 95%;
    margin: 0 auto 60px auto;
    padding: 0 50px 50px 50px;
    flex: unset; 
    height: auto;
    position: relative;
    overflow: hidden;
}

@media (min-width: 901px) {
    .opret-konto-wrapper {
        max-height: none;
        overflow: visible;
    }
}

.form-banner {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    z-index: 10;
    cursor: pointer;
    opacity: 0;
    transform: translateY(-10px);
    animation: slideDown 0.4s ease forwards, fadeOut 1s ease 4s forwards;
    /* appear, stay ~4s, fade + slide up */
}

.form-banner.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-banner.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-banner.hide {
    display: none;
}

/* Animations */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    to { opacity: 0; transform: translateY(-10px); visibility: hidden; }
}

/* =========================================================
   PRODUCT LISTING – Produkter Page
   ========================================================= */
.product-page-main-wrapper {
    display: flex;
    flex: 1;
    width: 99%;
}

.product-content {
    flex: 1;
    text-decoration: none;
}

.product-content-header {
    width: 100%;
    display: block !important;
    text-align: center;
    border-radius: 12px;
    overflow: hidden;
}

.product-content-header h1{
    font-size: 32px !important;
    margin: 10px;
    color: var(--txt-color);
}

.product-list-wrap {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 98%;
    border: 0;
    margin: 0 auto;
}

.product-list-wrap a{
    text-decoration: none;
}

.product-list-box { 
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    font-weight: 800;
    height: 140px;
    width: 98%;
    margin: 10px auto;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--mg-bg-color);
    box-sizing: content-box;
    overflow: auto;
}

.product-list-box:hover {
    transform: translateY(-5px);
    background-color: var(--menu-selected-bg-color);
}

.product-list-box:hover h3 {
    color: var(--menu-hover-txt-color);
}

.product-list-box:hover img {
    transform: scale(1.05);
}

.category-container {
    text-align: center;
}

.input-wrap {
    width: 100%;
    position: relative;
}

#searchBar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

#searchBar input[type="text"] {
    background-color: var(--search-bg-color);
    color: var(--search-txt-color);
}

#backend-searchBar {
    margin: 5px auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

#backend-searchBar input[type="text"] {
    background-color: var(--search-bg-color);
    color: var(--search-txt-color);
}

.search-result-list {
    list-style: none;
    padding: 0;
    margin-top: 10px;
    border: 1px solid #ccc;
    max-width: 400px;
    background-color: var(--bg-color);
}

.search-result-list li {
    padding: 6px 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.search-result-list li:hover { 
    background: #f0f0f0; 
}

/* Text columns beside product image */
.product-column-box {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    flex: 1;
    gap: 10px;
    padding-left: 5px;
    overflow: hidden;
}

/* First column: product name + icons */
.column-box-1 {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    flex: 2;
    min-width: 150px;
}

.column-box-1 h2 {
    margin: 0 0 6px 0;
    font-size: 20px;
    font-weight: bold;
    color: var(--mg-txt-color);
    text-align: left;
}

.column-box-1 .icon-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.column-box-1 .icon-row img {
    max-width: 40px;
    max-height: 25px;
    object-fit: contain;
}

/* Second column */
.column-box-2 {
    flex-basis: 25%;
    flex-grow: 1;
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 10px;
    align-items: start;
    font-size: 14px;
    color: var(--mg-txt-color);
    line-height: 1.4;
}

.column-box-2 span {
    display: block;
    margin-bottom: 4px;
}

/* Third column */
.column-box-3 {
    flex-basis: 30%;
    flex-grow: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 30px;
    align-items: center;
    font-size: 14px;
    color: var(--mg-txt-color);
    line-height: 1.4;
}

.column-box-3 span {
    display: block;
    line-height: 1.4;
    margin-bottom: 4px;
}

.column-box-3 span h2 {
    font-size: 20px;
    line-height: 1.4;
    font-weight: bold;
    margin-block-end: 0;
    margin-block-start: 0;
}

/* Sidebar */
#sidebar{
    display: flex;
    align-items: flex-start;
    padding: 0px;
    margin-left: 0px;
    margin-top: 0px;
    
    flex: 0 0 300px; /* fixed width (adjust as needed) */
}

/* Category tree section */
#tree {
    display: block;
    width: 100%;
    max-width: 330px;
    height: auto;
    background: white;
    border-radius: 12px;
    padding: 10px 15px;
    font-weight: 800;
}

.layout {
    display: flex;
    align-items: flex-start;
}

.main-content {
    flex: 1;
    padding: 20px;
    min-width: 0;
}

#tree ul {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

/* Apply indentation only to nested ul */
#tree ul ul {
    margin-left: 20px; 
    padding-left: 10px;
}

#tree li {
    cursor: pointer;
    margin: 2px 0;
    position: relative;
}

#tree li .toggle {
    margin-right: 5px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    display: inline-block;
    width: 14px;
    text-align: center;
}

/* =========================================================
   RESPONSIVE – Produkter visibility fix
   ========================================================= */

@media (max-width: 900px) {
    .top-block .left-image img {
        max-height: 300px;
        max-width: 300px;
        width: -webkit-fill-available;
        height: -webkit-fill-available;
        object-fit: scale-down;       
    }
}

/* =========================================================
   RESPONSIVE – Produkter visibility fix
   ========================================================= */
@media (max-width: 900px) {
    .product-list-box {
        flex-direction: column;
        width: 98%;
        align-items: center;
        height: auto !important;
        overflow: visible !important;
        padding: 0;
        border: 0;
        margin: 10px auto;        
    }

    .product-column-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding-left: 0;
        overflow: visible !important;
    }

    .column-box-1,
    .column-box-2,
    .column-box-3 {
        width: 100%;
    }

    .product-list-thumb img {
        max-height: 130px;
        max-width: 130px;
        object-fit: scale-down;        
    }
    
    .product-page-main-wrapper {
        flex-direction: column;
        width: 100%;
        padding: 0;
        margin: 0;
    }

    .column-box-1 h2 {
        margin: 0;
        width: 100%;
        font-size: 19px;
        text-align: center;
    }
    
    .column-box-2 span h2{
        font-size: 19px;
        line-height: 1.2;
        margin-block-end: 0;
        margin-block-start: 0;
        text-align: center;
    }

    .column-box-3 {
        column-gap: 15px;
        line-height: 1.2;
    }

    .column-box-3 span h2{
        column-gap: 15px;
        line-height: 1.2;
    }
}

/* =========================================================
   PRODUCT SPECIFICATIONS – Produktblad Page
   ========================================================= */

.product-spec-wrap {
    width: var(--info-text-width);
    text-align: left;
    display: flex;
    font-size: 16px;
    border-radius: 20px;
    flex-direction: column;
    flex: 1;
    width: 60%;
    border: 0;
    margin: 20px auto;
    background-color: var(--bg-txt-color);
}

.product-spec-wrap h1 {
    text-align: center;
}

.top-block {
    display: flex;
    align-items: flex-start;
    width: 98%;
    margin-bottom: 20px;
}

.top-block .left-image {
    max-width: 50%;
    width: 50%;
}

.top-block .left-image img {
    max-height: 600px;
    max-width: 600px;
    width: -webkit-fill-available;
    height: -webkit-fill-available;
    object-fit: scale-down;       
}

.top-block .info-table {
    margin-left: 20px;
    width: 50%;
}

.two-toned-table {
    width: 100%;
    max-width: 720px;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--table-bg);
    border-radius: 8px;
    overflow: hidden;
    margin: 0 auto;
}

.two-toned-table thead th {
    background: var(--header-bg);
    color: var(--header-txt);
    text-align: left;
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.two-toned-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    font-size: 14px;
}

/* Two-tone rows */
.two-toned-table tbody tr:nth-child(odd) { background: var(--row-odd); }
.two-toned-table tbody tr:nth-child(even) { background: var(--row-even); }

/* Hover */
.two-toned-table tbody tr:hover { background: var(--row-hover); }

.bottom-block {
    display: flex;
    align-items: flex-start; /* or center, depending on your design */
    width: 100%;
}

.product-spec-wrap .left-part {
    display: flex;
    position: relative;
    width: 50%;
    max-width: 50%;
    overflow: hidden;
    border-radius: 12px;
    justify-content: center;
    align-items: center;
    height: auto;
    margin-top: 30px;
}

.product-spec-wrap .left-part img{
    margin-right: 5px; 
    border: 2px;
    border-style: solid;
    border-color: black;
}    

.product-spec-wrap .description {
    display: block;
    margin: 30px;
    text-align: left;
    max-width: 45%;
    width: 45%
}

/* =========================================================
   RESPONSIVE – PRODUCT SPECIFICATIONS fix
   ========================================================= */

@media (max-width: 600px) {
    .product-spec-wrap {
        width: 98%;
        margin: 0 auto;
        border: 0;
        padding: 0;
        font-size: 12px;
        border-radius: 20px;
    }

    .product-spec-wrap h1 {
        text-align: center;
    }
    
    .top-block {
        display: block;
        width: 100%;
        margin-bottom: 20px;
    }

    .top-block .left-image {
        max-width: 100%;
        width: 100%;
    }

    .top-block .left-image img {
        max-height: 300px;
        max-width: 100%;
        width: -webkit-fill-available;
        height: -webkit-fill-available;
        object-fit: scale-down;  
    }

    .top-block .info-table {
        margin: 0;
        width: 100%;
    }

    .infotable .amounts { 
        font-size: 12px;
        margin-bottom: 20px;
        margin-top: 10px;
        margin-left: 10px;
        width: 98%;
        max-width: 98%;        
    }
    
    .two-toned-table {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }
    
    .two-toned-table tbody td {
        padding: 2px 4px;
        border-bottom: 1px solid var(--border);
        vertical-align: top;
        font-size: 14px;
    }
    
    .amounts {
        grid-template-columns: 50% auto;
        margin-bottom: 10px;
        margin-left: 10px;
    }    
    
    .two-toned-table thead { 
    }
    
    .two-toned-table, 
    .two-toned-table tbody, 
    .two-toned-table tr, 
    .two-toned-table td {
        width: 100%;
    }
    
    .two-toned-table td {
        box-sizing: border-box;
        padding: 2px 4px;
        border-bottom: 1px solid var(--border);
    }
    .two-toned-table td::before {
        display: block;
        font-weight: 700;
        margin-bottom: 6px;
    }
    
    .product-spec-wrap .description {
        margin: 0px;
        border: 0;
        padding: 9px;
        text-align: left;
        max-width: 100%;
        width: 100%;
    }    
}


.toggle-icon {
    cursor: pointer;
    margin-right: 6px;
    font-weight: bold;
    color: var(--menu-txt-color);
    display: inline-block;
    width: 16px;
    text-align: center;
    font-weight: bold;
    user-select: none;
    transition: transform 0.2s ease;
}

.toggle-icon.open {}

/* Node text */
#tree li .category-name { cursor: pointer; }

#tree li.collapsed > ul { display: none; }

#tree .selected {
    background-color: var(--menu-selected-bg-color);
    border-radius: 4px;
}

#tree li span.category-name:hover {
  color: var(--menu-hover-txt-color);
}

/* =========================================================
   RESPONSIVE – Category tree width on small screens
   ========================================================= */
/* Layout stack for .layout (sidebar + main) */
@media (max-width: 1024px) {
    .layout { flex-direction: column; }
    #sidebar { width: 100%; margin: 0 auto 10px auto; }
    .main-content { width: 100%; padding: 10px; }
}

@media (max-width: 900px) {
    #tree {
        width: 98% !important;
        max-width: 98% !important;
        margin: 0 auto !important;
        border-radius: 12px;
    }

    #sidebar{
        display: flex;
        width: 100% !important;
        justify-content: center; 
        padding: 0;
        margin: 0;
    }
    
    .layout {
        flex-direction: column !important;
        align-items: center;
    }
}
