/* === COURSES PAGE STYLES (Figma Design) === */

/* Courses Hero Section - Full bleed with background image */
.courses-hero {
    position: relative;
    min-height: 100vh;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Background image layer */
.courses-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.courses-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Dark overlay */
.courses-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(4, 26, 49, 0.60) 0%, rgba(4, 26, 49, 0.75) 100%);
    z-index: 1;
}

/* Dot pattern overlay */
.courses-hero-dots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background-image: radial-gradient(rgba(255, 255, 255, 0.15) 2px, transparent 2px);
    background-size: 58px 58px;
    pointer-events: none;
}

/* Hero content container */
.courses-hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1200px;
    padding: 140px 40px 80px;
    margin: 0 auto;
}

/* Hero text section */
.courses-hero-text {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 48px;
}

.courses-hero-title {
    font-family: 'Onest', sans-serif;
    font-size: 56px;
    font-weight: 400;
    line-height: 1.1;
    color: #FFFFFF;
    margin-bottom: 16px;
}

.courses-hero-subtitle {
    font-family: 'Onest', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.75);
    max-width: 600px;
    margin: 0 auto;
}

/* Category Tabs - Glassmorphism Container */
.courses-tabs-container {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.courses-category-tabs {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 8px;
    border-radius: 20px;
    background: rgba(4, 26, 49, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.courses-category-tab {
    position: relative;
    padding: 16px 40px;
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.courses-category-tab:hover {
    color: rgba(255, 255, 255, 0.8);
}

.courses-category-tab.active {
    color: #FFFFFF;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-top-color: transparent;
    -webkit-box-shadow:
        8px 0 16px -4px rgba(0, 0, 0, 0.4),
        -8px 0 16px -4px rgba(0, 0, 0, 0.4),
        0 8px 16px -4px rgba(0, 0, 0, 0.5),
        inset 0 -1px 1px rgba(255, 255, 255, 0.1),
        inset 1px 0 1px rgba(255, 255, 255, 0.1),
        inset -1px 0 1px rgba(255, 255, 255, 0.1);
    -moz-box-shadow:
        8px 0 16px -4px rgba(0, 0, 0, 0.4),
        -8px 0 16px -4px rgba(0, 0, 0, 0.4),
        0 8px 16px -4px rgba(0, 0, 0, 0.5),
        inset 0 -1px 1px rgba(255, 255, 255, 0.1),
        inset 1px 0 1px rgba(255, 255, 255, 0.1),
        inset -1px 0 1px rgba(255, 255, 255, 0.1);
    box-shadow:
        8px 0 16px -4px rgba(0, 0, 0, 0.4),
        -8px 0 16px -4px rgba(0, 0, 0, 0.4),
        0 8px 16px -4px rgba(0, 0, 0, 0.5),
        inset 0 -1px 1px rgba(255, 255, 255, 0.1),
        inset 1px 0 1px rgba(255, 255, 255, 0.1),
        inset -1px 0 1px rgba(255, 255, 255, 0.1);
}


/* Search & Filters */
.courses-filters {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.courses-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.courses-search-icon {
    position: absolute;
    right: 16px;
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    transition: color 0.3s ease;
}

.courses-search-wrapper:focus-within .courses-search-icon {
    color: rgba(255, 255, 255, 0.8);
}

.courses-search-input {
    width: 400px;
    max-width: 100%;
    padding: 16px 48px 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-top-color: transparent;
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    box-shadow:
        8px 0 16px -4px rgba(0, 0, 0, 0.4),
        -8px 0 16px -4px rgba(0, 0, 0, 0.4),
        0 8px 16px -4px rgba(0, 0, 0, 0.5),
        inset 0 -1px 1px rgba(255, 255, 255, 0.1),
        inset 1px 0 1px rgba(255, 255, 255, 0.1),
        inset -1px 0 1px rgba(255, 255, 255, 0.1);
}


.courses-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.courses-search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.12);
    box-shadow:
        8px 0 16px -4px rgba(0, 0, 0, 0.5),
        -8px 0 16px -4px rgba(0, 0, 0, 0.5),
        0 8px 16px -4px rgba(0, 0, 0, 0.6),
        inset 0 -1px 1px rgba(255, 255, 255, 0.15),
        inset 1px 0 1px rgba(255, 255, 255, 0.15),
        inset -1px 0 1px rgba(255, 255, 255, 0.15);
}

.courses-filter-wrapper {
    position: relative;
}

.courses-filter-dropdown {
    width: 400px;
    max-width: 100%;
    padding: 16px 48px 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-top-color: transparent;
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6,9 12,15 18,9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    transition: all 0.3s ease;
    box-shadow:
        8px 0 16px -4px rgba(0, 0, 0, 0.4),
        -8px 0 16px -4px rgba(0, 0, 0, 0.4),
        0 8px 16px -4px rgba(0, 0, 0, 0.5),
        inset 0 -1px 1px rgba(255, 255, 255, 0.1),
        inset 1px 0 1px rgba(255, 255, 255, 0.1),
        inset -1px 0 1px rgba(255, 255, 255, 0.1);
}

.courses-filter-dropdown:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.12);
    box-shadow:
        8px 0 16px -4px rgba(0, 0, 0, 0.5),
        -8px 0 16px -4px rgba(0, 0, 0, 0.5),
        0 8px 16px -4px rgba(0, 0, 0, 0.6),
        inset 0 -1px 1px rgba(255, 255, 255, 0.15),
        inset 1px 0 1px rgba(255, 255, 255, 0.15),
        inset -1px 0 1px rgba(255, 255, 255, 0.15);
}

.courses-filter-dropdown option {
    background: #1a1a2e;
    color: white;
}

.courses-clear-btn {
    padding: 16px 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.courses-clear-btn:hover {
    color: white;
}

/* Courses Grid Section */
.courses-grid-section {
    padding: 60px 0 80px;
    background: #FFFFFF;
}

.courses-grid-section .container {
    max-width: 1640px;
    padding: 0 40px;
}

/* Courses Grid - 4 columns */
.courses-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 380px));
    gap: 24px;
    justify-content: center;
    margin-bottom: 50px;
}

/* Course Card */
.courses-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.courses-card:hover {
    transform: translateY(-4px);
    box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.3);
}

/* Hidden state for load more functionality */
.courses-card.hidden {
    display: none;
}

/* Card Image Container */
.courses-card-image {
    position: relative;
    width: 100%;
    height: 285px;
    overflow: hidden;
    border-radius: 10px;
}

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

.courses-card:hover .courses-card-image img {
    transform: scale(1.05);
}

/* Tags on image - Frosted glass effect */
.courses-card-tags {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 16px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 0 0 10px 10px;
}

.courses-card-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: 'Onest', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #FFFFFF;
}

.courses-card-tag-icon {
    display: none;
}

/* Card Content */
.courses-card-content {
    padding: 20px 16px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
    text-align: center;
}

.courses-card-category {
    font-family: 'Onest', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #041A31;
    margin-bottom: 8px;
}

.courses-card-title {
    font-family: 'Onest', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: #041A31;
    line-height: 1.4;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.courses-card-footer {
    margin-top: auto;
}

.courses-card-link {
    display: inline-block;
    font-family: 'Onest', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: #2D368F;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: underline;
}

.courses-card-link:hover {
    color: var(--color-primary);
}

/* Legacy button styles (for backwards compatibility) */
.courses-card-btn {
    display: none;
}

.courses-card-readmore {
    display: none;
}

/* Load More Button */
.courses-load-more-wrapper {
    display: flex;
    justify-content: center;
}

.courses-load-more-btn {
    position: relative;
    padding: 14px 36px;
    border: none;
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.85) 0%,
        rgba(248, 250, 252, 0.75) 50%,
        rgba(255, 255, 255, 0.8) 100%
    );
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 2px 12px rgba(0, 0, 0, 0.08),
        inset 0 1px 1px rgba(255, 255, 255, 0.9),
        inset 0 -1px 2px rgba(0, 0, 0, 0.05);
}

.courses-load-more-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(200, 210, 230, 0.4) 40%,
        rgba(180, 190, 210, 0.3) 60%,
        rgba(255, 255, 255, 0.7) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.courses-load-more-btn:hover {
    color: var(--color-secondary);
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(248, 250, 252, 0.9) 50%,
        rgba(255, 255, 255, 0.92) 100%
    );
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 6px 20px rgba(40, 56, 146, 0.12),
        inset 0 1px 2px rgba(255, 255, 255, 1),
        inset 0 -1px 2px rgba(0, 0, 0, 0.05);
}

.courses-load-more-btn:hover::before {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 1) 0%,
        rgba(40, 56, 146, 0.3) 40%,
        rgba(40, 56, 146, 0.2) 60%,
        rgba(255, 255, 255, 0.9) 100%
    );
}

/* Responsive Styles */
@media (max-width: 1280px) {
    .courses-card-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .courses-grid-section .container {
        max-width: 1100px;
    }
}

@media (max-width: 1024px) {
    .courses-hero-title {
        font-size: 48px;
    }

    .courses-hero-content {
        padding: 120px 32px 60px;
    }

    .courses-card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .courses-grid-section .container {
        padding: 0 32px;
    }

    .courses-card-image {
        height: 240px;
    }
}

@media (max-width: 768px) {
    .courses-hero {
        min-height: auto;
    }

    .courses-hero-content {
        padding: 100px 20px 50px;
    }

    .courses-hero-title {
        font-size: 36px;
    }

    .courses-hero-subtitle {
        font-size: 13px;
    }

    .courses-category-tabs {
        gap: 8px;
    }

    .courses-category-tab {
        padding: 10px 18px;
        font-size: 10px;
    }

    .courses-filters {
        flex-direction: column;
        gap: 10px;
    }

    .courses-search-input,
    .courses-filter-dropdown {
        width: 100%;
        max-width: 400px;
    }

    .courses-grid-section {
        padding: 40px 0 60px;
    }

    .courses-grid-section .container {
        padding: 0 20px;
    }
}

@media (max-width: 600px) {
    .courses-card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .courses-hero-title {
        font-size: 32px;
    }

    .courses-card-image {
        height: 220px;
    }

    .courses-card-content {
        padding: 16px 12px 20px;
    }

    .courses-card-category {
        font-size: 14px;
    }

    .courses-card-title {
        font-size: 16px;
    }

    .courses-card-link {
        font-size: 16px;
    }

    .courses-card-tag {
        font-size: 14px;
    }

    .courses-card-tags {
        padding: 12px;
    }
}
