/* ================================================
   AMAINVOICE HELP SCOUT THEME
   Minimal bereinigt + responsive Kacheln gefixt
   ================================================ */

/* --- BRAND COLORS --- */
:root {
    --ai-primary: #22223c;
    --ai-accent: #add71b;
    --ai-white: #ffffff;
    --ai-bg: #4d4d67;
    --ai-bg-soft: #eef0f5;
    --ai-text: #1f1f21;
    --ai-text-dark: #18181b;
    --ai-text-muted: #515159;
    --ai-border: #e4e4e7;
    --ai-surface: #ffffff;
    --ai-shadow: rgba(34, 34, 60, 0.14);
}

/* --- GLOBAL --- */
html,
body {
    background: var(--ai-bg) !important;
    color: var(--ai-text);
}

body {
    font-family: Arial, Helvetica, sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--ai-primary) !important;
}

p,
li,
td {
    color: var(--ai-text) !important;
}

small,
.muted,
.help-block {
    color: var(--ai-text-muted);
}

strong,
b {
    color: var(--ai-primary) !important;
    text-decoration: none;
}

a {
    color: var(--ai-primary) !important;
    text-decoration: none;
    font-weight: 700;
}

a:hover,
a:focus {
    color: var(--ai-accent) !important;
    text-decoration: none;
}

/* --- FOOTER AUSBLENDEN --- */
footer,
#footer,
.footer {
    display: none !important;
}

/* ================================================
   NAVBAR / HEADER
   ================================================ */

.navbar {
    overflow: visible;
    min-height: 65px;
    background: var(--ai-primary) !important;
    background-image: none !important;
    border-bottom: none !important;
    box-shadow: 0 4px 18px rgba(34, 34, 60, 0.16);
}

.navbar-inner {
    overflow: visible;
    position: relative;
    min-height: 65px;
    background: var(--ai-primary) !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Logo */
.navbar .brand {
    float: left;
    overflow: visible;
    white-space: nowrap;
    padding: 3px 15px;
    margin: 0;
    font-weight: 800;
    color: var(--ai-white) !important;
    background: transparent !important;
    text-shadow: none !important;
}

.navbar .brand img {
    max-height: 60px;
    width: auto;
    display: block;
}

/* Navigation */
.navbar .nav li {
    font-size: 9pt;
    line-height: 9pt;
}

.navbar .nav > li > a {
    padding: 16px 8px;
    color: var(--ai-white) !important;
    background: transparent !important;
    background-image: none !important;
    text-shadow: none !important;
    font-weight: 700;
    transition: color 0.2s ease, box-shadow 0.2s ease;
}

/* Hover: nur Text grün */
.navbar .nav > li > a:hover,
.navbar .nav > li > a:focus {
    color: var(--ai-accent) !important;
    background: transparent !important;
    background-image: none !important;
    text-shadow: none !important;
}

/* Aktiver Menüpunkt */
.navbar .nav .active a,
.navbar .nav .active a:hover,
.navbar .nav .active a:focus {
    color: var(--ai-accent) !important;
    background: transparent !important;
    background-image: none !important;
    text-shadow: none !important;
    box-shadow: inset 0 -3px 0 var(--ai-accent);
}

/* Header Icons */
.navbar i,
.navbar .icon,
.navbar [class^="icon-"],
.navbar [class*=" icon-"] {
    color: var(--ai-white) !important;
}

.navbar a:hover i,
.navbar a:hover .icon,
.navbar a:hover [class^="icon-"],
.navbar a:hover [class*=" icon-"] {
    color: var(--ai-accent) !important;
}

/* Hamburger */
.navbar .btn-navbar {
    float: right;
    padding: 20px 10px;
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
}

.navbar .btn-navbar:hover,
.navbar .btn-navbar:focus,
.navbar .btn-navbar:active {
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.icon-bar {
    display: block;
    width: 22px;
    height: 2px;
    margin: 4px 0;
    border-radius: 1px;
    background: var(--ai-white) !important;
}

/* Desktop: letzten Nav-Punkt ausblenden, falls Support-Link */
@media (min-width: 1400px) {
    .navbar .nav li:last-child {
        display: none;
    }
}

/* Hamburger bei kleineren Breiten */
@media (max-width: 1400px) {
    .navbar .nav.pull-right {
        display: none;
    }

    .navbar .nav:not(.nav-collapse) {
        display: none;
    }

    .navbar .btn-navbar {
        display: block !important;
        float: right;
        position: relative;
        z-index: 11;
    }

    .navbar .nav-collapse .nav {
        display: block !important;
        background: var(--ai-primary) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 6px 16px var(--ai-shadow);
    }

    .nav-collapse .nav li {
        display: block !important;
    }

    .nav-collapse .nav > li > a {
        padding: 12px 16px;
        line-height: 20px;
        color: var(--ai-white) !important;
        background: transparent !important;
    }

    .nav-collapse .nav > li > a:hover,
    .nav-collapse .nav > li > a:focus,
    .nav-collapse .nav .active a {
        color: var(--ai-accent) !important;
        background: transparent !important;
    }
}

/* Support kontaktieren links neben Hamburger */
@media (min-width: 770px) and (max-width: 1400px) {
    .navbar .nav li:last-child {
        display: block !important;
        float: right;
        margin-right: 50px;
        position: relative;
        z-index: 9;
        pointer-events: none;
    }

    .navbar .nav li:last-child a {
        padding: 18px 8px;
        white-space: nowrap;
        line-height: 30px;
        color: var(--ai-white) !important;
        background: transparent !important;
        pointer-events: all;
        font-weight: 700;
    }

    .navbar .nav li:last-child a:hover {
        color: var(--ai-accent) !important;
        background: transparent !important;
    }
}

@media (max-width: 770px) {
    .navbar .nav li:last-child {
        display: none !important;
    }
}

/* Mittlere Desktop-Breiten */
@media (min-width: 1400px) and (max-width: 1600px) {
    .navbar .nav li {
        font-size: 7.5pt;
    }

    .navbar .nav > li > a {
        padding: 22px 4px;
    }
}

/* ================================================
   HERO / SUCHBEREICH
   ================================================ */

#docsSearch {
    position: relative;
    padding: 72px 20px 64px;
    background-color: var(--ai-bg-soft) !important;
    background-image:
        radial-gradient(circle at 15% 20%, rgba(173, 215, 27, 0.16), transparent 22%),
        radial-gradient(circle at 85% 8%, rgba(34, 34, 60, 0.14), transparent 24%),
        linear-gradient(135deg, #f7f8fb, #eef0f5) !important;
    background-size: cover !important;
    background-position: center !important;
    border-bottom: 1px solid var(--ai-border);
}

/* Optionaler Pattern-Look */
#docsSearch::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.28;
    background-image:
        linear-gradient(135deg, rgba(34, 34, 60, 0.08) 25%, transparent 25%),
        linear-gradient(225deg, rgba(34, 34, 60, 0.08) 25%, transparent 25%);
    background-size: 38px 38px;
}

#docsSearch h1 {
    position: relative;
    z-index: 1;
    margin-bottom: 24px;
    font-weight: 800;
    font-size: 42px;
    line-height: 1.15;
    letter-spacing: -0.8px;
    color: var(--ai-primary);
    text-shadow: none;
}

/* ================================================
   SUCHLEISTE
   ================================================ */

#searchBar {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
    border-radius: 8px;
}

#searchBar .search-query {
    min-height: 56px;
    border: 1px solid var(--ai-border);
    border-radius: 8px 0 0 8px !important;
    box-shadow: none;
    color: var(--ai-text-dark);
    font-size: 16px;
}

#searchBar .search-query:focus {
    border: 1px solid var(--ai-accent);
    box-shadow: 0 0 0 3px rgba(173, 215, 27, 0.22);
    outline: none;
}

#searchBar button {
    min-height: 56px;
    padding: 0 28px;
    border: 0;
    border-radius: 0 8px 8px 0 !important;
    background: var(--ai-primary) !important;
    background-image: none !important;
    color: var(--ai-white) !important;
    text-shadow: none;
    font-weight: 800;
    transition: background 0.2s ease, color 0.2s ease;
}

#searchBar button:hover,
#searchBar button:focus {
    background: var(--ai-accent) !important;
    color: var(--ai-primary) !important;
    text-shadow: none;
}

/* Lupe auf Search-Seite */
#sidebar #searchBar {
    box-shadow: none;
}

#sidebar #searchBar button {
    background: var(--ai-white) !important;
    color: var(--ai-text-muted) !important;
    border-radius: 0 4px 4px 0 !important;
}

#sidebar #searchBar button:hover,
#sidebar #searchBar button:focus {
    color: var(--ai-primary) !important;
}

/* ================================================
   CONTENT WRAPPER
   ================================================ */

#contentArea,
.contentWrapper,
.main-content {
    background: var(--ai-bg) !important;
}

/* ================================================
   KATEGORIE-KACHELN / TOPICS
   ================================================ */

.collection-category h2 a {
    font-weight: 800;
    color: var(--ai-primary);
}

.collection-category h2 a:hover,
.collection-category h2 a:focus {
    color: var(--ai-accent);
}

.category-list {
    margin-top: 28px;
}

.category-list .category {
    background: var(--ai-surface) !important;
    border: 1px solid var(--ai-border);
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(34, 34, 60, 0.08);
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.category-list .category:hover {
    background: var(--ai-surface) !important;
    border-color: rgba(173, 215, 27, 0.55) !important;
    box-shadow: 0 14px 30px rgba(34, 34, 60, 0.10) !important;
    transform: translateY(-2px) !important;
}

.category-list h3 {
    color: var(--ai-primary);
    font-weight: 800;
}

.category-list .category p {
    color: var(--ai-text-muted);
}

.category-list .category .article-count,
.category-list .category:hover .article-count {
    color: var(--ai-primary);
    font-weight: 800;
    border-bottom: 2px solid var(--ai-accent);
}

/* ================================================
   KATEGORIE-KACHELN: ARTIKEL SICHTBAR, ABER RUHIGER
   Bestehendes Layout bleibt erhalten
   ================================================ */

.threeCol .collection h2 a,
.twoCol .collection h2 a {
    color: var(--ai-primary);
    font-weight: 800;
}

.threeCol .collection h2 a:hover,
.threeCol .collection h2 a:focus,
.twoCol .collection h2 a:hover,
.twoCol .collection h2 a:focus {
    color: var(--ai-accent);
}

/* Kacheln Basis */
.threeCol .collection,
.twoCol .collection {
    background: var(--ai-white);
    border: 1px solid var(--ai-border);
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(34, 34, 60, 0.08);
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    padding: 28px 26px !important;
    min-height: 220px;
}

.threeCol .collection:hover,
.twoCol .collection:hover {
    border-color: rgba(173, 215, 27, 0.55) !important;
    box-shadow: 0 14px 30px rgba(34, 34, 60, 0.10) !important;
    transform: translateY(-2px) !important;
}

/* Überschrift der Kachel */
.threeCol .collection h2,
.twoCol .collection h2 {
    margin-bottom: 28px !important;
    text-align: center;
}

.threeCol .collection h2 a,
.twoCol .collection h2 a {
    font-size: 22px !important;
    line-height: 1.25 !important;
    font-weight: 800 !important;
}

/* Artikelliste anzeigen, aber dezent */
.threeCol .popArticles,
.twoCol .popArticles {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* Einzelne Artikel */
.threeCol .popArticles li,
.twoCol .popArticles li {
    display: block !important;
    margin: 0 0 9px !important;
    padding: 0 !important;
    line-height: 1.35 !important;
}

/* Artikel-Links ruhiger */
.threeCol .popArticles li a,
.twoCol .popArticles li a {
    display: block !important;
    color: var(--ai-primary) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    text-decoration: none !important;
    border-bottom: none !important;
    opacity: 0.88;
}

/* Icon vor Artikel dezenter */
.threeCol .popArticles li a i,
.twoCol .popArticles li a i,
.threeCol .popArticles li a .icon,
.twoCol .popArticles li a .icon {
    color: var(--ai-text-muted) !important;
    opacity: 0.55;
    margin-right: 6px;
}

/* Text im Link */
.threeCol .popArticles li a span,
.twoCol .popArticles li a span {
    color: inherit !important;
}

/* Hover nur Text grün */
.threeCol .popArticles li a:hover,
.twoCol .popArticles li a:hover {
    color: var(--ai-accent) !important;
    opacity: 1;
}

/* Nur die ersten 4 Artikel je Kachel anzeigen */
.threeCol .popArticles li:nth-child(n+5),
.twoCol .popArticles li:nth-child(n+5) {
    display: none !important;
}

/* Browse-/Mehr-Link ausblenden */
.threeCol .browse,
.twoCol .browse {
    display: none !important;
}

.twoCol p,
.threeCol p {
    color: var(--ai-text);
}

.twoCol h2 a:hover,
.threeCol h2 a:hover {
    border-bottom-color: var(--ai-accent);
}

/* ================================================
   MINIMAL FIX: STARTSEITEN-KACHELN RESPONSIVE
   Bestehendes Layout behalten, nur Card-Breite/Padding fixen
   ================================================ */

/* Desktop: immer 2 große Kacheln pro Reihe */
.threeCol.row-fluid,
.twoCol.row-fluid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 36px !important;
    justify-content: center !important;
    align-items: stretch !important;
}

/* Nur echte Kacheln anfassen */
.threeCol.row-fluid > .collection,
.twoCol.row-fluid > .collection {
    float: none !important;
    width: calc(50% - 18px) !important;
    max-width: 720px !important;
    min-height: 300px !important;
    margin: 0 !important;
    padding: 42px 46px !important;
    box-sizing: border-box !important;
}

/* Leere/unsichtbare Collection-Slots entfernen */
.threeCol.row-fluid > .collection:empty,
.twoCol.row-fluid > .collection:empty,
.threeCol.row-fluid > .collection[style*="visibility: hidden"],
.twoCol.row-fluid > .collection[style*="visibility: hidden"],
.threeCol.row-fluid > .collection[style*="display: none"],
.twoCol.row-fluid > .collection[style*="display: none"] {
    display: none !important;
}

/* Überschriften in den Kacheln */
.threeCol.row-fluid > .collection h2,
.twoCol.row-fluid > .collection h2 {
    margin: 0 0 38px !important;
    text-align: center !important;
}

.threeCol.row-fluid > .collection h2 a,
.twoCol.row-fluid > .collection h2 a {
    font-size: 24px !important;
    line-height: 1.25 !important;
}

/* Artikellisten */
.threeCol.row-fluid > .collection .popArticles,
.twoCol.row-fluid > .collection .popArticles {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.threeCol.row-fluid > .collection .popArticles li,
.twoCol.row-fluid > .collection .popArticles li {
    margin-bottom: 12px !important;
    line-height: 1.45 !important;
}

.threeCol.row-fluid > .collection .popArticles li a,
.twoCol.row-fluid > .collection .popArticles li a {
    font-size: 14px !important;
    line-height: 1.45 !important;
}

/* Maximal 4 Artikel je Kachel */
.threeCol.row-fluid > .collection .popArticles li:nth-child(n+5),
.twoCol.row-fluid > .collection .popArticles li:nth-child(n+5) {
    display: none !important;
}

/* Tablet: weiterhin 2 Spalten, aber mit besseren Abständen */
@media (min-width: 769px) and (max-width: 1100px) {
    .threeCol.row-fluid,
    .twoCol.row-fluid {
        gap: 24px !important;
        padding: 0 18px !important;
    }

    .threeCol.row-fluid > .collection,
    .twoCol.row-fluid > .collection {
        width: calc(50% - 12px) !important;
        min-height: 280px !important;
        padding: 36px 32px !important;
    }

    .threeCol.row-fluid > .collection h2,
    .twoCol.row-fluid > .collection h2 {
        margin-bottom: 30px !important;
    }

    .threeCol.row-fluid > .collection h2 a,
    .twoCol.row-fluid > .collection h2 a {
        font-size: 21px !important;
    }

    .threeCol.row-fluid > .collection .popArticles li a,
    .twoCol.row-fluid > .collection .popArticles li a {
        font-size: 13px !important;
    }
}

/* Handy: genau 1 Kachel pro Reihe + angenehmes Padding */
@media (max-width: 768px) {
    .threeCol.row-fluid,
    .twoCol.row-fluid {
        display: flex !important;
        flex-direction: column !important;
        gap: 22px !important;
        padding: 0 18px !important;
    }

    .threeCol.row-fluid > .collection,
    .twoCol.row-fluid > .collection {
        width: 100% !important;
        max-width: none !important;
        min-height: auto !important;
        padding: 40px 30px !important;
        margin: 0 !important;
        border-radius: 14px !important;
    }

    .threeCol.row-fluid > .collection h2,
    .twoCol.row-fluid > .collection h2 {
        text-align: left !important;
        margin-bottom: 30px !important;
    }

    .threeCol.row-fluid > .collection h2 a,
    .twoCol.row-fluid > .collection h2 a {
        font-size: 22px !important;
        line-height: 1.3 !important;
    }

    .threeCol.row-fluid > .collection .popArticles li,
    .twoCol.row-fluid > .collection .popArticles li {
        margin-bottom: 13px !important;
    }

    .threeCol.row-fluid > .collection .popArticles li a,
    .twoCol.row-fluid > .collection .popArticles li a {
        font-size: 14px !important;
        line-height: 1.5 !important;
    }
}

/* Kleine Handys: etwas kompakter, aber nicht gequetscht */
@media (max-width: 480px) {
    .threeCol.row-fluid,
    .twoCol.row-fluid {
        gap: 18px !important;
        padding: 0 14px !important;
    }

    .threeCol.row-fluid > .collection,
    .twoCol.row-fluid > .collection {
        padding: 34px 24px !important;
    }

    .threeCol.row-fluid > .collection h2 a,
    .twoCol.row-fluid > .collection h2 a {
        font-size: 20px !important;
    }
}

/* ================================================
   ARTIKEL / INHALT
   ================================================ */

.article,
.article-content,
#article-content {
    color: var(--ai-text);
}

.article h1,
.article h2,
.article h3,
.article-content h1,
.article-content h2,
.article-content h3,
#article-content h1,
#article-content h2,
#article-content h3 {
    color: var(--ai-primary);
}

.article a,
.article-content a,
#article-content a {
    color: var(--ai-primary);
    font-weight: 700;
    border-bottom: 1px solid rgba(173, 215, 27, 0.65);
}

.article a:hover,
.article-content a:hover,
#article-content a:hover {
    color: var(--ai-accent);
    border-bottom-color: var(--ai-accent);
}

/* FullArticle Text-Fix */
#fullArticle,
#fullArticle p,
#fullArticle ul,
#fullArticle ol,
#fullArticle li,
#fullArticle div,
#fullArticle blockquote,
#fullArticle dd,
#fullArticle table {
    color: var(--ai-text) !important;
}

#fullArticle strong,
#fullArticle b {
    color: var(--ai-primary) !important;
}

/* ================================================
   SIDEBAR / ARTICLE NAV
   ================================================ */

#sidebar a,
.sidebar a {
    color: var(--ai-primary);
}

#sidebar a:hover,
.sidebar a:hover {
    color: var(--ai-accent);
}

#sidebar .active a,
.sidebar .active a {
    color: var(--ai-accent) !important;
    background: transparent !important;
}

/* ================================================
   TABELLEN
   ================================================ */

table {
    border-color: var(--ai-border);
}

td {
    word-break: break-all;
    color: var(--ai-text);
}

th {
    color: var(--ai-primary);
    background: var(--ai-bg-soft);
}

/* ================================================
   BUTTONS / AKTIONEN
   ================================================ */

.btn,
button {
    text-shadow: none !important;
}

.btn-primary,
input[type="submit"] {
    background: var(--ai-primary) !important;
    background-image: none !important;
    color: var(--ai-white) !important;
    border: none !important;
}

.btn-primary:hover,
.btn-primary:focus,
input[type="submit"]:hover,
input[type="submit"]:focus {
    background: var(--ai-accent) !important;
    color: var(--ai-primary) !important;
}

/* ================================================
   AKTIVE / MARKIERTE ELEMENTE
   ================================================ */

.active,
.current,
.selected {
    color: var(--ai-primary);
}

.active > a,
.current > a,
.selected > a {
    color: var(--ai-accent) !important;
    background: transparent !important;
}

/* ================================================
   RESPONSIVE FEINSCHLIFF
   ================================================ */

@media (max-width: 900px) {
    #docsSearch {
        padding: 52px 16px 46px;
    }

    #docsSearch h1 {
        font-size: 34px;
    }

    #searchBar {
        max-width: 100%;
    }

    #searchBar .search-query,
    #searchBar button {
        min-height: 50px;
    }

    .category-list .category,
    .threeCol .collection,
    .twoCol .collection {
        border-radius: 12px;
    }
}

@media (max-width: 600px) {
    .navbar .brand img {
        max-height: 36px;
    }

    #docsSearch h1 {
        font-size: 30px;
    }

    #searchBar button {
        padding: 0 18px;
    }
	
	/* ================================================
   MOBILE: KACHELINHALTE ZENTRIEREN
   ================================================ */

@media (max-width: 768px) {
    .threeCol.row-fluid > .collection,
    .twoCol.row-fluid > .collection {
        text-align: center !important;
        padding: 40px 30px !important;
    }

    .threeCol.row-fluid > .collection h2,
    .twoCol.row-fluid > .collection h2 {
        text-align: center !important;
        margin-bottom: 30px !important;
    }

    .threeCol.row-fluid > .collection h2 a,
    .twoCol.row-fluid > .collection h2 a {
        text-align: center !important;
        display: block !important;
    }

    .threeCol.row-fluid > .collection .popArticles,
    .twoCol.row-fluid > .collection .popArticles {
        text-align: center !important;
    }

    .threeCol.row-fluid > .collection .popArticles li,
    .twoCol.row-fluid > .collection .popArticles li {
        text-align: center !important;
    }

    .threeCol.row-fluid > .collection .popArticles li a,
    .twoCol.row-fluid > .collection .popArticles li a {
        text-align: center !important;
        display: block !important;
    }

    .threeCol.row-fluid > .collection .popArticles li a i,
    .twoCol.row-fluid > .collection .popArticles li a i,
    .threeCol.row-fluid > .collection .popArticles li a .icon,
    .twoCol.row-fluid > .collection .popArticles li a .icon {
        display: block !important;
        margin: 0 auto 8px !important;
    }

    .threeCol.row-fluid > .collection .popArticles li a span,
    .twoCol.row-fluid > .collection .popArticles li a span {
        display: block !important;
        text-align: center !important;
    }
}
}