/* Extracted from index.html */
/* Clean Medical Background System */
* {
    box-sizing: border-box;
}

:root {
    display: block !important;
    background: none !important;
}

html {
    background: linear-gradient(135deg, #6b9f78 0%, #5a8a67 100%);
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: #0f172a;
    background: transparent;
    min-height: 100vh;
    position: relative;
    width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Clinical Cases System Styles */
.case-step {
    display: none;
}

.case-step.active {
    display: block !important;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6b9f78, #4a6d52);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.case-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.case-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.case-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.case-difficulty {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.case-difficulty.beginner {
    background: #10b981;
    color: white;
}

.case-difficulty.intermediate {
    background: #f59e0b;
    color: white;
}

.case-difficulty.difficult {
    background: #ef4444;
    color: white;
}

.case-stages {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.case-stages span {
    background: #f3f4f6;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    color: #6b7280;
}

.stage-explanation {
    display: grid;
    gap: 15px;
    margin-top: 15px;
}

.stage-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
}

.stage-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.quiz-button {
    background: #6b9f78;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px 5px;
}

.quiz-button:hover {
    background: #4a6d52;
    transform: translateY(-1px);
}

.differential-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    min-height: 120px;
}

.differential-input:focus {
    outline: none;
    border-color: #6b9f78;
}



body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(107, 159, 120, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(34, 197, 94, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 60% 60%, rgba(168, 85, 247, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Enhanced PGY Selection Screen */
.enhanced-pgy-selection {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 40px 20px;
}

.selection-title-card {
    background: linear-gradient(135deg, #fefcf3 0%, #f8fafc 100%);
    border: 3px solid rgba(107, 159, 120, 0.2);
    border-radius: 30px;
    padding: 50px;
    margin-bottom: 50px;
    box-shadow:
        0 25px 70px rgba(107, 159, 120, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
    animation: gentleFloat 6s ease-in-out infinite;
}

.selection-title-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(34, 197, 94, 0.1),
            rgba(168, 85, 247, 0.1),
            rgba(234, 179, 8, 0.1),
            transparent);
    animation: journeyShimmer 4s infinite;
}

@keyframes journeyShimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

@keyframes gentleFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.main-title {
    font-size: 3.5em;
    color: #1e293b;
    margin-bottom: 15px;
    font-weight: 800;
}

.main-subtitle {
    font-size: 1.3em;
    color: #64748b;
    margin-bottom: 30px;
}

.pgy-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.pgy-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid rgba(107, 159, 120, 0.2);
    border-radius: 25px;
    padding: 40px 30px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.pgy-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(107, 159, 120, 0.25);
    border-color: rgba(107, 159, 120, 0.4);
}

.pgy-level {
    font-size: 2.5em;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 15px;
}

.pgy-description {
    color: #64748b;
    font-size: 1.1em;
    line-height: 1.5;
}

.hidden {
    display: none !important;
}

/* Enhanced quiz styling */
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.quiz-option {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid rgba(107, 159, 120, 0.2);
    border-radius: 10px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-size: 0.95em;
}

.quiz-option:hover {
    background: linear-gradient(135deg, #6b9f78 0%, #4a6d52 100%);
    color: white;
    transform: translateX(5px);
}

.quiz-option.correct {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-color: #059669;
}

.quiz-option.incorrect {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-color: #dc2626;
}

.quiz-result {
    background: #f0f9ff;
    border: 2px solid #0ea5e9;
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
    font-weight: 500;
}

.quiz-result.correct {
    background: #f0fdf4;
    border-color: #10b981;
    color: #065f46;
}

.quiz-result.incorrect {
    background: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}

/* Progress Dashboard Styles */
.progress-dashboard {
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 30px;
}

.dashboard-header h3 {
    color: #1e293b;
    font-size: 2em;
    margin-bottom: 20px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid rgba(107, 159, 120, 0.2);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: rgba(107, 159, 120, 0.4);
}

.stat-number {
    font-size: 2.5em;
    font-weight: 800;
    color: #6b9f78;
    margin-bottom: 8px;
}

.stat-label {
    color: #64748b;
    font-size: 1.1em;
    font-weight: 500;
}

.achievement-showcase {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 20px;
    padding: 25px;
    min-height: 150px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.achievement-badge {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
    animation: badgeGlow 2s ease-in-out infinite alternate;
}

@keyframes badgeGlow {
    0% {
        box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
    }

    100% {
        box-shadow: 0 6px 20px rgba(251, 191, 36, 0.5);
    }
}

.no-achievements {
    color: #94a3b8;
    font-style: italic;
    font-size: 1.1em;
}

/* App Health Welcome Screen - Clean Medical Design */
.app-welcome-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    box-sizing: border-box;
    padding: 40px 20px;
    background: radial-gradient(circle at top left, #2d4a35 0%, #1a2e21 100%);
    margin: 0;
    position: relative;
    z-index: 1000;
}

.app-main-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 40px;
    padding: 60px;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    text-align: center;
    position: relative;
    transform: translateY(20px);
    opacity: 0;
    animation: revealContainer 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* App Health Logo */
.app-logo-container {
    margin-bottom: 15px;
}

.app-logo-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: contain;
}

/* Main Title */
.app-main-title {
    font-family: 'Outfit', sans-serif;
    font-size: 3.8em;
    color: #0f172a;
    margin-bottom: 40px;
    font-weight: 800;
    letter-spacing: -0.04em;
    text-align: center;
    margin-top: 0;
    background: linear-gradient(to bottom, #0f172a, #334155);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.app-welcome-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

/* Content Area with ERNEST and Speech */
.app-content-area {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 15px;
    text-align: left;
}

.mascot-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.ernest-label-pill {
    font-family: 'Outfit', sans-serif;
    background: #ffffff;
    color: #000000;
    padding: 12px 40px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.2em;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    border: 4px solid #000000;
    box-shadow: 0 4px 0 #000000;
    text-transform: uppercase;
}

.ernest-label-pill:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15), 0 4px 0 #000000;
    background: #f8fafc;
}

.ernest-label-pill:active {
    transform: translateY(1px);
    box-shadow: 0 2px 0 #000000;
}

/* ERNEST Silhouette Container */
.start-page-mascot-stage {
    position: relative;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    margin: 40px auto 10px auto;
    height: 400px;
    width: 400px;
    overflow: visible;
    /* Mascot Podium */
}

.start-page-mascot-stage::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 20px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
}

/* Speech Bubble - Glassmorphism Style */
.speech-bubble {
    flex: 1;
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 35px;
    padding: 45px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.05);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.speech-bubble p {
    font-family: 'Inter', sans-serif;
    font-size: 1.25em;
    line-height: 1.6;
    color: #475569;
    font-weight: 500;
}

.speech-bubble::before {
    content: '';
    position: absolute;
    left: -18px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
    border-right: 20px solid rgba(226, 232, 240, 0.8);
}

.speech-bubble::after {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-right: 15px solid #f8fafc;
}

.speech-text {
    font-size: 1.25em;
    line-height: 1.6;
    color: #374151;
    margin: 0;
}

/* Call to Action Button */
.app-cta-button {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, #059669 0%, #064e3b 100%);
    color: white;
    border: none;
    padding: 24px 80px;
    font-size: 1.6em;
    font-weight: 800;
    border-radius: 100px;
    /* Extremely rounded */
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 50px rgba(5, 150, 105, 0.3);
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    margin: 40px auto 0;
    display: block;
    width: fit-content;
}

.app-cta-button:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 30px 70px rgba(5, 150, 105, 0.4);
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.app-cta-button:active {
    transform: translateY(-2px) scale(0.98);
}

/* Mobile Optimization for Start Page */
@media (max-width: 768px) {
    .app-content-area {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 30px;
    }

    .ernest-character-img {
        width: 140px;
        /* Much smaller */
        height: 140px;
    }

    .ernest-label {
        padding: 8px 16px;
        font-size: 14px;
        margin-top: 15px;
    }

    .speech-bubble {
        padding: 20px;
    }

    .speech-text {
        font-size: 1rem;
        /* Smaller text */
        line-height: 1.5;
    }

    .speech-bubble::before,
    .speech-bubble::after {
        /* Move arrow to top for column layout */
        left: 50%;
        top: -14px;
        transform: translateX(-50%) rotate(90deg);
    }

    .app-cta-button {
        padding: 15px 30px;
        font-size: 1.1em;
        width: 100%;
    }

    /* Mobile Optimization for Modules (Fix "Massive Borders") */
    #modal-overlay>div {
        width: 100% !important;
        height: 100% !important;
        max-height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        padding: 10px !important;
        /* Reduce internal padding of the modal container */
    }

    .interactive-content>div {
        padding: 15px !important;
        margin-bottom: 15px !important;
        border-radius: 10px !important;
    }

    .interactive-content h3 {
        font-size: 1.2em !important;
        margin-bottom: 10px !important;
    }

    .interactive-content p,
    .interactive-content li {
        font-size: 0.95em !important;
    }

    /* Adjust iframe container height for mobile */
    .interactive-content iframe {
        height: 500px !important;
    }

    /* Compact Podcast Card on Mobile */
    .podcast-card-hover {
        padding: 15px !important;
        margin-bottom: 15px !important;
    }
}

.app-cta-button {
    background: #6b9f78;
    color: white;
    border: none;
    padding: 18px 45px;
    font-size: 1.4em;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(107, 159, 120, 0.3);
}

.app-cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(107, 159, 120, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-content-area {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .app-main-container {
        padding: 40px 25px;
    }

    .app-main-title {
        font-size: 2.2em;
    }

    .ernest-silhouette {
        width: 150px;
        height: 180px;
    }

    .speech-bubble::before,
    .speech-bubble::after {
        display: none;
    }
}

/* Clean 13-Module Pathway System */
.app-pathway-container {
    background: #fdfcf8;
    min-height: 100vh;
    padding: 40px 20px;
    animation: pathwaySlideIn 0.8s ease-out;
    display: block !important;
    visibility: visible !important;
    position: relative;
    overflow-x: hidden;
    overflow-y: visible;
}

/* Prevent layout shifts during content loading */
#learning-board {
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* Smooth loading state */
.pathway-loading {
    opacity: 0;
    transform: translateY(20px);
}

.pathway-loaded {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Green Sidebar Bars */
.app-pathway-container::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    background: linear-gradient(to bottom, #6b9f78, #5a8a67, #4a6d52);
    border-radius: 0 4px 4px 0;
    box-shadow: 2px 0 8px rgba(107, 159, 120, 0.3);
}

.app-pathway-container::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    background: linear-gradient(to bottom, #6b9f78, #5a8a67, #4a6d52);
    border-radius: 4px 0 0 4px;
    box-shadow: -2px 0 8px rgba(107, 159, 120, 0.3);
}

/* Ensure learning board shows when not hidden */
#learning-board:not(.hidden) {
    display: block !important;
    visibility: visible !important;
}

@keyframes pathwaySlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.pathway-header {
    text-align: center;
    margin-bottom: 50px;
}

.pathway-title {
    font-size: 3.8em;
    color: #6b9f78;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-shadow: 0 4px 12px rgba(107, 159, 120, 0.3);
    animation: titleFloat 6s ease-in-out infinite alternate;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

@keyframes titleFloat {
    0% {
        transform: translateY(0px) scale(1);
        text-shadow: 0 4px 12px rgba(107, 159, 120, 0.3);
    }

    100% {
        transform: translateY(-8px) scale(1.02);
        text-shadow: 0 8px 20px rgba(107, 159, 120, 0.4);
    }
}

.app-logo-title {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: logoTilt 5s ease-in-out infinite alternate;
}

@keyframes logoTilt {
    0% {
        transform: rotate(-12deg) scale(1);
    }

    100% {
        transform: rotate(12deg) scale(1.05);
    }
}

.pathway-subtitle {
    font-size: 1.2em;
    color: #64748b;
    margin-bottom: 30px;
}


/* ========================================= */
/* NEW GRID LAYOUT SYSTEM */
/* ========================================= */

/* Main Container */
.modules-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px 120px 20px;
    /* Extra bottom padding for ERNEST dialogue */
    position: relative;
    z-index: 1;
}

/* Shimmer Background Animation (keep this - looks nice!) */
.pathway-background-animation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    background: linear-gradient(45deg,
            rgba(107, 159, 120, 0.03) 0%,
            rgba(107, 159, 120, 0.08) 25%,
            rgba(107, 159, 120, 0.03) 50%,
            rgba(107, 159, 120, 0.08) 75%,
            rgba(107, 159, 120, 0.03) 100%);
    background-size: 400% 400%;
    animation: shimmer 12s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        background-position: 0% 0%;
    }

    25% {
        background-position: 100% 100%;
    }

    50% {
        background-position: 100% 0%;
    }

    75% {
        background-position: 0% 100%;
    }

    100% {
        background-position: 0% 0%;
    }
}


/* Legacy inline styles removed - moved to css/legendary-pathway-styles.css */

/* Speech bubble effect */
.module-description-panel::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    top: 50%;
}

.module-description-panel.position-right::before {
    left: -10px;
    transform: translateY(-50%);
    border-right: 10px solid rgba(255, 255, 255, 0.96);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
}

.module-description-panel.position-left::before {
    right: -10px;
    transform: translateY(-50%);
    border-left: 10px solid rgba(255, 255, 255, 0.96);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
}

/* Responsive Design for Description Panels */
@media (max-width: 1400px) {
    .module-description-panel.position-right {
        left: calc(50% + 150px);
    }

    .module-description-panel.position-left {
        right: calc(50% + 150px);
    }

    .module-description-panel {
        width: 280px;
        max-width: 280px;
    }
}

@media (max-width: 1200px) {
    .module-description-panel.position-right {
        left: calc(50% + 100px);
    }

    .module-description-panel.position-left {
        right: calc(50% + 100px);
    }

    .module-description-panel {
        width: 250px;
        max-width: 250px;
        padding: 20px;
    }

    .description-title {
        font-size: 1.1em;
    }

    .description-text {
        font-size: 0.9em;
    }
}

@media (max-width: 768px) {
    .module-description-panel {
        position: fixed !important;
        bottom: 80px !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: 90% !important;
        max-width: 350px !important;
        top: auto !important;
    }

    .module-description-panel.show {
        transform: translateX(-50%) scale(1) !important;
    }

    .module-description-panel::before {
        display: none;
    }
}

/* Learning Objectives Button */
.learning-objectives-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #6b9f78, #4a6d52);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin: 15px 0 10px 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(107, 159, 120, 0.3);
}

.learning-objectives-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 159, 120, 0.4);
    background: linear-gradient(135deg, #7ab088, #557d5e);
}

/* Learning Objectives Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    width: 90%;
    max-width: 1200px;
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.modal-body {
    padding: 25px;
    max-height: calc(90vh - 100px);
    overflow-y: auto;
}

.learning-objectives-content {
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
}

/* PGY-2 Section (Prominent) */
.pgy2-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.pgy2-header {
    color: #1e40af;
    font-size: 24px;
    margin-bottom: 5px;
}

/* Three Column Grid */
.objectives-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 992px) {
    .objectives-grid {
        grid-template-columns: 1fr;
    }
}

/* Section Styling */
.objectives-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pgy3-section {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
}

.pgy3-header {
    color: #92400e;
}

.pgy4-section {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    border: 2px solid #ec4899;
}

.pgy4-header {
    color: #831843;
}

.advanced-section {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    border: 2px solid #a855f7;
}

.advanced-header {
    color: #6b21a8;
}

.objectives-header {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 5px;
}

.objectives-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 15px;
    font-style: italic;
}

/* Competency Groups */
.competency-group {
    margin-bottom: 20px;
}

.competency-group h4 {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.competency-group ul {
    margin: 0;
    padding-left: 20px;
}

.competency-group li {
    margin-bottom: 6px;
    line-height: 1.5;
    color: #4b5563;
}

/* Compact Groups for 3-column layout */
.competency-group-compact {
    margin-bottom: 15px;
}

.competency-group-compact h4 {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.competency-group-compact ul {
    margin: 0;
    padding-left: 18px;
}

.competency-group-compact li {
    margin-bottom: 4px;
    font-size: 13px;
    line-height: 1.4;
    color: #4b5563;
}