/**
 * Course Archive Page Styles
 * Gateway College
 * 
 * Uses same hero structure as single-course.php
 * Depends on: cpt-isolation.css (loaded first)
 * 
 * @package Gateway_College
 * @since 2.0.0
 */

/* ==============================================
   Hero Section - Same as single-course.php
   ============================================== */

.cpt-scope .gateway-course-hero {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    position: relative;
    overflow: hidden;
    background: var(--gateway-navy, #262474);
    margin-top: -4em !important;
}

.cpt-scope .gateway-hero-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 7fr 3fr;
    gap: 60px;
    min-height: 500px;
    align-items: end;
    position: relative;
}

.cpt-scope .gateway-hero-content {
    z-index: 2;
    position: relative;
    margin-bottom: 40px;
}

.cpt-scope .gateway-hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 0.95;
    color: var(--gateway-white, #ffffff);
    margin-bottom: 32px;
    letter-spacing: -1.5px;
    opacity: 0;
    animation: fadeUp 0.6s ease forwards 0.4s;
}

.cpt-scope .gateway-hero-subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    opacity: 0;
    animation: fadeUp 0.6s ease forwards 0.6s;
}

.cpt-scope .gateway-hero-background {
    position: absolute;
    top: 0;
    right: calc(-50vw + 50%);
    bottom: 0;
    z-index: 1;
    overflow: hidden;
}

.cpt-scope .gateway-hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    pointer-events: none;
}

.cpt-scope .gateway-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(20%);
    position: relative;
    z-index: 1;
}

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

/* ==============================================
   Search Section
   ============================================== */

.cpt-scope .gateway-search-section {
    background: var(--gateway-white, #ffffff);
    padding: 60px 0 40px;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.cpt-scope .gateway-search-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px;
}

/* ==============================================
   Course Archive Content
   ============================================== */

.cpt-scope .gateway-archive-content {
    background: var(--gateway-white, #ffffff);
    padding: 20px 0 60px;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.cpt-scope .gateway-archive-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px;
}

/* ==============================================
   NEW: Course Sections (Diploma & Certificate)
   ============================================== */

.cpt-scope .gateway-course-section {
    padding: 40px 0;
}

.cpt-scope .gateway-section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 32px;
}

.cpt-scope .gateway-diploma-title {
    color: var(--gateway-navy, #262474);
}

.cpt-scope .gateway-certificate-title {
    color: var(--gateway-green-dark, #24906b);
}

/* ==============================================
   Course Grid
   ============================================== */

.cpt-scope .gateway-course-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

/* ==============================================
   Course Card
   ============================================== */

.cpt-scope .gateway-course-card {
    background: var(--gateway-white, #ffffff);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    animation: fadeInCard 0.6s ease forwards;
}

.cpt-scope .gateway-course-card:nth-child(1) { animation-delay: 0.1s; }
.cpt-scope .gateway-course-card:nth-child(2) { animation-delay: 0.2s; }
.cpt-scope .gateway-course-card:nth-child(3) { animation-delay: 0.3s; }
.cpt-scope .gateway-course-card:nth-child(4) { animation-delay: 0.4s; }
.cpt-scope .gateway-course-card:nth-child(5) { animation-delay: 0.5s; }
.cpt-scope .gateway-course-card:nth-child(6) { animation-delay: 0.6s; }

.cpt-scope .gateway-course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.cpt-scope .gateway-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.cpt-scope .gateway-card-image {
    width: 100%;
    height: 200px;
    position: relative;
    overflow: hidden;
}

.cpt-scope .gateway-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.cpt-scope .gateway-course-card:hover .gateway-card-image img {
    transform: scale(1.08);
}

.cpt-scope .gateway-card-content {
    padding: 28px;
}

.cpt-scope .gateway-card-code {
    font-size: 14px;
    font-weight: 700;
    color: var(--gateway-green, #6db460);
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.cpt-scope .gateway-card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gateway-black, #0a0a0a);
    line-height: 1.4;
    margin-bottom: 24px;
}

.cpt-scope .gateway-card-footer {
    padding-top: 20px;
    border-top: 2px solid var(--gateway-gray-100, #f0f0f0);
}

.cpt-scope .gateway-learn-more {
    color: var(--gateway-blue, #1b60aa);
    font-weight: 600;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s ease;
}

.cpt-scope .gateway-course-card:hover .gateway-learn-more {
    gap: 12px;
}

.cpt-scope .gateway-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

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

/* ==============================================
   No Results
   ============================================== */

.cpt-scope .gateway-no-results {
    text-align: center;
    padding: 80px 40px;
    background: var(--gateway-white, #ffffff);
    border-radius: 24px;
}

.cpt-scope .gateway-no-results h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--gateway-black, #0a0a0a);
    margin-bottom: 16px;
}

.cpt-scope .gateway-no-results p {
    font-size: 18px;
    color: var(--gateway-gray-800, #2a2a2a);
}

/* No Results Message (within grid) */
.cpt-scope .gateway-no-results-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background: var(--gateway-white, #ffffff);
    border-radius: 24px;
    margin-bottom: 32px;
}

.cpt-scope .gateway-no-results-message h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gateway-black, #0a0a0a);
    margin-bottom: 12px;
}

.cpt-scope .gateway-no-results-message p {
    font-size: 16px;
    color: var(--gateway-gray-800, #2a2a2a);
}

/* ==============================================
   Pagination
   ============================================== */

.cpt-scope .gateway-pagination {
    margin-top: 60px;
    text-align: center;
}

.cpt-scope .gateway-pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.cpt-scope .gateway-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    background: var(--gateway-white, #ffffff);
    color: var(--gateway-gray-800, #2a2a2a);
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cpt-scope .gateway-pagination .page-numbers:hover {
    background: var(--gateway-navy, #262474);
    color: var(--gateway-white, #ffffff);
    transform: translateY(-2px);
}

.cpt-scope .gateway-pagination .page-numbers.current {
    background: var(--gateway-navy, #262474);
    color: var(--gateway-white, #ffffff);
}

.cpt-scope .gateway-pagination .page-numbers.dots {
    background: transparent;
}

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

@media (max-width: 1200px) {
    .cpt-scope .gateway-hero-wrapper {
        grid-template-columns: 1fr;
        padding: 60px 40px;
        min-height: 600px;
    }

    .cpt-scope .gateway-hero-background {
        right: calc(-50vw + 50%);
        width: calc(40vw + (50vw - 50%));
    }

    .cpt-scope .gateway-hero-title {
        font-size: 48px;
    }

    .cpt-scope .gateway-search-container,
    .cpt-scope .gateway-archive-container {
        padding: 0 40px;
    }

    .cpt-scope .gateway-course-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }
}

@media (max-width: 768px) {
    .cpt-scope .gateway-hero-wrapper {
        grid-template-columns: 1fr;
        padding: 0;
        gap: 0;
        display: flex;
        flex-direction: column;
        min-height: auto;
    }

    .cpt-scope .gateway-hero-background {
        position: relative;
        width: 100%;
        height: 300px;
        order: 1;
        right: 0;
    }

    .cpt-scope .gateway-hero-content {
        order: 2;
        padding: 40px 24px;
        text-align: left;
        width: 100%;
        box-sizing: border-box;
    }

    .cpt-scope .gateway-hero-title {
        font-size: 36px;
        text-align: left;
    }

    .cpt-scope .gateway-hero-subtitle {
        font-size: 18px;
        text-align: left;
    }

    .cpt-scope .gateway-search-container,
    .cpt-scope .gateway-archive-container {
        padding: 0 24px;
    }

    .cpt-scope .gateway-search-section {
        padding: 40px 0 20px;
    }

    .cpt-scope .gateway-archive-content {
        padding: 40px 0 60px;
    }

    .cpt-scope .gateway-course-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .cpt-scope .gateway-card-content {
        padding: 24px;
    }

    .cpt-scope .gateway-card-title {
        font-size: 18px;
    }
    
    .cpt-scope .gateway-section-title {
        font-size: 28px;
        margin-bottom: 24px;
    }
}

@media (max-width: 480px) {
    .cpt-scope .gateway-hero-content {
        padding: 32px 20px;
    }

    .cpt-scope .gateway-hero-title {
        font-size: 32px;
    }

    .cpt-scope .gateway-hero-background {
        height: 250px;
    }

    .cpt-scope .gateway-search-container,
    .cpt-scope .gateway-archive-container {
        padding: 0 20px;
    }

    .cpt-scope .gateway-card-content {
        padding: 20px;
    }
    
    .cpt-scope .gateway-section-title {
        font-size: 24px;
    }
}