@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg-primary: #ffffff;
    --bg-card: #ffffff;
    --text-main: #120914;
    --text-muted: #524f53;
    --primary: #c740c7;
    --primary-light: #fdf2fd;
    --primary-hover: #a530a5;
    --success: #10b981;
    --success-bg: #ecfdf5;
    --warning: #ef4444;
    --warning-bg: #fef2f2;
    --border: #ebe7ec;
    --radius: 15px;
    --sidebar-width: 280px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    overflow-x: hidden;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-main);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
}

#app {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Home / Dashboard Layout */
.dashboard-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem 2rem;
    animation: fadeIn 0.4s ease-out;
}

.dashboard-header {
    margin-bottom: 3rem;
    text-align: center;
}

.dashboard-header h1 {
    font-size: 2.75rem;
    font-weight: 800;
    color: #130C3E;
    letter-spacing: -0.04em;
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* Dashboard Benefits Grid */
.aprendero-benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 3rem auto;
    max-width: 1000px;
    width: 100%;
}

.benefit-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: left;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.benefit-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 10px 20px rgba(199, 64, 199, 0.05);
}

.benefit-icon {
    font-size: 2rem;
    margin-bottom: 0.25rem;
    display: inline-block;
}

.benefit-card h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #130C3E;
    margin: 0;
    font-family: 'Montserrat', sans-serif;
}

.benefit-card p {
    font-size: 0.88rem;
    color: var(--text-muted) !important;
    line-height: 1.45;
    margin: 0;
}

@media (max-width: 768px) {
    .aprendero-benefits-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 2rem auto;
    }

    .courses-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.dashboard-info-footer {
    margin-top: 3.5rem;
    padding: 1.5rem;
    background: rgba(199, 64, 199, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.dashboard-info-footer p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.course-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.course-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 10px 20px -3px rgba(199, 64, 199, 0.1);
}

.course-card-image-container {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background-color: #f1f5f9;
}

.course-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-card:hover .course-card-image {
    transform: scale(1.05);
}

.course-card-logo-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.course-card-logo-icon {
    font-size: 1.6rem;
    line-height: 1;
}

.course-card-content {
    padding: 1.5rem 1.75rem 1.75rem 1.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.course-card h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.75rem;
}

.course-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    flex-grow: 1;
    line-height: 1.5;
}

.course-card-footer {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    width: 100%;
}

.course-card-footer-cta {
    white-space: nowrap;
}

.course-card-completed-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.35rem 0.7rem;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.35);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid rgba(255, 255, 255, 0.25);
    animation: badgeScaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.course-card.completed {
    border-color: rgba(16, 185, 129, 0.3);
}

.course-card.completed:hover {
    border-color: var(--success);
    box-shadow: 0 10px 20px -3px rgba(16, 185, 129, 0.15);
}

@keyframes badgeScaleIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Course Viewer Shell Layout */
.course-viewer-layout {
    display: flex;
    min-height: 100vh;
}

aside {
    width: var(--sidebar-width);
    background-color: #130C3E;
    border-right: 1px solid #1c154f;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    overflow-y: auto;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.aside-header {
    margin-bottom: 1.5rem;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    background: #1e1654;
    border: 1px solid #281e6e;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.back-btn:hover {
    background: #2d227a;
    color: #ffffff;
}

.brand {
    padding: 0.25rem 0.75rem;
}

.brand h2 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.brand p {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 0.1rem;
}

.lang-dropdown-container {
    position: fixed;
    top: 1.5rem;
    right: 2.5rem;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-dropdown {
    appearance: none;
    -webkit-appearance: none;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 2.2rem 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    max-width: 180px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
}

.lang-dropdown:hover {
    border-color: #cbd5e1;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.lang-dropdown:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

@media (max-width: 1024px) {
    .lang-dropdown-container {
        position: absolute;
        top: 1rem;
        right: 1rem;
    }

    .lang-dropdown-container.dashboard-context {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        padding: 1rem 1rem 0 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    .lang-dropdown-container.dashboard-context .lang-dropdown {
        flex: 1 1 auto;
        min-width: 130px;
        max-width: 180px;
        font-size: 0.85rem;
    }

    .lang-dropdown-container.viewer-context {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        width: 100%;
        background-color: #130C3E;
        padding: 0.6rem 1rem;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 0.5rem;
        border-bottom: 1px solid #1c154f;
        z-index: 200;
    }

    .lang-dropdown-container.viewer-context .lang-dropdown {
        flex: 1 1 auto;
        min-width: 130px;
        max-width: 180px;
        font-size: 0.78rem;
        padding: 0.4rem 2rem 0.4rem 0.75rem;
    }
}

@media (max-width: 768px) {
    .lang-dropdown-container.dashboard-context {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .lang-dropdown-container.dashboard-context .lang-dropdown {
        width: 100%;
        max-width: 280px;
    }

    .lang-dropdown-container.viewer-context {
        flex-direction: column;
        align-items: flex-end;
        gap: 0.4rem;
        padding: 0.6rem 1rem;
    }
    
    .lang-dropdown-container.viewer-context .lang-dropdown {
        width: 100%;
        max-width: 180px;
    }
}

.nav-group {
    margin-bottom: 1.5rem;
}

.nav-group-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 0.05em;
    padding: 0 0.75rem;
    margin-bottom: 0.5rem;
}

.nav-list {
    list-style: none;
}

.nav-item button {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 0.55rem 0.75rem;
    font-size: 0.85rem;
    color: #cbd5e1;
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-item button:hover {
    background-color: #1e1654;
    color: #ffffff;
}

.nav-item button.active {
    background-color: var(--primary);
    color: #ffffff;
    font-weight: 600;
}

/* Main Content Workspace */
main {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 3rem 4rem;
    max-width: 1000px;
}

.lesson-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 3rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typography & Components */
.meta-tag {
    display: inline-block;
    background-color: var(--primary-light);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

h1 {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    color: #130C3E;
}

/* Course Overview Header styles */
.overview-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.overview-icon {
    width: 72px;
    height: 72px;
    min-width: 72px;
    background: linear-gradient(135deg, #130C3E, #c740c7);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 20px rgba(199, 64, 199, 0.3);
}

.overview-title-container {
    flex: 1;
}

.overview-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin: 0.5rem 0 0 0;
    color: #130C3E;
    line-height: 1.25;
}

p {
    font-size: 1.05rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.25rem;
    margin: 2rem 0 1rem 0;
    color: #130C3E;
}

/* Framework Diagrams */
.diagram-box {
    background-color: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #334155;
    overflow-x: auto;
    white-space: pre;
}

/* Action/Scripting lists */
.framework-steps {
    list-style: none;
    margin: 1.5rem 0;
    counter-reset: step-counter;
}

.framework-steps li {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 1.5rem;
}

.framework-steps li::before {
    content: counter(step-counter);
    counter-increment: step-counter;
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.example-card {
    background-color: #fdfdfd;
    border-left: 4px solid var(--primary);
    padding: 1.25rem;
    margin-top: 0.75rem;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.01);
}

/* Grid Framework layouts */
.concept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
    margin: 1.5rem 0;
}

.concept-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    background-color: var(--bg-card);
    transition: var(--transition);
}

.concept-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -4px rgba(199, 64, 199, 0.08);
    border-color: var(--primary);
}

.concept-card strong {
    display: block;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.concept-card p {
    margin-bottom: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text-muted);
}

/* Interactive Quiz Blocks */
.quiz-panel {
    margin-top: 3rem;
    border-top: 2px solid var(--border);
    padding-top: 2rem;
}

.quiz-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #0f172a;
}

.options-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.option-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.option-item:hover {
    background-color: var(--bg-primary);
    border-color: #cbd5e1;
}

.option-item input {
    margin-top: 0.25rem;
}

.btn-submit {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-submit:hover {
    background-color: var(--primary-hover);
}

.alert-box {
    margin-top: 1.5rem;
    padding: 1.25rem;
    border-radius: 8px;
    display: none;
    font-weight: 500;
    font-size: 0.95rem;
}

.alert-box.pass {
    display: block;
    background-color: var(--success-bg);
    color: var(--success);
    border: 1px solid #bbf7d0;
}

.alert-box.fail {
    display: block;
    background-color: var(--warning-bg);
    color: var(--warning);
    border: 1px solid #fecaca;
}

/* Image CMS Component */
.cms-image-container {
    margin: 2rem 0;
    text-align: center;
}

.cms-image {
    max-width: 500px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.cms-caption {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-style: italic;
}

/* Video CMS Component */
.cms-video-wrapper {
    margin: 2rem 0;
}

.cms-video-container {
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #000;
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
}

.cms-video-container iframe,
.cms-video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Accordion CMS Component */
.cms-accordion {
    border: 1px solid var(--border);
    border-radius: 8px;
    margin: 1.5rem 0;
    overflow: hidden;
}

.cms-accordion-item {
    border-bottom: 1px solid var(--border);
}

.cms-accordion-item:last-child {
    border-bottom: none;
}

.cms-accordion-header {
    background: #f8fafc;
    padding: 1rem 1.25rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: var(--transition);
}

.cms-accordion-header:hover {
    background: #f1f5f9;
}

.cms-accordion-header::after {
    content: '▼';
    font-size: 0.75rem;
    transition: transform 0.25s ease;
}

.cms-accordion-item.active .cms-accordion-header::after {
    transform: rotate(-180deg);
}

.cms-accordion-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    background: white;
    transition: all 0.25s ease-out;
}

.cms-accordion-item.active .cms-accordion-content {
    padding: 1.25rem;
    max-height: 1000px;
    border-top: 1px solid var(--border);
}

/* Responsive Fixes */
@media (max-width: 1024px) {
    body {
        overflow-x: hidden;
    }

    .course-viewer-layout {
        flex-direction: column;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    aside {
        width: 100%;
        position: relative;
        top: auto;
        bottom: auto;
        left: auto;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
        overflow-y: visible;
    }

    main {
        margin-left: 0;
        padding: 1rem;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    .lesson-content {
        padding: 1.25rem;
        border: none;
        border-radius: 0;
        box-shadow: none;
        overflow-x: hidden;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .lesson-content h1 {
        font-size: 1.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .lesson-content h2 {
        font-size: 1.2rem;
    }

    .lesson-content h3 {
        font-size: 1.05rem;
    }

    .lesson-content img {
        max-width: 100%;
        height: auto;
    }

    .lesson-navigation-top {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }

    .lesson-navigation-footer {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .nav-prev-btn,
    .nav-next-btn {
        font-size: 0.78rem;
        padding: 0.5rem 0.75rem;
        max-width: 100%;
        white-space: normal;
        text-align: left;
    }

    .cms-quote {
        padding: 1rem 1.25rem;
    }

    .cms-video-wrapper {
        margin: 1.25rem 0;
    }

    .dashboard-container {
        padding: 1.5rem 1rem 2rem 1rem;
        overflow-x: hidden;
        max-width: 100vw;
    }

    .dashboard-header h1 {
        font-size: 1.75rem;
    }

    .overview-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .overview-title {
        font-size: 1.75rem;
    }
}

/* Lesson Metadata (Objectives/Outcomes) Styling */
.lesson-meta-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    margin: 1.5rem 0 2rem 0;
}

.lesson-meta-section h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
}

.lesson-meta-section ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.lesson-meta-section li {
    font-size: 0.9rem;
    color: #334155;
    margin-bottom: 0.25rem;
    position: relative;
    padding-left: 1.25rem;
}

.lesson-meta-section li::before {
    position: absolute;
    left: 0;
    font-size: 0.75rem;
}

.lesson-meta-section.obj li::before {
    content: "🎯";
}

.lesson-meta-section.out li::before {
    content: "🏆";
}

@media (max-width: 640px) {
    .lesson-meta-box {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Quote CMS Component */
.cms-quote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    border-left: 4px solid var(--primary);
    background: var(--primary-light);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.cms-quote .quote-text {
    font-size: 1.05rem;
    font-style: italic;
    color: var(--text-main);
    line-height: 1.6;
    margin: 0 0 0.5rem 0;
}

.cms-quote .quote-author {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    display: block;
    font-style: normal;
}

/* Lesson Navigation Footer */
.lesson-navigation-top {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    opacity: 0.85;
}

.lesson-navigation-top .lesson-navigation-footer {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.lesson-navigation-top .nav-prev-btn,
.lesson-navigation-top .nav-next-btn {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
}

.lesson-navigation-footer {
    margin-top: 3.5rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.nav-prev-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-prev-btn:hover {
    background-color: var(--bg-primary);
    border-color: #cbd5e1;
    color: var(--text-main);
}

.nav-next-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(199, 64, 199, 0.2);
}

.nav-next-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(199, 64, 199, 0.3);
}

.nav-next-btn:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.7;
}

/* Comic strip container and panels */
.comic-strip-container {
    max-width: 960px;
    margin: 3rem auto 2.5rem auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 0 1rem;
    box-sizing: border-box;
}

.comic-panel {
    background: var(--bg-card);
    border: 2px solid var(--text-main);
    border-radius: 12px;
    box-shadow: 4px 4px 0px var(--text-main);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comic-panel:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px var(--text-main);
}

.comic-panel-header {
    background: #130C3E;
    color: #ffffff;
    padding: 0.6rem;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: center;
    border-bottom: 2px solid var(--text-main);
}

.comic-panel-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 190px;
    background: #fdfbfe;
}

.comic-panel-narration {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    text-align: center;
}

.comic-panel-illustration {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: auto 0;
    padding: 0.5rem 0;
}

.comic-bubble {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.85rem;
    position: relative;
    max-width: 90%;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
    line-height: 1.35;
}

.comic-bubble.red {
    background: #ffebe9;
    border: 2px solid #ff8182;
    color: #b91c1c;
}

.comic-bubble.green {
    background: #e6fffa;
    border: 2px solid #4fd1c5;
    color: #0d9488;
}

.comic-badge {
    background: #f3e8ff;
    border: 2px dashed #a855f7;
    color: #6b21a8;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
}

.comic-panel-caption {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    margin-top: 0.75rem;
    line-height: 1.35;
}

/* Section Divider */
.hub-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border), transparent);
    margin: 4rem auto 2.5rem auto;
    max-width: 600px;
}

@media (max-width: 768px) {
    .comic-strip-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 2rem;
    }
}

/* ─── Sidebar Contact Button ─────────────────── */
.sidebar-contact-btn-wrapper {
    padding: 1.25rem 0.75rem 1.5rem 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 1rem;
}

.sidebar-contact-btn {
    width: 100%;
    background: rgba(199, 64, 199, 0.12);
    border: 1px solid rgba(199, 64, 199, 0.35);
    border-radius: 10px;
    color: #e9c8f5;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.65rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    letter-spacing: 0.02em;
}

.sidebar-contact-btn:hover {
    background: rgba(199, 64, 199, 0.22);
    border-color: rgba(199, 64, 199, 0.6);
    transform: translateY(-1px);
}

/* ─── Contact Modal Overlay ──────────────────── */
#contact-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

#contact-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

#contact-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18), 0 4px 16px rgba(199, 64, 199, 0.1);
    width: 100%;
    max-width: 480px;
    padding: 2rem 2rem 1.75rem 2rem;
    position: relative;
    transform: translateY(16px) scale(0.97);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 90vh;
    overflow-y: auto;
}

#contact-modal-overlay.active #contact-modal {
    transform: translateY(0) scale(1);
}

#contact-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--text-muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
    font-family: inherit;
}

#contact-modal-close:hover {
    background: var(--border);
    color: var(--text-main);
}

#contact-modal h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 0.35rem 0;
}

#contact-modal>p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 1.5rem 0;
    line-height: 1.5;
}

.contact-field {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.contact-field label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.contact-field input,
.contact-field textarea {
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-main);
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.65rem 0.9rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    resize: vertical;
    line-height: 1.5;
}

.contact-field input:focus,
.contact-field textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

#contact-submit-btn {
    width: 100%;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.8rem 1.5rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(199, 64, 199, 0.3);
    letter-spacing: 0.02em;
}

#contact-submit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(199, 64, 199, 0.4);
}

#contact-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 768px) {
    #contact-modal {
        padding: 1.5rem 1.25rem 1.5rem 1.25rem;
        border-radius: 14px;
    }
}

/* Comic Triptych Styles */
.comic-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #130C3E;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comic-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.comic-panel {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 3px solid #130C3E;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(19, 12, 62, 0.12);
    overflow: hidden;
    transition: var(--transition);
}

.comic-panel:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(19, 12, 62, 0.18), 0 0 0 3px rgba(199, 64, 199, 0.2);
    border-color: var(--primary);
}

/* Narrator Header Bar */
.comic-narrator-bar {
    background: #130C3E;
    color: #ffffff;
    padding: 0.6rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.35;
    border-bottom: 2px solid #130C3E;
    border-left: 5px solid var(--primary);
}

/* Speech Row (above image, below narrator) */
.comic-speech-row {
    display: flex;
    gap: 0.5rem;
    padding: 0.6rem 0.6rem 0.5rem 0.6rem;
    background: #ffffff;
    position: relative;
    z-index: 2;
    overflow: visible;
}

.comic-bubble-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    justify-content: flex-end;
}

.comic-bubble-col.left-col {
    align-items: flex-start;
}

.comic-bubble-col.right-col {
    align-items: flex-end;
}

/* Chat/Comic Bubble styles */
.comic-bubble {
    padding: 0.45rem 0.6rem;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.35;
    border-radius: 10px;
    max-width: 95%;
    position: relative;
    box-shadow: 3px 3px 0px rgba(19, 12, 62, 0.15);
    border: 2px solid #130C3E;
}

/* Left-aligned bubble (Alice, primary colors) */
.comic-bubble.left {
    background-color: var(--primary-light);
    color: var(--text-main);
    border-bottom-left-radius: 2px;
}

/* Right-aligned bubble (Bob, gray neutral) */
.comic-bubble.right {
    background-color: #f1f5f9;
    color: var(--text-main);
    border-bottom-right-radius: 2px;
}

/* Downward speech bubble tails that point onto the image */
.comic-bubble.tail-down-left::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 15px;
    border-width: 8px 6px 0 6px;
    border-style: solid;
    border-color: var(--primary-light) transparent transparent transparent;
    display: block;
    width: 0;
    z-index: 3;
}

.comic-bubble.tail-down-left::before {
    content: '';
    position: absolute;
    bottom: -11px;
    left: 14px;
    border-width: 10px 7px 0 7px;
    border-style: solid;
    border-color: #130C3E transparent transparent transparent;
    display: block;
    width: 0;
    z-index: 2;
}

.comic-bubble.tail-down-right::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 15px;
    border-width: 8px 6px 0 6px;
    border-style: solid;
    border-color: #f1f5f9 transparent transparent transparent;
    display: block;
    width: 0;
    z-index: 3;
}

.comic-bubble.tail-down-right::before {
    content: '';
    position: absolute;
    bottom: -11px;
    right: 14px;
    border-width: 10px 7px 0 7px;
    border-style: solid;
    border-color: #130C3E transparent transparent transparent;
    display: block;
    width: 0;
    z-index: 2;
}

/* Image Container */
.comic-image-container {
    width: 100%;
    position: relative;
    overflow: hidden;
    background: #f1f5f9;
    z-index: 1;
    border-top: 2px solid #130C3E;
    margin-top: auto;
}

.comic-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

/* Responsive adjustment for Mobile screens */
@media (max-width: 768px) {
    .comic-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Categories & Filtering system */
.course-card-category {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.dashboard-filter-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 2.5rem 0 3rem 0;
    padding: 0.5rem;
}

.filter-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.55rem 1.35rem;
    border-radius: 50px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(199, 64, 199, 0.05);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(199, 64, 199, 0.3);
}

.filter-btn.active .filter-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.filter-count {
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.1rem 0.4rem;
    border-radius: 50px;
    min-width: 1.2rem;
    text-align: center;
    transition: var(--transition);
}

.sidebar-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.65rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0.75rem;
    margin-left: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hidden-card {
    display: none !important;
}

/* ==========================================
   DONATION BLOCKS STYLES (DESIGNS 1, 2, 3, 4)
   ========================================== */

/* Common SVG Icon */
.donation-icon-svg {
    width: 26px;
    height: 26px;
    display: block;
}

/* Grid Layouts (Designs 1, 2, 3) */
.donation-grid-panel {
    margin: 4rem auto;
    max-width: 800px;
    text-align: center;
    padding: 3rem 2rem;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    animation: fadeIn 0.4s ease-out;
}

.donation-grid-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.donation-grid-panel.design-1 .donation-grid-icon-wrapper {
    background-color: #e6fdf5;
    color: #10b981;
}

.donation-grid-panel.design-2 .donation-grid-icon-wrapper {
    background-color: #fffbeb;
    color: #f59e0b;
}

.donation-grid-panel.design-3 .donation-grid-icon-wrapper {
    background-color: #f5f3ff;
    color: #6366f1;
}

.donation-grid-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #130C3E;
    margin-bottom: 0.75rem;
    font-family: 'Montserrat', sans-serif;
}

.donation-grid-desc {
    font-size: 0.98rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 2.5rem auto;
    line-height: 1.6;
}

.donation-grid-options-container {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.donation-card-grid {
    position: relative;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2.2rem 1rem 1.8rem 1rem;
    flex: 1;
    min-width: 180px;
    max-width: 220px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.donation-card-grid:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.04);
    border-color: #cbd5e1;
}

.donation-card-grid.design-1.selected {
    border: 2px solid #10b981;
    background-color: #f0fdf4;
}

.donation-card-grid.design-2.selected {
    border: 2px solid #f59e0b;
    background-color: #fffbeb;
}

.donation-card-grid.design-3.selected {
    border: 2px solid #6366f1;
    background-color: #f5f3ff;
}

.donation-amount-grid {
    font-size: 2.25rem;
    font-weight: 800;
}

.donation-card-grid.design-1 .donation-amount-grid {
    color: #10b981;
}

.donation-card-grid.design-2 .donation-amount-grid {
    color: #f59e0b;
}

.donation-card-grid.design-3 .donation-amount-grid {
    color: #6366f1;
}

.donation-label-grid {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.donation-card-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    color: #ffffff;
    z-index: 2;
}

.donation-card-grid.design-1 .donation-card-badge {
    background-color: #10b981;
}

.donation-card-grid.design-2 .donation-card-badge {
    background-color: #f59e0b;
}

.donation-card-grid.design-3 .donation-card-badge {
    background-color: #6366f1;
}

.donation-grid-button-wrapper {
    margin-top: 2rem;
}

.donation-grid-button {
    border: none;
    border-radius: 50px;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 1rem 2.75rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Montserrat', sans-serif;
}

.donation-grid-button:hover {
    transform: translateY(-2px);
}

.donation-grid-button.design-1 {
    background-color: #10b981;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
}

.donation-grid-button.design-1:hover {
    background-color: #059669;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

.donation-grid-button.design-2 {
    background-color: #f59e0b;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.25);
}

.donation-grid-button.design-2:hover {
    background-color: #d97706;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
}

.donation-grid-button.design-3 {
    background-color: #6366f1;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
}

.donation-grid-button.design-3:hover {
    background-color: #4f46e5;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

/* Inline Layout (Design 4) */
.donation-inline-panel {
    margin: 4rem auto;
    max-width: 800px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.2rem 2.2rem 1.8rem 2.2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    animation: fadeIn 0.4s ease-out;
}

.donation-inline-header {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    text-align: left;
}

.donation-inline-icon-container {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    flex-shrink: 0;
}

.donation-inline-text h4 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.2rem;
    font-family: 'Montserrat', sans-serif;
}

.donation-inline-text p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.donation-inline-divider {
    border: none;
    border-top: 1px solid #f1f5f9;
    margin: 1.5rem 0;
}

.donation-inline-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.donation-inline-options-wrapper {
    display: flex;
    gap: 0.75rem;
}

.donation-card-inline {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.55rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.donation-card-inline:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
}

.donation-card-inline.selected {
    background-color: #0f172a;
    border-color: #0f172a;
}

.donation-amount-inline {
    font-weight: 800;
    font-size: 1.05rem;
    color: #0f172a;
    transition: all 0.2s ease;
}

.donation-card-inline.selected .donation-amount-inline {
    color: #ffffff;
}

.donation-label-inline {
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    transition: all 0.2s ease;
}

.donation-card-inline.selected .donation-label-inline {
    color: #94a3b8;
}

.donation-inline-button {
    background-color: #0f172a;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.75rem;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Montserrat', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.donation-inline-button:hover {
    background-color: #1e293b;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15);
}

/* Responsive Rules */
@media (max-width: 768px) {
    .donation-grid-options-container {
        flex-direction: column;
        align-items: center;
    }

    .donation-card-grid {
        width: 100%;
        max-width: 280px;
    }

    .donation-grid-panel {
        padding: 2rem 1.25rem;
    }

    .donation-grid-title {
        font-size: 1.35rem;
    }

    .donation-grid-desc {
        font-size: 0.9rem;
    }

    .donation-inline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.85rem;
    }

    .donation-inline-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
    }

    .donation-inline-options-wrapper {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .donation-card-inline {
        flex: 1;
        justify-content: center;
        min-width: 110px;
    }

    .donation-inline-button {
        width: 100%;
    }

    .course-card-publisher-logo-footer {
        height: 36px;
        max-width: 140px;
    }
}

/* ==========================================
   APRENDERO BRANDING & PUBLISHER BADGES
   ========================================== */

/* Main Header Logo Wrapper */
.aprendero-logo-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 2rem;
}

/* Shapes Graphic Logo */
.aprendero-logo-shapes {
    width: 210px;
    height: 105px;
    display: block;
}

/* Platform Name Graphic Text */
.aprendero-logo-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.45rem;
    font-weight: 800;
    color: #a530a5;
    letter-spacing: -0.04em;
    margin: 0;
    line-height: 1;
}

/* Card Publisher Logo in Footer */
.course-card-publisher-logo-footer {
    height: 44px;
    width: auto;
    max-width: 170px;
    object-fit: contain;
    display: block;
    opacity: 0.85;
    transition: var(--transition);
}

.course-card:hover .course-card-publisher-logo-footer {
    opacity: 1;
    transform: scale(1.04);
}

/* ─── 3D Certificate Preview Stack ───────────────── */
.comic-cert-preview-wrapper {
    margin: 1.5rem auto 3rem auto;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    width: 100%;
    box-sizing: border-box;
    padding: 0 1rem;
}

.comic-cert-preview-stack {
    position: relative;
    width: 100%;
    max-width: 240px;
    height: 160px;
    margin: 0.75rem 0;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
    z-index: 10;
}

.cert-page {
    position: absolute;
    height: 140px;
    width: auto;
    box-shadow: 0 6px 16px rgba(19, 12, 62, 0.15);
    border: 2px solid #130C3E;
    border-radius: 6px;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s ease, z-index 0.4s ease;
}

.cert-p1 {
    transform: rotate(-8deg) translateX(-24px) scale(0.95);
    z-index: 1;
}

.cert-p2 {
    transform: rotate(8deg) translateX(24px) scale(0.95);
    z-index: 2;
}

.comic-cert-preview-stack:hover .cert-p1 {
    transform: rotate(-14deg) translateX(-45px) scale(1.04);
    z-index: 3;
    box-shadow: 0 12px 28px rgba(19, 12, 62, 0.25);
}

.comic-cert-preview-stack:hover .cert-p2 {
    transform: rotate(14deg) translateX(45px) scale(1.04);
    z-index: 3;
    box-shadow: 0 12px 28px rgba(19, 12, 62, 0.25);
}

.comic-cert-preview-overlay {
    position: absolute;
    inset: 0;
    background: rgba(19, 12, 62, 0.6);
    backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    border-radius: 6px;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease;
    border: 2px solid #130C3E;
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.comic-cert-preview-stack:hover .comic-cert-preview-overlay {
    opacity: 1;
}

.comic-cert-preview-tag {
    font-size: 0.75rem;
    line-height: 1.4;
    font-weight: 700;
    color: var(--primary);
    padding: 0.45rem 1rem;
    background-color: var(--primary-light);
    border-radius: 30px;
    border: 1.5px dashed rgba(199, 64, 199, 0.4);
    max-width: 90%;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 10px rgba(199, 64, 199, 0.05);
}

/* ─── Lightbox Popup Overlay ─────────────────────── */
#cert-lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(19, 12, 62, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#cert-lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

#cert-lightbox-container {
    position: relative;
    width: 100%;
    max-width: 960px;
    max-height: 90vh;
    background: #ffffff;
    border: 3px solid #130C3E;
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#cert-lightbox-overlay.active #cert-lightbox-container {
    transform: scale(1);
}

#cert-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    border: 2px solid #130C3E;
    background: #f1f5f9;
    color: #130C3E;
    font-size: 1.6rem;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 15;
    font-family: inherit;
}

#cert-lightbox-close:hover {
    background: var(--primary);
    color: white;
    transform: rotate(90deg);
}

#cert-lightbox-scroll-wrapper {
    padding: 2rem 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 1.5rem;
    background: #f8fafc;
    box-sizing: border-box;
    flex: 1 1 auto;
}

.cert-lightbox-page-wrapper {
    position: relative;
    width: 100%;
    flex: 1 1 340px;
    max-width: 420px;
    border: 2px solid #130C3E;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(19, 12, 62, 0.12);
    background: #ffffff;
}

.cert-lightbox-img {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 768px) {
    #cert-lightbox-scroll-wrapper {
        gap: 1.5rem;
        padding: 1.5rem 1rem;
    }
}

/* ─── Daily Struggles Hub ────────────────────────── */
.struggles-section {
    margin: 3.5rem auto 1.5rem auto;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

.struggles-header {
    margin-bottom: 1.5rem;
    text-align: left;
}

.struggles-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #130C3E;
    margin: 0 0 0.35rem 0;
    font-family: 'Montserrat', sans-serif;
}

.struggles-header p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
}

.struggles-carousel-wrapper {
    position: relative;
    width: 100%;
    display: block;
}

.struggles-scroll-container {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    padding: 0.5rem 3rem 1rem 3rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    min-width: 0;
    scrollbar-width: none; /* Hide standard Firefox scrollbar */
}

.struggles-scroll-container::-webkit-scrollbar {
    display: none; /* Hide Chrome/Safari scrollbar */
}

.struggles-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid #130C3E;
    background: #ffffff;
    color: #130C3E;
    font-size: 1.3rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 2px 2px 0px #130C3E;
    transition: all 0.2s ease;
    z-index: 25;
    user-select: none;
}

.struggles-arrow:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-50%) translate(-2px, -2px);
    box-shadow: 4px 4px 0px #130C3E;
}

.struggles-arrow:active {
    transform: translateY(-50%);
    box-shadow: 1px 1px 0px #130C3E;
}

.struggles-arrow-left {
    left: 10px;
}

.struggles-arrow-right {
    right: 10px;
}

.struggle-card {
    flex: 0 0 320px;
    scroll-snap-align: start;
    background: #ffffff;
    border: 2px solid #130C3E;
    border-radius: 16px;
    box-shadow: 4px 4px 0px #130C3E;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-sizing: border-box;
}

.struggle-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 7px 7px 0px var(--primary);
    border-color: var(--primary);
}

.struggle-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.struggle-card-icon {
    font-size: 1.5rem;
}

.struggle-card-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #130C3E;
    margin: 0;
    font-family: 'Montserrat', sans-serif;
}

.struggle-card-problem {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.5;
    margin: 0.25rem 0;
    flex-grow: 1;
    position: relative;
    padding-left: 0.75rem;
    border-left: 3px solid rgba(19, 12, 62, 0.15);
    font-family: inherit;
}

.struggle-card-solution {
    margin-top: auto;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s ease;
}

.struggle-card:hover .struggle-card-solution {
    color: var(--primary-hover);
}

/* ─── Pulse Highlight Animation for Course Cards ─── */
@keyframes pulse-card-highlight {
    0% {
        box-shadow: 4px 4px 0px #130C3E;
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 25px var(--primary);
        border-color: var(--primary);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 4px 4px 0px #130C3E;
        transform: scale(1);
    }
}

.pulse-highlight {
    animation: pulse-card-highlight 1.2s ease-in-out 2;
    z-index: 50;
    position: relative;
}

@media (max-width: 768px) {
    .struggle-card {
        flex: 0 0 280px;
        padding: 1.25rem;
    }
    .struggles-header h2 {
        font-size: 1.4rem;
    }
}

/* ─── Interactive Hub Quiz ───────────────────────── */
.hub-quiz-box {
    background: linear-gradient(135deg, #1d154f, #130c3e);
    color: #ffffff;
    border-radius: var(--radius);
    padding: 2.2rem;
    box-shadow: 0 12px 32px rgba(19, 12, 62, 0.25);
    border: 1px solid #2d236d;
    position: relative;
    overflow: hidden;
    margin-top: 1.5rem;
}

.hub-quiz-box h3 {
    margin-top: 0;
    color: #2ce1a4;
    font-size: 1.3rem;
    font-weight: 700;
}

.quiz-progress-track {
    background: rgba(255, 255, 255, 0.1);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin: 1rem 0 1.5rem 0;
}

.quiz-progress-fill {
    background: linear-gradient(90deg, #2ce1a4, var(--primary));
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

.quiz-question-title {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    color: #f1f5f9;
}

.quiz-options-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quiz-option-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    padding: 0.95rem 1.25rem;
    border-radius: 10px;
    text-align: left;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    line-height: 1.4;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-option-btn:hover {
    background: rgba(44, 225, 164, 0.08);
    border-color: #2ce1a4;
    color: #ffffff;
    transform: translateX(4px);
}

.quiz-results-container {
    animation: fadeIn 0.4s ease-out;
}

.quiz-results-title {
    font-size: 1.4rem;
    color: #2ce1a4;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.quiz-results-desc {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: #f1f5f9 !important;
}

.quiz-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.quiz-btn-primary {
    background: #2ce1a4;
    color: #130c3e;
    border: none;
    padding: 0.8rem 1.8rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.quiz-btn-primary:hover {
    background: #23c791;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 225, 164, 0.3);
}

.quiz-btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    padding: 0.8rem 1.8rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.quiz-btn-secondary:hover {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

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

@media (max-width: 600px) {
    .hub-quiz-box {
        padding: 1.5rem;
    }
    .quiz-question-title {
        font-size: 1.05rem;
    }
    .quiz-option-btn {
        font-size: 0.88rem;
        padding: 0.8rem 1rem;
    }
    .quiz-actions {
        flex-direction: column;
    }
    .quiz-btn-primary, .quiz-btn-secondary {
        width: 100%;
        text-align: center;
    }
}