/* ============================================
   TRAINING & CEP PAGES - Distinct Professional Designs
   Each page has its own visual identity
   ============================================ */

/* ============================================
   TRAINING PAGE - Logo Theme (Black, Red, Yellow)
   Borneo Smartskill Academy brand colors
   ============================================ */
:root {
    --logo-black: #0f0f0f;
    --logo-red: #c41e3a;
    --logo-red-dark: #9e1830;
    --logo-yellow: #eab308;
    --logo-yellow-light: #fbbf24;
}

body.training-page {
    background: linear-gradient(180deg, #fafafa 0%, #f5f5f5 100%);
    overflow-x: hidden;
}

/* Training Hero - Logo theme: Black base, Red & Yellow accents */
body.training-page .training-hero {
    background: linear-gradient(155deg, #0f0f0f 0%, #1a1a1a 40%, #262626 70%, #0f0f0f 100%);
    position: relative;
}

body.training-page .training-hero::before {
    background: linear-gradient(90deg, transparent 0%, var(--logo-red) 30%, var(--logo-yellow) 50%, var(--logo-red) 70%, transparent 100%);
    height: 5px;
}

body.training-page .training-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
    z-index: 0;
}

body.training-page .training-hero .training-hero-content::before {
    background-image: none;
}

body.training-page .training-hero-accent {
    color: var(--logo-red);
}

body.training-page .training-hero-accent::after {
    background: linear-gradient(90deg, var(--logo-red), var(--logo-yellow));
}

body.training-page .training-hero-badge {
    border: 1px solid rgba(234, 179, 8, 0.4);
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.15) 0%, rgba(234, 179, 8, 0.08) 100%);
    backdrop-filter: blur(12px);
}

body.training-page .training-hero-badge::before {
    background: var(--logo-yellow);
    box-shadow: 0 0 12px rgba(234, 179, 8, 0.5);
}

body.training-page .training-hero-subtitle {
    color: rgba(255,255,255,0.85);
}

/* Training Cards - Clean professional cards */
body.training-page .training-list::before {
    background: transparent;
}

body.training-page .course {
    border-left-color: var(--logo-red);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(0,0,0,0.04);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-left-width: 5px;
}

body.training-page .course::before {
    display: none;
}

body.training-page .course:hover {
    border-color: rgba(196, 30, 58, 0.3);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(0,0,0,0.06);
}

body.training-page .course:nth-child(even) {
    border-right-color: var(--logo-red);
    border-left-width: 1px;
    border-right-width: 5px;
}

body.training-page .course-left img {
    border-radius: 10px 0 0 10px;
    border: none;
}

body.training-page .course:nth-child(even) .course-left img {
    border-radius: 0 10px 10px 0;
}

body.training-page .vertical-line {
    background: linear-gradient(180deg, var(--logo-red), var(--logo-yellow));
}

/* Meta strip (Duration, Venue, HRD info) */
body.training-page .course-right > p:first-of-type {
    background: linear-gradient(135deg, #fef7f6 0%, #fef2f0 100%);
    padding: 14px 18px;
    border-radius: 8px;
    border-left: 3px solid var(--logo-red);
    font-size: 13px;
    line-height: 1.7;
    color: #475569;
    margin-bottom: 20px;
}

body.training-page .course-right h2 {
    color: var(--logo-red);
    padding-left: 14px;
    border-left: 3px solid var(--logo-red);
    font-size: 0.9rem;
}

body.training-page .course-right a[href*="Brochure"],
body.training-page .course-right a[style*="color: #1c244b"] {
    color: var(--logo-red) !important;
}

body.training-page .course-right a[href*="Brochure"]:hover,
body.training-page .course-right a[style*="color: #1c244b"]:hover {
    color: var(--logo-red-dark) !important;
}

body.training-page #read-more-btn,
body.training-page #read-more-btn-2 {
    color: var(--logo-red) !important;
}

body.training-page #read-more-btn:hover,
body.training-page #read-more-btn-2:hover {
    color: var(--logo-red-dark) !important;
}

body.training-page .btn.clr {
    background: var(--primary);
}

body.training-page .btn.clr:hover {
    background: var(--primary-dark);
}

/* All buttons same style as Enroll Now (logo red) */
body.training-page .btn-group .btn {
    background: linear-gradient(135deg, var(--logo-red) 0%, var(--logo-red-dark) 100%);
    color: #fff !important;
    border: none;
    box-shadow: 0 2px 8px rgba(196, 30, 58, 0.35);
}

body.training-page .btn-group .btn:hover {
    background: linear-gradient(135deg, var(--logo-red-dark) 0%, #7a1328 100%);
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(196, 30, 58, 0.4);
}

/* ============================================
   CEP PAGE - Teal/Emerald Theme
   Growth, Continuing Education, Development
   ============================================ */
body.cep-page {
    background: linear-gradient(135deg, #fef7f6 0%, #fef2f0 25%, #fce7e5 50%, #fef2f0 75%, #fef7f6 100%);
    background-size: 400% 400%;
    animation: cepBgFlow 22s ease infinite;
    overflow-x: hidden;
}

@keyframes cepBgFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* CEP Hero - Dark Red/Burgundy */
body.cep-page .training-hero {
    background: linear-gradient(155deg, #1a1514 0%, #2c1f1e 30%, #3d2522 60%, #1a1514 100%);
}

body.cep-page .training-hero::before {
    background: linear-gradient(90deg, 
        transparent 0%, var(--brand-primary) 20%, var(--brand-light) 50%, var(--brand-primary) 80%, transparent 100%);
}

body.cep-page .training-hero::after {
    background: radial-gradient(
        ellipse 80% 60% at 50% 0%,
        rgba(180, 74, 63, 0.15) 0%,
        rgba(180, 74, 63, 0.04) 40%,
        transparent 70%
    );
}

body.cep-page .training-hero .training-hero-content::before {
    background-image: 
        linear-gradient(rgba(180, 74, 63, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(180, 74, 63, 0.05) 1px, transparent 1px);
}

body.cep-page .training-hero-accent {
    color: var(--brand-light);
}

body.cep-page .training-hero-accent::after {
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-light));
}

body.cep-page .training-hero-badge {
    border-color: rgba(214, 90, 79, 0.35);
}

body.cep-page .training-hero-badge::before {
    background: var(--brand-light);
    box-shadow: 0 0 8px rgba(214, 90, 79, 0.6);
}

/* CEP Cards - Workshop style: vertical layout, image banner on top, soft rounded */
body.cep-page .training-list::before {
    background: repeating-linear-gradient(-30deg, transparent, transparent 100px, rgba(180, 74, 63, 0.04) 100px, rgba(180, 74, 63, 0.04) 200px);
}

body.cep-page .course {
    flex-direction: column;
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(139, 58, 50, 0.08), 0 0 0 1px rgba(180, 74, 63, 0.08);
}

body.cep-page .course:hover {
    box-shadow: 0 20px 50px rgba(180, 74, 63, 0.15), 0 0 0 1px rgba(180, 74, 63, 0.12);
}

body.cep-page .course:nth-child(even) {
    flex-direction: column;
}

/* CEP: Image as full-width banner on top */
body.cep-page .course-left {
    flex: none;
    max-width: 100%;
    width: 100%;
    min-height: 220px;
    aspect-ratio: 21/9;
}

body.cep-page .course-left img {
    border-radius: 0;
}

body.cep-page .course:hover .course-left img {
    transform: scale(1.03);
}

/* CEP: Horizontal divider instead of vertical line */
body.cep-page .vertical-line {
    width: 100%;
    height: 4px;
    min-height: 4px;
    background: linear-gradient(90deg, transparent, var(--brand-primary), var(--brand-light), transparent);
}

/* CEP: Content area with soft red top border */
body.cep-page .course-right {
    position: relative;
}

body.cep-page .course-right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(180, 74, 63, 0.3), transparent);
}

body.cep-page .course-right h2 {
    color: var(--brand-dark);
    border-left: none;
    padding-left: 0;
}


body.cep-page .course-right a[href*="Brochure"],
body.cep-page .course-right a[style*="color: #1c244b"] {
    color: var(--brand-primary) !important;
}

body.cep-page .course-right a[href*="Brochure"]:hover,
body.cep-page .course-right a[style*="color: #1c244b"]:hover {
    color: var(--brand-dark) !important;
}

body.cep-page #read-more-btn,
body.cep-page #read-more-btn-2 {
    color: var(--brand-primary) !important;
}

body.cep-page #read-more-btn:hover,
body.cep-page #read-more-btn-2:hover {
    color: var(--brand-dark) !important;
}

body.cep-page .btn.clr {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-dark));
}

body.cep-page .btn.clr:hover {
    background: linear-gradient(135deg, var(--brand-dark), var(--brand-primary));
}

body.cep-page .btn.btn-dark-blue {
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
}

body.cep-page .btn.btn-dark-blue:hover {
    background: linear-gradient(135deg, #3d3d3d 0%, #2c2c2c 100%);
}

/* ============================================
   SHARED - Hero & Card Structure
   ============================================ */
.training-hero {
    padding: 120px 24px 100px;
    position: relative;
    overflow: hidden;
}

.training-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    z-index: 1;
}

.training-hero::after {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 120%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.training-hero .training-hero-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    background-size: 48px 48px;
    pointer-events: none;
    z-index: -1;
}

.training-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
    animation: trainingHeroFadeIn 0.8s ease-out forwards;
}

@keyframes trainingHeroFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.training-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    border-radius: 6px;
    margin-bottom: 28px;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

.training-hero-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.training-hero-content h1 {
    font-size: clamp(42px, 6.5vw, 60px);
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 20px 0;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.training-hero-accent {
    position: relative;
    display: inline-block;
}

.training-hero-accent::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 2px;
    opacity: 0.7;
}

.training-hero-subtitle {
    font-size: clamp(17px, 2.2vw, 20px);
    color: rgba(255,255,255,0.75);
    margin: 0;
    line-height: 1.75;
    font-weight: 400;
}

/* Training List */
.training-list {
    padding: 80px 24px 100px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.training-list::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
}

.course {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-bottom: 60px;
    scroll-margin-top: 140px;
    background: #ffffff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 2px solid transparent;
    border-left: 4px solid;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(40px);
}

.course.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.course:hover {
    transform: translateY(-6px);
}

.course:nth-child(even) {
    flex-direction: row-reverse;
    border-left: none;
    border-right: 4px solid;
}

.course-left {
    flex: 0 0 38%;
    max-width: 38%;
    min-width: 0;
    min-height: 320px;
    overflow: hidden;
}

.course-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.course:hover .course-left img {
    transform: scale(1.05);
}

.vertical-line {
    width: 4px;
    min-height: 100%;
    flex-shrink: 0;
}

.course:nth-child(even) .vertical-line {
    order: -1;
}

.course-right {
    flex: 1;
    min-width: 0;
    padding: 40px 44px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.course-right h1 {
    font-size: clamp(22px, 2.8vw, 28px);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    line-height: 1.3;
}

.course-right h2 {
    font-size: 1rem;
    font-weight: 600;
    margin: 20px 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.course-right p {
    font-size: 15px;
    line-height: 1.75;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
}

.course-right ul {
    margin: 8px 0 16px 0;
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
}

.course-right ul li {
    margin-bottom: 6px;
}

.course-right a[href*="Brochure"],
.course-right a[style*="color: #1c244b"] {
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.course-right a[href*="Brochure"]:hover,
.course-right a[style*="color: #1c244b"]:hover {
    text-decoration: underline;
}

#read-more-btn,
#read-more-btn-2 {
    font-weight: 600;
    transition: color 0.2s ease;
}

/* Buttons */
.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
    max-width: 100%;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
}

.btn.clr {
    color: #fff !important;
    box-shadow: var(--shadow-sm);
}

.btn.clr:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn.btn-dark-blue {
    color: #fff !important;
    box-shadow: var(--shadow-sm);
}

.btn.btn-dark-blue:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    /* Training: switch to column */
    body.training-page .course,
    body.training-page .course:nth-child(even) {
        flex-direction: column;
        border-left: 4px solid var(--logo-red) !important;
        border-right: none !important;
    }

    body.training-page .course-left {
        flex: none;
        max-width: 100%;
        min-height: 280px;
        aspect-ratio: 16/10;
    }

    body.training-page .course-left img {
        border-radius: 8px 8px 0 0;
    }

    body.training-page .vertical-line {
        width: 100%;
        height: 4px;
        min-height: 4px;
        background: linear-gradient(90deg, var(--logo-red), var(--logo-yellow));
    }

    /* CEP: already column, adjust image height */
    body.cep-page .course-left {
        min-height: 200px;
        aspect-ratio: 21/8;
    }

    body.cep-page .vertical-line {
        width: 100%;
        height: 4px;
        min-height: 4px;
        background: linear-gradient(90deg, transparent, var(--brand-primary), var(--brand-light), transparent);
    }

    .course-right {
        padding: 32px 28px;
    }
}

@media (max-width: 768px) {
    .training-hero {
        padding: 100px 20px 80px;
    }

    .training-list {
        padding: 50px 16px 80px;
        overflow-x: hidden;
    }

    .course {
        margin-bottom: 40px;
    }

    .course-right {
        padding: 28px 20px;
    }

    .course-right h1 {
        font-size: 20px;
    }

    .course-right p,
    .course-right ul {
        font-size: 14px;
    }

    .btn-group {
        flex-direction: column;
        margin-top: 20px;
        width: 100%;
    }

    .btn-group .btn {
        width: 100%;
        max-width: 100%;
        margin: 0;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    .course-left {
        min-height: 220px;
    }
}
