.header-title {
    width: 90%;
    margin: 60px auto 20px;
    text-align: center;
}

.header-title h1 {
    font-size: 45px;
    font-weight: 700;
}

.header-title p {
    margin-top: 10px;
    color: var(--subtext);
}

/* GRID */
.case-grid {
    width: 90%;
    margin: 40px auto 80px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 40px;
}

.case-box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    transition: 0.3s;
}

.case-box img {
    width: 100%;
    border-radius: 12px;
}

.case-box h2 {
    margin: 15px 0 8px;
}

.case-box p {
    color: var(--subtext);
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 16px;
}

.case-box:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

/* VIEW BUTTON */
.view-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
    transition: 0.3s;
}

.view-btn:hover {
    opacity: 0.85;
}

/* CASE STUDY OVERLAY */
.case-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    overflow-y: auto;
    padding: 40px 20px;
}

.case-overlay.show {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.case-overlay-content {
    background: var(--card-bg);
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    margin: auto;
    position: relative;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.close-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 32px;
    cursor: pointer;
    color: var(--text);
    z-index: 10001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--card-bg);
    transition: 0.3s;
}

.close-overlay:hover {
    background: var(--border);
    transform: rotate(90deg);
}

.case-overlay-body {
    padding: 50px 40px;
}

.case-overlay-body img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 30px;
}

.case-overlay-body h2 {
    font-size: 32px;
    margin-bottom: 15px;
}

.case-overlay-body .case-description {
    color: var(--subtext);
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 30px;
}

.case-overlay-body .case-details {
    margin-bottom: 30px;
}

.case-overlay-body .case-details h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--accent);
}

.case-overlay-body .case-details ul {
    list-style: none;
    padding: 0;
}

.case-overlay-body .case-details ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.case-overlay-body .case-details ul li:last-child {
    border-bottom: none;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.tech-badge {
    background: var(--accent);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* Challenge Items */
.challenge-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
}

.challenge-item:last-child {
    margin-bottom: 0;
}

.challenge-item h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text);
}

.challenge-item p {
    color: var(--subtext);
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
}

/* Section heading icons */
.case-details h3 i {
    margin-right: 8px;
    color: var(--accent);
}

/* Features list styling */
.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
    border-bottom: 1px solid var(--border);
}

.features-list li:last-child {
    border-bottom: none;
}

.features-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
    font-size: 18px;
}

@media (max-width: 768px) {
    .case-overlay-content {
        margin: 20px;
        border-radius: 16px;
    }
    
    .case-overlay-body {
        padding: 30px 20px;
    }
    
    .case-overlay-body h2 {
        font-size: 24px;
    }
}

