/**
 * Single Case Study Styles
 * 
 * Styles for individual case study post pages based on Figma design
 */

/* Main container */
.case-study-single-container {
    width: 100%;
    margin: 0 auto;
    background: #ffffff;
    position: relative;
    padding: 0 20px;
    scroll-behavior: smooth;
}

/* Large screens - professional spacing */
@media (min-width: 1441px) {
    .case-study-single-container {
        padding: 0 60px;
    }
}

/* Breadcrumbs styling for single case studies */
.case-study-single-container .case-studies-breadcrumbs {
    margin: 0 auto;
    max-width: 1200px;
    padding: 25px 0;
}

/* Content wrapper with margins */
.case-study-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0; /* Remove left and right padding */
}

/* Content area - 800px wide, centered in 1200px container */
.case-study-content {
    max-width: 800px; /* Figma: exact width */
    margin: 0 auto; /* Center within 1200px container (200px margins each side) */
    padding: 0;
}

/* Hero Image Section */
.case-study-hero {
    width: 100%; /* Figma: 1200px width (full container) */
    height: 675px; /* Figma: exact height */
    border-radius: 32px; /* Figma: exact corner radius */
    overflow: hidden;
    margin: 0 0 24px 0; /* Figma: 24px spacing to content */
    position: relative;
}

.case-study-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.case-study-hero-placeholder {
    width: 100%;
    height: 100%;
    background-color: rgb(237, 204, 173); /* Figma: r: 0.9275770783424377, g: 0.7987357378005981, b: 0.6782068014144897 */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Main title */
.case-study-title {
    font-family: var(--proxima-nova-font) !important;
    font-size: 48px; /* Figma: large title size */
    font-weight: 700;
    line-height: 1.3; /* Figma: proper line height for title */
    color: rgb(42, 52, 71); /* Figma: r: 0.16606363654136658, g: 0.2034904807806015, b: 0.2783440947532654 */
    margin: 0 0 24px 0; /* Figma: 24px spacing to first section */
    text-align: left;
    width: 100%; /* Figma: full width of 800px content area */
    min-height: 156px; /* Figma: minimum height for title area */
    display: flex;
    align-items: flex-start;
}

/* Content sections container */
.case-study-sections {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

/* Individual section */
.case-study-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Section title */
.case-study-section-title {
    font-family: var(--proxima-nova-font) !important;
    font-size: 32px; /* Figma: section heading size */
    font-weight: 600;
    line-height: 1.25; /* Figma: 40px height / 32px font = 1.25 */
    color: rgb(42, 52, 71); /* Figma: exact color match */
    margin: 0;
    height: 40px; /* Figma: exact height */
    display: flex;
    align-items: center;
}

/* Section content */
.case-study-section-content {
    font-family: var(--proxima-nova-font) !important;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.65; /* Good readability */
    color: rgb(42, 52, 71); /* Figma: exact color match */
    margin: 0;
    width: 100%; /* Full width of 800px content area */
    min-height: 132px; /* Figma: minimum content height */
}

.case-study-section-content p {
    margin-bottom: 16px;
}

.case-study-section-content p:last-child {
    margin-bottom: 0;
}

.case-study-section-content p {
    font-family: var(--proxima-nova-font) !important;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.65;
    color: rgb(42, 52, 71); /* Figma: exact color match */
    margin: 0 0 16px 0;
}

.case-study-section-content p:last-child {
    margin-bottom: 0;
}

/* Responsive Design */

/* Large desktop (1200px+) */
@media (min-width: 1200px) {
    .case-study-content-wrapper {
        padding: 0; /* Remove left and right padding */
    }
    
    .case-study-single-container .case-studies-breadcrumbs {
        padding: 25px 0;
    }
    
    /* Maintain Figma proportions on large screens */
    .case-study-content {
        max-width: 800px; /* Keep 800px content width */
    }
}

/* Desktop/Tablet (1024px) */
@media (max-width: 1024px) {
    .case-study-content-wrapper {
        padding: 0 20px; /* Add padding on smaller screens */
    }
    
    .case-study-single-container .case-studies-breadcrumbs {
        padding: 25px 0;
    }
    
    .case-study-content {
        max-width: 100%; /* Use full available width */
    }
    
    .case-study-hero {
        height: 500px; /* Maintain proportion */
        border-radius: 24px; /* Smaller radius for tablet */
    }
    
    .case-study-title {
        font-size: 42px;
        min-height: 120px; /* Adjust for smaller screen */
    }
    
    .case-study-section-title {
        font-size: 28px;
        height: 36px; /* Adjust for smaller font */
    }
    
    .case-study-section-content {
        min-height: 100px; /* Adjust for tablet */
    }
}

/* Tablet (768px) */
@media (max-width: 768px) {
    .case-study-content-wrapper {
        padding: 0 16px; /* Add padding on smaller screens */
    }
    
    .case-study-single-container .case-studies-breadcrumbs {
        padding: 20px 0;
    }
    
    .case-study-content {
        max-width: 100%; /* Use full available width */
    }
    
    .case-study-hero {
        height: 400px;
        border-radius: 24px;
    }
    
    .case-study-title {
        font-size: 36px;
        margin-bottom: 24px; /* Keep Figma spacing */
        min-height: 100px; /* Adjust for smaller screen */
    }
    
    .case-study-section-title {
        font-size: 24px;
        height: 32px; /* Adjust for smaller font */
    }
    
    .case-study-section-content {
        font-size: 16px;
        min-height: 80px; /* Adjust for tablet */
    }
    
    .case-study-section-content p {
        font-size: 16px;
        color: rgb(42, 52, 71); /* Maintain color consistency */
    }
    
    .case-study-sections {
        gap: 32px; /* Slightly smaller gap for mobile */
    }
}

/* Mobile (480px and smaller) */
@media (max-width: 480px) {
    .case-study-content-wrapper {
        padding: 0 16px; /* Add padding for mobile */
    }
    
    .case-study-single-container .case-studies-breadcrumbs {
        padding: 16px 0;
    }
    
    .case-study-content {
        max-width: 100%; /* Use full available width */
    }
    
    .case-study-hero {
        height: 300px;
        border-radius: 16px;
    }
    
    .case-study-title {
        font-size: 28px;
        margin-bottom: 24px; /* Keep consistent spacing */
        min-height: 80px; /* Adjust for mobile screen */
        line-height: 1.3;
    }
    
    .case-study-section-title {
        font-size: 20px;
        height: 28px; /* Adjust for smaller font */
    }
    
    .case-study-section-content {
        font-size: 16px;
        line-height: 1.6;
        min-height: 60px; /* Adjust for mobile */
    }
    
    .case-study-section-content p {
        font-size: 16px;
        line-height: 1.6;
        margin-bottom: 12px;
        color: rgb(42, 52, 71); /* Maintain color consistency */
    }
    
    .case-study-sections {
        gap: 24px; /* Smaller gap for mobile */
    }
    
    .case-study-section {
        gap: 6px; /* Smaller internal gap for mobile */
    }
}

/* Testimonial Section */
.case-study-testimonial-section {
    margin-top: 120px;
    width: 100%;
}

.case-study-testimonial-container {
    background-color: #ECF9D8; /* Green background matching Figma */
    border-radius: 32px;
    padding: 80px;
    display: flex;
    gap: 80px;
    align-items: flex-start;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.case-study-testimonial-intro {
    flex: 0 0 400px; /* Fixed width like in Figma */
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.case-study-testimonial-intro-title {
    font-family: var(--proxima-nova-font) !important;
    font-size: 32px;
    font-weight: 600;
    line-height: 1.25;
    color: #1E1E1E;
    margin: 0;
}

.case-study-testimonial-intro-subtitle {
    font-family: var(--proxima-nova-font) !important;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.67;
    color: #757575;
    margin: 0;
}

.case-study-testimonial-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.case-study-testimonial-quote {
    font-family: var(--proxima-nova-font) !important;
    font-size: 28px;
    font-weight: 400;
    line-height: 1.36;
    color: #1E1E1E;
    margin: 0;
    border: none;
    padding: 0;
    quotes: none;
}

.case-study-testimonial-author {
    display: flex;
    align-items: center;
    gap: 24px;
}

.case-study-testimonial-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.case-study-testimonial-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #D9D9D9;
    flex-shrink: 0;
}

.case-study-testimonial-author-info {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.case-study-testimonial-author-name {
    font-family: var(--proxima-nova-font) !important;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    color: #1E1E1E;
    margin: 0;
}

.case-study-testimonial-author-company {
    font-family: var(--proxima-nova-font) !important;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.39;
    color: #757575;
    margin: 0;
}

/* Responsive Testimonial Section */
@media (max-width: 1024px) {
    .case-study-testimonial-section {
        margin-top: 80px;
    }
    
    .case-study-testimonial-container {
        padding: 60px;
        gap: 60px;
        flex-direction: column;
        text-align: center;
    }
    
    .case-study-testimonial-intro {
        flex: none;
        align-items: center;
    }
    
    .case-study-testimonial-content {
        align-items: center;
    }
    
    .case-study-testimonial-author {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .case-study-testimonial-section {
        margin-top: 60px;
    }
    
    .case-study-testimonial-container {
        border-radius: 24px;
        padding: 40px;
        gap: 32px;
    }
    
    .case-study-testimonial-intro-title {
        font-size: 28px;
    }
    
    .case-study-testimonial-quote {
        font-size: 24px;
    }
    
    .case-study-testimonial-author-name {
        font-size: 18px;
    }
    
    .case-study-testimonial-author-company {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .case-study-testimonial-section {
        margin-top: 40px;
    }
    
    .case-study-testimonial-container {
        border-radius: 16px;
        padding: 24px;
        gap: 24px;
    }
    
    .case-study-testimonial-intro-title {
        font-size: 24px;
    }
    
    .case-study-testimonial-intro-subtitle {
        font-size: 16px;
    }
    
    .case-study-testimonial-quote {
        font-size: 20px;
    }
    
    .case-study-testimonial-avatar,
    .case-study-testimonial-avatar-placeholder {
        width: 60px;
        height: 60px;
    }
    
    .case-study-testimonial-author {
        gap: 16px;
    }
    
    .case-study-testimonial-author-name {
        font-size: 16px;
    }
    
    .case-study-testimonial-author-company {
        font-size: 14px;
    }
}

/* Related Posts Section */
.case-study-related-posts {
    margin-top: 120px;
    width: 100%;
}

.case-study-related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 384px);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
}

.case-study-related-post {
    width: 384px;
}

.case-study-related-post-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
}

.case-study-related-post-link:hover {
    transform: translateY(-2px);
}

.case-study-related-post-image {
    width: 100%;
    height: 216px;
    border-radius: 32px;
    overflow: hidden;
    margin-bottom: 24px;
    position: relative;
}

.case-study-related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.case-study-related-post-placeholder {
    width: 100%;
    height: 100%;
    background-color: rgb(237, 204, 173); /* Figma: consistent placeholder color */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.case-study-related-post-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.case-study-related-post-title {
    font-family: var(--proxima-nova-font) !important;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.33;
    color: #2A3447;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 64px; /* 2 lines at line-height 1.33 */
}

.case-study-related-post-excerpt {
    font-family: var(--proxima-nova-font) !important;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: #2A3447;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 72px; /* 3 lines at line-height 1.5 */
}

/* Responsive Design Improvements */
@media (max-width: 1280px) {
    .case-study-single-container {
        padding: 0 40px;
    }
    
    .case-study-related-posts-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1200px;
    }
    
    .case-study-related-post {
        width: 100%;
    }
}

@media (max-width: 1024px) {
    .case-study-single-container {
        padding: 0 30px;
    }
    
    .case-study-hero {
        height: 400px;
        border-radius: 24px;
    }
    
    .case-study-title {
        font-size: 40px;
        margin-bottom: 32px;
    }
    
    .case-study-section-title {
        font-size: 28px;
    }
    
    .case-study-section-content {
        font-size: 16px;
    }
    
    .case-study-sections {
        gap: 32px;
    }
    
    .case-study-related-posts {
        margin-top: 80px;
    }
    
    .case-study-related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .case-study-related-post-image {
        height: 180px;
        border-radius: 24px;
        margin-bottom: 20px;
    }
    
    .case-study-related-post-title {
        font-size: 20px;
        height: 54px;
    }
    
    .case-study-related-post-excerpt {
        font-size: 14px;
        height: 63px;
    }
}

@media (max-width: 768px) {
    .case-study-single-container {
        padding: 0 20px;
    }
    
    .case-study-hero {
        height: 280px;
        border-radius: 20px;
    }
    
    .case-study-title {
        font-size: 32px;
        margin-bottom: 24px;
    }
    
    .case-study-section-title {
        font-size: 24px;
    }
    
    .case-study-section-content {
        font-size: 16px;
        line-height: 1.6;
    }
    
    .case-study-sections {
        gap: 24px;
    }
    
    .case-study-related-posts {
        margin-top: 60px;
    }
    
    .case-study-related-posts-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .case-study-related-post-image {
        height: 200px;
        border-radius: 20px;
    }
    
    .case-study-related-post-title {
        font-size: 22px;
        height: 58px;
    }
    
    .case-study-related-post-excerpt {
        font-size: 15px;
        height: 67px;
    }
}

@media (max-width: 480px) {
    .case-study-single-container {
        padding: 0 16px;
    }
    
    .case-study-hero {
        height: 220px;
        border-radius: 16px;
    }
    
    .case-study-title {
        font-size: 28px;
        margin-bottom: 20px;
        line-height: 1.3;
    }
    
    .case-study-section-title {
        font-size: 20px;
    }
    
    .case-study-section-content {
        font-size: 14px;
        line-height: 1.6;
    }
    
    .case-study-sections {
        gap: 20px;
    }
    
    .case-study-related-posts {
        margin-top: 40px;
    }
    
    .case-study-related-posts-grid {
        gap: 20px;
    }
    
    .case-study-related-post-image {
        height: 160px;
        border-radius: 16px;
        margin-bottom: 16px;
    }
    
    .case-study-related-post-content {
        gap: 2px;
    }
    
    .case-study-related-post-title {
        font-size: 18px;
        height: 48px;
    }
    
    .case-study-related-post-excerpt {
        font-size: 14px;
        height: 63px;
    }
}

/* Call to Action Section */
.case-study-cta-section {
    margin-top: 120px;
    margin-bottom: 48px;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.case-study-cta-container {
    max-width: 1200px;
    width: 100%;
    height: 404px;
    background-color: #B3C3E4; /* Figma: rgb(179, 195, 228) */
    border-radius: 32px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 36px;
    box-sizing: border-box;
}

.case-study-cta-title {
    font-family: var(--proxima-nova-font) !important;
    font-size: 64px;
    font-weight: 600;
    line-height: 1;
    color: #2A3447;
    margin: 0 0 16px 0;
    max-width: 1128px;
    text-align: center;
}

.case-study-cta-subtitle {
    font-family: var(--proxima-nova-font) !important;
    font-size: 24px;
    font-weight: 400;
    line-height: 1.17;
    color: #2A3447;
    margin: 0 0 16px 0;
    max-width: 1128px;
    text-align: center;
}

.case-study-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #FFFFFF;
    color: #000000;
    border: none;
    border-radius: 100px;
    padding: 16px 24px;
    font-family: var(--proxima-nova-font) !important;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-width: 137px;
    height: 56px;
}

.case-study-cta-button:hover {
    background-color: #F5F5F5;
    color: #000000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.case-study-cta-button:focus {
    outline: 2px solid #000000;
    outline-offset: 2px;
}

.case-study-cta-text {
    white-space: nowrap;
}

/* Responsive CTA Section */
@media (max-width: 1280px) {
    .case-study-cta-section {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 1024px) {
    .case-study-cta-section {
        margin-top: 80px;
        margin-bottom: 40px;
    }
    
    .case-study-cta-container {
        height: auto;
        min-height: 320px;
        padding: 60px 32px;
    }
    
    .case-study-cta-title {
        font-size: 48px;
        line-height: 1.1;
        margin-bottom: 20px;
    }
    
    .case-study-cta-subtitle {
        font-size: 20px;
        margin-bottom: 24px;
    }
}

@media (max-width: 768px) {
    .case-study-cta-section {
        margin-top: 60px;
        margin-bottom: 32px;
    }
    
    .case-study-cta-container {
        border-radius: 24px;
        min-height: 280px;
        padding: 40px 24px;
    }
    
    .case-study-cta-title {
        font-size: 36px;
        line-height: 1.2;
        margin-bottom: 16px;
    }
    
    .case-study-cta-subtitle {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .case-study-cta-button {
        padding: 14px 20px;
        font-size: 15px;
        min-width: 120px;
        height: 52px;
    }
}

@media (max-width: 480px) {
    .case-study-cta-section {
        margin-top: 40px;
        margin-bottom: 24px;
    }
    
    .case-study-cta-container {
        border-radius: 20px;
        min-height: 240px;
        padding: 32px 20px;
    }
    
    .case-study-cta-title {
        font-size: 28px;
        line-height: 1.25;
        margin-bottom: 12px;
    }
    
    .case-study-cta-subtitle {
        font-size: 16px;
        line-height: 1.4;
        margin-bottom: 16px;
    }
    
    .case-study-cta-button {
        padding: 12px 18px;
        font-size: 14px;
        min-width: 110px;
        height: 48px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .case-study-title,
    .case-study-section-title,
    .case-study-section-content,
    .case-study-section-content p,
    .case-study-testimonial-intro-title,
    .case-study-testimonial-quote,
    .case-study-testimonial-author-name,
    .case-study-related-post-title,
    .case-study-related-post-excerpt,
    .case-study-cta-title,
    .case-study-cta-subtitle {
        color: #000000;
    }
    
    .case-study-hero-placeholder,
    .case-study-testimonial-avatar-placeholder,
    .case-study-related-post-placeholder {
        background-color: #F0F0F0;
        border: 2px solid #000000;
    }
    
    .case-study-testimonial-container,
    .case-study-cta-container {
        background-color: #F0F0F0;
        border: 2px solid #000000;
    }
    
    .case-study-cta-button {
        background-color: #FFFFFF;
        color: #000000;
        border: 2px solid #000000;
    }
    
    .case-study-cta-button:hover {
        background-color: #000000;
        color: #FFFFFF;
    }
    
    .case-study-divider-top {
        background-color: #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .case-study-hero img,
    .case-study-related-post-link,
    .case-study-cta-button {
        transition: none;
    }
    
    .case-study-cta-button:hover {
        transform: none;
    }
}