:root {
    --bg-color: #f8f9fa;
    --text-color: #212529;
    --card-bg: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --transition: all 0.3s ease;
}

body.dark-mode {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --card-bg: #1e1e1e;
    --glass-bg: rgba(0, 0, 0, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: var(--transition);
    position: relative;
    min-height: 100vh;
}

body.has-bg-image {
    background: transparent;
}

/* Layer 1: Blurred background image behind everything */
body.has-bg-image::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--site-bg-image);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    filter: blur(6px);
    transform: scale(1.05);
    z-index: -2;
}

/* Layer 1b: Dark tint over the blurred bg */
body.has-bg-image::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    z-index: -1;
}

body.dark-mode.has-bg-image::before {
    background: rgba(0, 0, 0, 0.45);
}

/* Layer 2: Every element gets heavy glass blur */
body.has-bg-image .card,
body.has-bg-image .card>div {
    background: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #fff;
}

body.dark-mode.has-bg-image .card,
body.dark-mode.has-bg-image .card>div {
    background: rgba(0, 0, 0, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.has-bg-image nav {
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

body.dark-mode.has-bg-image nav {
    background: rgba(0, 0, 0, 0.3) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.has-bg-image footer {
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

body.dark-mode.has-bg-image footer {
    background: rgba(0, 0, 0, 0.3) !important;
}

body.has-bg-image section {
    background-color: transparent !important;
    background: transparent !important;
}

/* Glassmorphism on all container-level elements */
body.has-bg-image .container>.card,
body.has-bg-image .grid,
body.has-bg-image form,
body.has-bg-image table,
body.has-bg-image .hero-carousel {
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

/* Force white text everywhere */
body.has-bg-image,
body.has-bg-image .nav-links a,
body.has-bg-image .logo,
body.has-bg-image h1,
body.has-bg-image h2,
body.has-bg-image h3,
body.has-bg-image h4,
body.has-bg-image p,
body.has-bg-image span,
body.has-bg-image small,
body.has-bg-image label,
body.has-bg-image td,
body.has-bg-image th,
body.has-bg-image li,
body.has-bg-image a,
body.has-bg-image div {
    color: #ffffff;
}

body.has-bg-image .nav-links a:hover {
    color: var(--primary-color);
}

body.has-bg-image .btn-primary {
    background-color: var(--primary-color);
    color: white;
}

body.has-bg-image .btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

body.has-bg-image input,
body.has-bg-image textarea,
body.has-bg-image select {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}

body.has-bg-image input::placeholder,
body.has-bg-image textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

h1,
h2,
h3 {
    font-family: 'Outfit', sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

nav {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

.hero {
    padding: 8rem 0;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.hero p {
    font-size: 1.25rem;
    position: relative;
    z-index: 2;
}

.hero .btn {
    position: relative;
    z-index: 2;
    margin-top: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    filter: brightness(1.2);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 4rem 0;
}

.card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1rem;
}

footer {
    background-color: var(--card-bg);
    padding: 4rem 0;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.alert {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    text-align: center;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: var(--transition);
}

@media (max-width: 768px) {

    html,
    body {
        overflow-x: hidden;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        height: 100vh;
        width: 100%;
        background: rgba(0, 0, 0, 0.92);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.35s ease, visibility 0.35s ease;
        z-index: 999;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-links a {
        color: #ffffff !important;
        font-size: 1.4rem;
        font-weight: 600;
    }

    .nav-links a:hover {
        color: var(--primary-color) !important;
    }

    .menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .menu-toggle.open span {
        background-color: #fff;
    }

    .menu-toggle.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.open span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.open span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .grid {
        grid-template-columns: 1fr;
    }
}

/* Language Switcher Styles */
.lang-dropdown {
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    list-style: none;
    padding: 0.5rem 0;
    min-width: 150px;
    display: none;
    z-index: 1000;
}

.lang-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0 !important;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--text-color) !important;
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown-menu a:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary-color) !important;
}

/* Markdown Styles */
.blog-content h1,
.blog-content h2,
.blog-content h3 {
    margin: 1.5rem 0 1rem;
}

.blog-content ul,
.blog-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.blog-content li {
    margin-bottom: 0.5rem;
}

.blog-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    font-style: italic;
    margin: 1rem 0;
    color: #666;
}

.blog-content pre {
    background: #f4f4f4;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
}

body.dark-mode .blog-content pre {
    background: #2d2d2d;
}

.blog-content code {
    background: rgba(0, 0, 0, 0.05);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
}

body.dark-mode .blog-content code {
    background: rgba(255, 255, 255, 0.1);
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1rem 0;
}

/* =========================================
   Course Detail Page Sytles
   ========================================= */

.course-page-wrapper {
    padding-bottom: 4rem;
}

/* Course Hero */
.course-hero {
    position: relative;
    background: #1a1a1a;
    color: white;
    padding: 6rem 0 4rem;
    margin-bottom: 3rem;
    overflow: hidden;
}

.course-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.6));
    z-index: 1;
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    filter: blur(4px);
    opacity: 0.6;
    z-index: 0;
}

.course-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.course-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.course-meta {
    font-size: 1.1rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge-accent {
    background-color: var(--primary-color);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 1rem;
}

/* Main Layout */
.course-container {
    padding-top: 0;
    /* Override container padding if needed */
}

.course-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    /* Main content vs Sidebar */
    gap: 3rem;
}

.course-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-color);
}

.section-title i {
    color: var(--primary-color);
}

.course-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    opacity: 0.9;
}

/* Highlight Box (What you will learn) */
.highlight-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.learning-points {
    display: grid;
    gap: 0.8rem;
}

/* Program & Certification */
.program-section {
    margin-bottom: 2rem;
}

.certification-box {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 1.5rem;
    background: var(--card-bg);
    /* Or a subtle variant */
    border-radius: 12px;
    border: 1px dashed rgba(0, 0, 0, 0.2);
    margin-bottom: 2rem;
    /* Separates it from the element below (Registration) */
}

.certification-icon {
    font-size: 2rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.certification-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.certification-content .blog-content {
    font-size: 0.95rem;
    opacity: 0.9;
}

.course-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.card-box {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.card-box.compact {
    padding: 1rem 1.25rem;
}

.card-box.compact .card-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.card-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.card-title i {
    color: var(--secondary-color);
}

/* Sidebar & Form */
.course-sidebar {
    position: relative;
}

.sticky-top {
    position: sticky;
    top: 100px;
    /* Adjust based on navbar height */
}

.registration-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border-top: 5px solid var(--primary-color);
}

.price-tag {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.price-tag .currency {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    opacity: 0.7;
}

.form-instruction {
    margin-bottom: 2rem;
    opacity: 0.8;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    transition: all 0.2s;
    font-family: inherit;
    background: var(--bg-color);
}

.form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-lg {
    padding: 1rem;
    font-size: 1.1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
}

.security-note {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.6;
}

.course-image-mobile {
    display: none;
    margin-bottom: 2rem;
}

.course-image-mobile img {
    width: 100%;
    border-radius: 12px;
}

/* Responsive */
@media (max-width: 900px) {
    .course-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .course-image-mobile {
        display: block;
    }

    .course-hero {
        padding: 4rem 0 3rem;
    }

    .course-title {
        font-size: 2.2rem;
    }

    .course-grid-2 {
        grid-template-columns: 1fr;
    }

    .registration-card {
        padding: 1.5rem;
    }
}