/* ========== Case Study Layout ========== */
.case-hero {
    padding: var(--space-3xl) 0 var(--space-xl);
}

/* hero uses default Bootstrap container width */

.case-hero h1 {
    margin-bottom: var(--space-md);
}

.case-hero p,
.case-hero .lead {
    color: var(--primary-5);
    font-size: 1.1rem;
    line-height: 1.7;
}

.case-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xl);
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.case-meta-item {
    font-size: 0.85rem;
}

.case-meta-label {
    color: var(--primary-4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.7rem;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.case-meta-value {
    color: white;
    font-weight: 600;
}

.case-section {
    padding: var(--space-2xl) 0;
}

/* sections use default Bootstrap container width */

.case-section h2 {
    margin-bottom: var(--space-lg);
}

.case-note {
    background: var(--secondary-6);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    font-size: 0.85rem;
    color: var(--secondary-1);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* ========== Mockup Container ========== */
.mockup-browser {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.mockup-browser-bar {
    background: var(--primary-6);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.mockup-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
}

.mockup-dot:nth-child(1) { background: #ff5f57; }
.mockup-dot:nth-child(2) { background: #ffbd2e; }
.mockup-dot:nth-child(3) { background: #28c840; }

.mockup-url {
    flex: 1;
    background: white;
    border-radius: 4px;
    padding: 4px 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 8px;
}

.mockup-content {
    padding: var(--space-lg);
    min-height: 300px;
}

/* ========== Phone Mockup ========== */
.mockup-phone {
    width: 280px;
    background: var(--primary-0);
    border-radius: 32px;
    padding: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    margin: 0 auto;
}

.mockup-phone-screen {
    background: var(--color-surface);
    border-radius: 22px;
    overflow: hidden;
    min-height: 480px;
}

.mockup-phone-notch {
    width: 120px;
    height: 24px;
    background: var(--primary-0);
    border-radius: 0 0 16px 16px;
    margin: 0 auto;
}

/* ========== UI Elements (for mockup content) ========== */
.ui-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--primary-6);
}

.ui-nav-logo {
    width: 80px;
    height: 20px;
    background: var(--primary-3);
    border-radius: 4px;
}

.ui-nav-links {
    display: flex;
    gap: 12px;
}

.ui-nav-link {
    width: 40px;
    height: 8px;
    background: var(--primary-5);
    border-radius: 4px;
}

.ui-btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

.ui-btn-primary {
    background: var(--secondary-3);
    color: white;
}

.ui-btn-outline {
    border: 1.5px solid var(--primary-5);
    color: var(--primary-3);
    background: transparent;
}

.ui-card {
    background: var(--color-surface);
    border: 1px solid var(--primary-6);
    border-radius: var(--radius-md);
    padding: 12px;
}

.ui-skeleton {
    background: var(--primary-6);
    border-radius: 4px;
    height: 10px;
    margin-bottom: 8px;
}

.ui-skeleton.w-75 { width: 75%; }
.ui-skeleton.w-50 { width: 50%; }
.ui-skeleton.w-100 { width: 100%; }
.ui-skeleton.h-lg { height: 120px; border-radius: var(--radius-sm); }
.ui-skeleton.h-md { height: 40px; }

.ui-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--secondary-5);
    flex-shrink: 0;
}

.ui-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
}

.ui-badge-green { background: var(--secondary-6); color: var(--secondary-2); }
.ui-badge-blue { background: #dbeafe; color: #1d4ed8; }
.ui-badge-orange { background: #ffedd5; color: #c2410c; }
.ui-badge-red { background: #fee2e2; color: #dc2626; }

.ui-stat {
    text-align: center;
    padding: 12px;
}

.ui-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-3);
    line-height: 1;
}

.ui-stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.ui-input {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid var(--primary-6);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--primary-4);
    background: white;
    margin-bottom: 8px;
}

.ui-sidebar {
    background: var(--primary-0);
    padding: 16px;
    border-radius: var(--radius-md);
    min-height: 300px;
}

.ui-sidebar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 4px;
    font-size: 0.75rem;
    color: var(--primary-5);
}

.ui-sidebar-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.ui-sidebar-icon {
    width: 16px;
    height: 16px;
    background: currentColor;
    border-radius: 3px;
    opacity: 0.5;
}

/* ========== Color Palette Display ========== */
.palette-row {
    display: flex;
    border-radius: var(--radius-md);
    overflow: hidden;
    height: 80px;
    box-shadow: var(--shadow-sm);
}

.palette-color {
    flex: 1;
    display: flex;
    align-items: flex-end;
    padding: 8px;
}

.palette-color span {
    font-size: 0.65rem;
    font-weight: 600;
    opacity: 0.8;
}

/* ========== Typography Display ========== */
.type-sample {
    border: 1px solid var(--primary-6);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    background: white;
}

.type-sample h3 {
    font-weight: 700 !important;
    margin-bottom: var(--space-xs);
}

.type-sample p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ========== Metrics Grid ========== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-md);
}

.metric-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.metric-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-3);
    line-height: 1.1;
}

.metric-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.metric-change {
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 4px;
}

.metric-change.positive { color: var(--secondary-3); }
.metric-change.negative { color: #dc2626; }

/* ========== Flow Diagram ========== */
.flow-steps {
    display: flex;
    align-items: center;
    gap: 0;
    justify-content: center;
    flex-wrap: wrap;
}

.flow-step {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.flow-step.highlight {
    background: var(--secondary-3);
    color: white;
    border-color: var(--secondary-3);
}

.flow-arrow {
    color: var(--primary-5);
    font-size: 1.2rem;
    padding: 0 8px;
}

/* ========== Product Grid (e-commerce) ========== */
.ui-product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.ui-product {
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--primary-6);
}

.ui-product-img {
    height: 80px;
    background: var(--primary-6);
}

.ui-product-info {
    padding: 6px 8px;
}

.ui-product-name {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--primary-2);
}

.ui-product-price {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary-0);
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .mockup-phone {
        width: 240px;
    }

    .mockup-phone-screen {
        min-height: 380px;
    }

    .flow-steps {
        flex-direction: column;
    }

    .flow-arrow {
        transform: rotate(90deg);
    }

    .palette-row {
        height: 60px;
    }

    .case-meta {
        gap: var(--space-md);
    }
}
