/* ============================================================
   Case Studies — Custom Design Overrides
   Enhances spacing, typography, section dividers, and adds
   a modern sidebar CTA. Uses root design tokens from style.css.
   ============================================================ */

/* ---------- Layout & Spacing ---------- */
.blog {
    padding-top: 100px !important;
    padding-bottom: 60px;
}

.blog .left {
    border-right: 1px solid rgba(30, 58, 138, 0.10);
    padding-right: 40px !important;
}

.blog-padding {
    padding: 30px 60px;
    max-width: 1320px;
    margin: 0 auto;
}

@media (max-width: 1200px) {
    .blog-padding { padding: 20px 30px; }
    .blog .left { padding-right: 20px !important; }
}

@media (max-width: 768px) {
    .blog-padding { padding: 16px 16px; }
    .blog .left {
        border-right: none;
        padding-right: 12px !important;
    }
}

/* ---------- Title ---------- */
.blog h1 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--p2, #0F172A);
    margin-bottom: 28px;
    letter-spacing: -0.02em;
}

@media (max-width: 768px) {
    .blog h1 { font-size: 1.45rem; }
}

/* ---------- Section Dividers (colored left-border) ---------- */
.blog .orange,
.blog .blue,
.blog .green,
.blog .red {
    border-radius: 8px;
    padding: 14px 18px;
    margin-top: 32px;
    margin-bottom: 6px;
    background: var(--bg2, #F1F5F9);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog .orange { border-left: 5px solid #F59E0B; }
.blog .blue   { border-left: 5px solid var(--p, #1E3A8A); }
.blog .green  { border-left: 5px solid #22C55E; }
.blog .red    { border-left: 5px solid var(--ac, #DC2626); }

.blog .orange:hover,
.blog .blue:hover,
.blog .green:hover,
.blog .red:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 12px rgba(30, 58, 138, 0.06);
}

.blog .orange h4,
.blog .blue h4,
.blog .green h4,
.blog .red h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--p2, #0F172A);
    margin: 0;
}

/* ---------- Body Text & Lists ---------- */
.blog p {
    font-size: 0.975rem;
    line-height: 1.75;
    color: var(--muted, #334155);
    margin-top: 10px;
    margin-bottom: 16px;
}

.blog li {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--muted, #334155);
    margin-bottom: 6px;
    padding-left: 6px;
    list-style-position: inside;
}

.blog h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--p, #1E3A8A);
    margin-top: 24px;
    margin-bottom: 12px;
}

.blog h4 {
    font-size: 1.1rem;
    font-weight: 700;
}

/* ---------- Tables ---------- */
.blog .table {
    margin-top: 20px;
    margin-bottom: 28px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 8px rgba(30, 58, 138, 0.07);
    border: 1px solid rgba(30, 58, 138, 0.08);
}

.blog .table thead.table-dark th {
    background: var(--p, #1E3A8A) !important;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    padding: 14px 16px;
    border: none;
}

.blog .table tbody td {
    padding: 13px 16px;
    font-size: 0.925rem;
    color: var(--muted, #334155);
    vertical-align: middle;
    border-color: rgba(30, 58, 138, 0.06);
}

.blog .table-striped tbody tr:nth-of-type(odd) {
    background-color: var(--bg, #F8FAFC);
}

.blog .table-striped tbody tr:hover {
    background-color: rgba(30, 58, 138, 0.03);
}

/* ---------- Images ---------- */
.blog .row img.w-100,
.blog .col-lg-6 img {
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 16px;
}

.blog .row img.w-100:hover,
.blog .col-lg-6 img:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.blog .banner img {
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* ---------- Links ---------- */
.blog .left a {
    color: var(--p, #1E3A8A);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.blog .left a:hover {
    color: var(--ac, #DC2626);
}

/* ---------- Sidebar (col-lg-4) ---------- */
.cs-sidebar {
    position: sticky;
    top: 110px;
    padding: 0 0 0 28px;
}

/* CTA Card */
.cs-cta-card {
    background: linear-gradient(135deg, var(--p, #1E3A8A) 0%, #2563EB 100%);
    border-radius: 18px;
    padding: 36px 28px;
    color: #fff;
    text-align: center;
    box-shadow: 0 8px 32px rgba(30, 58, 138, 0.18);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cs-cta-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(30, 58, 138, 0.25);
}

.cs-cta-card .cs-cta-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-cta-card .cs-cta-icon svg {
    width: 28px;
    height: 28px;
    stroke: #fff;
}

.cs-cta-card h5 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}

.cs-cta-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.88);
    margin-bottom: 22px;
}

.cs-cta-btn {
    display: inline-block;
    background: #fff;
    color: var(--p, #1E3A8A);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 13px 32px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.cs-cta-btn:hover {
    background: var(--g, #FACC15);
    color: var(--p2, #0F172A);
    transform: scale(1.04);
    box-shadow: 0 4px 16px rgba(250,204,21,0.35);
}

/* Info Card */
.cs-info-card {
    background: var(--bg, #F8FAFC);
    border: 1px solid var(--border, rgba(30,58,138,0.13));
    border-radius: 16px;
    padding: 26px 22px;
    margin-top: 24px;
}

.cs-info-card h6 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--p, #1E3A8A);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}

.cs-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

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

.cs-info-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--p, #1E3A8A);
    flex-shrink: 0;
    margin-top: 6px;
}

.cs-info-item span {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--muted, #334155);
}

/* Related Case Studies */
.cs-related {
    margin-top: 24px;
}

.cs-related h6 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--p, #1E3A8A);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
}

.cs-related-link {
    display: block;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: #fff;
    border: 1px solid var(--border, rgba(30,58,138,0.13));
    border-radius: 12px;
    color: var(--p2, #0F172A) !important;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.cs-related-link:hover {
    background: var(--p, #1E3A8A);
    color: #fff !important;
    border-color: var(--p, #1E3A8A);
    transform: translateX(4px);
}

/* ---------- Solutions Cards ---------- */
.blog .solutions {
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 14px;
    border: 1px solid rgba(30,58,138,0.06);
}

.blog .solutions:hover {
    scale: 1;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

/* ---------- Responsive Sidebar ---------- */
@media (max-width: 991px) {
    .cs-sidebar {
        position: static;
        padding: 30px 0 0 0;
    }
    .cs-cta-card {
        max-width: 480px;
        margin: 0 auto;
    }
    .cs-info-card {
        max-width: 480px;
        margin: 24px auto 0;
    }
    .cs-related {
        max-width: 480px;
        margin: 24px auto 0;
    }
}

/* ---------- Smooth scroll anchor effect ---------- */
.blog .left > * {
    animation: cs-fadein 0.5s ease both;
}

@keyframes cs-fadein {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
