/* Plugin Specific Styles for RPS Case Study Builder */

body.rps-case-study-active {
    background-color: #ffffff !important;
}

html[data-theme="dark"] body.rps-case-study-active {
    background-color: #000000 !important;
}

main.rps-case-study-main-wrapper {
    padding-top: 120px !important; /* Balanced spacing below header */
}

.rps-case-study-template.case-studay-single-content-container {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.rps-builder-sections-container {
    padding-bottom: 150px;
}

.rps-case-study-hero {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 0 !important;
    padding-top: 0 !important;
    margin-bottom: 150px; /* Space between hero and first block */
}

.rps-hero-image-wrapper {
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
}

.rps-hero-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 0 !important; /* Force override theme styles */
}

.rps-hero-tags-wrapper {
    width: 100%;
    background-color: #FBFBFB;
    padding: 30px 0;
}

html[data-theme="dark"] .rps-hero-tags-wrapper {
    background-color: rgba(255, 255, 255, 0.03); /* Subtle alternative dark color */
}

.rps-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

.rps-hero-tag {
    background-color: #FBFBFB;
    color: #333;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Dark mode compatibility */
html[data-theme="dark"] .rps-hero-tag {
    background-color: rgba(255, 255, 255, 0.1); /* Standard dark mode secondary bg found in theme */
    color: var(--monochorme-white, #ffffff);
    box-shadow: none;
}

/* --- Section 2: Overview --- */

.rps-case-study-overview {
    text-align: center;
    max-width: 1000px;
    margin: 120px auto;
}

.rps-section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.rps-section-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 36px;
    border-radius: 25px;
    background: linear-gradient(90deg, #000000 0%, #A8A8A8 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 18px;
}

.rps-section-label {
    color: #788089;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.rps-overview-title {
    font-size: 48px;
    font-weight: 800;
    margin: 0 0 30px 0;
    background: linear-gradient(90deg, #000000 0%, #A8A8A8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.rps-overview-description {
    font-size: 18px;
    line-height: 1.6;
    color: #333333;
    margin-bottom: 40px;
}

.rps-overview-description p {
    margin-bottom: 20px;
}

.rps-overview-cta-wrapper {
    margin-top: 30px;
}

.rps-overview-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #005DAC;
    color: #ffffff;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.rps-overview-cta:hover {
    background-color: #004582;
    color: #ffffff;
}

.rps-overview-cta svg {
    width: 18px;
    height: 18px;
}

/* Overview Dark Mode */
html[data-theme="dark"] .rps-section-number {
    background: linear-gradient(90deg, #ffffff 0%, #555555 100%);
    color: #000000;
}

html[data-theme="dark"] .rps-section-label {
    color: #A0AAB5;
}

html[data-theme="dark"] .rps-overview-title {
    background: linear-gradient(90deg, #ffffff 0%, #555555 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

html[data-theme="dark"] .rps-overview-description {
    color: #dddddd;
}

/* --- Section 3: Role --- */

.rps-case-study-role {
    max-width: 1200px;
    margin: 120px auto;
}

.rps-role-title-wrapper {
    text-align: center;
    margin-bottom: 60px;
}

.rps-role-title {
    font-size: 44px;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(90deg, #000000 0%, #A8A8A8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.rps-role-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.rps-role-text-col {
    font-size: 18px;
    line-height: 1.6;
    color: #333333;
}

.rps-role-text-col p {
    margin-bottom: 20px;
}

.rps-role-text-col ul {
    margin-left: 25px;
    margin-bottom: 20px;
    list-style-type: disc;
}

.rps-role-image-col img {
    width: 100%;
    height: auto;
    display: block;
}

.rps-role-divider {
    width: 200px;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, #000000 0%, #A8A8A8 100%);
    margin: 40px auto 0;
}

/* Role Dark Mode */
html[data-theme="dark"] .rps-role-title {
    background: linear-gradient(90deg, #ffffff 0%, #555555 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

html[data-theme="dark"] .rps-role-text-col {
    color: #dddddd;
}

html[data-theme="dark"] .rps-role-divider {
    background: linear-gradient(90deg, #ffffff 0%, #555555 100%);
}

/* Responsive */
@media (max-width: 768px) {
    .rps-role-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* --- Section 4: Challenges --- */

.rps-case-study-challenges {
    max-width: 1200px;
    margin: 120px auto;
}

.rps-challenges-title-wrapper {
    text-align: center;
    margin-bottom: 60px;
}

.rps-challenges-title {
    font-size: 36px;
    font-weight: 700;
    margin: 0;
    display: inline-block;
    background: linear-gradient(90deg, #000000 0%, #A8A8A8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

html[data-theme="dark"] .rps-challenges-title {
    background: linear-gradient(90deg, #ffffff 0%, #555555 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rps-challenges-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.rps-challenge-card {
    padding: 40px;
    border-radius: 12px;
}

.rps-card-title {
    font-size: 24px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 20px;
}

.rps-card-text ul {
    padding-left: 20px;
    margin: 0;
}

.rps-card-text li {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* Problem Card */
.rps-card-problem {
    background: linear-gradient(180deg, #FFFFFF 0%, #FDF2F2 100%);
    border: 1px solid #EE4444;
}

html[data-theme="dark"] .rps-card-problem {
    background: linear-gradient(180deg, #111111 0%, #2A1111 100%);
    border: 1px solid #882222;
}

html[data-theme="dark"] .rps-card-problem .rps-card-title,
html[data-theme="dark"] .rps-card-problem .rps-card-text {
    color: var(--color-white, #ffffff);
}

/* Solution Card */
.rps-card-solution {
    background: radial-gradient(102.06% 102.06% at 50% -2.06%, #FFFFFF 0%, #ECFDF5 100%);
    border: 1px solid #2EB610;
}

html[data-theme="dark"] .rps-card-solution {
    background: radial-gradient(102.06% 102.06% at 50% -2.06%, #111111 0%, #112A18 100%);
    border: 1px solid #1B6A09;
}

html[data-theme="dark"] .rps-card-solution .rps-card-title,
html[data-theme="dark"] .rps-card-solution .rps-card-text {
    color: var(--color-white, #ffffff);
}

@media (max-width: 768px) {
    .rps-challenges-content {
        grid-template-columns: 1fr;
    }
}

/* --- Section 5: Approach --- */
.rps-case-study-approach {
    text-align: center;
    max-width: 1200px;
    margin: 120px auto;
}

.rps-approach-title-wrapper {
    margin-bottom: 20px;
}

.rps-approach-title {
    font-size: 40px;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(90deg, #000000 0%, #A8A8A8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

html[data-theme="dark"] .rps-approach-title {
    background: linear-gradient(90deg, #ffffff 0%, #555555 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.rps-approach-description {
    font-size: 18px;
    line-height: 1.6;
    color: #333333;
    max-width: 800px;
    margin: 0 auto 60px;
}

html[data-theme="dark"] .rps-approach-description {
    color: #dddddd;
}

.rps-approach-steps-wrapper {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 20px;
    margin-top: 100px; /* Space for character */
}

.rps-approach-step-container {
    flex: 1;
    position: relative;
    z-index: 1; /* Establish stacking context for character */
    display: flex;
    flex-direction: column;
}

.rps-approach-step {
    border-radius: 24px;
    padding: 40px;
    color: #ffffff;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    position: relative; /* to make sure it respects z-index stacking context if needed */
}

/* Min heights to guarantee staircase */
.rps-approach-step-1 .rps-approach-step {
    min-height: 480px;
}
.rps-approach-step-2 .rps-approach-step {
    min-height: 380px;
}
.rps-approach-step-3 .rps-approach-step {
    min-height: 280px;
}

.rps-approach-character {
    position: absolute;
    bottom: 55%; /* Pushed up slightly */
    left: 50%;
    transform: translateX(-50%);
    z-index: -1; /* Behind the solid step box */
    width: 350px;
}

.rps-approach-character img {
    width: 100%;
    height: auto;
    display: block;
}

.rps-step-content-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: center;
}

.rps-step-number {
    font-size: 80px;
    font-weight: 800;
    margin: 0 0 10px 0;
    line-height: 1;
}

.rps-step-subtitle {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px 0;
}

.rps-step-desc {
    font-size: 16px;
    line-height: 1.5;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .rps-approach-steps-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    .rps-approach-step-1 .rps-approach-step, .rps-approach-step-2 .rps-approach-step, .rps-approach-step-3 .rps-approach-step {
        min-height: auto;
    }
    .rps-approach-character {
        display: none;
    }
}

/* --- Section 6: Persona --- */
.rps-case-study-persona {
    text-align: center;
    max-width: 1200px;
    margin: 120px auto;
}

.rps-persona-title-wrapper {
    margin-bottom: 24px;
}
.rps-persona-title {
    font-size: 48px;
    font-weight: 700;
    color: #1a1a1a;
}
.rps-persona-description {
    font-size: 18px;
    color: #4a4a4a;
    max-width: 900px;
    margin: 0 auto 60px auto;
    line-height: 1.6;
}

/* Overlapping Circle Images */
.rps-persona-images-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 60px;
    padding: 20px;
    gap: 15px; /* Added gap to keep them close but not overlapping */
}
.rps-persona-img-circle {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
}
.rps-persona-img-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.rps-circle-1 {
}
.rps-circle-2 {
    width: 320px;
    height: 320px;
}
.rps-circle-3 {
}

/* Cards Subheading */
.rps-persona-subheading-wrapper {
    margin-bottom: 40px;
}
.rps-persona-subheading {
    font-size: 24px;
    font-weight: 700;
    color: #6C7A89;
}

/* --- Section: Cards Grid --- */
.rps-case-study-cards-grid {
    text-align: center;
    margin: 120px auto;
    max-width: 1200px;
}
.rps-cards-grid-title-wrapper {
    margin-bottom: 40px;
}
.rps-cards-grid-title {
    font-size: 24px;
    font-weight: 700;
    color: #6C7A89;
}
.rps-cards-grid-description {
    font-size: 18px;
    color: #4a4a4a;
    max-width: 900px;
    margin: 0 auto 40px auto;
    line-height: 1.6;
}

/* Cards Grid (Shared with Persona) */
.rps-persona-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    text-align: left;
    max-width: 900px; /* will be overridden based on count */
    margin: 0 auto;
}
.rps-persona-card {
    border-radius: 12px;
    padding: 24px;
    display: flex;
    gap: 20px;
}
.rps-persona-card.has-image {
    align-items: center;
}
.rps-persona-card.no-image {
    align-items: flex-start;
}
.rps-card-content {
    flex: 1;
}
.rps-card-quote p {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}
.rps-card-desc p {
    font-size: 14px;
    color: #4a4a4a;
    margin: 0;
}
/* --- Section: Key Improvements --- */
.rps-case-study-improvements {
    text-align: center;
    margin: 120px auto;
    max-width: 1200px;
}
.rps-improvements-title-wrapper {
    margin-bottom: 24px;
}
.rps-improvements-title {
    font-size: 48px;
    font-weight: 700;
    color: #1a1a1a;
}
.rps-improvements-description {
    font-size: 18px;
    color: #4a4a4a;
    max-width: 900px;
    margin: 0 auto 60px auto;
    line-height: 1.6;
}
.rps-improvements-image img {
    width: 100%;
    max-width: 1200px;
    height: auto;
    border-radius: 20px;
    margin: 0 auto 60px auto;
    display: block;
}

/* Improvements Grid & Container */
.rps-improvements-cards-container {
    position: relative;
    padding-bottom: 60px;
}
.rps-improvements-gradient-bg {
    position: absolute;
    top: -60px;
    left: calc(-50vw + 50%);
    right: calc(-50vw + 50%);
    width: 100vw;
    bottom: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent 0%, var(--grad-color) 40%, #ffffff 100%);
}
[data-theme="dark"] .rps-improvements-gradient-bg {
    display: none;
}
[data-theme="dark"] .rps-improvements-card {
    background: #151515;
    border: 1px solid #333333 !important;
    box-shadow: none;
}

[data-theme="dark"] .rps-improvements-gradient-bg {
    display: none !important;
}
[data-theme="dark"] .rps-improvement-card-title,
[data-theme="dark"] .rps-improvement-card-title p {
    color: #ffffff;
}
[data-theme="dark"] .rps-improvement-card-desc,
[data-theme="dark"] .rps-improvement-card-desc p {
    color: #cccccc;
}

.rps-improvements-cards-grid {
    display: grid;
    gap: 24px;
    text-align: left;
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto 60px auto;
}
.rps-grid-3-col {
    grid-template-columns: repeat(3, 1fr);
}
.rps-grid-2-col {
    grid-template-columns: repeat(2, 1fr);
}
.rps-improvements-card {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.rps-improvement-card-title p, .rps-improvement-card-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
    margin-top: 0;
}
.rps-improvement-card-desc p, .rps-improvement-card-desc {
    font-size: 16px;
    color: #4a4a4a;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 900px) {
    .rps-grid-3-col, .rps-grid-2-col {
        grid-template-columns: 1fr;
    }
}

/* --- Section: Refinement --- */
.rps-case-study-refinement {
    text-align: center;
    margin: 120px auto;
    max-width: 1200px;
}
.rps-refinement-title-wrapper {
    margin-bottom: 24px;
}
.rps-refinement-title {
    font-size: 48px;
    font-weight: 700;
    color: #1a1a1a;
}
.rps-refinement-description {
    font-size: 18px;
    color: #4a4a4a;
    max-width: 900px;
    margin: 0 auto 60px auto;
    line-height: 1.6;
}

.rps-refinement-cards-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.rps-refinement-card {
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    aspect-ratio: 1240 / 684;
    height: auto;
    min-height: min-content;
    display: flex;
    overflow: hidden; /* For gradient overlay */
}

.rps-refinement-content {
    width: 100%;
    display: flex;
    padding: 60px;
    box-sizing: border-box;
    /* Soft gradient overlay for light mode ensuring text legibility */
}

.rps-ref-pos-right {
    justify-content: flex-end;
    background: linear-gradient(to left, rgba(255,255,255,0.85) 10%, transparent 60%);
}

.rps-ref-pos-left {
    justify-content: flex-start;
    background: linear-gradient(to right, rgba(255,255,255,0.85) 10%, transparent 60%);
}

.rps-refinement-text-block {
    width: 100%;
    max-width: 330px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.rps-refinement-card-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
    margin-top: 0;
}

.rps-refinement-card-subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 24px;
    font-weight: 500;
}

.rps-refinement-card-desc {
    font-size: 16px;
    color: #4a4a4a;
    line-height: 1.6;
}
.rps-refinement-card-desc p {
    margin: 0;
}

/* Dark mode overrides for Refinement */
html[data-theme="dark"] .rps-refinement-title,
html[data-theme="dark"] .rps-refinement-card-title {
    color: #ffffff;
}
html[data-theme="dark"] .rps-refinement-description,
html[data-theme="dark"] .rps-refinement-card-desc,
html[data-theme="dark"] .rps-refinement-card-subtitle {
    color: #cccccc;
}

/* Dark mode overlays for legibility */
html[data-theme="dark"] .rps-ref-pos-right {
    background: linear-gradient(to left, rgba(17,17,17,0.9) 10%, transparent 60%);
}
html[data-theme="dark"] .rps-ref-pos-left {
    background: linear-gradient(to right, rgba(17,17,17,0.9) 10%, transparent 60%);
}

@media (max-width: 900px) {
    main.rps-case-study-main-wrapper {
        padding-top: 0 !important;
    }
    .rps-refinement-content {
        padding: 30px 0;
        align-items: flex-end; /* Push text to bottom */
        justify-content: center;
        background: linear-gradient(to top, rgba(255,255,255,0.95) 20%, transparent 80%);
    }
    html[data-theme="dark"] .rps-refinement-content {
        background: linear-gradient(to top, rgba(17,17,17,0.95) 20%, transparent 80%);
    }
    .rps-refinement-card {
        width: 100% !important;
        aspect-ratio: auto !important;
        min-height: 450px;
        background-size: cover;
        background-position: center top;
    }
    .rps-refinement-text-block {
        max-width: 100%;
        text-align: center;
    }
}

/* --- Section: Components --- */
.rps-case-study-components {
    text-align: center;
    margin: 120px auto;
    max-width: 1200px;
}
.rps-components-title-wrapper {
    margin-bottom: 24px;
}
.rps-components-title {
    font-size: 48px;
    font-weight: 700;
    color: #1a1a1a;
}
.rps-components-description {
    font-size: 18px;
    color: #4a4a4a;
    max-width: 900px;
    margin: 0 auto 40px auto;
    line-height: 1.6;
}
.rps-components-image img {
    width: 100%;
    max-width: 1200px;
    height: auto;
    border-radius: 20px;
    margin: 0 auto;
    display: block;
}

.rps-card-image {
    flex-shrink: 0;
}
.rps-card-image img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

/* Impact Section */
.rps-case-study-impact {
    text-align: center;
    margin: 0 auto 120px auto;
    max-width: 1200px;
}
.rps-impact-title {
    font-size: 42px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
}
.rps-impact-description {
    font-size: 18px;
    color: #4a4a4a;
    max-width: 800px;
    margin: 0 auto 60px auto;
    line-height: 1.6;
}
.rps-impact-layout {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: stretch;
    gap: 30px;
    margin-top: 60px;
}
.rps-impact-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    min-width: 300px;
}
.rps-impact-center-img {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 400px;
}
.rps-impact-center-img img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}
.rps-impact-card {
    border-radius: 12px;
    padding: 30px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 120px;
}
.rps-impact-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
}
.rps-impact-card-desc {
    font-size: 15px;
    color: #333;
    line-height: 1.5;
    margin: 0;
}

/* Wrap-up Section */
.rps-case-study-wrap-up {
    text-align: center;
    margin: 0 auto 120px auto;
    max-width: 1200px;
}
.rps-wrap-up-title {
    font-size: 42px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
}
.rps-wrap-up-description {
    font-size: 18px;
    color: #4a4a4a;
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.6;
}
.rps-wrap-up-image {
    margin-top: 100px;
}
.rps-wrap-up-image img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    display: block;
}

/* Image Filler Section */
.rps-case-study-image-filler {
    margin-bottom: 150px;
}

/* AI Stack Section */
.rps-case-study-ai-stack {
    text-align: center;
    margin: 0 auto 120px auto;
    max-width: 1000px;
}
.rps-ai-stack-title {
    font-size: 42px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
}
.rps-ai-stack-description {
    font-size: 18px;
    color: #4a4a4a;
    margin: 0 auto 60px auto;
    line-height: 1.6;
}
.rps-ai-stack-cards-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.rps-ai-stack-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    text-align: left;
}
.rps-ai-stack-card-image {
    flex: 1;
    max-width: 400px;
    display: flex;
    padding: 20px;
}
.rps-ai-stack-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}
.rps-ai-stack-card-content {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.rps-ai-stack-tool-name {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 5px;
    text-transform: uppercase;
}
.rps-ai-stack-purpose {
    font-size: 14px;
    font-weight: 600;
    color: #888;
    margin-bottom: 20px;
}
.rps-ai-stack-card-desc {
    font-size: 16px;
    color: #4a4a4a;
    line-height: 1.6;
    margin: 0;
}

/* More Case Studies */
.rps-more-case-studies {
    max-width: 1200px;
    margin: 80px auto;
    text-align: center;
    padding: 0 20px;
}
.rps-more-case-studies-title {
    font-size: 42px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 40px;
}
.rps-more-case-studies-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}
.rps-more-case-study-card {
    display: block;
    flex: 1;
    min-width: 300px;
    max-width: 580px;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
}
.rps-more-case-study-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.rps-more-case-study-card img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
}
.rps-more-case-study-placeholder {
    width: 100%;
    height: 350px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    border-radius: 20px;
}
.rps-more-case-studies-action {
    margin-top: 40px;
}
.rps-button-view-all {
    display: inline-block;
    background-color: #0b69c5;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    padding: 15px 40px;
    border-radius: 30px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}
.rps-button-view-all:hover {
    background-color: #084c94;
    color: #fff;
}

@media (max-width: 900px) {
    .rps-persona-cards-grid {
        grid-template-columns: 1fr;
    }
    .rps-circle-2 {
        width: 250px;
        height: 250px;
    }
    .rps-persona-img-circle {
        width: 180px;
        height: 180px;
    }
}
@media (max-width: 600px) {
    .rps-persona-images-wrapper {
        flex-direction: column;
        gap: 20px;
    }
    .rps-circle-2 {
        margin: 0;
    }
}
@media (max-width: 1000px) {
    .rps-impact-layout {
        flex-direction: column;
        align-items: center;
    }
    .rps-impact-center-img {
        order: -1;
        margin-bottom: 30px;
    }
    .rps-impact-column {
        width: 100%;
    }
}
@media (max-width: 768px) {
    .rps-ai-stack-card {
        flex-direction: column;
    }
    .rps-ai-stack-card-image {
        max-width: 100%;
        height: 250px;
    }
    .rps-role-title,
    .rps-persona-title,
    .rps-refinement-title,
    .rps-components-title,
    .rps-impact-title,
    .rps-wrap-up-title,
    .rps-ai-stack-title,
    .rps-cards-grid-title,
    .rps-improvements-title,
    .rps-overview-title,
    .rps-approach-title,
    .rps-challenges-title {
        font-size: 32px !important;
        line-height: 1.2;
    }
    .rps-refinement-card-title,
    .rps-impact-card-title,
    .rps-cards-grid-card h4,
    .rps-challenge-card h4,
    .rps-ai-stack-card-title,
    .rps-refinement-text-block h1,
    .rps-refinement-text-block h2,
    .rps-refinement-text-block h3,
    .rps-refinement-text-block h4,
    .rps-refinement-text-block h5,
    .rps-refinement-text-block h6 {
        font-size: 22px !important;
        line-height: 1.3 !important;
        white-space: normal !important;
        word-break: break-word;
    }
    .rps-refinement-card-desc,
    .rps-refinement-card-desc p,
    .rps-refinement-card-desc span,
    .rps-refinement-text-block div {
        font-size: 15px !important;
        line-height: 1.5 !important;
        white-space: normal !important;
        word-break: break-word;
    }
    .rps-case-study-hero,
    .rps-case-study-section,
    .rps-case-study-two-col,
    .rps-case-study-full-image,
    .rps-case-study-cards-grid,
    .rps-case-study-improvements,
    .rps-case-study-impact,
    .rps-case-study-ai-stack,
    .rps-more-case-studies {
        margin-top: 60px !important;
        margin-bottom: 60px !important;
    }
    .rps-case-study-wrap-up {
        margin-bottom: 60px !important;
    }
}

/* --- DARK MODE OVERRIDES --- */
[data-theme="dark"] .rps-case-study-hero-title,
[data-theme="dark"] .rps-section-title,
[data-theme="dark"] .rps-section-title-large,
[data-theme="dark"] .rps-persona-title,
[data-theme="dark"] .rps-components-title,
[data-theme="dark"] .rps-improvements-title,
[data-theme="dark"] .rps-impact-title,
[data-theme="dark"] .rps-wrap-up-title,
[data-theme="dark"] .rps-ai-stack-title,
[data-theme="dark"] .rps-cards-grid-title,
[data-theme="dark"] .rps-card-quote,
[data-theme="dark"] .rps-card-quote p,
[data-theme="dark"] .rps-challenge-content h2,
[data-theme="dark"] .rps-challenge-card h4,
[data-theme="dark"] .rps-cards-grid-card h4,
[data-theme="dark"] .rps-impact-card-title,
[data-theme="dark"] .rps-ai-stack-card-title,
[data-theme="dark"] .rps-ai-stack-tool-name,
[data-theme="dark"] .rps-more-case-studies-title {
    color: #ffffff;
}

[data-theme="dark"] .rps-case-study-hero-desc,
[data-theme="dark"] .rps-section-desc,
[data-theme="dark"] .rps-persona-description,
[data-theme="dark"] .rps-components-description,
[data-theme="dark"] .rps-improvements-description,
[data-theme="dark"] .rps-impact-description,
[data-theme="dark"] .rps-wrap-up-description,
[data-theme="dark"] .rps-ai-stack-description,
[data-theme="dark"] .rps-cards-grid-description,
[data-theme="dark"] .rps-card-desc,
[data-theme="dark"] .rps-card-desc p,
[data-theme="dark"] .rps-challenge-content p,
[data-theme="dark"] .rps-challenge-card p,
[data-theme="dark"] .rps-cards-grid-card p,
[data-theme="dark"] .rps-impact-card-desc,
[data-theme="dark"] .rps-ai-stack-card-desc,
[data-theme="dark"] .rps-ai-stack-purpose {
    color: #cccccc;
}

[data-theme="dark"] .rps-persona-card,
[data-theme="dark"] .rps-challenge-card,
[data-theme="dark"] .rps-cards-grid-card,
[data-theme="dark"] .rps-impact-card,
[data-theme="dark"] .rps-ai-stack-card {
    background-color: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1) !important;
}

[data-theme="dark"] .rps-more-case-study-placeholder {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* Custom Background Overrides for Dark Mode */
[data-theme="dark"] .has-light-bg .rps-card-quote,
[data-theme="dark"] .has-light-bg .rps-card-quote p,
[data-theme="dark"] .has-light-bg .rps-challenge-content h2,
[data-theme="dark"] .has-light-bg .rps-challenge-card h4,
[data-theme="dark"] .has-light-bg .rps-cards-grid-card h4,
[data-theme="dark"] .has-light-bg .rps-impact-card-title,
[data-theme="dark"] .has-light-bg .rps-ai-stack-card-title,
[data-theme="dark"] .has-light-bg .rps-ai-stack-tool-name {
    color: #1a1a1a !important;
}

[data-theme="dark"] .has-light-bg .rps-card-desc,
[data-theme="dark"] .has-light-bg .rps-card-desc p,
[data-theme="dark"] .has-light-bg .rps-challenge-content p,
[data-theme="dark"] .has-light-bg .rps-challenge-card p,
[data-theme="dark"] .has-light-bg .rps-cards-grid-card p,
[data-theme="dark"] .has-light-bg .rps-impact-card-desc,
[data-theme="dark"] .has-light-bg .rps-ai-stack-card-desc,
[data-theme="dark"] .has-light-bg .rps-ai-stack-purpose {
    color: #4a4a4a !important;
}

/* For dark custom backgrounds, ensure text remains light */
[data-theme="dark"] .has-dark-bg .rps-card-quote,
[data-theme="dark"] .has-dark-bg .rps-card-quote p,
[data-theme="dark"] .has-dark-bg .rps-challenge-content h2,
[data-theme="dark"] .has-dark-bg .rps-challenge-card h4,
[data-theme="dark"] .has-dark-bg .rps-cards-grid-card h4,
[data-theme="dark"] .has-dark-bg .rps-impact-card-title,
[data-theme="dark"] .has-dark-bg .rps-ai-stack-card-title,
[data-theme="dark"] .has-dark-bg .rps-ai-stack-tool-name {
    color: #ffffff !important;
}

[data-theme="dark"] .has-dark-bg .rps-card-desc,
[data-theme="dark"] .has-dark-bg .rps-card-desc p,
[data-theme="dark"] .has-dark-bg .rps-challenge-content p,
[data-theme="dark"] .has-dark-bg .rps-challenge-card p,
[data-theme="dark"] .has-dark-bg .rps-cards-grid-card p,
[data-theme="dark"] .has-dark-bg .rps-impact-card-desc,
[data-theme="dark"] .has-dark-bg .rps-ai-stack-card-desc,
[data-theme="dark"] .has-dark-bg .rps-ai-stack-purpose {
    color: #cccccc !important;
}
