/* ===========================
   Corporate Training — Hero
   =========================== */

.ct-hero-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.05em;
    height: 1.05em;
    border-radius: 0.22em;
    background: rgba(41, 240, 204, 0.15);
    border: 1px solid rgba(41, 240, 204, 0.25);
    color: rgba(41, 240, 204, 0.9);
}

.ct-hero-icon svg {
    width: 55%;
    height: 55%;
}

.ct-hero {
    background:
        radial-gradient(circle at top left, rgba(41, 240, 204, 0.22), transparent 38%),
        radial-gradient(circle at 88% 22%, rgba(255, 255, 255, 0.14), transparent 26%),
        linear-gradient(135deg, #081f59 0%, #0b2567 48%, #093a92 100%);
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.ct-hero-background {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.ct-hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0.9;
}

.ct-hero-orb-left {
    top: -4rem;
    left: -3rem;
    width: 14rem;
    height: 14rem;
    background: radial-gradient(circle, rgba(41, 240, 204, 0.32) 0%, rgba(41, 240, 204, 0) 70%);
}

.ct-hero-orb-right {
    right: -2rem;
    bottom: -5rem;
    width: 18rem;
    height: 18rem;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 70%);
}

.ct-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.ct-hero-title-wrapper {
    font-size: clamp(2rem, 3.8vw, 3.2rem);
    display: flex;
    align-items: center;
    gap: 0.4em;
    justify-content: center;
    margin-bottom: 1rem;
}

.ct-hero-title {
    color: var(--white);
    font-size: 1em;
    line-height: 0.98;
    letter-spacing: -0.03em;
    margin-bottom: 0;
}

.ct-hero-subtitle {
    color: rgba(255, 255, 255, 0.84);
    font-size: 1.08rem;
    line-height: 1.75;
    margin-bottom: 0;
}

/* ===========================
   Corporate Training — Status Badges (base)
   =========================== */

.ct-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 50px;
    font-size: 0.7rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* Base badge colors — used on detail page meta area */
.ct-badge-upcoming {
    background: var(--primary-gradient);
    color: white;
    animation: ct-badge-pulse 2.4s ease-in-out infinite;
}

@keyframes ct-badge-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.72; }
}

.ct-badge-in_progress {
    background: rgba(6, 132, 223, 0.12);
    color: var(--blue);
    border: 1px solid rgba(6, 132, 223, 0.25);
}

.ct-badge-completed {
    background: rgba(109, 109, 109, 0.1);
    color: var(--grey);
    border: 1px solid rgba(109, 109, 109, 0.2);
}

/* On card images: solid opaque backgrounds for readability on photos */
.ct-card-badges .ct-badge-in_progress {
    background: var(--blue);
    color: white;
    border-color: transparent;
}

.ct-card-badges .ct-badge-completed {
    background: #5a6270;
    color: white;
    border-color: transparent;
}

/* ===========================
   Corporate Training — Filter Tabs
   =========================== */

.ct-filter-tabs {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.ct-filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1.1rem;
    border-radius: 50px;
    font-size: 0.88rem;
    text-decoration: none;
    color: var(--dark-blue);
    background: rgba(11, 37, 103, 0.06);
    border: 1.5px solid transparent;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.ct-filter-tab:hover {
    background: rgba(11, 37, 103, 0.1);
    color: var(--dark-blue);
}

.ct-filter-tab.active {
    background: var(--dark-blue);
    color: var(--white);
    border-color: var(--dark-blue);
}

.ct-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.3rem;
    border-radius: 50px;
    font-size: 0.72rem;
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
}

.ct-filter-tab:not(.active) .ct-filter-count {
    background: rgba(11, 37, 103, 0.1);
    color: var(--grey);
}

/* ===========================
   Corporate Training — Card Grid
   =========================== */

.ct-grid-section {
    padding: 2.25rem 0 4rem;
}

.ct-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* ===========================
   Corporate Training — Card Design
   =========================== */

.ct-card {
    border-radius: var(--border-radius-md);
    overflow: hidden;
    background: var(--white);
    box-shadow: 0 2px 12px rgba(11, 37, 103, 0.06);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.ct-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(11, 37, 103, 0.12);
}

.ct-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Card Image */
.ct-card-image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.ct-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.ct-card:hover .ct-card-image {
    transform: scale(1.06);
}

.ct-card-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8edf8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ct-card-placeholder-logo {
    width: 60px;
    opacity: 0.3;
}

.ct-card-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(11, 37, 103, 0.12), transparent);
    pointer-events: none;
}

/* Status badge — top right corner of image */
.ct-card-badges {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.35rem;
    z-index: 1;
}

/* Progress bar — bottom edge of image for in-progress trainings */
.ct-progress-bar-track {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    z-index: 2;
}

.ct-progress-bar-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 0 2px 2px 0;
    transition: width 0.3s ease;
}

/* Card Body */
.ct-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ct-card-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.ct-card-date {
    display: block;
    font-size: 0.78rem;
    color: var(--grey);
    margin-bottom: 0;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.ct-card-title {
    font-size: 1.15rem;
    color: var(--dark-blue);
    margin-bottom: 0.6rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Corporate row: logo pill + name text side by side */
.ct-card-corporate-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.25rem;
}

.ct-card-logo-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: white;
    border: 1px solid rgba(11, 37, 103, 0.1);
    border-radius: 8px;
    padding: 0.3rem 0.6rem;
    box-shadow: 0 1px 5px rgba(11, 37, 103, 0.07);
}

.ct-card-corporate-logo {
    height: 32px;
    width: auto;
    max-width: 80px;
    object-fit: contain;
}

.ct-card-corporate {
    font-size: 0.85rem;
    color: var(--dark-blue);
    letter-spacing: 0.01em;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ct-card-summary {
    font-size: 0.9rem;
    color: var(--dark-grey);
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ct-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 0.75rem;
}

.ct-card-cta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    background: var(--text-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: 'Gilroy-Medium', sans-serif;
    transition: gap var(--transition-fast);
}

.ct-card-cta svg path {
    stroke: var(--blue);
}

.ct-card:hover .ct-card-cta {
    gap: 0.65rem;
}

/* ===========================
   Corporate Training — Empty State
   =========================== */

.ct-empty {
    text-align: center;
    padding: 5rem 0;
    max-width: 32rem;
    margin: 0 auto;
}

.ct-empty-icon {
    width: 80px;
    opacity: 0.2;
    margin-bottom: 1.5rem;
}

/* ===========================
   Corporate Training — Detail Hero
   =========================== */

.ct-detail-hero {
    position: relative;
    height: 420px;
    overflow: hidden;
}

.ct-detail-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ct-detail-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(11, 37, 103, 0.15) 100%);
}

/* ===========================
   Corporate Training — Detail Layout (2-column)
   =========================== */

.ct-detail-article {
    padding: 3rem 0 5rem;
}

.ct-detail-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
    align-items: start;
}

/* ===========================
   Corporate Training — Detail Main Content
   =========================== */

.ct-detail-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.ct-detail-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.85rem;
    border-radius: 50px;
    background: linear-gradient(135deg, rgba(6, 132, 223, 0.08), rgba(41, 240, 204, 0.08));
    border: 1px solid rgba(6, 132, 223, 0.15);
    color: var(--blue);
    font-family: 'Gilroy-Medium', sans-serif;
    font-size: 0.82rem;
}

.ct-detail-title {
    font-size: 2.5rem;
    color: var(--dark-blue);
    line-height: 1.2;
    margin-bottom: 0;
}

.ct-detail-divider {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(11, 37, 103, 0.12), transparent);
    margin: 1.75rem 0;
}

/* Rich Content */
.ct-detail-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--dark-grey);
}

.ct-detail-content h1,
.ct-detail-content h2,
.ct-detail-content h3,
.ct-detail-content h4 {
    font-family: 'Gilroy-Bold', sans-serif;
    color: var(--dark-blue);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.ct-detail-content h2 { font-size: 1.6rem; }
.ct-detail-content h3 { font-size: 1.3rem; }

.ct-detail-content p { margin-bottom: 1.25rem; }

.ct-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-md);
    margin: 1.5rem 0;
}

.ct-detail-content a {
    color: var(--blue);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ct-detail-content a:hover { color: var(--dark-blue); }

.ct-detail-content ul,
.ct-detail-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.ct-detail-content li { margin-bottom: 0.4rem; }

.ct-detail-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(11, 37, 103, 0.08);
}

.ct-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dark-blue);
    text-decoration: none;
    font-size: 0.95rem;
    transition: gap var(--transition-fast), color var(--transition-fast);
}

.ct-back-link:hover {
    gap: 0.75rem;
    color: var(--blue);
}

/* ===========================
   Corporate Training — Detail Sidebar
   =========================== */

.ct-detail-sidebar {
    position: sticky;
    top: 2rem;
    background: var(--white);
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(11, 37, 103, 0.1);
    box-shadow: 0 4px 28px rgba(11, 37, 103, 0.08);
    overflow: hidden;
}

/* Corporate partner header */
.ct-sidebar-client {
    padding: 1.75rem 1.5rem 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(6, 132, 223, 0.05), rgba(41, 240, 204, 0.05));
    border-bottom: 1px solid rgba(11, 37, 103, 0.08);
}

.ct-sidebar-logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 10px;
    padding: 0.65rem 1.1rem;
    box-shadow: 0 2px 12px rgba(11, 37, 103, 0.1);
    margin-bottom: 1rem;
}

.ct-sidebar-logo {
    height: 56px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
}

.ct-sidebar-partner-label {
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--grey);
    margin-bottom: 0.2rem;
}

.ct-sidebar-partner-name {
    font-size: 1.05rem;
    color: var(--dark-blue);
    margin-bottom: 0;
    line-height: 1.3;
}

/* Generic sidebar section (border-top divider) */
.ct-sidebar-section {
    padding: 1.2rem 1.5rem;
    border-top: 1px solid rgba(11, 37, 103, 0.07);
}

.ct-sidebar-summary {
    font-size: 0.9rem;
    color: var(--dark-grey);
    line-height: 1.65;
    margin-bottom: 0;
}

/* Key-value meta rows */
.ct-sidebar-meta-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.88rem;
    color: var(--dark-grey);
}

.ct-sidebar-meta-item + .ct-sidebar-meta-item {
    margin-top: 0.85rem;
}

.ct-sidebar-meta-label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--grey);
    font-size: 0.82rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.ct-sidebar-meta-label svg {
    color: var(--blue);
}

.ct-sidebar-meta-value {
    text-align: right;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Progress bar inside sidebar section */
.ct-inline-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--dark-blue);
    margin-bottom: 0.5rem;
}

.ct-inline-progress-label span {
    font-family: 'Gilroy-Bold', sans-serif;
    color: var(--blue);
}

.ct-inline-progress-track {
    height: 6px;
    border-radius: 50px;
    background: rgba(11, 37, 103, 0.08);
    overflow: hidden;
}

.ct-inline-progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 50px;
    transition: width 0.4s ease;
}

/* Enquiry buttons */
.ct-sidebar-actions {
    padding: 1.2rem 1.5rem;
    border-top: 1px solid rgba(11, 37, 103, 0.07);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.ct-enquire-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.8rem 1.25rem;
    border-radius: var(--border-radius-xl);
    background: var(--primary-gradient);
    color: white;
    font-family: 'Gilroy-Bold', sans-serif;
    font-size: 0.95rem;
    text-decoration: none;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.ct-enquire-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
    color: white;
}

.ct-email-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.65rem 1rem;
    border-radius: var(--border-radius-xl);
    border: 1.5px solid rgba(11, 37, 103, 0.15);
    color: var(--dark-blue);
    font-family: 'Gilroy-Medium', sans-serif;
    font-size: 0.88rem;
    text-decoration: none;
    transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.ct-email-btn:hover {
    border-color: var(--blue);
    background: rgba(6, 132, 223, 0.04);
    color: var(--blue);
}

/* ===========================
   Corporate Training — Pagination
   =========================== */

.ct-pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.ct-pagination-list {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.ct-page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1.5px solid transparent;
    color: var(--dark-grey);
    font-family: 'Gilroy-Medium', sans-serif;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.ct-page-link:hover {
    border-color: var(--dark-blue);
    color: var(--dark-blue);
}

.ct-page-link.active {
    background: var(--dark-blue);
    color: var(--white);
    border-color: var(--dark-blue);
}

/* ===========================
   Responsive
   =========================== */

@media (max-width: 992px) {
    .ct-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ct-detail-layout {
        grid-template-columns: 1fr;
    }

    .ct-detail-sidebar {
        position: static;
        order: -1;
    }

    .ct-hero-title-wrapper {
        font-size: 2.2rem;
    }

    .ct-detail-title {
        font-size: 2rem;
    }

    .ct-detail-hero {
        height: 340px;
    }
}

@media (max-width: 768px) {
    .ct-grid {
        grid-template-columns: 1fr;
    }

    .ct-hero {
        padding: 2rem 0;
    }

    .ct-hero-title-wrapper {
        font-size: 2rem;
    }

    .ct-detail-title {
        font-size: 1.75rem;
    }

    .ct-detail-hero {
        height: 280px;
    }
}

@media (max-width: 576px) {
    .ct-grid-section {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .ct-filter-tabs {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 0.25rem;
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .ct-filter-tabs::-webkit-scrollbar {
        display: none;
    }

    .ct-filter-tab {
        flex-shrink: 0;
    }

    .ct-hero-title-wrapper {
        font-size: 1.7rem;
    }

    .ct-detail-hero {
        height: 220px;
    }

    .ct-detail-title {
        font-size: 1.5rem;
    }

    .ct-detail-article {
        padding: 2rem 0 3rem;
    }
}
