/* Courses Hub - Training & Courses Styling */

:root {
    --agency-coral: #eb5342;
    --agency-charcoal: #282828;
    --agency-dark-grey: #6d6f71;
    --agency-light-grey: #f4f4f4;
    --tile-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --tile-width: 100%;
}

.courses-hub-container {
    background-color: #efefef;
    padding-bottom: 120px;
    scroll-behavior: smooth;
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', 'Inter', sans-serif;
}

/* Sticky Navigation Fix (Mobile & Desktop) */
.mobile-header {
    position: fixed !important;
    top: 0 !important;
    left: 0;
    right: 0;
    z-index: 9999 !important;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.desktop-top-bar {
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Header Section - Full Width */
.courses-hub-header {
    position: relative;
    height: 440px;
    background-color: #4a4a4a;
    background-image: var(--courses-hub-header-bg, url('../images/course-hub-axis.png'));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 0;
    width: 100%;
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.5);
}

.courses-hub-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.25);
    z-index: 1;
}

.cat-overlay-text {
    position: relative;
    z-index: 2;
    color: #fff;
    font-size: 36px;
    font-weight: 300;
    margin-bottom: 30px;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Header Categories Grid - Centered Content within Full Width Header */
.header-categories-grid {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.header-category-tile {
    background: #fff !important;
    width: 180px;
    height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--agency-charcoal);
    text-decoration: none !important;
    transition: all 0.3s ease;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 15px;
    text-align: center;
}

.header-category-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

.cat-icon-wrap {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cat-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.cat-label {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
    color: #333;
}

/* Hub Section - Centered Content */
.hub-section {
    max-width: 900px;
    margin: 60px auto;
    padding: 0 20px;
    width: 100%;
}

.hub-section-title {
    text-align: center;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #333;
    margin-bottom: 30px;
    position: relative;
    font-weight: 700;
}

.hub-section-title::after {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background: #ddd;
    margin: 10px auto 0;
}

/* Course Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    justify-content: center;
}

/* Course Card - Exact Tile Sample Design */
.course-card {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 340px;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.1);
}

.course-card-image {
    width: 100%;
    height: 40%;
    min-height: 40%;
    max-height: 40%;
    overflow: hidden;
    background: #f0f0f0;
    flex-shrink: 0;
}

.course-card-image img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    display: block;
}

.course-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    height: 60%;
    box-sizing: border-box;
}

.course-card-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.3;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-shrink: 0;
}

.course-card-intro {
    font-size: 13px;
    color: #666;
    margin: 0 0 15px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 400;
    flex-grow: 1;
    min-height: 0;
}

.course-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f2f2f2;
    padding-top: 12px;
    margin-top: auto;
    flex-shrink: 0;
}

.course-meta-info {
    font-size: 16px;
    color: #adb5bd;
    font-weight: 400;
}

.view-course-btn {
    font-size: 16px;
    font-weight: 600;
    color: var(--agency-coral);
    text-decoration: none;
    letter-spacing: 0;
    transition: opacity 0.2s ease;
}

.course-card:hover .view-course-btn {
    opacity: 0.8;
}

.course-card-link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
}

/* Empty State */
.empty-section-msg {
    text-align: center;
    color: #bbb;
    grid-column: 1 / -1;
    padding: 40px;
    font-size: 14px;
    font-style: italic;
}

/* Responsive States */
@media (max-width: 1100px) {
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hub-section {
        max-width: 300px;
    }

    .course-card {
        height: 360px;
    }

    .desktop-top-bar {
        display: none !important;
    }

    .courses-hub-header {
        height: auto;
        padding: 60px 20px;
    }

    .cat-overlay-text {
        font-size: 28px;
    }

    .header-categories-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        width: 100%;
        max-width: 300px;
        gap: 15px;
        padding: 0;
    }

    .header-category-tile {
        width: 100%;
        height: 160px;
        padding: 10px;
    }

    .courses-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .hub-section {
        margin-top: 40px;
        padding: 0;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }

    .course-card {
        height: 360px;
        min-height: 360px;
    }

    .course-card-intro {
        height: auto;
        max-height: none;
    }
}

.lp-modal-dialog .lp-modal-body .main-content {
    min-height: 5vh;
    margin-left: 0;
}