/* --- CSS Variables & Global Styles --- */
:root {
    --primary-color: #4f46e5;
    --primary-hover: #3b30a9;
    --background-color: #0b1220;
    --card-background: #1f2937;
    --text-color: #e5e7eb;
    --muted-text: #9ca3af;
    --border-color: #374151;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --font-sans: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* General Reset and Base Styles */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    font-family: var(--font-sans);
    overflow-x: hidden;
}

/* --- Canvas & Animations --- */
#particle-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }
.animate-on-scroll { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

/* --- HEADER (Consistent) --- */
header {
    background-color: rgba(31, 41, 55, 0.9); backdrop-filter: blur(5px);
    border-bottom: 1px solid var(--border-color); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    padding: 15px 20px; display: flex; justify-content: space-between; align-items: center;
    position: sticky; top: 0; z-index: 1000;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand .logo img { width: 40px; height: 40px; }
.site-name { font-size: 1.5rem; font-weight: 800; color: var(--primary-color); }
.tagline { font-size: 0.75rem; color: var(--muted-text); }
nav a {
    text-decoration: none; color: var(--text-color); font-weight: 500;
    padding: 10px 15px; border-radius: 8px; transition: background-color 0.3s, color 0.3s;
}
nav a:hover, nav a.active { background-color: var(--border-color); color: var(--text-color); }

/* --- Main Content & Sections --- */
main { padding: 40px 20px; max-width: 900px; margin: auto; position: relative; z-index: 1; }
section {
    background-color: var(--card-background); padding: 30px; border-radius: 12px;
    margin-bottom: 30px; border: 1px solid var(--border-color);
}
h1, h2, h3 { color: var(--primary-color); }
h1 { font-size: 2.5rem; text-align: center; margin-bottom: 10px; line-height: 1.2; }
h2 { font-size: 1.8rem; margin-bottom: 15px; border-bottom: 2px solid var(--primary-color); display: inline-block; padding-bottom: 5px; }
h3 { font-size: 1.3rem; margin-bottom: 10px; }
p { color: var(--muted-text); margin-bottom: 15px; }
ul { list-style-type: none; padding-left: 0; }
ul li { padding-left: 25px; position: relative; margin-bottom: 10px; color: var(--muted-text); }
ul li::before { content: '✓'; color: var(--primary-color); position: absolute; left: 0; font-weight: bold; }
.subtitle { font-size: 1.1rem; text-align: center; max-width: 700px; margin: 0 auto 30px auto; }
.small { font-size: 0.9rem; color: var(--muted-text); margin-top: 15px; text-align: center; }

/* --- Hero Section --- */
.course-hero { text-align: center; }
.course-hero img { width: 100%; max-height: 400px; object-fit: cover; border-radius: 12px; margin-top: 20px; }

/* --- Buttons --- */
.btn-row { display: flex; gap: 1rem; margin-top: 1rem; flex-wrap: wrap; }
.cta, .btn-ghost, .cta-primary {
    text-decoration: none; text-align: center; border: none; padding: 12px 28px;
    border-radius: 8px; cursor: pointer; font-weight: 600; transition: all 0.3s ease;
}
.cta, .cta-primary { background-color: var(--primary-color); color: #fff; border: 2px solid var(--primary-color); }
.cta:hover, .cta-primary:hover { background-color: var(--primary-hover); border-color: var(--primary-hover); transform: translateY(-3px); }
.btn-ghost { background: transparent; color: var(--primary-color); border: 2px solid var(--primary-color); }
.btn-ghost:hover { background: var(--primary-color); color: #fff; }

/* --- Key Features Section --- */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; text-align: center; }
.feature-item img { width: 50px; height: 50px; margin-bottom: 10px; filter: invert(35%) sepia(58%) saturate(3327%) hue-rotate(231deg) brightness(96%) contrast(94%); }

/* --- Contact Form --- */
.contact-form-container { text-align: center; }
.contact-form-container h3 { border: none; }
.form-group { margin-bottom: 15px; }
.form-group input, .form-group textarea {
    width: 100%; padding: 12px; border: 1px solid var(--border-color); border-radius: 8px;
    background-color: var(--background-color); color: var(--text-color); font-size: 1rem;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2); }

/* --- Popup Modal --- */
#popup { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); justify-content: center; align-items: center; z-index: 2000; }
.popup-content { background: var(--card-background); padding: 30px; border-radius: 16px; text-align: center; max-width: 350px; border: 1px solid var(--border-color); animation: pop 0.3s ease-out; }
.popup-content button { padding: 10px 20px; border: none; border-radius: 8px; background: var(--primary-color); color: #fff; cursor: pointer; }
@keyframes pop { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* --- FOOTER (Consistent) --- */
footer { background-color: var(--card-background); padding: 60px 20px; border-top: 1px solid var(--border-color); position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; max-width: 1200px; margin: 0 auto; }
.footer-about p { color: var(--muted-text); max-width: 400px; margin-top: 15px; }
.social-links { margin-top: 20px; display: flex; gap: 15px; }
.social-links svg { width: 24px; height: 24px; color: var(--muted-text); transition: color 0.3s, transform 0.3s; }
.social-links a:hover svg { color: var(--primary-color); transform: translateY(-3px); }
.footer-links h3, .footer-contact h3 { font-size: 1.2rem; margin-bottom: 15px; color: var(--text-color); }
.footer-links ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-links a, .footer-contact a { text-decoration: none; color: var(--muted-text); transition: color 0.3s; }
.footer-links a:hover, .footer-contact a:hover { color: var(--primary-color); }
.footer-contact p { color: var(--muted-text); margin-bottom: 10px; }
.footer-bottom { text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border-color); color: var(--muted-text); }

@media (max-width: 768px) {
    h1 { font-size: 2rem; } h2 { font-size: 1.5rem; }
    header, .footer-grid { flex-direction: column; text-align: center; }
    nav { margin-top: 15px; justify-content: center; flex-wrap: wrap; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-about, .footer-links, .footer-contact { align-items: center; }
}