/* Course Specific Styles - Legacy Restored with Refined Spacing */

/* Parallax Sections */
.parallax-section {
    height: 60vh; /* Restored to original scale */
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 0;
    width: 100%;
}

.parallax-content {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    padding: 30px 50px; /* Refined padding */
    border-radius: 15px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.parallax-content h1 {
    font-size: 2.2rem;
    margin-bottom: 8px;
    color: white; /* Maintain white on images */
}

.parallax-content h2 {
    font-size: 1.3rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 3px;
    animation: blink 3s infinite;
    background: none;
    -webkit-text-fill-color: initial;
    padding: 0;
    border: none;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Course Headers (Gradient) */
.course-header {
    border-bottom: solid 1px var(--border-color);
    padding: 20px 5%;
    margin-top: 0;
    margin-bottom: 0;
    background: linear-gradient(90.2deg, var(--bg-gradient-start) -0.4%, var(--bg-gradient-end) 106.1%);
    color: white;
    font-size: 2rem;
}

/* Content Blocks */
.content-block {
    padding: 30px 20px; /* Reduced from 60px */
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
    line-height: 1.8;
}

.content-block h1 {
    color: var(--accent-color);
    margin-bottom: 20px;
}

.content-block h3 {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
}

.content-row {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
    margin-top: 30px; /* Reduced from 40px */
}

.content-col {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    text-align: left;
}

.content-col h1 {
    font-size: 1.8rem;
}

/* Flip Cards */
.flip-card {
    background-color: transparent;
    width: 280px;
    height: 200px;
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner,
.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.flip-card-front {
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    color: white;
    border: 1px solid var(--border-color);
}

.flip-card-back {
    background: var(--bg-card);
    color: var(--text-main);
    transform: rotateY(180deg);
    border: 1px solid var(--accent-color);
}

.flip-card h3 {
    color: white;
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.flip-card-back h3 {
    color: var(--text-main);
}

/* Quiz Section - Legacy Restored & Mini Shrunk */
.quiz-wrapper {
    background: var(--bg-card);
    padding: 20px; /* Refined */
    border-radius: 12px;
    max-width: 550px; /* Reduced further per request */
    margin: 20px auto;
    text-align: left;
    border: 1px solid var(--border-color);
}

.quiz-question {
    display: none;
}

.quiz-question.active {
    display: block;
    animation: fadeIn 0.5s;
}

.quiz-options label {
    display: block;
    background: rgba(0, 0, 0, 0.05);
    padding: 12px 15px; /* Refined */
    margin-bottom: 8px; /* Refined */
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
    color: var(--text-main);
}

body:not(.light-theme) .quiz-options label {
    background: rgba(255, 255, 255, 0.05);
}

.quiz-options label:hover {
    background: rgba(0, 0, 0, 0.1);
}

body:not(.light-theme) .quiz-options label:hover {
    background: rgba(255, 255, 255, 0.1);
}

.quiz-options input {
    margin-right: 10px;
    width: auto;
}

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

/* Agent Response Styles */
.agent-response-good {
    background-color: rgba(0, 200, 100, 0.1);
    padding: 15px;
    border-left: 4px solid #00c864;
    text-align: left;
    margin-bottom: 20px;
    border-radius: 0 8px 8px 0;
    color: var(--text-main);
}

.agent-response-bad {
    background-color: rgba(255, 100, 100, 0.1);
    padding: 15px;
    border-left: 4px solid #ff6464;
    text-align: left;
    margin-bottom: 20px;
    border-radius: 0 8px 8px 0;
    color: var(--text-main);
}

/* --- BRUTE FORCE THEME OVERRIDES FOR LEGACY COURSES --- */
/* This section targets hardcoded inline styles in older HTML files and forces them to adapt to Light Mode */

body.light-theme [style*="color:white"],
body.light-theme [style*="color: white"],
body.light-theme [style*="color:#fff"],
body.light-theme [style*="color: #fff"],
body.light-theme [style*="color:#FFFFFF"],
body.light-theme [style*="color: #FFFFFF"],
body.light-theme [style*="color:rgba(255,255,255"],
body.light-theme [style*="color: rgba(255,255,255"],
body.light-theme [style*="color:rgb(255,255,255"],
body.light-theme [style*="color: rgb(255,255,255"] {
    color: var(--text-main) !important;
}

body.light-theme [style*="color:#ccc"],
body.light-theme [style*="color: #ccc"],
body.light-theme [style*="color:#eee"],
body.light-theme [style*="color: #eee"],
body.light-theme [style*="color:#e0e0e0"],
body.light-theme [style*="color: #e0e0e0"],
body.light-theme [style*="color:rgba(204,204,204"],
body.light-theme [style*="color: rgba(204,204,204"] {
    color: var(--text-muted) !important;
}

/* Force container accessibility for hardcoded translucent backgrounds */
body.light-theme [style*="background:rgba(255,255,255,0.05)"],
body.light-theme [style*="background: rgba(255,255,255,0.05)"],
body.light-theme [style*="background:rgba(255, 255, 255, 0.05)"],
body.light-theme [style*="background: rgba(255, 255, 255, 0.05)"],
body.light-theme [style*="background:rgba(255,255,255,0.1)"] {
    background: rgba(0, 0, 0, 0.03) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* Exception: Parallax Header text should stay bright atop images */
body.light-theme .parallax-content h1,
body.light-theme .parallax-content h1[style*="color"],
body.light-theme .parallax-content h2,
body.light-theme .parallax-content h2[style*="color"],
body.light-theme .parallax-content h3,
body.light-theme .parallax-content h3[style*="color"],
body.light-theme .parallax-content p,
body.light-theme .parallax-content p[style*="color"] {
    color: white !important;
}

body.light-theme .parallax-content h2,
body.light-theme .parallax-content h2[style*="color"] {
    color: var(--accent-color) !important;
}