/* ---------- SHARED CASE STUDY BLOCK STYLES ---------- */
.cs-block {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #eaeaea; /* Replicates the red box dividers cleanly */
    font-family: inherit;
}

.cs-block:last-child {
    border-bottom: none;
}

.cs-section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--ink);
}

/* 1. Article Header */
.cs-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.cs-tags span {
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.cs-title {
    font-size: clamp(32px, 4vw, 42px);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.cs-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: #666;
    flex-wrap: wrap;
}

.cs-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.cs-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 2. Media & Text */
.cs-mt-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    align-items: center;
}

.pos-right .cs-mt-grid {
    grid-template-columns: 2fr 1fr;
}
.pos-right .cs-mt-media {
    order: 2;
}

.cs-mt-media img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.cs-mt-content {
    font-size: 16px;
    line-height: 1.7;
    color: #444;
}

/* 3. Highlight Text */
.cs-ht-top {
    font-size: 16px;
    line-height: 1.7;
    color: #444;
    margin-bottom: 30px;
}

.cs-ht-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.cs-ht-quote {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.5;
    font-style: italic;
}

.cs-ht-side {
    font-size: 15px;
    line-height: 1.7;
    color: #444;
}

/* 4. Newsletter */
.cs-newsletter {
    text-align: center;
    padding: 50px 20px;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    background: #fafafa;
}

.cs-nl-icon {
    font-size: 32px;
    color: #aaa;
    margin-bottom: 15px;
}

.cs-nl-heading {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 25px;
}

.cs-nl-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

.cs-nl-form input {
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
}

.cs-nl-form button {
    padding: 14px 20px;
    background: #E58D57; /* Matches wireframe button color */
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.cs-nl-form button:hover {
    opacity: 0.9;
}

/* ---------- REFINED TAGS STYLING ---------- */
.cs-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* Tighter spacing */
    margin-bottom: 20px;
}

.cs-tags span {
    background-color: #c5d6d4 !important; /* Exact orange from screenshot */
    color: #272525;
    padding: 2px 2px;
    border-radius: 2px; /* Slightly squared edges */
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1;
}

.cs-tags span:hover {
    background-color: #272525 !important; /* Exact orange from screenshot */
    color: #eaeaea;
    padding: 2px 2px;
    border-radius: 2px; /* Slightly squared edges */
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1;
}

/* ---------- SIDEBAR WIDGETS ---------- */
.cs-widget {
    margin-bottom: 40px;
    background: #fff;
    border: 1px solid #eaeaea;
    padding: 25px;
    border-radius: 8px;
}

.cs-widget-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--ink);
    border-bottom: 2px solid #E98453;
    padding-bottom: 10px;
    display: inline-block;
}

/* 1. Client Widget */
.cs-widget-client {
    background: #1C1C1C;
    border: none;
    color: #fff;
}

.cs-client-logo-box {
    background: #fff;
    padding: 15px;
    text-align: center;
    border-radius: 4px;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

.cs-client-logo-box img {
    max-height: 40px;
    width: auto;
}

.cs-meta-label {
    display: block;
    font-size: 13px;
    color: #888;
    margin-bottom: 4px;
}

.cs-meta-value {
    display: block;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.cs-client-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.cs-tag-bracket {
    background: #fff;
    color: #1C1C1C;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* 2. Tabbed Widget */
.cs-widget-tabs { padding: 0; overflow: hidden; }
.cs-tab-header {
    display: flex;
    border-bottom: 1px solid #eaeaea;
    background: #f9f9f9;
}
.cs-tab-btn {
    flex: 1;
    padding: 15px 0;
    background: none;
    border: none;
    border-top: 3px solid transparent;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}
.cs-tab-btn.active {
    background: #fff;
    color: #E98453;
    border-top: 3px solid #E98453;
}
.cs-tab-panel { display: none; padding: 20px; }
.cs-tab-panel.active { display: block; }
.cs-tab-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    text-decoration: none;
    color: inherit;
}
.cs-tab-item:last-child { margin-bottom: 0; }
.cs-tab-img {
    width: 70px;
    height: 50px;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    flex-shrink: 0;
}
.cs-tab-info h4 {
    font-size: 14px;
    line-height: 1.4;
    margin: 0 0 5px 0;
    color: var(--ink);
}
.cs-tab-date {
    font-size: 12px;
    color: #888;
}

/* 3. Related Case Studies */
.cs-related-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    text-decoration: none;
    color: inherit;
}
.cs-related-img-wrap {
    position: relative;
    width: 80px;
    flex-shrink: 0;
}
.cs-related-img {
    width: 100%;
    height: 55px;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
}
.cs-related-number {
    position: absolute;
    top: -8px;
    left: -8px;
    background: #ee930b;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}
.cs-related-info h4 {
    font-size: 14px;
    margin: 0 0 5px 0;
    color: var(--ink);
}
.cs-related-date { font-size: 12px; color: #888; }

/* 4. Contact Form */
.cs-contact-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}
.cs-sidebar-form label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 5px;
    color: var(--ink);
}
.cs-sidebar-form input,
.cs-sidebar-form select,
.cs-sidebar-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    font-family: inherit;
}
.cs-sidebar-form button {
    width: 100%;
    background: #608ddc;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.cs-sidebar-form button:hover { background: #a8542b; }

/* ---------- 5. RICH CONTENT BLOCK ---------- */

/* ---------- DROPCAP FIX ---------- */
.cs-rc-dropcap {
    font-size: 16px;
    line-height: 1.7;
    color: #555;
    margin-bottom: 40px;
}

/* Targets strictly the first letter of the very first paragraph */
.cs-rc-dropcap > p:first-child::first-letter {
    float: left;
    font-size: 72px;
    line-height: 1; /* Changed to 1 to prevent clipping issues */
    padding-top: 4px; /* Better alignment control */
    font-weight: 800;
    margin-right: 12px;
    color: #1c1c1c;
}

/* 2-Column Text & List Layout */
.cs-rc-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.cs-rc-columns p, 
.cs-rc-columns li {
    font-size: 16px;
    line-height: 1.7;
    color: #555;
}

.cs-rc-col-right ul {
    margin: 0;
    padding-left: 20px;
}

.cs-rc-col-right li {
    margin-bottom: 12px;
}

/* Quote Box Styling */
/* ---------- QUOTE BOX FIX ---------- */
.cs-rc-quote-box {
    background-color: #f4f5f7; /* Ensures the light grey background is rendered */
    border-radius: 8px;
    padding: 35px 40px;
    display: flex;
    gap: 25px;
    margin-bottom: 40px;
    align-items: flex-start;
}

.cs-rc-quote-icon {
    flex-shrink: 0; /* Prevents flexbox from stretching the icon */
    width: 45px;
    height: 45px;
}

.cs-rc-quote-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.cs-rc-quote-content blockquote {
    font-size: 20px; /* Reduced slightly to match your expected output */
    line-height: 1.5;
    color: #5a6b7c; /* Matched the slate-grey color from your target image */
    margin: 0 0 15px 0;
    border: none;
    padding: 0;
}

.cs-rc-quote-content cite {
    font-size: 14px;
    color: #777;
    font-style: normal;
}

/* Bottom Text */
.cs-rc-bottom {
    font-size: 16px;
    line-height: 1.7;
    color: #555;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .cs-rc-columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cs-rc-quote-box {
        flex-direction: column;
        gap: 15px;
        padding: 25px;
    }
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .cs-mt-grid,
    .cs-ht-split {
        grid-template-columns: 1fr;
    }
    .pos-right .cs-mt-media {
        order: 0;
    }
}