:root {
    /* --- COLOR SYSTEM (Light Mode Default) --- */
    --pda-bg-body: #f8fafc;
    --pda-bg-surface: #ffffff;
    --pda-bg-surface-alt: #f1f5f9;
    --pda-text-primary: #1e293b;
    --pda-text-secondary: #64748b;
    --pda-border-color: #e2e8f0;
    --pda-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --pda-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);

    /* Colors */
    --primary: #0066FF;
    --primary-dark: #005ce6;
    --primary-light: #e6f0ff;
    --secondary: #2E3A59;
    --accent: #00C853;
    /* Success Green */
    --background: var(--pda-bg-body);
    /* Mapped to new system */
    --surface: var(--pda-bg-surface);
    /* Mapped to new system */
    --text-main: var(--pda-text-primary);
    /* Mapped to new system */
    --text-muted: var(--pda-text-secondary);
    /* Mapped to new system */
    --border: var(--pda-border-color);
    /* Mapped to new system */

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-xxl: 48px;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-round: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-float: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* --- DARK MODE OVERRIDES (90% Black Gray) --- */
body.pda-dark-mode {
    --pda-bg-body: #1a1a1a;
    /* 90% Black Gray */
    --pda-bg-surface: #242424;
    /* Slightly lighter surface */
    --pda-bg-surface-alt: #2e2e2e;
    /* Alt surface */
    --pda-text-primary: #f5f5f5;
    /* Near white */
    --pda-text-secondary: #a3a3a3;
    /* Neutral gray */
    --pda-border-color: #333333;
    /* Dark border */
    --pda-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --pda-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);

    /* Update Mappings */
    --background: var(--pda-bg-body);
    --surface: var(--pda-bg-surface);
    --text-main: var(--pda-text-primary);
    --text-muted: var(--pda-text-secondary);
    --border: var(--pda-border-color);
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

a:not(.btn):hover {
    color: var(--pda-primary) !important;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Utilities */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 12px !important;
    /* Force rounded corners against Theme overrides */
    /* Rounded pill shape */
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: transform 0.1s active, box-shadow 0.2s;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    /* Removed large shadow for institutional look */
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: white !important;
    /* Ensure text visible on hover */
}

.btn-secondary {
    background-color: var(--pda-bg-surface);
    /* Updated to new variable */
    color: var(--pda-text-primary);
    border: 1px solid var(--pda-border-color);
}

border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: var(--primary-light);
    border-color: var(--primary);
}

.btn-outline {
    border: 1px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-whatsapp-outline {
    color: #128C7E;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #128C7E;
    border-radius: 50px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.btn-whatsapp-outline:hover {
    background-color: #E0F2F1;
}

.btn-whatsapp-outline svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.125rem;
    width: 100%;
}

.btn-block {
    width: 100%;
    display: flex;
}

@media (min-width: 640px) {
    .btn-lg {
        width: auto;
    }
}

.pulse {
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 102, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(0, 102, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 102, 255, 0);
    }
}

/* Header */
/* Header styles removed to avoid theme conflict */

/* Hero */
.hero {
    padding: var(--spacing-xl) 0;
    /* Reduced from xxl */
    text-align: center;
}

.badge-hero {
    display: inline-block;
    background-color: var(--primary-light);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 12px;
    /* Reduced from round */
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

.hero h1 {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
}

.hero-sub {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--text-main);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    /* Clean look */
    padding: 6px 12px;
    border-radius: 6px;
    /* Removed shadow */
    border: 1px solid var(--border);
    font-weight: 500;
}

@media (min-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
}

/* Filters */
/* Filters (Catalog Style) */
.filters-section {
    position: sticky;
    top: 60px;
    /* Adjusted to sit just below header */
    background: var(--background);
    z-index: 90;
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid #e5e7eb;
}

.filters-scroll {
    display: flex;
    gap: 24px;
    /* Increased gap for clear separation */
    overflow-x: auto;
    padding-bottom: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    align-items: center;
}

.filters-scroll::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    background: none;
    border: none;
    padding: 8px 0;
    font-size: 1rem;
    color: #6b7280;
    /* Text muted */
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    transition: color 0.2s;
    border-radius: 0;
    /* No radius */
}

.filter-btn:hover {
    color: var(--primary);
}

.filter-btn.active {
    background: none;
    color: var(--primary);
    font-weight: 600;
    border: none;
}

.filter-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    /* Align with container border */
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
}

/* Ads */
.ad-container {
    margin: var(--spacing-lg) auto;
}

.ad-slot {
    background-color: #eee;
    min-height: 250px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
}

.ad-slot-feed {
    grid-column: 1 / -1;
    background-color: #eee;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    margin: var(--spacing-md) 0;
    position: relative;
}

.ad-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    background: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Course Grid */
.course-list {
    padding-bottom: var(--spacing-xxl);
}

.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
}

@media (min-width: 640px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Cards */
.course-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #FFE082;
    color: #664d03;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
}

.card-badge.popular {
    background: #FFCDD2;
    color: #B71C1C;
}

.badge-success {
    background-color: var(--accent);
    color: white;
}

.platform-badge {
    display: inline-block;
    background-color: var(--secondary);
    color: white;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    box-shadow: var(--shadow-sm);
}

.card-header {
    margin-bottom: var(--spacing-md);
}

.category-tag {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 4px;
}

.course-title {
    font-size: 1.25rem;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-meta {
    margin-bottom: var(--spacing-lg);
    color: var(--text-muted);
    font-size: 0.875rem;
    flex-grow: 1;
}

.course-meta li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.card-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-direction: column;
    margin-top: auto;
}

@media (min-width: 400px) {
    .card-actions {
        flex-direction: row;
    }

    .card-actions .btn {
        flex: 1;
        padding: 10px;
        /* Compress slightly if 2 buttons */
        font-size: 0.9rem;
    }
}

.load-more-container {
    text-align: center;
    margin-top: var(--spacing-xl);
}

.btn-wide {
    width: 100%;
}

@media (min-width: 640px) {
    .btn-wide {
        width: auto;
        min-width: 200px;
    }
}

/* Footer */
.site-footer {
    background: white;
    border-top: 1px solid var(--border);
    padding: var(--spacing-xl) 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-links {
    margin-top: var(--spacing-md);
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
}

.footer-links a:hover {
    color: var(--primary);
}

/* =========================================
   AI Tutor Styles
   ========================================= */
.ai-tutor-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.27);
    border: none;
    color: white;
}

.ai-tutor-fab:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.5);
}

.ai-tutor-fab svg {
    width: 32px;
    height: 32px;
}

/* Chat Container */
.ai-chat-container {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 350px;
    height: 500px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
}

.ai-chat-container.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* Header */
.chat-header {
    background: #4f46e5;
    color: white;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-title {
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-chat {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.close-chat:hover {
    color: white;
}

/* Messages Area */
.chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
    position: relative;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.ai {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 2px;
    align-self: flex-start;
    color: #1e293b;
}

.message.user {
    background: #4f46e5;
    color: white;
    border-bottom-right-radius: 2px;
    align-self: flex-end;
}

/* Input Area */
.chat-input-area {
    padding: 16px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 8px;
}

.chat-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input:focus {
    border-color: #4f46e5;
}

.send-btn {
    background: #4f46e5;
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.send-btn:hover {
    background: #4338ca;
}

.send-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 4px 8px;
    background: #e2e8f0;
    border-radius: 12px;
    width: fit-content;
    display: none;
    /* Hidden by default */
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #64748b;
    border-radius: 50%;
    animation: typing 1s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

/* =========================================
   Course Page Redesign (Mobile-First)
   ========================================= */

/* =========================================
   Course Page Redesign (Mobile-First)
   ========================================= */

.course-hero {
    background-color: transparent;
    /* Card Background */
    color: var(--text-main);
    padding: 24px 0;
    text-align: left;
    border: none;
    border-radius: 0;
    margin: 16px 16px 0 16px;
    box-shadow: none;
}

.course-hero .container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Tighter spacing */
}

/* Removed hero-badge per request */
.hero-badge {
    display: none;
}

.course-hero h1 {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    margin: 0 0 16px 0;
    line-height: 1.2;
    border-bottom: 2px solid var(--pda-border-color);
    /* Updated */
    padding-bottom: 12px;
    width: 100%;
}

.hero-platform {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Glass Panels -> Clean Info Grid */
.glass-panel {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.glass-panel svg {
    color: var(--primary);
    /* Primary blue icons */
    width: 20px;
    height: 20px;
}

/* Content Sections */
.course-content {
    padding: 24px 16px;
    background: transparent;
    /* Force transparent */
}

/* Ensure images don't have white backgrounds */
.feature-image-container,
.course-content img {
    background-color: transparent !important;
}

.content-card {
    background-color: transparent;
    border: none;
    border-radius: 0;
    padding: 24px 0;
    margin-bottom: 24px;
    box-shadow: none;
}

/* Section Title rules moved to bottom of file */

/* Feature Box (Green) */
/* Feature Box (Green) - Default Light */
.feature-box {
    background: var(--pda-bg-surface-alt);
    border: 1px solid var(--pda-border-color);
    border-radius: 12px;
    padding: 16px;
}

.feature-quote {
    color: var(--pda-text-primary) !important;
}

/* Check List Items */
.check-list-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: var(--pda-bg-surface);
    /* Updated */
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--pda-border-color);
    /* Updated */
}

.check-list-item svg {
    color: #10b981;
    /* Green-500 */
    flex-shrink: 0;
    margin-top: 2px;
}

.check-list-item span {
    font-size: 0.95rem;
    color: var(--pda-text-primary);
    /* Updated */
    line-height: 1.5;
}

/* Desktop Fixes */
@media (min-width: 1024px) {
    .course-hero {
        margin: 24px auto 0 auto;
        max-width: 1200px;
        position: relative;
        /* Changed from sticky to relative */
        top: 0;
        z-index: 10;
    }
}

/* =========================================
   Single Course Content Cards
   ========================================= */
.content-card {
    background: transparent !important;
    border: none !important;
    border-radius: 0;
    padding: 24px 0;
    margin-bottom: 24px;
    box-shadow: none !important;
    width: 100%;
    display: block;
    box-sizing: border-box;
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: var(--pda-text-primary);
    /* Updated */
    margin-bottom: 24px;
}

/* Glass Panel Items (Grid) - Fix Separators */
.glass-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 2px solid var(--pda-border-color);
    /* Updated to 2px as requested */
    padding-bottom: 12px;
    margin-bottom: 12px;
    width: 100%;
}

.glass-panel:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Force specific border color in Dark Mode as requested */
body.pda-dark-mode .glass-panel {
    border-color: #334155 !important;
}

/* Merged into final rule below */

.feature-box {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 16px;
}

.course-content {
    background-color: transparent;
    /* Fixed from #FFFFFF */
    padding: 32px 0;
}

.course-content p,
.course-content li,
.course-content div {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    line-height: 1.7;
    color: inherit;
    /* Allow parent variable to control color */
}

.section-title svg {
    display: block !important;
    min-width: 24px !important;
    width: 24px !important;
    height: 24px !important;
    color: var(--primary) !important;
    stroke: var(--primary) !important;
    fill: none !important;
    stroke-width: 2px !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.meta-value {
    font-weight: 600;
    color: #111827;
}

/* =========================================
   Glass Panel / Meta Grid Styling (Enhanced)
   ========================================= */
/* =========================================
   Glass Panel / Meta Grid Styling (Enhanced)
   ========================================= */
.glass-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    /* Reduced from 16px */
    padding: 12px 0;
    /* Reduced from 20px */
    border-bottom: 1px solid #e5e7eb;
    font-family: 'Outfit', sans-serif !important;
    /* Match Title Font */
}

.glass-panel:last-child {
    border-bottom: none;
}

/* Label styling inside glass panel - Target the first div inside the text wrapper */
.glass-panel>div>div:first-child {
    font-family: 'Outfit', sans-serif !important;
    /* Match Title Font */
    font-size: 1rem !important;
    opacity: 0.9 !important;
    margin-bottom: 4px;
    font-weight: 500;
}

/* Value styling */
.meta-value {
    font-family: 'Outfit', sans-serif !important;
    /* Match Title Font */
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    color: #1f2937;
    margin-top: 2px;
    line-height: 1.2;
}

/* Icon size bump */
.glass-panel svg,
.glass-panel .icon-visual svg {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
}