:root {
    --bg-color: #f8fafc;
    --surface-color: #ffffff;
    --surface-hover: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --accent-cyan: #0087ca;
    --accent-blue: #0087ca;
    --accent-purple: #7c3aed;
    --accent-cyan-glow: rgba(255, 51, 102, 0.12);
    --accent-purple-glow: rgba(124, 58, 237, 0.12);
    --glass-blur: blur(8px);
}

.modern-scroll::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.modern-scroll::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.modern-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.modern-scroll::-webkit-scrollbar-thumb:hover {
    background: #0087ca;
}

#modern-case-studies-wrapper {
    background-color: transparent !important;
    background-image: none !important;
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    padding-top: 110px;
    padding-bottom: 80px;
}

#modern-case-studies-wrapper::before,
#modern-case-studies-wrapper::after {
    display: none;
}

.mcs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.mcs-header {
    text-align: center;
    margin-bottom: 44px;
}

.mcs-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 14px;
    color: #0f172a;
}

.mcs-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.6;
}

.mcs-controls {
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mcs-search-box {
    position: relative;
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
}

.mcs-search-box input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    color: #0f172a;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.mcs-search-box input:focus {
    outline: none;
    border-color: #ff3366;
    box-shadow: 0 0 12px rgba(255, 51, 102, 0.2);
    background: #ffffff;
}

.mcs-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
}

.mcs-clear-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
}

.mcs-clear-btn:hover {
    color: #0f172a;
}

.mcs-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.mcs-filter-btn {
    padding: 8px 20px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 30px;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    transition: all 0.25s ease;
}

.mcs-filter-btn:hover {
    color: #0f172a;
    border-color: #94a3b8;
    background: #f8fafc;
}

.mcs-filter-btn.active {
    background: #0087ca;
    color: #ffffff;
    border-color: #ff3366;
    box-shadow: 0 4px 12px rgba(255, 51, 102, 0.25);
    font-weight: 600;
}

.mcs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
}

.mcs-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.3s ease;
    height: 100%;
}

.mcs-card:hover {
    transform: translateY(-5px);
    border-color: #ff3366;
    box-shadow: 0 12px 28px rgba(255, 51, 102, 0.15);
}

.mcs-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.mcs-category-badge {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #0087ca;
    background: rgba(255, 51, 102, 0.08);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 51, 102, 0.18);
}

.mcs-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
    color: #0f172a;
    transition: color 0.25s ease;
}

.mcs-card:hover h3 {
    color: #0087ca;
}

.mcs-card p.mcs-desc {
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-secondary);
    flex-grow: 1;
    margin-bottom: 18px;
}

.mcs-card-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}

.mcs-tech-tag {
    font-size: 0.75rem;
    color: #334155;
    background: #f1f5f9;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    font-weight: 500;
}

.mcs-card-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #0087ca;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: color 0.25s ease;
}

.mcs-card-footer .mcs-arrow-icon {
    transition: transform 0.3s ease;
}

.mcs-card:hover .mcs-card-footer .mcs-arrow-icon {
    transform: translateX(5px);
}

.mcs-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 850px;
    height: 100vh;
    background: #ffffff;
    z-index: 2000;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    transition: right 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    border-left: 1px solid #e2e8f0;
}

.mcs-drawer.open {
    right: 0;
}

.mcs-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    isolation: isolate;
}

.mcs-drawer-backdrop::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.mcs-drawer-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.mcs-drawer-header {
    padding: 24px 32px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.mcs-drawer-title-area h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.65rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.mcs-drawer-close-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.mcs-drawer-close-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    transform: rotate(90deg);
}

.mcs-drawer-body {
    padding: 32px;
    overflow-y: auto;
    flex-grow: 1;
    background: #ffffff;
}

.mcs-comp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.mcs-comp-card {
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.mcs-comp-card.old {
    background: #f8fafc;
    border-left: 4px solid #94a3b8;
}

.mcs-comp-card.modernized {
    background: rgba(255, 51, 102, 0.03);
    border-left: 4px solid #0087ca;
    box-shadow: 0 4px 15px rgba(255, 51, 102, 0.05);
}

.mcs-comp-card h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mcs-comp-card h4.old-title {
    color: #64748b;
}

.mcs-comp-card h4.modern-title {
    color: #0087ca;
}

.mcs-comp-card ul {
    padding-left: 18px;
    margin: 0;
}

.mcs-comp-card ul li {
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 8px;
    color: #475569;
}

.mcs-comp-card.modernized ul li {
    color: #1e293b;
}

.mcs-tech-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 32px;
}

.mcs-tech-table th,
.mcs-tech-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.875rem;
}

.mcs-tech-table th {
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    background: #f8fafc;
}

.mcs-tech-table td.tech-old {
    color: #94a3b8;
    text-decoration: line-through;
}

.mcs-tech-table td.tech-modern {
    color: #0087ca;
    font-weight: 600;
}

.mcs-timeline {
    position: relative;
    padding-left: 24px;
    border-left: 2px solid #e2e8f0;
    margin-bottom: 32px;
}

.mcs-timeline-item {
    position: relative;
    margin-bottom: 24px;
}

.mcs-timeline-item::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #0087ca;
}

.mcs-timeline-phase {
    font-size: 0.75rem;
    font-weight: 700;
    color: #0087ca;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.mcs-timeline-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: #0f172a;
    margin-bottom: 6px;
}

.mcs-timeline-desc {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.4;
}

.mcs-preview-section {
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 24px;
    background: #f8fafc;
    margin-bottom: 32px;
}

.mcs-preview-section h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mcs-preview-widget {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
}

.mcs-spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 24px;
    margin-bottom: 32px;
}

.mcs-spec-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    text-align: left;
}

.mcs-spec-card h5 {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: #0087ca;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    margin-top: 0;
}

.mcs-spec-card p {
    font-size: 0.85rem;
    line-height: 1.4;
    color: #1e293b;
    margin: 0;
}

.mcs-section-card {
    display: flex;
    gap: 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.mcs-section-card:hover {
    background: #ffffff;
    border-color: #ff3366;
    box-shadow: 0 4px 12px rgba(255, 51, 102, 0.12);
}

.mcs-section-num {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #0087ca;
    opacity: 0.8;
    line-height: 1;
    min-width: 32px;
}

.mcs-section-content {
    flex-grow: 1;
    text-align: left;
}

.mcs-section-content h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin-top: 0;
    margin-bottom: 8px;
}

.mcs-section-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #334155;
    margin: 0;
}

.mcs-mockup-container {
    margin-bottom: 32px;
}

.mcs-mockup-image {
    width: 100%;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    object-fit: cover;
    max-height: 480px;
}

@media (max-width:768px) {
    .mcs-comp-grid {
        grid-template-columns: 1fr;
    }

    .mcs-header h2 {
        font-size: 2.2rem;
    }
}

@media (hover:hover) {
    .cs-card.featured-card .view-live-cta {
        opacity: 0;
        pointer-events: none;
        transform: scale(0.95) translateY(5px);
        transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .cs-card.featured-card:hover .view-live-cta {
        opacity: 1;
        pointer-events: auto;
        transform: scale(1) translateY(0);
    }
}