:root {
    --primary-color: #008ca1;
    /* Teal from header */
    --primary-light: #e0f2f1;
    --secondary-color: #f7941d;
    /* Orange from header */
    --secondary-light: #fff3e0;
    --accent-color: #1a3a5f;
    /* Dark blue from plane */
    --text-color: #2c3e50;
    --primary-light-bg: #e0f7fa;
    --primary-super-light: #f0fdff;
    --secondary-light-bg: #fff8e1;
    --secondary-super-light: #fffdf5;
    --accent-light: #e8eaf6;
    --accent-super-light: #f5f6fa;
    --task-bg: #f0f4c3;
    /* Light lime for tasks */
    --quiz-bg: #e1bee7;
    /* Light purple for quizzes */

    /* Restored Vars */
    --text-muted: #7f8c8d;
    --bg-color: #f8fbfb;
    --card-bg: #ffffff;
    --sidebar-bg: #ffffff;
    --sidebar-width: 300px;
    --border-radius: 16px;
    --shadow: 0 4px 15px rgba(0, 8ca1, 0.08);
    --shadow-hover: 0 12px 30px rgba(0, 140, 161, 0.15);
    --locked-color: #f1f1f1;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);


}

.hidden {
    display: none !important;
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    background-image:
        radial-gradient(at 0% 0%, rgba(0, 140, 161, 0.03) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(247, 148, 29, 0.03) 0px, transparent 50%);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

h1,
h2,
h3,
h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

h2 {
    font-size: 1.8rem;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    padding-bottom: 5px;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}



/* Alternating Card Backgrounds */


/* Specific Card overrides to ensure variety */


/* Ensure text is readable on colored backgrounds */
.card p,
.card li {
    color: #2c3e50;
}

p {
    margin-bottom: 1rem;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    text-align-last: left;
}

/* Prevent justification on lines with inputs to avoid ugly spacing */
p:has(input),
p:has(select),
p:has(textarea) {
    text-align: left;
}


.developer-credit {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: -2.5rem;
    margin-bottom: 3rem;
    text-align: left;
}

.core-material {
    border: 3px solid var(--secondary-color);
    position: relative;
    padding-top: 3.5rem !important;
    background: linear-gradient(to bottom right, #fff, #f0fff4) !important;
}

.badge-ribbon {
    position: absolute;
    top: 15px;
    left: 20px;
    background: var(--secondary-color);
    color: #2c5e4d;
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Progress Bar */
#progress-bar-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.05);
    z-index: 2100;
}

#progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.3s ease-out;
    box-shadow: 0 0 10px rgba(0, 140, 161, 0.4);
}

/* App Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--card-bg);
    border-right: 1px solid rgba(0, 140, 161, 0.1);
    height: 100vh;
    position: sticky;
    top: 0;
    padding: 2rem 1.5rem;
    overflow-y: auto;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    border-bottom: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-header h2::before {
    content: '✈';
    background: var(--secondary-color);
    color: white;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
}

.sidebar-header {
    margin-top: 3.5rem;
    /* Space for back button */
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    transition: var(--transition);
    font-weight: 500;
    gap: 12px;
}

.nav-link:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
    transform: translateX(5px);
}

.nav-link.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-link:focus {
    outline: none;
    background-color: var(--primary-light);
    color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 140, 161, 0.3);
}




.nav-link svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

/* Main Content */
.content {
    flex: 1;
    padding: 3rem 2rem;
    display: flex;
    justify-content: center;
    transition: var(--transition);
}

.lesson-body-content {
    max-width: 900px;
    width: 100%;
}

#lesson-view {
    position: relative;
    width: 100%;
    min-height: 100vh;
}

#back-to-dashboard {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1100;
    padding: 0.6rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    background: white;
    border: 1px solid #eee;
    color: var(--text-muted);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border-radius: 20px;
}

#back-to-dashboard:hover {
    transform: translateX(-3px);
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

#back-to-dashboard .icon {
    font-size: 1.1rem;
}

.scroll-section {
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.scroll-section:last-child {
    border-bottom: none;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

/* Brand Header */
.brand-header {
    width: 100%;
    margin-bottom: 2rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: center;
    background: white;
    aspect-ratio: 1819 / 346;
}

.brand-header .header-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Dashboard Styles */
#dashboard-view {
    padding: 2rem;
    min-height: 100vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.eu-disclaimer {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.eu-disclaimer img {
    height: 60px;
    width: auto;
    flex-shrink: 0;
}

.eu-disclaimer p {
    font-size: 0.85rem;
    color: #555;
    margin: 0;
    line-height: 1.4;
    text-align: left;
}

@media (max-width: 768px) {
    .eu-disclaimer {
        flex-direction: column;
        text-align: center;
    }

    .eu-disclaimer p {
        text-align: center;
    }
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-container h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.lesson-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    padding-bottom: 4rem;
}

.lesson-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-align: left;
    border: none;
    position: relative;
    overflow: hidden;
}

.lesson-card:hover:not(.locked) {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.lesson-card:hover:not(.locked) .lesson-number {
    transform: rotate(15deg);
    background-color: var(--secondary-color);
    color: white;
}

.lesson-card.active::before {
    display: none;
    /* Remove old gradient bar */
}

.lesson-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: var(--transition);
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.lesson-card.locked .lesson-number {
    background-color: var(--locked-color);
    color: #bdbdbd;
}

/* Ensure Lesson Info H3 overrides */
.lesson-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    /* Color handled above */
}

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

/* Loading States */
.loading-spinner {
    padding: 5rem;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    font-size: 1.2rem;
}

.error-box {
    padding: 3rem;
    background: #fff5f5;
    border: 1px solid #feb2b2;
    border-radius: var(--border-radius);
    color: #c53030;
    text-align: center;
    margin: 2rem 0;
}

/* Cards */
.card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 140, 161, 0.05);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.info-card {
    border-left: 5px solid var(--secondary-color);
    background-color: #ffffff;
}

/* Cyclic Card Content Borders/Headers */
/* Basic Card Colors - Reverted to default */
#lesson-content .scroll-section .card {
    border-left-width: 5px;
    border-left-style: solid;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: white;
    color: var(--text-color);
    border-left-color: var(--secondary-color);
    /* Default fallback */
}



/* Reset specific inputs styles that were for dark mode cards */
#lesson-content .card input,
#lesson-content .card textarea,
#lesson-content .card select {
    background-color: #fdfdfd;
    color: inherit;
    border: 1.5px solid #e2e8f0;
    box-shadow: none;
}

.card ul {
    margin-left: 1.5rem;
}

/* Form Elements */
.reflection-input {
    width: 100%;
    padding: 1.2rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
    background: #fdfdfd;
}

.reflection-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.1);
}

textarea.reflection-input {
    min-height: 120px;
}

/* Range Slider */
.range-container {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #edf2f7;
}

#range-value {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-color);
    min-width: 40px;
    text-align: center;
}

.slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 10px;
    border-radius: 10px;
    background: #e2e8f0;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* VARK Test Styles */
.vark-question {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: #fcfcfd;
    border-radius: 12px;
}

.vark-options {
    display: grid;
    gap: 0.8rem;
    margin-top: 1rem;
}

.vark-option {
    background-color: var(--card-bg);
    border: 2px solid #eef2f3;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 500;
}

.vark-option:hover {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

.vark-option.selected {
    border-color: var(--secondary-color);
    background-color: var(--secondary-light);
    color: var(--accent-color);
    box-shadow: 0 4px 15px rgba(247, 148, 29, 0.2);
}

.vark-option span {
    background-color: var(--primary-light);
    color: var(--primary-color);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
}

.vark-option.selected span {
    background-color: var(--secondary-color);
    color: white;
}

/* Quiz Feedback Styles */
.vark-option.correct {
    border-color: #4CAF50 !important;
    background-color: #e8f5e9 !important;
    color: #2e7d32 !important;
}

.vark-option.correct span {
    background-color: #4CAF50 !important;
    color: white !important;
}

.vark-option.incorrect {
    border-color: #F44336 !important;
    background-color: #ffebee !important;
    color: #c62828 !important;
}

.vark-option.incorrect span {
    background-color: #F44336 !important;
    color: white !important;
}

.quiz-feedback-icon {
    margin-left: auto;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Flip Cards */
.flip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* Summary Box */
.summary-box {
    margin-top: 2rem;
    text-align: left;
}

/* Mobile Toggle */
#mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    right: 1rem;
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    border-radius: 12px;
    z-index: 2000;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
}

/* Responsive */
@media (max-width: 1024px) {
    .content {
        padding: 2rem 2.5rem;
    }
}

@media (max-width: 768px) {
    #mobile-menu-toggle {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        width: 100%;
        max-width: 300px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .content {
        margin-left: 0 !important;
        padding-top: 5.5rem;
    }

    #back-to-dashboard {
        top: 1rem;
        left: 1rem;
    }

    h1 {
        font-size: 2rem;
    }
}

.flip-card {
    background-color: transparent;
    width: 100%;
    height: 200px;
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.flip-card-front {
    background-color: #fff;
    color: var(--text-color);
    border: 2px solid #eee;
}

.flip-card-back {
    background-color: var(--secondary-color);
    color: #fff;
    transform: rotateY(180deg);
}

.badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    font-weight: 700;
}

.badge.fixed {
    background: #eee;
    color: #888;
}

.badge.growth {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

/* Buttons */
.btn {
    padding: 0.8rem 1.8rem;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 700;
    transition: var(--transition);
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
    color: white;
}



.btn:hover {
    transform: translateY(-3px);
    filter: brightness(1.1);
}



.btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
}

.btn.secondary {
    background: linear-gradient(135deg, var(--secondary-color), #f39c12);
    color: white;
}

.hidden {
    display: none;
}

/* Mobile Toggle */
#mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    z-index: 2000;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
}

#mobile-menu-toggle:hover {
    background: var(--accent-color);
    transform: scale(1.05);
}

#mobile-menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: white;
    transition: var(--transition);
}

#mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

#mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

#mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Responsive */
@media (max-width: 768px) {

    /* Only show toggle when in lesson view */
    #lesson-view:not(.hidden)~#mobile-menu-toggle {
        display: flex;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 280px;
        height: 100vh;
        transform: translateX(-100%);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
        z-index: 1500;
        padding-top: 5rem;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-header {
        margin-top: 0;
    }

    .content {
        margin-left: 0;
        width: 100%;
        padding: 5rem 1rem 2rem;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .flip-grid {
        grid-template-columns: 1fr;
    }

    .app-container {
        display: block;
    }

    .card {
        padding: 1.5rem;
    }

    .developer-credit {
        margin-top: -2rem;
        margin-bottom: 2rem;
    }
}

/* Module 2 Specific Styles */
.interactive-table,
.behavior-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.interactive-table th,
.interactive-table td,
.behavior-table th,
.behavior-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.interactive-table tr {
    cursor: pointer;
    transition: background 0.2s;
}

.interactive-table tr:hover {
    background: #f0f7ff;
}

.selected-row {
    background: var(--primary-light) !important;
    border-left: 4px solid var(--primary-color);
}

.hidden-hint {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background: #f0fff4;
    border: 1px dashed var(--secondary-color);
    border-radius: 8px;
}

.hidden-hint.show {
    display: block;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.info-box {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

/* Accordion Styles */
.accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.accordion-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all 0.3s ease;
    width: 100%;
}

.accordion-header {
    padding: 1.5rem;
    background: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    color: var(--primary-color);
    transition: background 0.2s;
}

.accordion-header:hover {
    background: var(--primary-light);
}

.accordion-header::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 400;
    transition: transform 0.3s;
}

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

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #fcfcfd;
}

.accordion-body {
    padding: 1rem 2rem;
}

.accordion-content-inner {
    padding: 1.5rem;
    border-top: 1px solid #e2e8f0;
}


.example-box {
    background: #fffaf0;
    padding: 1rem;
    border-left: 4px solid #f6ad55;
    margin: 1rem 0;
    border-radius: 4px;
}

.card-inner {
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
    margin-top: 1rem;
}

.behavior-table input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.sources-grid .source-card {
    transition: transform 0.2s;
}

.sources-grid .source-card:hover {
    transform: scale(1.02);
}

/* Interactive Table Cells */
.selectable-cell {
    cursor: pointer;
    transition: background 0.2s;
}

.selectable-cell:hover {
    background-color: #f1f5f9;
}

.selected-cell {
    background-color: var(--secondary-light) !important;
    font-weight: 600;
    color: var(--accent-color);
    border-left: 4px solid var(--secondary-color) !important;
    box-shadow: inset 0 0 10px rgba(247, 148, 29, 0.1);
}

.inline-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary-color);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    margin-right: 12px;
    flex-shrink: 0;
}

.inline-icon svg {
    width: 20px;
    height: 20px;
}

/* Module 2 Specific Styles END */

/* Flip Cards */
.flip-card-container {
    background-color: transparent;
    width: 100%;
    height: 320px;
    perspective: 1000px;
    margin-bottom: 20px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
}

.flip-card-container:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.flip-card-front {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: var(--text-color);
}

.flip-card-front h4 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.flip-card-front .icon-large {
    width: 64px;
    height: 64px;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.flip-card-back {
    background: linear-gradient(135deg, var(--primary-color) 0%, #006064 100%);
    color: white;
    transform: rotateY(180deg);
    overflow-y: auto;
    text-align: center;
}

.flip-card-back h4 {
    color: white !important;
    border-bottom-color: rgba(255, 255, 255, 0.3);
    margin-bottom: 1rem;
}

.flip-card-back p {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Scaffolding Enhancements */
.scaffold-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.scaffold-card {
    flex: 1;
    min-width: 250px;
    padding: 1.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: none !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    background: white;
    position: relative;
    overflow: hidden;
}

.scaffold-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
}

.scaffold-card.under {
    background: #fff5f5;
}

.scaffold-card.under::before {
    background: #ef4444;
}

.scaffold-card.under h4 {
    color: #ef4444;
}

.scaffold-card.optimal {
    background: #f0fdf4;
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(22, 163, 74, 0.15);
    z-index: 2;
    border: 1px solid #dcfce7 !important;
}

.scaffold-card.optimal::before {
    background: #22c55e;
}

.scaffold-card.optimal h4 {
    color: #16a34a;
}

.scaffold-card.over {
    background: #f8fafc;
}

.scaffold-card.over::before {
    background: #94a3b8;
}

.scaffold-card.over h4 {
    color: #64748b;
}

.scaffold-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.scaffold-card.optimal:hover {
    transform: scale(1.08) translateY(-5px);
}

/* AI Comparison Table Styling */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-size: 0.95rem;
}

.data-table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
}

.data-table th {
    padding: 1.2rem;
    text-align: left;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table th:last-child {
    border-right: none;
}

.data-table td {
    padding: 1.2rem;
    border-bottom: 1px solid #eef2f3;
    vertical-align: top;
    color: var(--text-color);
    background: white;
    transition: background 0.3s;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:nth-child(even) td {
    background: #f8fbff;
}

.data-table tr:hover td {
    background: #e0f2f1;
    color: var(--accent-color);
}

.data-table td strong {
    color: var(--primary-color);
    font-size: 1rem;
}