.case-study-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    padding-top: 100px;
}

.case-study-header {
    margin-bottom: 40px;
    margin-top: 40px;
}

.case-study-title {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.case-study-featured-image {
    margin: 30px 0;
}

.case-study-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.case-study-meta {
    background: #f5f5f5;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-weight: bold;
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.meta-value {
    font-size: 1.1em;
}

.case-study-section {
    margin: 50px 0;
}

.case-study-section h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #333;
}

.section-content {
    line-height: 1.8;
    font-size: 1.1em;
}

.case-study-gallery {
    margin: 50px 0;
}

.case-study-gallery h2 {
    font-size: 2em;
    margin-bottom: 30px;
    color: #333;
    text-align: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.gallery-item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 4/3;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.05);
}

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

.case-study-testimonial {
    background: #f9f9f9;
    padding: 40px;
    border-left: 5px solid #667eea;
    margin: 50px 0;
}

.case-study-testimonial blockquote {
    margin: 0;
    font-size: 1.2em;
    line-height: 1.6;
    font-style: italic;
}

.case-study-testimonial cite {
    display: block;
    margin-top: 20px;
    font-style: normal;
    font-weight: bold;
    color: #666;
}

@media (max-width: 768px) {
    .case-study-title {
        font-size: 1.8em;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Lightbox Styles */
#csm-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.csm-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
}

.csm-lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.csm-lightbox-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    position: relative;
    z-index: 10000;
}

.csm-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10001;
    padding: 10px;
    line-height: 1;
}

.csm-lightbox-close:hover {
    color: #ccc;
}

.csm-lightbox-prev,
.csm-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    cursor: pointer;
    padding: 20px;
    z-index: 10001;
    transition: background 0.3s;
}

.csm-lightbox-prev:hover,
.csm-lightbox-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.csm-lightbox-prev {
    left: 20px;
}

.csm-lightbox-next {
    right: 20px;
}

.csm-lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 18px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 20px;
    z-index: 10001;
}

@media (max-width: 768px) {
    .csm-lightbox-prev,
    .csm-lightbox-next {
        font-size: 30px;
        padding: 15px;
    }
    
    .csm-lightbox-close {
        font-size: 30px;
        top: 10px;
        right: 10px;
    }
}

/* Archive Page Styles */
.case-studies-archive {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    padding-top: 100px;
}

.archive-header {
    text-align: center;
    margin-bottom: 60px;
}

.archive-title {
    font-size: 3em;
    margin-bottom: 15px;
}

.archive-description {
    font-size: 1.2em;
    color: #666;
}

.case-studies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.case-study-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.case-study-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.case-study-card .card-image {
    display: block;
    overflow: hidden;
}

.case-study-card .card-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.case-study-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 30px;
}

.card-title {
    margin: 0 0 15px 0;
    font-size: 1.5em;
}

.card-title a {
    color: #333;
    text-decoration: none;
}

.card-title a:hover {
    color: #667eea;
}

.card-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9em;
}

.meta-client {
    color: #667eea;
    font-weight: bold;
}

.meta-industry {
    color: #999;
}

.meta-industry:before {
    content: "•";
    margin-right: 8px;
}

.card-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.card-link {
    display: inline-block;
    color: #667eea;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}

.card-link:hover {
    color: #764ba2;
}

.no-case-studies {
    text-align: center;
    font-size: 1.2em;
    color: #999;
    padding: 60px 20px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination .nav-links {
    display: flex;
    gap: 10px;
}

.pagination a,
.pagination span {
    padding: 10px 15px;
    background: #f5f5f5;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.pagination a:hover {
    background: #667eea;
    color: white;
}

.pagination .current {
    background: #667eea;
    color: white;
}

@media (max-width: 768px) {
    .archive-title {
        font-size: 2em;
    }
    
    .case-studies-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}