/* Star Course Page Styles */
:root {
    --glass-bg: rgba(20, 20, 20, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-color: #00e5ff;
    --accent-glow: rgba(0, 229, 255, 0.4);
    --card-bg: rgba(30, 30, 30, 0.4);
}

body {
    background-color: #050505;
    color: #ffffff;
    overflow-x: hidden;
}

/* Wrapper & Canvas */
.star-course-wrapper {
    position: relative;
    min-height: 100vh;
    /* padding-top: 100px;  Removed to allow Hero to take over top space */
    padding-bottom: 60px;
    overflow: hidden;
}

#starry-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none; /* Let clicks pass through */
}

.relative-z {
    position: relative;
    z-index: 1;
}

/* ====================
   Hero Section (Adapted from Materials)
   ==================== */
.star-course-hero {
    position: relative;
    padding: 120px 0 60px; /* Adjusted padding */
    /* background: #000; Remove background to let canvas show */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 600px;
    z-index: 1;
}

/* Overlay Gradient - Optional, to darken canvas for text readability */
.hero-overlay-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 50%, rgba(10,10,10,0.85) 0%, rgba(5,5,5,0.6) 100%);
    z-index: 2;
}

/* Hero Flex Layout */
.hero-flex-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    position: relative;
    z-index: 10;
    width: 100%;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    text-align: left;
}

/* Typography */
.tagline {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    font-size: 14px;
    color: var(--accent-color);
    margin-bottom: 24px;
    border-radius: 50px;
    font-weight: 500;
}

.star-course-hero h1 {
    font-size: 64px;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1px;
    font-weight: 800;
    color: #fff;
}

.star-course-hero h1 .highlight {
    color: transparent;
    background: linear-gradient(90deg, #fff, var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    display: inline;
}

.star-course-hero .description {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    max-width: 650px;
    margin: 0 0 40px;
    line-height: 1.6;
}

/* Hero Visual (Right Side) */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    perspective: 1000px;
}

.glass-showcase-container {
    position: relative;
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    transform-style: preserve-3d;
    transform: rotateY(-8deg) rotateX(2deg);
    transition: transform 0.5s ease-out;
}

.glass-showcase-container:hover {
    transform: rotateY(0deg) rotateX(0deg);
}

.glow-sphere {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.2) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    pointer-events: none;
    animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.7; }
}

/* Module Cards */
.hero-module-card {
    position: relative;
    width: 320px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(18, 18, 24, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 16px 20px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(24px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.hero-module-card:hover {
    transform: translateZ(30px) scale(1.02);
    background: rgba(25, 25, 35, 0.8);
    border-color: rgba(0, 229, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 229, 255, 0.1);
    z-index: 100;
}

.module-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.module-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.module-content h3 {
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.module-content p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.module-action {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.hero-module-card:hover .module-action {
    background: var(--accent-color);
    color: #000;
}

/* Zig-Zag Animation */
.card-1 { align-self: flex-start; margin-left: 10px; animation: float-v-1 6s ease-in-out infinite; }
.card-2 { align-self: flex-end; margin-right: 10px; animation: float-v-2 7s ease-in-out infinite 1s; }
.card-3 { align-self: flex-start; margin-left: 20px; animation: float-v-3 8s ease-in-out infinite 0.5s; }

@keyframes float-v-1 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes float-v-2 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes float-v-3 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* Filter Bar (Existing Styles - kept but adjusted margin) */
.course-filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    margin-top: 40px; /* Add margin top to separate from hero */
}

.filter-left {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-pill {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-pill:hover {
    border-color: var(--accent-color);
    color: #fff;
    box-shadow: 0 0 10px var(--accent-glow);
}

.filter-pill.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #000;
    font-weight: 600;
    box-shadow: 0 0 15px var(--accent-glow);
}

.filter-right {
    flex-grow: 1;
    max-width: 400px;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 5px 5px 5px 20px;
    transition: border-color 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

.search-icon {
    color: rgba(255, 255, 255, 0.4);
    margin-right: 10px;
}

.search-input {
    background: transparent;
    border: none;
    color: #fff;
    flex-grow: 1;
    outline: none;
    font-size: 14px;
}

.search-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    padding: 8px 20px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: var(--accent-color);
    color: #000;
}

/* Sub Filter Bar */
.course-sub-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: -20px;
    margin-bottom: 30px;
    padding: 10px 20px;
    border-left: 4px solid rgba(0, 229, 255, 0.3);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
}

.course-sub-filter-bar .filter-pill {
    padding: 6px 16px;
    font-size: 13px;
}

/* Course Grid */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.course-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(5px);
    position: relative;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 229, 255, 0.1);
}

.card-thumb {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
}

.card-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.course-card:hover .card-thumb img {
    transform: scale(1.1);
}

.badge-booking {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(90deg, #ff9a9e 0%, #fad0c4 99%, #fad0c4 100%);
    color: #000;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.course-card:hover .card-overlay {
    opacity: 1;
}

.btn-detail {
    display: inline-block;
    text-decoration: none;
    background: transparent;
    border: 1px solid #fff;
    color: #fff;
    padding: 8px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-detail:hover {
    background: #fff;
    color: #000;
}

.card-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.course-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-meta {
    margin-top: auto;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 15px;
}

.meta-item i {
    margin-right: 5px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-color);
}

.btn-buy {
    display: inline-block;
    text-decoration: none;
    background: linear-gradient(90deg, var(--accent-color), #00b8d4);
    border: none;
    color: #000;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 229, 255, 0.3);
}

/* Responsive Adjustments */
@media (max-width: 900px) {
    .hero-flex-container {
        flex-direction: column;
        text-align: center;
        padding: 0 20px;
    }
    
    .hero-content {
        max-width: 100%;
        text-align: center;
    }
    
    .hero-visual {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .star-course-hero h1 {
        font-size: 42px;
    }
    
    .course-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-left {
        overflow-x: auto;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-right {
        max-width: none;
    }
}
