/* Hubs & Partners Directory and Courses Catalog Styles */

.hpd-directory-container,
.hpd-courses-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #1e293b;
    box-sizing: border-box;
}

.hpd-directory-container *,
.hpd-courses-container * {
    box-sizing: border-box;
}

/* Modals are moved to <body> by JS, so they need their own box model */
.hpd-modal-overlay,
.hpd-modal-overlay * {
    box-sizing: border-box;
}

/* Prevent body scrolling when modal is open */
body.hpd-modal-open {
    overflow: hidden !important;
}

/* Controls Header */
.hpd-controls {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.05);
}

.hpd-search-bar {
    position: relative;
    margin-bottom: 18px;
}

.hpd-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.hpd-search-input,
.hpd-course-search-input {
    width: 100% !important;
    padding: 14px 44px 14px 48px !important;
    font-size: 16px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    outline: none !important;
    background-color: #f8fafc !important;
    color: #1e293b !important;
    transition: all 0.2s ease !important;
}

.hpd-search-input:focus,
.hpd-course-search-input:focus {
    background-color: #ffffff !important;
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

.hpd-search-clear,
.hpd-course-search-clear {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 22px;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.hpd-search-clear:hover,
.hpd-course-search-clear:hover {
    color: #334155;
}

.hpd-filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}

.hpd-type-filters,
.hpd-format-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.hpd-type-btn,
.hpd-format-btn {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid transparent;
    padding: 9px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hpd-type-btn:hover,
.hpd-format-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.hpd-type-btn.active,
.hpd-format-btn.active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.hpd-province-select,
.hpd-category-select {
    padding: 9px 16px !important;
    font-size: 13px !important;
    border-radius: 10px !important;
    border: 1px solid #cbd5e1 !important;
    background-color: #ffffff !important;
    color: #334155 !important;
    min-width: 220px !important;
    cursor: pointer !important;
}

/* Metadata Bar */
.hpd-directory-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 4px;
    font-size: 13px;
    color: #64748b;
}

.hpd-counter,
.hpd-course-counter {
    font-weight: 600;
}

.hpd-btn-refresh-data,
.hpd-btn-refresh-courses {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid #cbd5e1;
    padding: 6px 12px;
    border-radius: 8px;
    color: #475569;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.hpd-btn-refresh-data:hover,
.hpd-btn-refresh-courses:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.hpd-spinning svg {
    animation: hpd-spin 1s linear infinite;
}

@keyframes hpd-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Grid Layout */
.hpd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    transition: opacity 0.2s ease;
}

/* Card Showcase with Big Logo */
.hpd-card-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.hpd-card-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.hpd-card-logo-showcase {
    position: relative;
    width: 100%;
    height: 160px;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.hpd-card-large-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.hpd-card-item:hover .hpd-card-large-logo {
    transform: scale(1.04);
}

.hpd-card-avatar-large-fallback {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 32px;
    color: #0284c7;
    background: #e0f2fe;
    border: 2px solid #bae6fd;
}

.hpd-badge-floating {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.hpd-type-hub {
    background: #e0e7ff;
    color: #3730a3;
}

.hpd-type-partner {
    background: #e0f2fe;
    color: #0369a1;
}

.hpd-card-content {
    padding: 18px 20px 14px 20px;
    flex-grow: 1;
}

.hpd-card-title {
    margin: 0 0 6px 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
}

.hpd-card-location {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
}

.hpd-card-location svg {
    flex-shrink: 0;
    color: #94a3b8;
}

.hpd-card-action-bar {
    padding: 12px 20px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}

.hpd-btn-view-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #0284c7;
    transition: color 0.15s;
}

.hpd-card-item:hover .hpd-btn-view-info {
    color: #0369a1;
}

/* Pagination Styling */
.hpd-pagination-wrap {
    margin-top: 36px;
    display: flex;
    justify-content: center;
}

.hpd-pagination-container {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    background: #ffffff;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.hpd-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: #f8fafc;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.hpd-page-btn:hover:not(.disabled):not(.active) {
    background: #e2e8f0;
    color: #0f172a;
}

.hpd-page-btn.active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
    cursor: default;
}

.hpd-page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f1f5f9;
}

.hpd-page-nav {
    font-weight: 500;
    padding: 0 14px;
}

.hpd-page-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 38px;
    color: #94a3b8;
    font-weight: 700;
}

/* Modal Styling */
.hpd-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 2147483647;
    display: flex;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #1e293b;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hpd-modal-content {
    background: #ffffff;
    border-radius: 16px;
    max-width: 680px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: hpd-modal-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes hpd-modal-in {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hpd-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 22px;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    line-height: 1;
}

.hpd-modal-close:hover {
    background: #0f172a;
    color: #ffffff;
}

.hpd-modal-body {
    padding: 30px;
}

/* Modal Header */
.hpd-modal-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 24px;
}

.hpd-modal-logo-wrap {
    width: 90px;
    height: 90px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hpd-modal-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.hpd-modal-avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 36px;
    color: #0284c7;
    background: #e0f2fe;
}

.hpd-modal-title-area {
    flex: 1;
    min-width: 0;
}

.hpd-modal-title {
    margin: 6px 0 6px 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.hpd-modal-location {
    margin: 0;
    font-size: 14px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hpd-modal-location svg {
    color: #0284c7;
}

/* Modal Sections */
.hpd-modal-section {
    margin-bottom: 22px;
}

.hpd-modal-section-title {
    margin: 0 0 12px 0;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
}

/* Contact Rows */
.hpd-modal-contact-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hpd-modal-contact-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-decoration: none;
    color: #1e293b;
    transition: all 0.2s ease;
}

.hpd-modal-contact-row:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateX(3px);
}

.hpd-modal-contact-row.hpd-row-wa:hover {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.hpd-contact-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0284c7;
    margin-right: 14px;
    flex-shrink: 0;
}

.hpd-icon-wa {
    color: #16a34a !important;
    background: #ffffff !important;
}

.hpd-contact-info-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.hpd-contact-label {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
}

.hpd-contact-value {
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hpd-contact-action-btn {
    font-size: 12px;
    font-weight: 600;
    color: #0284c7;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
    border-radius: 6px;
    flex-shrink: 0;
    margin-left: 10px;
}

.hpd-row-wa .hpd-contact-action-btn {
    color: #16a34a;
    border-color: #bbf7d0;
    background: #ffffff;
}

/* Social Grid */
.hpd-modal-social-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hpd-modal-social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    transition: all 0.2s ease;
}

.hpd-modal-social-link:hover {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.hpd-modal-empty-notice {
    text-align: center;
    color: #64748b;
    font-size: 14px;
    margin: 20px 0;
}

/* Loading & Empty States */
.hpd-loading, .hpd-empty {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    margin-top: 20px;
}

.hpd-empty h3 {
    margin: 12px 0 6px 0;
    font-size: 1.2rem;
    color: #334155;
}

.hpd-empty p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.hpd-spinner {
    width: 36px;
    height: 36px;
    margin: 0 auto 14px auto;
    border: 3px solid #e2e8f0;
    border-top-color: #0284c7;
    border-radius: 50%;
    animation: hpd-spin 0.8s linear infinite;
}

/* ==========================================================================
   Courses Directory Specific Styles - Modern Card V2
   ========================================================================== */
.hpd-courses-container {
    max-width: 1200px;
    margin: 0 auto;
}

.hpd-course-card-clean {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.hpd-course-card-clean:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px -4px rgba(2, 132, 199, 0.12), 0 4px 10px rgba(0, 0, 0, 0.04);
    border-color: #cbd5e1;
}

.hpd-course-clean-title {
    margin: 0 0 10px 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.hpd-course-card-clean:hover .hpd-course-clean-title {
    color: #0284c7;
}

.hpd-course-partner-author {
    margin: 0;
    font-size: 13px;
    color: #475569;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 5px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}

.hpd-course-author-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.hpd-course-author-name {
    font-weight: 700;
    color: #0284c7;
    font-size: 13px;
}

/* Card Top Bar (Category & Modality) */
.hpd-course-card-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px 12px 18px;
    gap: 8px;
}

.hpd-course-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    color: #334155;
    padding: 4px 10px 4px 6px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    max-width: 60%;
}

.hpd-course-cat-pill span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hpd-card-cat-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    border-radius: 50%;
    background: #ffffff;
    padding: 1px;
    flex-shrink: 0;
}

/* Modality Format Pills with Pulse Dots */
.hpd-format-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    flex-shrink: 0;
}

.hpd-format-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.hpd-format-online {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}
.hpd-format-online .hpd-format-dot {
    background: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.hpd-format-in_person {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}
.hpd-format-in_person .hpd-format-dot {
    background: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.hpd-format-hybrid {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}
.hpd-format-hybrid .hpd-format-dot {
    background: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}

.hpd-format-asyncronous {
    background: #faf5ff;
    color: #7e22ce;
    border: 1px solid #e9d5ff;
}
.hpd-format-asyncronous .hpd-format-dot {
    background: #a855f7;
    box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.25);
}

/* Card Main Content */
.hpd-course-card-main {
    padding: 0 18px 12px 18px;
    flex-grow: 1;
}

.hpd-course-title-v2 {
    font-size: 1.12rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.hpd-course-card-v2:hover .hpd-course-title-v2 {
    color: #0284c7;
}

.hpd-course-snippet-v2 {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Feature Chips Bar */
.hpd-course-chips-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 18px 14px 18px;
    flex-wrap: wrap;
}

.hpd-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.hpd-chip-hours {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}
.hpd-chip-hours svg {
    color: #0284c7;
}

.hpd-chip-modules {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}
.hpd-chip-modules svg {
    color: #6366f1;
}

.hpd-chip-exam {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.hpd-chip-exam svg {
    color: #16a34a;
}

/* Course Footer with Partner Showcase & CTA */
.hpd-course-footer-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    gap: 12px;
}

.hpd-course-partner-block {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.hpd-course-partner-logo {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 3px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.hpd-partner-avatar-fallback {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #e0f2fe;
    color: #0284c7;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #bae6fd;
    flex-shrink: 0;
}

.hpd-course-partner-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.hpd-course-partner-title {
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hpd-course-partner-location {
    font-size: 11px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 3px;
}

.hpd-course-partner-location svg {
    color: #0284c7;
    flex-shrink: 0;
}

.hpd-course-cta-row {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #0284c7;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.hpd-course-cta-arrow {
    transition: transform 0.2s ease;
}

.hpd-course-card-v2:hover .hpd-course-cta-arrow {
    transform: translateX(3px);
}

.hpd-course-card-v2:hover .hpd-course-cta-row {
    color: #0369a1;
}

/* Modal Specific Styles */
.hpd-course-modal-content {
    max-width: 650px;
}

/* Course Modal Specific Styles */
.hpd-course-modal-content {
    max-width: 650px;
}

.hpd-course-modal-header {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.hpd-course-modal-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
    margin-bottom: 6px;
}

.hpd-modal-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
}

.hpd-modal-cat-pill svg {
    color: #64748b;
    flex-shrink: 0;
}

.hpd-modal-format-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.2px;
}

.hpd-modal-format-pill .hpd-format-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.hpd-modal-hours-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
}

.hpd-modal-hours-pill svg {
    color: #16a34a;
    flex-shrink: 0;
}

.hpd-modal-institution-box {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin: 16px 0 20px 0;
}

.hpd-modal-partner-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 4px;
    flex-shrink: 0;
}

.hpd-inst-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 600;
}

.hpd-inst-name {
    margin: 2px 0 0 0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.hpd-inst-loc {
    font-size: 12px;
    color: #0284c7;
    font-weight: 500;
}

.hpd-modal-text-content {
    font-size: 14px;
    line-height: 1.6;
    color: #334155;
    background: #f8fafc;
    border-radius: 8px;
    padding: 14px 16px;
    border: 1px solid #f1f5f9;
}

/* Modules Accordion / List */
.hpd-modules-accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hpd-module-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
}

.hpd-module-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hpd-module-num {
    background: #0f172a;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}

.hpd-module-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.hpd-module-content {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
}

/* =========================================================================
   CATEGORY BROWSER / NAVIGATOR
   ========================================================================= */
.hpd-category-browser {
    margin: 18px 0 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 18px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.hpd-category-browser-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}

.hpd-category-browser-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hpd-category-browser-title svg {
    color: #0284c7;
}

.hpd-category-browser-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hpd-cat-nav-arrow {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #475569;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.hpd-cat-nav-arrow:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.hpd-btn-view-all-cats {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 6px;
}

.hpd-btn-view-all-cats:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}

/* Category Track (Horizontal Ribbon) */
.hpd-category-track-wrapper {
    position: relative;
    overflow: hidden;
}

.hpd-category-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 6px 2px 10px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    -webkit-overflow-scrolling: touch;
}

.hpd-category-track::-webkit-scrollbar {
    height: 5px;
}

.hpd-category-track::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.hpd-category-track::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.hpd-category-track::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Category Item Card in Ribbon */
.hpd-cat-card {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px 8px 10px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 28px;
    cursor: pointer;
    user-select: none;
    transition: all 0.22s ease;
    text-decoration: none;
    max-width: 260px;
}

.hpd-cat-card:hover {
    background: #f0f9ff;
    border-color: #7dd3fc;
    transform: translateY(-1.5px);
    box-shadow: 0 3px 10px rgba(2, 132, 199, 0.12);
}

.hpd-cat-card.active {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    border-color: #0284c7;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.28);
}

.hpd-cat-icon-wrap {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.hpd-cat-card.active .hpd-cat-icon-wrap {
    background: #ffffff;
    border-color: #ffffff;
}

.hpd-cat-icon-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.hpd-cat-icon-fallback {
    font-size: 13px;
    font-weight: 700;
    color: #0284c7;
}

.hpd-cat-card-text {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hpd-cat-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hpd-cat-card.active .hpd-cat-card-title {
    color: #ffffff;
}

.hpd-cat-skeleton {
    padding: 12px;
    color: #94a3b8;
    font-size: 13px;
    font-style: italic;
}

/* =========================================================================
   ALL CATEGORIES MODAL & GRID
   ========================================================================= */
.hpd-all-cats-modal-content {
    max-width: 850px !important;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.hpd-all-cats-modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e2e8f0;
}

.hpd-all-cats-modal-header h2 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

.hpd-modal-cat-search-box {
    margin-top: 14px;
    position: relative;
    display: flex;
    align-items: center;
}

.hpd-modal-cat-search-box svg {
    position: absolute;
    left: 12px;
    color: #94a3b8;
}

.hpd-modal-cat-search-input {
    width: 100%;
    padding: 9px 14px 9px 36px !important;
    border-radius: 10px !important;
    border: 1.5px solid #cbd5e1 !important;
    font-size: 14px !important;
    background: #f8fafc !important;
    outline: none !important;
    transition: all 0.2s ease;
}

.hpd-modal-cat-search-input:focus {
    border-color: #0284c7 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

.hpd-all-cats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    padding: 20px 24px 28px;
    overflow-y: auto;
    max-height: 55vh;
}

.hpd-modal-cat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hpd-modal-cat-item:hover {
    background: #f0f9ff;
    border-color: #0284c7;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(2, 132, 199, 0.12);
}

.hpd-modal-cat-item.active {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
}

.hpd-modal-cat-item.active .hpd-cat-card-title {
    color: #ffffff;
}

/* =========================================================================
   CATEGORIES PORTAL SCREEN (View 1)
   ========================================================================= */
.hpd-categories-screen {
    margin-top: 10px;
    animation: hpd-fade-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.hpd-categories-screen-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 16px;
}

.hpd-categories-screen-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px 0;
    letter-spacing: -0.02em;
}

.hpd-categories-screen-subtitle {
    margin: 0;
    font-size: 14px;
    color: #64748b;
    max-width: 600px;
    line-height: 1.5;
}

.hpd-categories-screen-filter {
    flex-shrink: 0;
}

.hpd-cat-quick-search-box {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 240px;
}

.hpd-cat-quick-search-box svg {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    pointer-events: none;
}

.hpd-cat-quick-search-input {
    width: 100% !important;
    padding: 9px 14px 9px 38px !important;
    font-size: 13px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 20px !important;
    background: #ffffff !important;
    outline: none !important;
    transition: all 0.2s ease !important;
}

.hpd-cat-quick-search-input:focus {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12) !important;
}

/* Categories Screen Grid */
.hpd-categories-screen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

/* Category Portal Card */
.hpd-cat-portal-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 22px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.hpd-cat-portal-card:hover {
    transform: translateY(-4px);
    border-color: #0284c7;
    box-shadow: 0 12px 24px -4px rgba(2, 132, 199, 0.14), 0 4px 8px rgba(0, 0, 0, 0.04);
}

.hpd-cat-portal-card::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0284c7 0%, #38bdf8 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.hpd-cat-portal-card:hover::after {
    opacity: 1;
}

.hpd-cat-portal-icon-wrap {
    width: 54px;
    height: 54px;
    min-width: 54px;
    border-radius: 14px;
    background: #f0f9ff;
    border: 1px solid #e0f2fe;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    transition: all 0.25s ease;
}

.hpd-cat-portal-card:hover .hpd-cat-portal-icon-wrap {
    background: #0284c7;
    border-color: #0284c7;
    transform: scale(1.05);
}

.hpd-cat-portal-icon-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: filter 0.2s ease;
}

.hpd-cat-portal-icon-fallback {
    font-size: 20px;
    font-weight: 800;
    color: #0284c7;
    transition: color 0.2s ease;
}

.hpd-cat-portal-card:hover .hpd-cat-portal-icon-fallback {
    color: #ffffff;
}

.hpd-cat-portal-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hpd-cat-portal-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.hpd-cat-portal-card:hover .hpd-cat-portal-title {
    color: #0284c7;
}

.hpd-cat-portal-cta {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.hpd-cat-portal-card:hover .hpd-cat-portal-cta {
    color: #0284c7;
    transform: translateX(3px);
}

.hpd-loading-categories,
.hpd-empty-categories-search {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
    font-size: 14px;
}

/* =========================================================================
   COURSES RESULTS SCREEN (View 2)
   ========================================================================= */
.hpd-courses-screen {
    animation: hpd-fade-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes hpd-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.hpd-courses-context-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.hpd-btn-back-categories {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hpd-btn-back-categories:hover {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.hpd-active-filter-badge-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.hpd-active-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    color: #0369a1;
    padding: 6px 14px 6px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.hpd-active-filter-label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    color: #0284c7;
    letter-spacing: 0.3px;
}

.hpd-active-cat-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 50%;
    background: #ffffff;
    padding: 2px;
}

.hpd-active-badge-clear {
    background: none;
    border: none;
    color: #0369a1;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    margin-left: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
}

.hpd-active-badge-clear:hover {
    color: #b91c1c;
}

.hpd-courses-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* =========================================================================
   PARTNER COURSES IN DIRECTORY MODAL
   ========================================================================= */
.hpd-modal-partner-courses-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.hpd-partner-courses-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.hpd-partner-courses-header .hpd-modal-section-title {
    margin-bottom: 0;
}

.hpd-partner-courses-badge {
    background: #e0f2fe;
    color: #0369a1;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid #bae6fd;
}

.hpd-partner-courses-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hpd-partner-course-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}

.hpd-partner-course-card:hover {
    background: #ffffff;
    border-color: #0284c7;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px -2px rgba(2, 132, 199, 0.12);
}

.hpd-partner-course-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.hpd-partner-course-cat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.hpd-partner-course-cat-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    border-radius: 50%;
}

.hpd-partner-course-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    transition: color 0.15s ease;
}

.hpd-partner-course-card:hover .hpd-partner-course-title {
    color: #0284c7;
}

.hpd-partner-course-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 6px;
    border-top: 1px solid #f1f5f9;
    font-size: 12px;
}

.hpd-partner-course-hours {
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.hpd-partner-course-hours svg {
    color: #0284c7;
}

.hpd-partner-course-cta {
    font-weight: 700;
    color: #0284c7;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: transform 0.15s ease;
}

.hpd-partner-course-card:hover .hpd-partner-course-cta {
    transform: translateX(3px);
    color: #0369a1;
}

.hpd-partner-courses-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px;
    background: #f8fafc;
    border-radius: 10px;
    color: #64748b;
    font-size: 13px;
}

.hpd-mini-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-top-color: #0284c7;
    border-radius: 50%;
    animation: hpd-spin 0.8s linear infinite;
}

.hpd-partner-courses-empty {
    padding: 20px;
    text-align: center;
    background: #f8fafc;
    border-radius: 10px;
    color: #64748b;
    font-size: 13px;
    border: 1px dashed #e2e8f0;
}

.hpd-partner-courses-empty p {
    margin: 0;
}

@media (max-width: 640px) {
    .hpd-filter-row,
    .hpd-courses-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .hpd-province-filter-wrap, .hpd-province-select,
    .hpd-category-filter-wrap, .hpd-category-select {
        width: 100% !important;
    }
    .hpd-grid,
    .hpd-categories-screen-grid {
        grid-template-columns: 1fr;
    }
    .hpd-modal-header {
        flex-direction: column;
        text-align: center;
    }
    .hpd-modal-location {
        justify-content: center;
    }
    .hpd-modal-contact-row {
        flex-wrap: wrap;
        gap: 8px;
    }
    .hpd-contact-action-btn {
        width: 100%;
        text-align: center;
        margin-left: 0;
    }
    .hpd-all-cats-grid {
        grid-template-columns: 1fr;
    }
    .hpd-cat-card {
        max-width: 220px;
    }
    .hpd-categories-screen-header {
        flex-direction: column;
        align-items: stretch;
    }
    .hpd-cat-quick-search-box {
        min-width: 100%;
    }
    .hpd-courses-context-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .hpd-btn-back-categories {
        justify-content: center;
        width: 100%;
    }
}




