/* ==========================================================================
   Online Help CSS for Automatic PDF Processor 2
   Responsive Layouts for Desktop, Tablet and Mobile
   ========================================================================== */

/* ==========================================================================
   Layout Container
   ========================================================================== */

.hilfe-container {
    display: flex;
    flex-direction: row;
    min-height: 600px;
    gap: 30px;
}

/* ==========================================================================
   Navigation (Left Sidebar)
   ========================================================================== */

.hilfe-nav {
    width: 280px;
    flex-shrink: 0;
    background-color: #f8f7f6;
    border-right: 1px solid #e7e7e7;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.hilfe-nav-header {
    background-color: #555;
    color: #fff;
    padding: 15px 20px;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hilfe-nav-header i {
    margin-right: 10px;
}

.hilfe-nav-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    display: none;
}

.hilfe-nav-content {
    padding: 10px 0;
}

/* Navigation Groups */
.hilfe-nav-group {
    margin-bottom: 5px;
}

.hilfe-nav-group-header {
    display: block;
    padding: 10px 20px;
    color: #333;
    font-weight: 600;
    text-decoration: none;
    background-color: #e9ecef;
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s ease;
}

.hilfe-nav-group-header:hover {
    background-color: #dde1e5;
    text-decoration: none;
    color: #333;
}

.hilfe-nav-group-header i {
    margin-right: 10px;
    color: #666;
    font-size: 12px;
    width: 12px;
    text-align: center;
}

/* Navigation Items */
.hilfe-nav-items {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.hilfe-nav-group.collapsed .hilfe-nav-items {
    max-height: 0;
}

.hilfe-nav-items li {
    margin: 0;
    padding: 0;
}

.hilfe-nav-items a {
    display: block;
    padding: 8px 20px 8px 35px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.hilfe-nav-items a:hover {
    background-color: #e9ecef;
    color: #333;
    text-decoration: none;
}

.hilfe-nav-items a.active {
    background-color: #679142;
    color: #fff;
    border-left-color: #50861f;
    font-weight: 500;
}

/* PDF Download Link */
.hilfe-nav-footer {
    padding: 15px 20px;
    border-top: 1px solid #dee2e6;
    margin-top: 10px;
}

.hilfe-pdf-link {
    display: block;
    padding: 10px 15px;
    background-color: #679142;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.hilfe-pdf-link:hover {
    background-color: #50861f;
    color: #fff;
    text-decoration: none;
}

.hilfe-pdf-link i {
    margin-right: 8px;
}

/* ==========================================================================
   Content Area (Right Side)
   ========================================================================== */

.hilfe-content {
    flex-grow: 1;
    min-width: 0;
    padding: 0 15px;
}

.hilfe-content h1 {
    color: #555;
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #72c02c;
}

.hilfe-content h2 {
    color: #333;
    font-size: 22px;
    margin-top: 30px;
    margin-bottom: 15px;
}

.hilfe-content h3 {
    color: #444;
    font-size: 18px;
    margin-top: 25px;
    margin-bottom: 12px;
}

.hilfe-content h4 {
    color: #555;
    font-size: 16px;
    margin-top: 20px;
    margin-bottom: 10px;
}

.hilfe-content p {
    line-height: 1.7;
    margin-bottom: 15px;
}

.hilfe-content ul,
.hilfe-content ol {
    margin-bottom: 15px;
    padding-left: 25px;
}

.hilfe-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Tables in Help Content */
.hilfe-content table {
    width: 100%;
    margin-bottom: 20px;
    border-collapse: collapse;
}

.hilfe-content table th,
.hilfe-content table td {
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    text-align: left;
}

.hilfe-content table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.hilfe-content table tr:nth-child(even) {
    background-color: #fafafa;
}

/* Images in Help Content */
.hilfe-content img {
    max-width: 100%;
    height: auto;
    margin: 15px 0;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Code Blocks */
.hilfe-content code {
    background-color: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
}

.hilfe-content pre {
    background-color: #f4f4f4;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.hilfe-content pre code {
    padding: 0;
    background: none;
}

/* Notes and Hints */
.hilfe-note {
    background-color: #e8f4e5;
    border-left: 4px solid #5a8a5a;
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 4px 4px 0;
}

.hilfe-note-title {
    font-weight: bold;
    color: #5a8a5a;
    margin-bottom: 5px;
}

.hilfe-warning {
    background-color: #fcf8e3;
    border-left: 4px solid #8a6d3b;
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 4px 4px 0;
}

.hilfe-warning-title {
    font-weight: bold;
    color: #8a6d3b;
    margin-bottom: 5px;
}

/* Chapter Navigation */
.hilfe-chapter-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.hilfe-chapter-nav a {
    display: inline-flex;
    align-items: center;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
}

.hilfe-chapter-nav a:hover {
    background-color: #e9ecef;
    text-decoration: none;
}

.hilfe-chapter-nav a i {
    margin: 0 5px;
}

/* ==========================================================================
   Tablet Layout (768px - 991px)
   ========================================================================== */

@media (max-width: 991px) {
    .hilfe-container {
        flex-direction: column;
    }

    .hilfe-nav {
        width: 100%;
        position: relative;
        top: 0;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid #e7e7e7;
    }

    .hilfe-nav-toggle {
        display: block;
    }

    .hilfe-nav-content {
        display: none;
    }

    .hilfe-nav.nav-open .hilfe-nav-content {
        display: block;
    }

    .hilfe-content {
        padding: 0;
    }

    /* On tablet, show navigation as dropdown */
    .hilfe-nav-items a {
        padding-left: 45px;
    }
}

/* ==========================================================================
   Mobile Layout (< 768px)
   ========================================================================== */

@media (max-width: 767px) {
    .hilfe-nav-header {
        font-size: 15px;
        padding: 12px 15px;
    }

    .hilfe-nav-group-header {
        padding: 10px 15px;
        font-size: 14px;
    }

    .hilfe-nav-items a {
        padding: 10px 15px 10px 40px;
        font-size: 13px;
    }

    .hilfe-content h1 {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .hilfe-content h2 {
        font-size: 18px;
    }

    .hilfe-content h3 {
        font-size: 16px;
    }

    .hilfe-content p {
        font-size: 14px;
        line-height: 1.6;
    }

    .hilfe-content img {
        margin: 10px 0;
    }

    .hilfe-chapter-nav {
        flex-direction: column;
        gap: 10px;
    }

    .hilfe-chapter-nav a {
        width: 100%;
        justify-content: center;
    }

    /* Tables become scrollable */
    .hilfe-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .hilfe-nav {
        display: none;
    }

    .hilfe-container {
        display: block;
    }

    .hilfe-content {
        width: 100%;
        padding: 0;
    }

    .hilfe-content img {
        max-width: 100%;
        page-break-inside: avoid;
    }

    .hilfe-chapter-nav {
        display: none;
    }
}

/* ==========================================================================
   Overview Page Styles (Index)
   ========================================================================== */

.hilfe-overview {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hilfe-overview h1 {
    border-bottom: none;
    text-align: center;
}

.hilfe-overview-intro {
    font-size: 16px;
    color: #555;
    margin-bottom: 30px;
}

.hilfe-overview-sections {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.hilfe-overview-section {
    flex: 1 1 300px;
    max-width: 400px;
    text-align: left;
    padding: 20px;
    background-color: #f8f7f6;
    border-radius: 8px;
    border: 1px solid #e7e7e7;
}

.hilfe-overview-section h3 {
    margin-top: 0;
    color: #555;
    border-bottom: 2px solid #72c02c;
    padding-bottom: 10px;
}

.hilfe-overview-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hilfe-overview-section li {
    margin-bottom: 8px;
}

.hilfe-overview-section a {
    color: #555;
    text-decoration: none;
}

.hilfe-overview-section a:hover {
    color: #4a9d31;
    text-decoration: underline;
}

.hilfe-overview-section a i {
    margin-right: 8px;
    color: #999;
}

/* ==========================================================================
   Tutorials Section
   ========================================================================== */

.hilfe-tutorials {
    background-color: #eeecea;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
}

.hilfe-tutorials h2 {
    margin-top: 0;
    color: #555;
}

.hilfe-tutorials h3 {
    margin-top: 25px;
    margin-bottom: 15px;
    color: #444;
    font-size: 17px;
    padding-bottom: 8px;
    border-bottom: 1px solid #d0d0d0;
}

.hilfe-tutorials h3:first-of-type {
    margin-top: 15px;
}

.hilfe-tutorials h3 i {
    margin-right: 8px;
    color: #679142;
}

.hilfe-tutorials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.hilfe-tutorial-link,
.hilfe-tutorial-link:link,
.hilfe-tutorial-link:visited {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #387625; /* Same green as site links */
    text-decoration: none;
    transition: all 0.2s ease;
}

.hilfe-tutorial-link:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
    text-decoration: none;
}

.hilfe-tutorial-link i {
    margin-right: 10px;
    font-size: 16px;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.hilfe-nav a:focus,
.hilfe-content a:focus {
    outline: 2px solid #72c02c;
    outline-offset: 2px;
}

/* Skip link for accessibility */
.hilfe-skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background-color: #555;
    color: #fff;
    padding: 8px 15px;
    text-decoration: none;
    z-index: 1000;
}

.hilfe-skip-link:focus {
    top: 0;
}
