/*======================================
Theme Name: Divi Child
Theme URI: https://www.peeayecreative.com/
Description: This is a free Divi child theme
Author: Nelson Lee Miller (aka The Divi Teacher)
Author URI: https://www.peeayecreative.com/
Author Email: nelson@peeayecreative.com
Template: Divi
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
======================================*/

 /* ===== NOTES ==================================================================
 * 
 * New to Divi? Take our full Divi course: https://www.peeayecreative.com/product/beyond-the-builder-the-ultimate-divi-website-course/
 * 
 * Learn cool tricks and features with our Divi tutorials: https://www.peeayecreative.com/blog/
 * 
 * Discover our premium Divi products: https://www.peeayecreative.com/shop/
 * 
 * =============================================================================== */

/*add your custom CSS below this line*/
/* Breadcrumb Styles */
.mc-breadcrumb {
    padding: 15px 0;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.mc-breadcrumb ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.mc-breadcrumb li {
    display: inline-flex;
    align-items: center;
}

.mc-breadcrumb li.separator {
    margin: 0 8px;
    color: #666;
    user-select: none;
}

.mc-breadcrumb a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s ease;
}

.mc-breadcrumb a:hover {
    color: #004499;
    text-decoration: underline;
}

.mc-breadcrumb .current {
    color: #333;
    font-weight: 500;
}

/* Apply to all month name and date cells, excluding the first column and the header year row */
.mc-training-schedule tbody td,
.mc-training-schedule thead tr td {
    border: 1px solid #eee;
    padding: 6px;
    text-align: center;
}

/* Exclude the first column in tbody (course title column) */
.mc-training-schedule tbody td:first-child {
    padding-left: 6px;
    text-align: left;
}

/* First row of thead: year row */
.mc-training-schedule thead tr:first-child td {
    background-color: #b71278;
    color: #fff;
    text-align: left;
}

/* Exclude the first column in the first row (keep default style) */
.mc-training-schedule thead tr:first-child td:first-child {
    background-color: initial;
    color: initial;
    text-align: initial;
}



/* Responsive */
@media (max-width: 768px) {
    .mc-breadcrumb {
        font-size: 12px;
    }
    
    .mc-breadcrumb li.separator {
        margin: 0 5px;
    }
    
    .mc-breadcrumb ol {
        flex-wrap: wrap;
    }
}

/* ================================
   Kurskatalog Styles with Chapter Headings
   ================================ */

/* Controls Container */
.mc-catalog-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
    flex-wrap: wrap;
}

/* Filter Wrapper */
.mc-filter-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mc-filter-wrapper label {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

/* Chapter Filter Dropdown */
.mc-chapter-filter {
    padding: 10px 35px 10px 15px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    min-width: 220px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.mc-chapter-filter:hover {
    border-color: #0066cc;
}

.mc-chapter-filter:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* Search Wrapper */
.mc-search-wrapper {
    flex: 0 0 auto;
}

/* Search Input */
.mc-search-input {
    padding: 10px 15px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 250px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.mc-search-input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* Table Styles */
.kurskatalog {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.kurskatalog thead th {
    background: #f5f5f5;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
    white-space: nowrap;
}

.kurskatalog tbody td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.kurskatalog tbody tr.course-row:hover {
    background-color: #f9f9f9;
}

/* Chapter Level 1 Header */
.kurskatalog tr.chapter-l1 {
    background-color: #e8e8e8;
}

.kurskatalog tr.chapter-l1 td {
    padding: 15px;
    border-bottom: 2px solid #ccc;
}

.kurskatalog tr.chapter-l1 h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.kurskatalog tr.chapter-l1 h2 a {
    color: #333;
    text-decoration: none;
}

.kurskatalog tr.chapter-l1 h2 a:hover {
    color: #0066cc;
    text-decoration: underline;
}

/* Chapter Level 2 Header */
.kurskatalog tr.chapter-l2 {
    background-color: #f5f5f5;
}

.kurskatalog tr.chapter-l2 td {
    padding: 10px 15px 10px 25px;
    border-bottom: 1px solid #ddd;
    font-weight: 600;
    color: #555;
}

.kurskatalog tr.chapter-l2 a {
    color: #555;
    text-decoration: none;
}

.kurskatalog tr.chapter-l2 a:hover {
    color: #0066cc;
    text-decoration: underline;
}

/* Course Row */
.kurskatalog tr.course-row td:first-child {
    padding-left: 40px; 
    width: 60%;
}

/* Course Title Link */
.course-title-link {
    color: #b71278;
    text-decoration: none;
    font-weight: 500;
}

.course-title-link:hover {
    text-decoration: underline;
    color: #004499;
}

/* No Results Message */
.mc-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
    font-size: 16px;
    background: #f9f9f9;
    border-radius: 4px;
    margin-top: 20px;
}

/* PDF Download Link */
.mc-catalog-header {
    margin-bottom: 20px;
}

.mc-pdf-download {
    display: inline-flex;
    align-items: center;
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

.mc-pdf-download:hover {
    text-decoration: underline;
}

.mc-pdf-download::before {
    content: '📄';
    margin-right: 8px;
}

/* Row striping for courses only */
.kurskatalog tr.course-row:nth-child(odd) {
    background-color: #fff;
}

.kurskatalog tr.course-row:nth-child(even) {
    background-color: #fafafa;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .mc-catalog-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mc-filter-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mc-filter-wrapper label {
        margin-bottom: 5px;
    }
    
    .mc-chapter-filter,
    .mc-search-input {
        width: 100%;
        min-width: 100%;
    }

    .kurskatalog tr.chapter-l1 td,
    .kurskatalog tr.chapter-l2 td {
        padding-left: 15px !important;
    }
    
    .kurskatalog tr.course-row {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 4px;
        padding: 10px;
        background: #fff;
    }
    
    .kurskatalog tr.course-row td {
        display: block;
        padding: 8px 0;
        padding-left: 0 !important;
        border-bottom: none;
        text-align: left;
    }
    
    .kurskatalog tr.course-row td::before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        margin-bottom: 5px;
        color: #666;
        font-size: 12px;
    }
    
    .kurskatalog tr.course-row td:first-child::before {
        display: none;
    }
}

/* Print Styles */
@media print {
    .mc-catalog-controls,
    .mc-catalog-header {
        display: none;
    }
    
    .kurskatalog {
        font-size: 10px;
    }
    
    .kurskatalog tr.chapter-l1 h2 {
        font-size: 14px;
    }
}

@media print {
    .no-print {
        display: none !important;
    }
    .print-only {
        display: inline !important;
    }
}

@media screen {
    .print-only {
        display: none !important;
    }
}