/* Case Study: Modern Visual (SaaS/Tech) Theme */
@import url('../courses/assets/css/style.css');
@import url('../courses/assets/font/stylesheet.css');

:root {
    --cs-primary: #393AA0;
    --cs-primary-dark: #2a2b75;
    --cs-accent: #ff3e67;
    --cs-gradient: linear-gradient(135deg, #101035 0%, #393AA0 50%, #ff3e67 100%);

    --cs-text-dark: #1e1e2f;
    --cs-text-gray: #6b7280;
    --cs-text-light: #9ca3af;

    --cs-bg-body: #f3f4f6;
    --cs-bg-white: #ffffff;

    --cs-radius: 16px;
    --cs-shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --cs-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --cs-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* === Global Reset & Typography === */
body {
    background-color: var(--cs-bg-body);
    /* Subtle dot pattern for texture */
    background-image: radial-gradient(#e5e7eb 1px, transparent 1px);
    background-size: 20px 20px;
    color: var(--cs-text-dark);
    font-family: 'Gordita', 'Inter', 'Helvetica Neue', sans-serif !important;
    line-height: 1.6;
}

/* === Header Override (Case Study Specific) === */
.headerSection {
    background: #ffffff !important;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.1) !important;
    position: absolute !important;
    width: 100%;
    z-index: 100;
}

/* Force header links to be dark on the white header */
.headerSection a {
    color: #fff;
}

/* Ensure Logo and Menu are visible */
.logo-mainhead-headerSection,
.menu-mainhead-headerSection {
    position: relative;
    z-index: 101;
}

.menu-items>li>a {
    color: var(--cs-text-dark) !important;
    font-weight: 600;
}

.menu-items>li>a:hover {
    color: var(--cs-primary) !important;
}

/* Fix for dropdowns (reset color to black for white bg dropdowns) */
.course-drap-down li a,
.agile-course-drap-down li a {
    color: #333 !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--cs-text-dark);
    font-weight: 700;
    margin-top: 0;
    line-height: 1.25;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

/* === Layout Utilities === */
.cs-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

/* === Hero Section (Vibrant) === */
.cs-hero {
    background: var(--cs-gradient);
    color: #fff;
    padding-top: 180px;
    /* Extra padding to account for the absolute header overlay */
    padding-bottom: 140px;
    text-align: center;
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
    /* Slanted edge */
}

/* Decorative background circle (optional sparkle) */
.cs-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 60%);
    transform: rotate(30deg);
    pointer-events: none;
}

.cs-hero h1 {
    font-size: 3.5rem;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-weight: 800;
}

.cs-hero p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto;
    font-weight: 400;
}

.cs-tag-hero {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}


/* === Index Grid Layout (Modern Cards) === */
.cs-grid-section {
    padding: 50px 0;
    margin-top: -80px;
    /* Overlap the hero */
}

.cs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.cs-card {
    background: var(--cs-bg-white);
    border-radius: var(--cs-radius);
    box-shadow: var(--cs-shadow-md);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.cs-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--cs-shadow-lg);
}

.cs-card-header {
    height: 180px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Gradient overlay on card headers */
.cs-card-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom right, rgba(57, 58, 160, 0.1), rgba(255, 62, 103, 0.1));
}

.cs-card-header i {
    font-size: 4rem;
    color: var(--cs-primary);
    z-index: 1;
}

.cs-card-body {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.cs-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--cs-accent);
    margin-bottom: 12px;
}

.cs-card-title {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--cs-text-dark);
}

.cs-card-excerpt {
    color: var(--cs-text-gray);
    font-size: 1rem;
    margin-bottom: 24px;
    flex-grow: 1;
}

/* Buttons */
.cs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: var(--cs-primary);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.cs-btn:hover {
    background: var(--cs-accent);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 62, 103, 0.3);
}

.cs-btn-outline {
    background: transparent;
    border: 2px solid var(--cs-primary);
    color: var(--cs-primary);
}

.cs-btn-outline:hover {
    background: var(--cs-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(57, 58, 160, 0.3);
}


/* === Detailed Article Layout (Floating Sheet) === */

.cs-floating-content {
    background: rgba(255, 255, 255, 0.95);
    /* Slight transparency */
    backdrop-filter: blur(10px);
    border-radius: var(--cs-radius);
    /* Rich, colored shadow */
    box-shadow: 0 20px 40px -10px rgba(57, 58, 160, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.5);
    padding: 50px 60px;
    /* Reduced vertical padding */
    margin-top: -120px;
    /* Pull up more into the hero */
    margin-bottom: 80px;
    position: relative;
    z-index: 20;
}

.cs-article-wrapper {
    display: flex;
    gap: 60px;
}

.cs-article-main {
    flex: 2;
    min-width: 0;
    /* Flexbox overflow fix */
}

.cs-article-sidebar {
    flex: 0 0 340px;
}

/* Typography Details */
.cs-article-content {
    font-size: 1.125rem;
    color: #374151;
    max-width: 68ch;
    /* Optimal Line Length */
    margin: 0 auto;
    /* Center the text column */
}

.cs-article-content h2 {
    font-size: 2rem;
    margin: 40px 0 20px;
    position: relative;
    padding-bottom: 15px;
}

.cs-article-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--cs-accent);
    border-radius: 2px;
}

.cs-article-content h3 {
    font-size: 1.5rem;
    margin: 30px 0 15px;
    color: var(--cs-primary);
}

.cs-article-content ul,
.cs-article-content ol {
    margin: 24px 0;
}

.cs-article-content li {
    margin-bottom: 8px;
}


/* === Component Boxes === */

.cs-section-header {
    display: flex;
    align-items: center;
    margin: 40px 0 20px;
    /* Remove the full-width border to avoid double lines */
    border-bottom: none;
    padding-bottom: 0;
}

/* Ensure the title inside header keeps its own accent but matches alignment */
.cs-section-header .cs-section-title {
    margin: 0;
    margin-left: 15px;
    /* Gap between number and text */
    padding-bottom: 10px;
    /* Space for the accent line */
    font-size: 1.75rem;
    position: relative;
    top: 5px;
    /* Optical alignment adjustment */
}


/* ... existing code ... */

/* 1. Summary Box - Glass Style */
.cs-summary-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, #f9fafb 100%);
    backdrop-filter: blur(5px);
    border: 1px solid #e5e7eb;
    border-left: 6px solid var(--cs-primary);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* 2. Diagnosis (Errors) */
.cs-diagnosis-list {
    list-style: none;
    padding: 0;
}

.cs-diagnosis-list li {
    background: #fff0f1;
    /* Light red bg */
    border: 1px solid #ffe0e3;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    border-left: 5px solid #ff3e67;
}

.cs-diagnosis-list strong {
    color: #d63056;
    display: block;
    margin-bottom: 5px;
}

/* 3. Solution (Success) - Glass Style */
.cs-solution-box {
    background: linear-gradient(135deg, #ecfdf5 0%, rgba(255, 255, 255, 0.8) 100%);
    /* Light green bg */
    border: 1px solid #d1fae5;
    padding: 30px;
    border-radius: 12px;
    margin: 30px 0;
    box-shadow: 0 4px 6px -1px rgba(5, 150, 105, 0.1);
}

.cs-solution-box h3 {
    color: #059669;
    margin-top: 0;
}

/* 4. Sidebar */
.cs-meta-box {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    /* No sticky here if parent is sticky, or make this sticky */
    position: sticky;
    top: 30px;
}

.cs-meta-box h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--cs-text-gray);
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.cs-meta-list {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.cs-meta-list li {
    margin-bottom: 12px;
    color: var(--cs-text-dark);
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
    /* Align top if text wraps */
    gap: 10px;
    /* Consistent gap instead of space-between */
}

.cs-meta-list strong {
    color: var(--cs-primary);
}

/* Download Buttons Override */
.cs-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    margin-bottom: 12px;
    background: white;
    color: var(--cs-text-dark);
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
}

.cs-download-btn:hover {
    border-color: var(--cs-primary);
    color: var(--cs-primary);
    background: #f8faff;
    transform: translateY(-2px);
    box-shadow: var(--cs-shadow-sm);
}

.cs-download-btn.primary-dl {
    background: var(--cs-primary);
    color: white;
    border-color: var(--cs-primary);
}

.cs-download-btn.primary-dl:hover {
    background: var(--cs-primary-dark);
    border-color: var(--cs-primary-dark);
    color: white;
}

/* === Quiz Section Design === */
.cs-quiz-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s;
}

.cs-quiz-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
}

.cs-quiz-question {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--cs-primary);
    margin-bottom: 20px;
    display: block;
}

/* Radio Option Styling */
.cs-quiz-options-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.cs-radio-label {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 2px solid #eee;
    /* Thicker border for better click feel */
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
    color: var(--cs-text-dark);
}

.cs-radio-label:hover {
    background: #f0fdf4;
    border-color: #d1fae5;
}

.cs-radio-input {
    margin-right: 12px;
    accent-color: var(--cs-primary);
    /* Modern browser radio color */
    transform: scale(1.2);
}

/* Selected State */
.cs-radio-label:has(.cs-radio-input:checked) {
    background: #e0e7ff;
    /* Light blue bg */
    border-color: var(--cs-primary);
    color: var(--cs-primary);
    font-weight: 600;
}

/* Gate Footer */
.cs-quiz-footer {
    border-top: 1px dashed #e5e7eb;
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cs-quiz-gate-msg {
    font-size: 0.85rem;
    color: var(--cs-text-gray);
    font-style: italic;
}

/* Reuse existing reveal styles just in case we want to show it later via JS */
.cs-quiz-answer-hidden {
    display: none;
}

/* Reveal Toggle */
.cs-quiz-reveal {
    border-top: 1px dashed #e5e7eb;
    padding-top: 15px;
}

.cs-quiz-reveal summary {
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cs-text-gray);
    outline: none;
    user-select: none;
}

.cs-quiz-reveal summary:hover {
    color: var(--cs-primary);
}

.cs-quiz-answer {
    margin-top: 15px;
    background: #ecfdf5;
    padding: 15px;
    border-left: 4px solid #10b981;
    border-radius: 4px;
    font-size: 0.95rem;
}

.cs-quiz-answer strong {
    color: #047857;
    display: block;
    margin-bottom: 5px;
}

/* === Exam Corner High-Impact Design === */
.cs-exam-corner {
    background: linear-gradient(135deg, #1e1e2f 0%, #2d2d44 100%);
    border-radius: 16px;
    padding: 35px;
    margin: 50px -20px 50px -20px;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

/* Decorative accent */
.cs-exam-corner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #ff3e67, #3c3db4);
}

.cs-exam-corner h2.cs-section-title {
    color: #fff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-block;
    padding-bottom: 10px;
    margin-bottom: 25px;
}

.cs-exam-corner h4 {
    color: #a5b4fc;
    margin-top: 30px;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* Dark Theme Table */
.cs-exam-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.05);
    /* Glassy background */
    border-radius: 8px;
    overflow: hidden;
}

.cs-exam-table th {
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    text-align: left;
    padding: 15px;
    font-weight: 600;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.cs-exam-table td {
    padding: 15px;
    color: #e5e7eb;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cs-exam-table tr:last-child td {
    border-bottom: none;
}

/* Strategy List */
.cs-exam-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cs-exam-list li {
    background: rgba(255, 255, 255, 0.08);
    margin-bottom: 10px;
    padding: 12px 15px;
    border-radius: 6px;
    border-left: 3px solid #ff3e67;
    /* Accent border */
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
    transition: transform 0.2s;
    color: #fff;
}

.cs-exam-list li:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.12);
}

.cs-exam-list li i {
    color: #ff3e67;
    margin-top: 4px;
}

/* Responsive */
@media (max-width: 900px) {
    .cs-article-wrapper {
        flex-direction: column;
    }

    .cs-article-sidebar {
        width: 100%;
        flex: auto;
    }

    .cs-floating-content {
        padding: 30px;
    }

    .cs-exam-corner {
        margin: 30px 0;
        padding: 20px;
    }
}