/* ==========================================================================
   NIBSS Training Listing - Frontend Styles
   ========================================================================== */

/* Wrapper */
.ntl-wrapper {
    max-width: 100%;
    margin: 0 auto;
}

/* Grid */
.ntl-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.ntl-grid .ntl-card {
    width: 100%;
    margin-bottom: 20px;
}

/* Card */
.ntl-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    padding: 20px;
}

.ntl-card-image {
    position: relative;
}

.ntl-card-image a {
    display: block;
}

.ntl-card-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

/* Category badge overlay */
.ntl-category-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #000;
    color: #fff;
    font-size: 14px;
    padding: 5px 16px;
    border-radius: 8px;
    box-shadow: 1.95px 1.95px 2.6px rgba(0, 0, 0, 0.15);
    line-height: 1.4;
}

/* Card body */
.ntl-card-body {
    padding-top: 16px;
}

/* Start date tag */
.ntl-start-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.ntl-start-label {
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

.ntl-start-value {
    background: #E3801C;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 4px;
}

/* Title */
.ntl-card-title {
    margin: 0 0 8px 0;
}

.ntl-card-title a {
    font-family: PalatinoLT, Palatino, Georgia, serif;
    font-size: 22px;
    line-height: 28px;
    font-weight: 700;
    color: inherit;
    text-decoration: none;
}

.ntl-card-title a:hover {
    color: #396B0A;
}

/* Description */
.ntl-card-desc {
    font-size: 15px;
    font-weight: 300;
    line-height: 24px;
    color: #444;
    margin: 0;
}

/* ==========================================================================
   Detailed Card Variant
   ========================================================================== */

/* Date badge (top-left orange) */
.ntl-date-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #E3801C;
    color: #fff;
    border-radius: 8px;
    padding: 8px 12px;
    text-align: center;
    line-height: 1.2;
    box-shadow: 1.95px 1.95px 2.6px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 50px;
}

.ntl-date-badge-month {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ntl-date-badge-day {
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

/* Detailed card image height */
.ntl-card--detailed .ntl-card-image img {
    height: 300px;
}

/* Detailed card title */
.ntl-card--detailed .ntl-card-title a {
    color: #396B0A;
    font-family: PalatinoLT, Palatino, Georgia, serif;
    font-size: 21px;
    line-height: 26px;
    font-weight: 700;
    text-decoration: none;
}

.ntl-card--detailed .ntl-card-title a:hover {
    color: #2d5508;
}

/* Detail metadata grid (2x2) */
.ntl-detail-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 12px 0 16px;
    gap: 8px 0;
}

.ntl-detail-item {
    width: 50%;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}

.ntl-detail-item svg {
    flex-shrink: 0;
    color: #E3801C;
}

/* View Details button */
.ntl-details-btn {
    display: inline-block;
    padding: 10px 24px;
    border: 2px solid #396B0A;
    border-radius: 8px;
    color: #396B0A;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.ntl-details-btn:hover {
    background: #396B0A;
    color: #fff;
}

/* ==========================================================================
   Card Background Variant
   ========================================================================== */

.ntl-card-bg .ntl-grid {
    gap: 16px;
}

.ntl-card-bg .ntl-card {
    background: #f5f5f5;
    border-radius: 12px;
    padding: 14px 14px 20px;
    margin-bottom: 16px;
}

.ntl-card-bg .ntl-card-image img {
    border-radius: 8px;
}

/* No results */
.ntl-no-results {
    text-align: center;
    padding: 40px 20px;
    font-size: 16px;
    color: #666;
}

/* ==========================================================================
   Search Bar
   ========================================================================== */

.ntl-search-form {
    margin-bottom: 30px;
}

.ntl-search-fields {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    padding-left: 20px;
    padding-right: 20px;
}

.ntl-search-input,
.ntl-category-select,
.ntl-month-select {
    padding: 12px 16px !important;
    border: 1px solid #bbb !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    background: #fff;
    min-width: 160px;
    height: auto !important;
    box-sizing: border-box;
    line-height: 1.4;
    font-family: inherit;
    color: #333;
}

.ntl-search-input {
    flex: 1 1 200px;
    min-width: 180px;
}

.ntl-search-btn {
    padding: 12px 28px;
    background: #396B0A;
    color: #fff;
    border: 2px solid #235935;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.ntl-search-btn:hover {
    background: #2d5508;
}

/* ==========================================================================
   Load More
   ========================================================================== */

.ntl-load-more-wrap {
    text-align: center;
    margin-top: 30px;
}

.ntl-load-more {
    padding: 14px 40px;
    background: #fff;
    color: #396B0A;
    border: 2px solid #396B0A;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ntl-load-more:hover {
    background: #396B0A;
    color: #fff;
}

.ntl-load-more.ntl-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ==========================================================================
   Responsive - Tablet (600px+)
   ========================================================================== */

@media (min-width: 600px) {
    .ntl-grid .ntl-card {
        width: calc(50% - 10px);
    }

    .ntl-card-bg .ntl-grid .ntl-card {
        width: calc(50% - 8px);
    }
}

/* ==========================================================================
   Responsive - Desktop (949px+)
   ========================================================================== */

@media (min-width: 949px) {
    .ntl-columns-3 .ntl-card {
        width: calc(33.333% - 14px);
    }

    .ntl-columns-4 .ntl-card {
        width: calc(33.333% - 14px);
    }

    .ntl-columns-2 .ntl-card {
        width: calc(50% - 10px);
    }

    .ntl-card-bg .ntl-columns-3 .ntl-card {
        width: calc(33.333% - 11px);
    }

    .ntl-card-bg .ntl-columns-4 .ntl-card {
        width: calc(33.333% - 11px);
    }

    .ntl-card-bg .ntl-columns-2 .ntl-card {
        width: calc(50% - 8px);
    }
}

/* ==========================================================================
   Responsive - Large Desktop (1199px+)
   ========================================================================== */

@media (min-width: 1199px) {
    .ntl-columns-4 .ntl-card {
        width: calc(25% - 15px);
    }

    .ntl-card-bg .ntl-columns-4 .ntl-card {
        width: calc(25% - 12px);
    }
}

/* ==========================================================================
   Responsive - Mobile (<600px)
   ========================================================================== */

@media (max-width: 599px) {
    .ntl-search-fields {
        flex-direction: column;
    }

    .ntl-search-input,
    .ntl-category-select,
    .ntl-month-select,
    .ntl-search-btn {
        width: 100%;
        min-width: unset;
    }

    .ntl-card-image img {
        height: 200px;
    }

    .ntl-card--detailed .ntl-card-image img {
        height: 200px;
    }

    .ntl-detail-item {
        width: 100%;
    }
}
