/* Frontend Case Study Styles */

.csp-case-wrapper {
    margin-top: 40px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Image Blocks */
.csp-images-container {
    display: flex;
    /* Default row for desktop */
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    margin-bottom: 40px;
}

.csp-image-block {
    flex: 1;
    min-width: 280px;
    /* Responsive breakdown */
    text-align: center;
}

.csp-img-title {
    background-color: #3b3f5c;
    /* Dark blue/purple from screenshot */
    color: #fff;
    padding: 10px;
    font-weight: bold;
    margin-bottom: 0;
    font-size: 1.1em;
}

.csp-img-wrap {
    position: relative;
    background: #666;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.csp-img-wrap img {
    display: block;
    width: 100%;
    height: auto;
}

.csp-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 80px;
    font-weight: bold;
    z-index: 10;
    pointer-events: none;
    line-height: 1;
}

/* Main Text */
.csp-main-text {
    background: #fff;
    padding: 20px;
    margin-bottom: 40px;
    line-height: 1.8;
}

/* Data Table */
.csp-data-table-wrapper {
    margin-top: 30px;
    border: 1px solid #ddd;
    background: #f9f9f9;
}

.csp-data-table {
    width: 100%;
    border-collapse: collapse;
    border: none;
    margin: 0;
}

.csp-data-table th,
.csp-data-table td {
    border-bottom: 1px solid #ddd;
    padding: 15px;
    text-align: left;
    vertical-align: top;
}

.csp-data-table th {
    background-color: #f0f2f5;
    width: 30%;
    font-weight: bold;
    color: #333;
}

.csp-data-table td {
    background-color: #fff;
    color: #555;
}

@media (max-width: 768px) {
    .csp-images-container {
        flex-direction: column;
    }
}

/* Grid Layouts (5 and 9 images) */
.csp-grid-groups-container {
    margin-bottom: 30px;
}

.csp-grid-group-block {
    margin-bottom: 40px;
}

.csp-grid-group-title {
    background-color: #f7a496;
    /* Pink bar from screenshot */
    color: #fff;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 1.1em;
}

.csp-frontend-3x3-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    /* Tight spacing like the screenshot */
    max-width: 900px;
    margin: 0 auto;
}

/* Cross layout structure */
.csp-frontend-3x3-grid.csp-is-cross .csp-slot-0,
.csp-frontend-3x3-grid.csp-is-cross .csp-slot-2,
.csp-frontend-3x3-grid.csp-is-cross .csp-slot-6,
.csp-frontend-3x3-grid.csp-is-cross .csp-slot-8 {
    visibility: hidden;
    pointer-events: none;
}

.csp-grid-slot {
    aspect-ratio: 1;
    overflow: hidden;
    background: transparent;
    /* No background for empty slots */
    display: flex;
    align-items: center;
    justify-content: center;
}



.csp-grid-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* On Mobile, keep 3x3 but shrink gap */
@media (max-width: 600px) {
    .csp-frontend-3x3-grid {
        gap: 5px;
    }
}



/* =========================================
   Archive Page Styles
   ========================================= */
.csp-archive-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.csp-main-content {
    flex: 1;
    min-width: 0;
    /* Fix flex overflow */
}

/* Sidebar */
.csp-sidebar {
    width: 300px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .csp-sidebar {
        width: 100%;
        margin-top: 40px;
    }
}

.csp-widget {
    margin-bottom: 40px;
}

.csp-widget-title {
    background: #6c9bd2;
    /* Light Blue from screenshot */
    color: #fff;
    padding: 10px 15px;
    font-size: 16px;
    margin-bottom: 20px;
    border-radius: 2px;
}

.csp-widget-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.csp-widget-list li {
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.csp-widget-list li a {
    text-decoration: none;
    color: #333;
    display: block;
}

/* Tag Cloud Style */
.csp-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.csp-tag-badge {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    color: #555;
    background: #fff;
}

.csp-tag-badge:hover {
    background: #f0f0f0;
}

/* Archive List Items */
.csp-archive-item {
    margin-bottom: 60px;
    border-bottom: 1px solid #eee;
    padding-bottom: 40px;
}

.csp-archive-header {
    margin-bottom: 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 50px;
}

.page-title {
    color: #6c9bd2;
    font-size: 28px;
    border-bottom: none;
    /* Reset theme defaults */
    display: inline-block;
}

.csp-entry-title {
    font-size: 24px;
    margin-bottom: 10px;
}

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

.csp-meta-top {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #888;
    margin-bottom: 15px;
}

.csp-cat-link {
    color: #6c9bd2;
    font-weight: bold;
    text-decoration: none;
}

.csp-archive-body {
    /* Layout similar to screenshot 2: simple stack or side-by-side? 
       Screenshot 2 shows title top, then image block. 
       Let's keep it simple stack for now as per HTML structure. */
}

.csp-archive-thumb img {
    width: 100%;
    height: auto;
    display: block;
    background: #555;
    /* Placeholder gray */
    margin-bottom: 20px;
}

.csp-no-image {
    width: 100%;
    height: 300px;
    background: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    margin-bottom: 20px;
}

.csp-archive-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.csp-meta-tags {
    display: flex;
    gap: 10px;
}

.csp-tag-link {
    display: inline-block;
    padding: 4px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none;
    color: #666;
}

.csp-read-more {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid #ccc;
    color: #6cb4e4;
    /* Light text color */
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.csp-read-more:hover {
    background: #6cb4e4;
    color: #fff;
    border-color: #6cb4e4;
}

/* =========================================
   Slideshow (Splide) Styles
   ========================================= */
.csp-slideshow-container {
    padding: 60px 0;
    overflow: visible !important;
}

.splide__slide {
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.4s ease;
    opacity: 0.6;
}

/* Center Focus Effect */
.splide__slide.is-active {
    transform: scale(1.1);
    opacity: 1;
    z-index: 10;
}

.csp-slide-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 100%;
    max-width: 400px;
    border: 1px solid #eee;
}

.csp-slide-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.csp-slide-image-wrap {
    position: relative;
    aspect-ratio: 16/9;
    background: #555;
}

.csp-slide-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.csp-slide-cat-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #6cb4e4;
    color: #fff;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 2px;
}

.csp-slide-content {
    padding: 20px;
}

.csp-slide-meta-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 20px;
}

.csp-slide-meta-table th {
    text-align: left;
    width: 30%;
    padding: 8px 0;
    color: #333;
    font-weight: bold;
    vertical-align: top;
}

.csp-slide-meta-table td {
    padding: 8px 0;
    color: #666;
    line-height: 1.5;
}

.csp-slide-footer {
    border-top: 1px solid #eee;
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.csp-slide-date {
    font-size: 12px;
    color: #999;
}

.csp-slide-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.csp-slide-tags span {
    font-size: 11px;
    padding: 3px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
}

/* Arrows Styling */
.splide__arrow {
    background: #3b3f5c !important;
    opacity: 1 !important;
}

.splide__arrow svg {
    fill: #fff !important;
}

@media (max-width: 768px) {
    .splide__slide.is-active {
        transform: scale(1.05);
    }
}