 
* {
    box-sizing: border-box;
    font-family: "apertura", sans-serif;
}

:root {
    /* Blue */
    --color-matisse-50: #f1f8fe;
    --color-matisse-100: #e3effb;
    --color-matisse-200: #c0dff7;
    --color-matisse-300: #88c6f1;
    --color-matisse-400: #49a8e7;
    --color-matisse-500: #218ed6;
    --color-matisse-600: #1370b6;
    --color-matisse-700: #1261a0;
    --color-matisse-800: #124c7a;
    --color-matisse-900: #144166;
    --color-matisse-950: #0e2943;

    /* Accent */
    --color-red: #e63946;

    /* Neutrals */
    --color-white: #ffffff;
    --color-off-white: #f5f8fa;
    --color-black: #111111;
}

h1, h2, h3, h4, h5 {
    font-family: "din-2014", sans-serif;
    margin: 0;
}

.cs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 64px 24px;
}

/* --- Hero Section --- */
.cs-grid-hero {
    background-color: var(--color-matisse-800);
    text-align: center;
    padding: 100px 16px;
}

.cs-grid-hero .cs-container {
	padding: 0!important;
}

.cs-subtitle {
    display: block;
    color: var(--color-matisse-200);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.cs-title {
    color: var(--color-white);
    font-size: 4rem;
    line-height: 1.2;
}

/* --- Grid Section --- */
.cs-grid-wrapper {
    padding: 80px 0;
    background-color: var(--color-white);
}

.cs-grid-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -20px;
}

.col-12 {
    width: 100%;
    padding: 0 20px;
    margin-bottom: 60px;
}

.post-item {
    position: relative;
    display: block;
    transition: transform 0.3s ease;
}

.post-item:hover {
    transform: translateY(-5px);
}

.stretched-link::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    content: "";
}

/* The Pointy SVG Mask Container */
.case-study-item-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 600 / 492; /* Match SVG ViewBox */
    background-color: var(--color-matisse-50);
    margin-bottom: 24px;
    /* Apply SVG mask from HTML */
    clip-path: url(#cs-clippath);
    -webkit-clip-path: url(#cs-clippath); 
}

.case-study-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease;
}

.post-item:hover .case-study-image {
    transform: scale(1.05);
}

.content h2 {
    color: var(--color-matisse-700);
    font-size: 1.75rem;
    margin-bottom: 12px;
    line-height: 1.2;
}

.content p {
    color: #666666;
    font-size: 0.95rem;
    margin: 0;
}

.content .cat {
    font-weight: 500;
    color: var(--color-matisse-900);
}

/* --- WordPress Native Pagination --- */
.cs-pagination {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

.cs-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #e0e0e0;
    color: var(--color-black);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cs-pagination .page-numbers:hover {
    border-color: var(--color-matisse-500);
    color: var(--color-matisse-500);
}

.cs-pagination .page-numbers.current {
    background-color: var(--color-matisse-500);
    border-color: var(--color-matisse-500);
    color: var(--color-white);
}

.cs-pagination .page-numbers.dots {
    border: none;
    background: transparent;
    color: #999;
    width: auto;
}

/* --- Bottom CTA Section --- */
.cs-cta-section {
    padding: 60px 0 100px;
}

.cs-cta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.cs-cta-card {
    padding: 48px;
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Pointy Corners via CSS Polygon */
    -webkit-clip-path: polygon(60px 0, 100% 0, 100% calc(100% - 60px), calc(100% - 60px) 100%, 0 100%, 0 60px);
    clip-path: polygon(60px 0, 100% 0, 100% calc(100% - 60px), calc(100% - 60px) 100%, 0 100%, 0 60px);
}

.cs-cta-primary {
    background-color: var(--color-matisse-500);
}

.cs-cta-secondary {
    background-color: var(--color-matisse-900);
}

.cs-cta-title {
    font-size: 2rem;
    margin-bottom: 16px;
    color: var(--color-white);
}

.cs-cta-text {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 32px;
    opacity: 0.9;
}

/* Form in the Primary CTA */
.cs-cta-form {
    display: flex;
    width: 100%;
    max-width: 400px;
    background: var(--color-white);
    padding: 4px;
    margin-bottom: 16px;
}

.cs-cta-form input {
    flex-grow: 1;
    border: none;
    padding: 12px 16px;
    font-family: "apertura", sans-serif;
    outline: none;
}

.cs-cta-form button {
    background-color: var(--color-red);
    color: var(--color-white);
    border: none;
    width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cs-cta-form button:hover {
    background-color: #d12e3b;
}

.cs-cta-link {
    color: var(--color-white);
    text-decoration: underline;
    font-size: 0.875rem;
}

/* Button in the Secondary CTA */
.cs-btn {
    display: inline-block;
    background-color: var(--color-red);
    color: var(--color-white);
    padding: 16px 32px;
    text-decoration: none;
    font-weight: 600;
    align-self: flex-start;
    transition: background-color 0.3s ease;
}

.cs-btn:hover {
    background-color: #d12e3b;
}

/* --- Responsive Adjustments --- */
@media (min-width: 768px) {
    .col-md-6 {
        width: 50%;
    }
}

@media (max-width: 1024px) {
    .cs-container {
        max-width: 1024px;
    }
    
    .cs-cta-card {
        padding: 32px;
    }
}

@media (max-width: 767px) {
    .cs-grid-hero {
        padding: 60px 16px;
    }

    .cs-title {
        font-size: 2.25rem;
    }

    .cs-grid-wrapper, 
    .cs-cta-section {
        padding-top: 48px;
        padding-bottom: 48px;
    }
    
    .cs-pagination {
        justify-content: center;
        margin-top: 20px;
    }

    .cs-cta-grid {
        grid-template-columns: 1fr;
    }
    
    .cs-cta-card {
        /* Adjust clip-path size for mobile if needed */
        -webkit-clip-path: polygon(40px 0, 100% 0, 100% calc(100% - 40px), calc(100% - 40px) 100%, 0 100%, 0 40px);
        clip-path: polygon(40px 0, 100% 0, 100% calc(100% - 40px), calc(100% - 40px) 100%, 0 100%, 0 40px);
    }
}