/* ==========================================================================
   INDIVIDUELLE FARBCODIERUNG FÜR DIE KERNLEISTUNGEN (SERVICE_WORK) - OPTION 3
   ========================================================================== */

/* --- 1. Panel: design-concept (Schiefer-Dunkelgrau) --- */
.design-concept { 
    border-color: #1e293b; 
}
.design-concept .result-header { 
    background-color: #1e293b; 
}
.design-concept .result-paint li::before { 
    color: #1e293b; 
}
.design-concept .result-conclusion { 
    background: #f1f5f9; /* Sehr softes Schiefer-Hellgrau */
}

/* --- 2. Panel: production-print (Mittelgrau/Asche) --- */
.production-print { 
    border-color: #64748b; 
}
.production-print .result-header { 
    background-color: #64748b; 
}
.production-print .result-paint li::before { 
    color: #64748b; 
}
.production-print .result-conclusion { 
    background: #f8fafc; /* Minimales, neutrales Asche-Weiß */
}

/* --- 3. Panel: service-variety (Bernstein/Bronze) --- */
.service-variety { 
    border-color: #b45309; 
}
.service-variety .result-header { 
    background-color: #b45309; 
}
.service-variety .result-paint li::before { 
    color: #b45309; 
}
.service-variety .result-conclusion { 
    background: #fffbeb; /* Edles, sehr softes Bernstein-Weiß */
}


/* --- Spalte 1: Basis-Abo --- */
.design-concept .result-paint { 
    background-image: url('../images/print.jpg'); 
    background-position: left 10% center;
}
@supports (background-image: url('test.webp')) {
    .design-concept .result-paint { background-image: url('../images/print.webp'); }
}

/* --- Spalte 2: Standard-Abo --- */
.production-print .result-paint { 
    background-image: url('../images/cut.jpg'); 
        background-position: left 7% center;
}
@supports (background-image: url('test.webp')) {
    .production-print .result-paint { background-image: url('../images/cut.webp'); }
}

/* --- Spalte 2: Standard-Abo --- */
.service-variety .result-paint { 
    background-image: url('../images/folder.jpg'); 
    background-position: right center;
}
@supports (background-image: url('test.webp')) {
    .service-variety .result-paint { background-image: url('../images/folder.webp'); }
}

.result-paint {
    list-style: none;
    padding: 15px 0; /* Etwas Luft nach oben und unten im Bildbereich */
    margin: 0 -17px 15px 0;
    flex-grow: 1; /* Füllt den Raum, damit das Fazit nach unten gedrückt wird */
    
    /* HIER ERWEITERT FÜR DIE HINTERGRÜNDE */
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    z-index: 1;
}

/* Der weiche, weiße Schleier liegt NUR hinter den Listeneinträgen */
.result-paint::before {
    content: "";
    position: absolute;
    top: 0;
    left: -10px;
    right: -10px;
    bottom: 0;
    /* Links (0%) komplett weiß für den Text, ab der Mitte (55%) blendet es aus, 
       und ganz rechts (100%) ist es absolut klar/transparent ohne weiß */
    background: linear-gradient(to right, 
        rgba(255, 255, 255, 1) 0%, 
        rgba(255, 255, 255, 0.95) 35%,
        rgba(255, 255, 255, 0.4) 75%, 
        rgba(255, 255, 255, 0) 100%
    );
    z-index: -1;
}

.result-paint li {
    padding-left: 30px;
    position: relative;
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: #2c3e50;
    line-height: 1.4;
    z-index: 2; /* Hält den Text über dem Schleier */
}

/* Das farbige Häkchen vor jedem Punkt via CSS generiert */
.result-paint li::before {
    content: "✓";
    position: absolute;
    left: 5px;
    top: -1px;
    font-weight: bold;
    font-size: 1.1rem;
}

/* ==========================================================================
   SERVICE-ABOS SEKTION (3 SPALTEN) - DEFTIVITY
   ========================================================================== */

/* Das Panel, das alles umschließt */
.abo-panel-container {
    background: #ffffff;
    border: 2px solid #e2e8f0; /* Der äußere Rahmen um das gesamte Panel */
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* Legende jetzt innerhalb des Panels */
.abo-legend {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9; /* Trennlinie zwischen Legende und Grid */
}

/* Der Rest deines Grids bleibt wie gewohnt */

/* Das Grid-System für die 3 Spalten */
.result-grid {
    display: grid;
    /* Erstellt automatisch 3 Spalten, bricht auf dem Handy (unter 300px) automatisch untereinander um */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    align-items: stretch; /* Sorgt dafür, dass alle Boxen gleich hoch sind */
    padding-top: 20px
}

.result-column {
    position: relative; /* WICHTIG: Erlaubt die Positionierung der Lasche */
    background: #ffffff;
    border: 3px solid transparent;
    border-radius: 16px;
    padding: 15px 15px 15px 15px; /* Etwas mehr Padding oben für die Lasche */
    transition: 0.3s;
}

/* Die Lasche / Das Feld auf der Linie */
.abo-type {
    position: absolute;
    top: -27px; /* Schiebt es halb aus der Box heraus */
    left: 15px;
    background: #ffffff;
    padding: 0 3px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    z-index: 1;
}

/* Farben passend zum Rahmen */
.abo-basis { border-color: #04346C; color: #04346C; }
.abo-basis .abo-type { color: #04346C; }

.abo-standard { border-color: #165F30; color: #165F30; }
.abo-standard .abo-type { color: #165F30; }

.abo-premium { border-color: #d35400; color: #d35400; }
.abo-premium .abo-type { color: #d35400; }

/* Kleiner Hover-Effekt für Interaktivität */
.result-column:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

/* Die farbigen Köpfe der Spalten (Titel + Icon) */
.result-header {
    display: grid;
    grid-template-columns: 45px 1fr;
    grid-template-rows: auto auto;
    column-gap: 15px;
    align-items: center;
    padding: 15px 20px;
    border-radius: 12px;
    color: #ffffff;
}

.result-header .emoij {
    grid-column: 1;
    grid-row: 1 / 3; /* Zieht das Emoji über beide Textzeilen (h4 & h3) */
    font-size: 1.6rem;
    background: rgba(255, 255, 255, 0.2);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0; 
}

.result-header .abo-type {
    grid-column: 2;
    margin: 0 0 2px 0;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.result-header h3 {
    grid-column: 2;
    white-space: pre-line; /* Damit reagiert das Element auf echte Zeilenumbrüche im Text */
    margin: 0;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.8;
}

/* Individuelle Farbcodierung der Abo-Stufen */
/* Basis-Abo (Modernes Blau) */
.abo-basis .result-header { background-color: #04346C; }
/* Standard-Abo (Professionelles Grün) */
.abo-standard .result-header { background-color: #165F30; }
/* Premium-Abo (Gold/Orange) */
.abo-premium .result-header { background-color: #d35400; }

/* Der Einleitungstext (Teaser) direkt unter dem Kopf */
.result-text {
    font-size: 1.05rem;
    font-style: italic;
    color: #5d6d7e;
    line-height: 1.6;
}

/* Die Liste mit Preis und Punkten */
.result-point {
    list-style: none;
    flex-grow: 1; 
    
    /* Hintergrundbilder */
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    z-index: 1;
}

/* Der weiche, weiße Schleier liegt NUR hinter den Listeneinträgen */
.result-point::before {
    content: "";
    position: absolute;
    top: 0;
    left: -10px;
    right: -10px;
    bottom: 0;
    background: linear-gradient(to right, 
        rgba(255, 255, 255, 1) 0%, 
        rgba(255, 255, 255, 0.95) 35%,
        rgba(255, 255, 255, 0.6) 75%, 
        rgba(255, 255, 255, 0) 100%
    );
    z-index: -1;
}

/* --- Spalte 1: Basis-Abo --- */
.abo-basis .result-point { 
    background-image: url('https://deftivity.com/images/abo-basis.jpg'); 
    background-position: right center;
}
@supports (background-image: url('test.webp')) {
    .abo-basis .result-point { background-image: url('https://deftivity.com/images/abo-basis.webp'); }
}

/* --- Spalte 2: Standard-Abo --- */
.abo-standard .result-point { 
    background-image: url('https://deftivity.com/images/abo-standard.jpg'); 
    background-position: right center;
}
@supports (background-image: url('test.webp')) {
    .abo-standard .result-point { background-image: url('https://deftivity.com/images/abo-standard.webp'); }
}

/* --- Spalte 3: Premium-Abo --- */
.abo-premium .result-point { 
    background-image: url('https://deftivity.com/images/abo-premium.jpg'); 
    background-position: right center;
}
@supports (background-image: url('test.webp')) {
    .abo-premium .result-point { background-image: url('https://deftivity.com/images/abo-premium.webp'); }
}

.result-point li {
    padding-left: 20px;
    position: relative;
    margin-bottom: 7px;
    font-size: 1.1rem;
    color: #2c3e50;
    line-height: 1.4;
    z-index: 2; /* Hält den Text über dem Schleier */
}

/* Das Symbol vor den Preis/Punkte-Einträgen (Chevron statt Häkchen für IT-Look) */
.result-point li::before {
    content: "❯";
    position: absolute;
    left: 2px;
    top: -1px;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Symbol-Farben passend zur Spalte */
.abo-basis .result-point li::before { color: #04346C; }
.abo-standard .result-point li::before { color: #165F30; }
.abo-premium .result-point li::before { color: #d35400; }

/* Das Fazit-Blockzitat am Ende der Spalte */
.result-conclusion {
    margin: 0;
    padding: 15px 18px;
    background: #f8fafc;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #475569;
    border-radius: 12px;
}

/* Das Strong-Tag (Closing) im Blockzitat hervorheben */
.result-conclusion strong {
    display: block;
    margin-bottom: 5px;
    color: #2c3e50;
    font-size: 0.9rem;
}

.abo-basis .result-conclusion {background: #f4f8fd; }
.abo-standard .result-conclusion {background: #f4fbf7; }
.abo-premium .result-conclusion {background: #fdfaf4; }

/* CSS-Klasse falls die Datenbank mal keine Einträge zurückgibt */
.no-services {
    text-align: center;
    color: #94a3b8;
    font-style: italic;
    grid-column: 1 / -1;
    padding: 40px;
}

/* ==========================================================================
   NEUE PUNKTEVERRECHNUNG & BUTTONS (FARBLICH AN HEADER ANGEPASST)
   ========================================================================== */

/* Äußerer Kasten der Punkteverrechnung */
.settlement-box {
    margin: 20px 0;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
}

/* 1. RAHMEN-FARBEN PASSEND ZUR JEWEILIGEN SPALTE */
.abo-basis .settlement-box { border: 1px solid #04346C; }
.abo-standard .settlement-box { border: 1px solid #165F30; }
.abo-premium .settlement-box { border: 1px solid #d35400; }

/* Titel-Headerbalken für die Punkteverrechnung */
.settlement-header {
    padding: 7px 20px;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
}

/* 2. HEADER-HINTERGRÜNDE PASSEND ZUR JEWEILIGEN SPALTE (Identisch mit oben) */
.abo-basis .settlement-header { background-color: #04346C; }      /* Basis-Blau */
.abo-standard .settlement-header { background-color: #165F30; }   /* Standard-Grün */
.abo-premium .settlement-header { background-color: #d35400; }    /* Premium-Gold */

.settlement-star {
    font-size: 1rem;
}

/* Innenabstand der Tabelle */
.settlement-body {
    padding: 5px 15px;
}

/* Die Tabellenzeilen für Listenelemente */
.settlement-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
    color: #334155;
}

.settlement-item:last-child {
    border-bottom: none;
}

.item-name {
    font-weight: 500;
}

/* Punkte-Werte rechtsbündig fett ausrichten */
.item-value {
    font-weight: 700;
}

/* Werte-Farben synchron zu den Spalten */
.abo-basis .item-value { color: #04346C; }
.abo-standard .item-value { color: #165F30; }
.abo-premium .item-value { color: #d35400; }

/* Spezielle Hervorhebung für "kostenlos" */
.highlight-free {
    color: #2563eb !important;
    font-weight: 800;
}

/* ==========================================================================
   NEU: DOPPEL-BOXEN RECHTS/LINKS (DESKTOP NEBENEINANDER / MOBIL ÜBEREINANDER)
   ========================================================================== */

/* Der Haupt-Wrapper bricht aus dem 3-Spalten-Raster aus */
.bottom-boxes-wrapper {
    grid-column: 1 / -1; 
    display: grid;
    /* Standard auf Desktop: 2 Spalten gleich breit nebeneinander */
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    width: 100%;
    box-sizing: border-box;
    margin-top: 30px;

}

/* Gemeinsames Layout für die Legenden- & Info-Box */
.settlement-legend-fixed,
.settlement-info-list-fixed {
    background: #FFF; /* Hellgrau-Blau */
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 22px 25px;
    font-size: 0.88rem;
    line-height: 1.6;
    color: #475569;
    box-sizing: border-box;
}

/* Spezifische Formatierung Box 1: Legende / Ablauf */
.settlement-legend-fixed h5 {
    margin: 0 0 12px 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.settlement-legend-fixed p {
    white-space: pre-line; /* Damit reagiert das Element auf echte Zeilenumbrüche im Text */
    margin: 10px 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.settlement-legend-fixed .legend-step {
    background: #04346C;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.75rem;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

/* Spezifische Formatierung Box 2: Rechtliche Hinweise */
.settlement-info-list-fixed p {
    white-space: pre-line; /* Damit reagiert das Element auf echte Zeilenumbrüche im Text */
    margin: 8px 0;
    padding-left: 25px;
    position: relative;
    text-align: left;
    font-weight: 500;
}
.settlement-info-list-fixed .info-emoji {
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1rem;
    color: #64748b;
}

.settlement-info-list-fixed p:first-child, 
.settlement-legend-fixed p:first-of-type { margin-top: 0; }
.settlement-info-list-fixed p:last-child, 
.settlement-legend-fixed p:last-of-type { margin-bottom: 0; }

.abo-btn {
    display: block;
    /* 10px links + 10px rechts Abstand vom Kartenrand */
    width: calc(100% - 20px); 
    max-width: 280px;
    /* margin-top: auto schiebt den Button nach unten, 
       10px Abstand nach unten zum Rahmen */
    margin: 15px auto auto auto;
    padding: 12px;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    box-sizing: border-box; /* WICHTIG */
    transition: background 0.2s ease-in-out;
}

/* RESPONSIVE ANPASSUNG FÜR MOBILGERÄTE */
@media (max-width: 900px) {
    .bottom-boxes-wrapper {
        /* Bricht auf Smartphones saubere Container direkt untereinander */
        grid-template-columns: 1fr;
        gap: 25px;
        margin-top: 0;
    }
}


/* ==========================================================================
   3. BUTTONS UNTEN (FARBLICH AN HEADER ANGEPASST)
   ========================================================================== */

/* Farbzuordnung der Buttons exakt wie die Headerboxen */
.abo-basis .abo-btn { background-color: #04346C; }
.abo-standard .abo-btn { background-color: #165F30; }
.abo-premium .abo-btn { background-color: #d35400; }

/* Abdunklungseffekt beim Darüberfahren (Hover) */
.abo-basis .abo-btn:hover { background-color: #2980b9; }
.abo-standard .abo-btn:hover { background-color: #27ae60; }
.abo-premium .abo-btn:hover { background-color: #f39c12; }

/* ==========================================================================
   MOBILE SLIDER FÜR ABO-SERVICE (AKTUALISIERT)
   ========================================================================== */

@media (max-width: 768px) {
    /* 1. Die Schiene (Der Slider-Container) */
    #abo-service .result-grid {
        display: flex; 
        overflow-x: auto;
        scroll-behavior: smooth;
        scroll-snap-type: x mandatory;
        flex-wrap: nowrap; 
        gap: 15px; 
        -ms-overflow-style: none;  
        scrollbar-width: none; 
    }
    
    #abo-service .result-grid::-webkit-scrollbar {
        display: none;
    }

    /* 2. Der Waggon (Die einzelne Abo-Karte) - Rahmen bleibt sichtbar */
    #abo-service .result-column {
        flex: 0 0 auto; 
        width: 100%; 
        box-sizing: border-box; 
        scroll-snap-align: center; 
    }

    /* 3. Slider-Buttons Container */
    #slider-controls-abos {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 20px; /* Kleiner Abstand zwischen den Elementen */
        margin: 1.5rem 0;
        width: 100%;
        box-sizing: border-box;
    }

    /* 4. Die Pfeile (Next/Prev) - Bleiben kompakt & quadratisch */
    #slider-controls-abos .slider-btn {
        flex: 0 0 45px;      /* Feste Breite */
        height: 45px;        /* Feste Höhe */
        padding: 0 !important;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        transition: background-color 0.3s ease;
    }

    /* 5. Der Auswählen-Button (Mitte) - Wird in die Länge gezogen */
    #slider-controls-abos .abo-btn {
        display: inline-block !important;
        flex-grow: 1;        /* Nutzt den verfügbaren Platz zwischen den Pfeilen */
        margin: 0 !important;
        padding: 12px 20px;
        color: #ffffff !important;
        text-align: center;
        white-space: nowrap;
        transition: background-color 0.3s ease;
    }

    /* 6. Original-Buttons in den Karten verstecken */
    #abo-service .result-column > .abo-btn {
        display: none !important;
    }
}

/* Auf großen Bildschirmen (Desktop) Steuerung verstecken */
@media (min-width: 769px) {
    #slider-controls-abos {
        display: none !important;
    }
}