/* BLOCKQUOTE STYLING */

blockquote { border-left: 5px solid var(--color-primary); margin:2em 5px; padding:15px 10px 5px 40px;position:relative; }
blockquote:before { color:var(--color-primary);content: "“";display:block;font-size:4em;line-height:1;position:absolute;left:8px;top:0; }

/* TABLE STYLING: Targeting generic table inside content-wrapper */

/* --- Global Table Typography & Accessibility --- */
.content-wrapper table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5em;
}

.content-wrapper table caption {
  text-align: left;
  font-weight: bold;
  font-size: 1.1em;
  padding-bottom: 0.5em;
  color: var(--color-dark-bg);
}

.content-wrapper thead td {
  font-weight: 700;
  text-align: left;
  padding: 0.5em;
  color: var(--color-grey-light);
  background-color: var(--color-primary);
  border-bottom: 2px solid var(--color-primary); 
}

.content-wrapper thead th {
  font-weight: 700;
  text-align: left;
  padding: 0.5em;
  color: var(--color-grey-light);
  background-color: var(--color-primary);
  border-bottom: 2px solid var(--color-primary); 
}

.content-wrapper tbody td {
  padding: 0.5em;
  text-align: left;
  border-bottom: 1px solid var(--color-grey-medium); 
}

/* Hover effect to help readability on large data rows */
.content-wrapper tbody tr:hover {
  background-color: var(--color-grey-light);
}

/* --- Type 1: Normal Tables (Auto-optimizing Column Widths) --- */
/* By default, columns expand based on content weight. No special classes needed. */
.content-wrapper table:not(.widetable) {
  table-layout: auto;
}

/* --- Type 2: Wide Tables (Mobile Scrolling without Div Wrappers) --- */

@media (max-width: 720px) 
{
  .content-wrapper table.widetable 
  {
    display: block;          
    overflow-x: auto;        
    -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid var(--color-grey-medium);
    min-width:90%;
  }

  /* CRITICAL FIX: Prevent any single cell/column from eclipsing the mobile viewport width */
  .content-wrapper table.widetable th,
  .content-wrapper table.widetable td 
  {
    max-width: 80vw;         /* Column can never be wider than 80% of the mobile screen */
    white-space: normal;     /* Forces long text to wrap vertically instead of stretching horizontally */
    word-wrap: break-word;   /* Safely breaks exceptionally long strings or URLs if necessary */
    min-width: 40px;        /* Optional: Prevents columns from becoming comically skinny */
    padding:0.2em;
    font-size: smaller;
  }
}

/* Syle for Non-Visible-Parts by Default */
.defaulthide
{
    display: none;
}

/* UNSTYLED CONTENT LIST FIX: Target generic UL/OL within the content wrapper */
.content-wrapper ul, 
.content-wrapper ol {
    padding-left: 20px;
    margin-bottom: 20px;
}
.content-wrapper ol {
    margin-left: 20px;
}

/* Style different nesting levels using direct selectors */
.content-wrapper ul {
    list-style-image: url('/_assets/icons/li.svgz');
}

.rvlist .onelineonly {
    display: block;
    max-width: 90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contentimage {
    position: relative;
    display: inline-block; 
    overflow: hidden;
    margin-top:10px;
}

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

.ratiolandscape {
    aspect-ratio: 16 / 9;
}

.ratiosquare {
    aspect-ratio: 1 / 1;
}

.ratioportrait {
    aspect-ratio: 9 / 16;
}

/* 🚨 FEATURE AREA CONTAINER STYLING */
.feature-area {
    background-color: var(--color-grey-light); /* Apply the light grey background */
    padding: 20px; /* Add padding inside the area */
    margin: 20px -20px 10px; /* Negate the 20px padding of .content-wrapper for full width */
}
@media (max-width: 800px) {
        .feature-area {
        /* On mobile, adjust negative margin to match mobile padding variable */
        margin: 20px calc(-1 * var(--mobile-padding)) 0;
    }
}

/* Reset content alignment/padding within the feature area for the heading */
.feature-area h2 {
    margin-top: 0;
    padding-top: 0;
    margin-bottom: 20px;
}

/* FEATURE BOXES & HOVER EFFECT */
.feature-boxes { 
    display: flex; 
    gap: 20px; 
    padding: 0; /* Removed padding here as it is now on the feature-area */
    flex-wrap: wrap;
}
/* Feature box must be relative to position the credit */
.feature-box {
    flex: 0 0 calc(50% - 10px); 
    background-color: white; 
    padding: 10px;
    border-top: 5px solid var(--color-primary);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center; 
    transition: transform 0.3s, box-shadow 0.3s; 
    position: relative;
    min-width:240px; 
}

.feature-box a {
    color: var(--color-primary);
}

/* FEATURE BOX HOVER EFFECT */
.feature-box:hover {
    transform: translateY(-5px); 
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15); 
}

.feature-box img { 
    width: 100%; 
    max-width: 100%; 
    aspect-ratio: 16/9;
    object-fit: cover; 
    /* Removed margin-bottom here */
}

/* 🚨 RECOMMENDATION AREA CONTAINER STYLING */

.recommendation-area {
    background-color: var(--color-primary);
    padding: 20px;
    margin: 20px -20px -20px;
    display: flex;
    flex-wrap: nowrap;          /* Forces items to stay in one line */
    overflow-x: auto;          /* Enables horizontal scrollbar */
    gap: 10px;                 /* Space between boxes */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling for iOS */

    /* --- Scrollbar Styling --- */
    
    /* Firefox */
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) #e0e0e0;

    /* Chrome, Edge, and Safari */
    &::-webkit-scrollbar {
        height: 10px; /* Adjust thickness */
    }

    &::-webkit-scrollbar-track {
        background: #f1f1f1; 
        border-radius: 5px;
    }

    &::-webkit-scrollbar-thumb {
        background: var(--color-primary); 
        border-radius: 5px;
        border: 2px solid #f1f1f1; /* Adds space around the thumb */
    }

    &::-webkit-scrollbar-thumb:hover {
        background: #555; /* Darker color on hover */
    }
}

@media (max-width: 800px) {
        .recommendation-area {
        margin: 20px calc(-1 * var(--mobile-padding)) -20px;
    }
}

.recommendation-box {
    flex: 0 0 200px; 
    background-color: white; 
    padding: 10px;
    border-top: 5px solid var(--color-grey-dark);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.recommendation-box:hover {
    transform: translateY(-5px); 
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15); 
}

.recommendation-box img { 
    width: 100%; 
    max-width: 100%; 
    aspect-ratio: 16/9;
    object-fit: cover; 
    margin-bottom: 5px;
}

.recommendation-box p {
    font-size: 0.8em;
    font-weight: 700;
}

/* ARTICLE LIST: Image float/wrap on mobile */
        .article-item { display: block; gap: 20px; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--color-grey-light); }
        .article-item picture img {
            float: left; margin-right: var(--mobile-padding); margin-bottom: 5px;
            flex-shrink: 0; width: 240px; max-width: 30%; aspect-ratio: 16/9; object-fit: cover;
        }
        .article-item::after { content: ""; display: table; clear: both; }


article a {
    text-decoration: none;
}

article a h4 {
    text-decoration: underline;
}

article a p {
    text-decoration: none;
}

/* VIDEO CONTAINER */
.rvvideo {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

.rvvideo video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}


/* FOOTER */
.footer { 
    background-color: var(--color-grey-light); 
    color: var(--color-grey-dark); 
    text-align: center; 
    padding: 20px 0; 
}
.footer a {
    padding: 0 10px;
}


/* SCROLL UP BUTTON */
#scrollup {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--color-primary); /* Dein Farbwunsch */
    color: white;
    text-align: center;
    line-height: 50px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 24px;
    transition: opacity 0.3s, visibility 0.3s, background-color 0.3s;
    
    /* Anfangs unsichtbar */
    opacity: 0;
    visibility: hidden;
    z-index: 99;
}

#scrollup:hover {
    background-color: var(--color-grey-dark);
}

/* Sichtbar, wenn die Klasse "show" hinzugefügt wird */
#scrollup.show {
    opacity: 1;
    visibility: visible;
}

#scrollup:hover {
    transform: scale(1.1); /* Slight pop effect */
    background-color: var(--color-grey-dark); 
}