/* ===============================================
   TRACK PAGE STYLES (Individual Course Pages)
   Theme: Immersive Dark Mode & Glass
=============================================== */

/* --- 1. TRACK HERO (Aurora) --- */
.page-hero-section {
    position: relative;
    padding: 10rem 0 6rem; /* Balanced spacing */
    text-align: center;
    color: #fff;
    background-color: var(--dark-bg);
    overflow: hidden;
}

.page-hero-section .aurora-background {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
}

.page-hero-section .container {
    position: relative; z-index: 2;
}

.page-hero-section h1 {
    font-size: 3.5rem; font-weight: 800; color: #fff;
    margin-bottom: 1.5rem; line-height: 1.2;
    letter-spacing: -1px;
}

.page-hero-section .lead {
    font-size: 1.2rem; color: #e0e0e0;
    max-width: 800px; margin: 0 auto;
    line-height: 1.6;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* --- 2. WHY CHOOSE US (Fixed Spacing & Glass) --- */
.why-choose-us-section {
    padding: 6rem 0; /* Clean separation from Hero */
    background-color: var(--light-bg);
}

.choose-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.choose-us-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.choose-us-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    border-color: var(--primary-blue);
}

.choose-us-item .item-icon {
    font-size: 3rem; color: var(--primary-blue);
    margin-bottom: 1.5rem; display: inline-block;
}

.choose-us-item h3 {
    font-size: 1.3rem; font-weight: 700;
    margin-bottom: 1rem; color: var(--heading-color);
}

.choose-us-item p {
    font-size: 0.95rem; color: var(--light-subtle-text);
    line-height: 1.7;
}

/* --- 3. COURSE DETAIL CARDS (Aligned Grid) --- */
.course-detail-section {
    padding: 6rem 0;
    background-color: var(--light-card-bg); /* Slight contrast */
    border-top: 1px solid var(--border-color);
}

.section-title-main {
    font-size: 2.5rem; text-align: center; margin-bottom: 3rem;
    color: var(--heading-color); font-weight: 700;
}

.section-title-sub {
    font-size: 1.5rem; color: var(--heading-color);
    margin: 4rem 0 2rem; padding-bottom: 10px;
    border-bottom: 3px solid var(--accent-teal);
    display: inline-block;
}
/* Remove top margin for the first subtitle */
.section-title-sub:first-of-type { margin-top: 0; }

.course-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* THE CARD FIX: Flex Column for Alignment */
.course-detail-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px; padding: 2rem;
    display: flex; flex-direction: column; /* Stacks items vertically */
    height: 100%; /* Forces equal height */
    transition: 0.3s ease;
    position: relative;
}

.course-detail-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: var(--accent-teal);
}

.course-level {
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px;
    color: var(--accent-teal); font-weight: 700; margin-bottom: 10px;
}

.course-detail-card h4 {
    font-size: 1.3rem; margin-bottom: 10px;
    color: var(--heading-color); font-weight: 700; line-height: 1.3;
}

.course-focus {
    font-size: 0.95rem; color: var(--light-subtle-text);
    margin-bottom: 1.5rem; line-height: 1.6;
    flex-grow: 1; /* Pushes content down to fill space */
}

/* Tools Tags */
.course-tools {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1.5rem;
}

.tool-tag {
    font-size: 0.8rem; background: rgba(0,0,0,0.05); color: #555;
    padding: 5px 10px; border-radius: 6px; font-weight: 500;
}

/* BUTTON ALIGNMENT FIX */
.course-card-actions {
    display: flex; gap: 10px;
    margin-top: auto; /* Pushes buttons to the absolute bottom */
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.btn-small {
    padding: 0.7rem 1.2rem; font-size: 0.9rem; flex: 1;
    text-align: center;
}

/* --- 4. COMMITMENT SECTION --- */
.commitment-section {
    padding: 6rem 0; background-color: var(--light-bg);
    border-top: 1px solid var(--border-color);
}
.commitment-section .section-title {
    text-align: center; font-size: 2rem; margin-bottom: 3rem;
}
.commitment-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
    max-width: 1000px; margin: 0 auto;
}
.commitment-item { display: flex; gap: 1.5rem; }
.commitment-icon {
    font-size: 2rem; color: var(--accent-teal); min-width: 40px;
}
.commitment-item h4 { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.5rem; }
.commitment-item p { font-size: 0.95rem; line-height: 1.6; color: var(--light-subtle-text); }

/* --- 5. FINAL CTA (Parallax Tech BG) --- */
.final-cta-section {
    position: relative; padding: 6rem 0; text-align: center; color: #fff;
    /* Use local path relative to CSS file */
    background-image: url('../../images/tech-bg.jpg');
    background-size: cover; background-position: center;
    background-attachment: fixed; /* Parallax */
}
/* Overlay for readability */
.final-cta-section::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10, 20, 35, 0.85); z-index: 1;
}
.final-cta-section .container { position: relative; z-index: 2; }

.cta-card {
    background: rgba(255, 255, 255, 0.1); /* Glass */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px; padding: 3rem;
    max-width: 800px; margin: 0 auto;
    display: flex; align-items: center; gap: 2rem;
    text-align: left;
}
.cta-card-icon {
    font-size: 3rem; color: var(--accent-teal);
    background: rgba(0, 191, 179, 0.1);
    width: 80px; height: 80px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.cta-card-content h3 { font-size: 1.8rem; margin-bottom: 0.5rem; color: #fff; }
.cta-card-content p { font-size: 1rem; color: #ccc; line-height: 1.6; }
.cta-card-action { margin-left: auto; }

/* --- 6. DARK MODE OVERRIDES (Complete) --- */
body.dark-mode .why-choose-us-section,
body.dark-mode .course-detail-section,
body.dark-mode .commitment-section {
    background-color: var(--dark-bg);
}

/* Dark Mode Cards */
body.dark-mode .choose-us-item,
body.dark-mode .course-detail-card {
    background: rgba(255, 255, 255, 0.03); /* Glass */
    backdrop-filter: blur(10px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

body.dark-mode .choose-us-item:hover,
body.dark-mode .course-detail-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-teal);
    box-shadow: 0 10px 40px rgba(0, 191, 179, 0.1);
}

body.dark-mode .choose-us-item h3,
body.dark-mode .course-detail-card h4,
body.dark-mode .section-title-main,
body.dark-mode .section-title-sub,
body.dark-mode .commitment-item h4 {
    color: #fff;
}

body.dark-mode .choose-us-item p,
body.dark-mode .course-focus,
body.dark-mode .commitment-item p {
    color: #b0bec5;
}

body.dark-mode .tool-tag {
    background: rgba(255,255,255,0.1); color: #ccc;
}

/* Syllabus Ghost Button Dark Mode */
.syllabus-btn {
    border: 1px solid var(--border-color); color: var(--primary-blue); background: transparent;
}
body.dark-mode .syllabus-btn {
    border-color: rgba(255,255,255,0.2); color: #ccc;
}
body.dark-mode .syllabus-btn:hover {
    border-color: #fff; color: #fff; background: rgba(255,255,255,0.05);
}

/* --- 7. RESPONSIVE --- */
@media (max-width: 992px) {
    .cta-card { flex-direction: column; text-align: center; padding: 2rem; }
    .cta-card-action { margin: 0; width: 100%; }
    .cta-card-action .btn-primary { width: 100%; }
}

@media (max-width: 768px) {
    .page-hero-section { padding: 8rem 0 4rem; }
    .page-hero-section h1 { font-size: 2.5rem; }
    .why-choose-us-section { padding: 4rem 0; }
    .choose-us-grid, .course-detail-grid, .commitment-grid { grid-template-columns: 1fr; }
    .course-card-actions { flex-direction: column; }
}