/** 
 * Case Studies Stylesheet for ZenCorp Healthcare
 * Covers both case-studies.php (listing) and individual case study detail pages.
 */

/* ==========================================================================
   Case Studies Listing Page (case-studies.php)
   ========================================================================== */

.case-studies-section {
    position: relative;
    padding: 100px 0px;
    background-color: #F8F9FA;
}

.case-study-card {
    position: relative;
    display: block;
    background: #ffffff;
    border: 1px solid #E5E8ED;
    border-radius: 12px;
    margin-bottom: 40px;
    overflow: hidden;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.02);
    transition: all 400ms ease;
}

.case-study-card:hover {
    transform: translateY(-8px);
    border-color: var(--theme-color, #EB292C);
    box-shadow: 0px 15px 40px rgba(235, 41, 44, 0.08);
}

.case-study-card .blog-card-image {
    position: relative;
    display: block;
    height: 300px;
    overflow: hidden;
    background-color: #0A0F20;
}

.case-study-card .blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 500ms ease;
}

.case-study-card:hover .blog-card-image img {
    transform: scale(1.05);
    opacity: 0.92;
}

.case-study-card .blog-card-content {
    position: relative;
    padding: 35px 30px;
}

.case-study-card .blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-family: var(--text-font, 'Inter', sans-serif);
    font-size: 14px;
    color: #888888;
}

.case-study-card .blog-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.case-study-card .blog-meta span i {
    color: var(--theme-color, #EB292C);
}

.case-study-card h2 {
    font-family: var(--title-font, 'Manrope', sans-serif);
    font-size: 24px;
    line-height: 34px;
    font-weight: 800;
    margin-bottom: 15px;
}

.case-study-card h2 a {
    color: var(--secondary-color, #0A0F20);
    transition: all 300ms ease;
}

.case-study-card h2 a:hover {
    color: var(--theme-color, #EB292C);
}

.case-study-card p {
    font-family: var(--text-font, 'Inter', sans-serif);
    font-size: 15px;
    line-height: 26px;
    color: #555555;
    margin-bottom: 25px;
}

.case-study-card .read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--title-font, 'Manrope', sans-serif);
    font-size: 15px;
    font-weight: 700;
    color: var(--theme-color, #EB292C);
    transition: all 300ms ease;
}

.case-study-card .read-more-btn:hover {
    color: var(--secondary-color, #0A0F20);
    gap: 12px;
}

/* Pagination */
.pagination-wrapper {
    margin-top: 20px;
}

.pagination-list {
    display: flex;
    justify-content: center;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination-list a {
    display: flex;
    width: 45px;
    height: 45px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid #E5E8ED;
    background-color: #ffffff;
    color: var(--secondary-color, #0A0F20);
    font-family: var(--title-font, 'Manrope', sans-serif);
    font-weight: 700;
    transition: all 300ms ease;
}

.pagination-list li.active a,
.pagination-list a:hover {
    background-color: var(--theme-color, #EB292C);
    border-color: var(--theme-color, #EB292C);
    color: #ffffff;
}

/* Sidebar Styling */
.sidebar-widget {
    position: relative;
    background: #ffffff;
    border: 1px solid #E5E8ED;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.01);
}

.widget-title {
    position: relative;
    font-family: var(--title-font, 'Manrope', sans-serif);
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary-color, #0A0F20);
    margin-bottom: 25px;
    padding-bottom: 10px;
}

.widget-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background-color: var(--theme-color, #EB292C);
}

/* Recent Posts / Case Studies Widget */
.recent-post-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.recent-post-item {
    display: flex;
    gap: 15px;
    align-items: center;
}

.recent-post-thumb {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background-color: #0A0F20;
}

.recent-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-post-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.recent-post-info h5 {
    font-family: var(--title-font, 'Manrope', sans-serif);
    font-size: 14px;
    line-height: 20px;
    font-weight: 700;
    color: var(--secondary-color, #0A0F20);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: all 300ms ease;
}

.recent-post-info h5 a {
    color: inherit;
}

.recent-post-info h5 a:hover {
    color: var(--theme-color, #EB292C);
}

.recent-post-info span {
    font-family: var(--text-font, 'Inter', sans-serif);
    font-size: 12px;
    color: #888888;
}

/* Sidebar CTA Widget */
.cta-widget {
    position: relative;
    background-color: var(--secondary-color, #0A0F20);
    background-image: radial-gradient(circle at 90% 10%, rgba(235, 41, 44, 0.15) 0%, transparent 50%);
    color: #ffffff;
    padding: 45px 30px;
    text-align: center;
    border-radius: 12px;
    border: 1px solid #0A0F20;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.05);
}

.cta-widget h4 {
    font-family: var(--title-font, 'Manrope', sans-serif);
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
}

.cta-widget p {
    font-family: var(--text-font, 'Inter', sans-serif);
    font-size: 14px;
    line-height: 24px;
    color: #b5bbcd;
    margin-bottom: 22px;
}

.cta-widget .cta-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--theme-color, #EB292C);
    color: #ffffff !important;
    font-family: var(--title-font, 'Manrope', sans-serif);
    font-size: 14px;
    font-weight: 700;
    border-radius: 6px;
    transition: all 300ms ease;
}

.cta-widget .cta-btn:hover {
    background-color: #ffffff;
    color: var(--theme-color, #EB292C) !important;
}


/* ==========================================================================
   Individual Case Study Details Page
   ========================================================================== */

.case-study-details {
    position: relative;
    padding: 100px 0;
    background-color: #F8F9FA;
}

.case-study-details .post-main-card {
    position: relative;
    background-color: #ffffff;
    border: 1px solid #E5E8ED;
    border-radius: 12px;
    padding: 45px 40px;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.02);
    margin-bottom: 40px;
}

.case-study-details .post-main-image {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 35px;
    background-color: #0A0F20;
}

.case-study-details .post-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.case-study-header {
    margin-bottom: 40px;
}

.case-study-header .blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-family: var(--text-font, 'Inter', sans-serif);
    font-size: 14px;
    color: #888888;
}

.case-study-header .blog-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.case-study-header .blog-meta span i {
    color: var(--theme-color, #EB292C);
}

.case-study-header h1 {
    font-family: var(--title-font, 'Manrope', sans-serif);
    font-size: 34px;
    line-height: 44px;
    font-weight: 800;
    color: var(--secondary-color, #0A0F20);
    margin: 15px 0 25px;
}

.case-study-intro {
    font-family: var(--text-font, 'Inter', sans-serif);
    font-size: 17px;
    line-height: 1.8;
    color: #444444;
}

.case-study-section {
    margin-bottom: 50px;
}

.case-study-section h2 {
    font-family: var(--title-font, 'Manrope', sans-serif);
    font-size: 24px;
    line-height: 1.35;
    font-weight: 700;
    color: var(--secondary-color, #0A0F20);
    margin-bottom: 20px;
}

.case-study-section p {
    font-family: var(--text-font, 'Inter', sans-serif);
    font-size: 16px;
    line-height: 28px;
    color: #555555;
    margin-bottom: 18px;
}

.case-study-heading {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 22px;
}

.case-study-heading h2 {
    margin: 0;
}

.case-study-number {
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-family: var(--title-font, 'Manrope', sans-serif);
    font-weight: 800;
    font-size: 15px;
    background: rgba(235, 41, 44, 0.08);
    color: var(--theme-color, #EB292C);
    border: 1px solid rgba(235, 41, 44, 0.2);
}

/* Timeline */
.case-study-timeline {
    position: relative;
    margin: 0 0 25px;
    padding: 0 0 0 32px;
    list-style: none;
}

.case-study-timeline li {
    position: relative;
    padding: 0 0 24px 0;
    margin-bottom: 0;
    list-style: none;
    border-left: none;
}

.case-study-timeline li:last-child {
    padding-bottom: 0;
}

/* Connecting Timeline Track Line */
.case-study-timeline li:after {
    content: '';
    position: absolute;
    left: 2px;
    top: 15px;
    bottom: -20px;
    width: 2px;
    background-color: rgba(235, 41, 44, 0.3);
    z-index: 1;
}

.case-study-timeline li:last-child:after {
    display: none;
}

/* Perfectly Centered Timeline Node Dot */
.case-study-timeline li:before {
    content: '';
    position: absolute;
    left: -31px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--theme-color, #EB292C);
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 2px rgba(235, 41, 44, 0.35);
    z-index: 2;
}

.case-study-timeline strong {
    display: block;
    margin-bottom: 6px;
    font-family: var(--title-font, 'Manrope', sans-serif);
    font-size: 16px;
    line-height: 22px;
    font-weight: 700;
    color: var(--secondary-color, #0A0F20);
}

.case-study-timeline span {
    display: block;
    font-family: var(--text-font, 'Inter', sans-serif);
    font-size: 15px;
    line-height: 1.7;
    color: #555555;
}

/* Snapshots & Highlights */
.case-snapshot {
    padding: 25px 28px;
    margin-top: 20px;
    background: #F8F9FA;
    border-left: 4px solid var(--theme-color, #EB292C);
    border-top: 1px solid #E5E8ED;
    border-right: 1px solid #E5E8ED;
    border-bottom: 1px solid #E5E8ED;
    border-radius: 0 8px 8px 0;
}

.case-snapshot h3 {
    font-family: var(--title-font, 'Manrope', sans-serif);
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary-color, #0A0F20);
    margin-bottom: 12px;
}

.case-snapshot p:last-child {
    margin-bottom: 0;
}

.case-highlight {
    padding: 25px 28px;
    margin: 25px 0;
    background: #F8F9FA;
    border-left: 4px solid var(--theme-color, #EB292C);
    border-top: 1px solid #E5E8ED;
    border-right: 1px solid #E5E8ED;
    border-bottom: 1px solid #E5E8ED;
    border-radius: 0 8px 8px 0;
}

.case-highlight strong {
    display: block;
    margin-bottom: 10px;
    font-family: var(--title-font, 'Manrope', sans-serif);
    color: var(--secondary-color, #0A0F20);
}

.case-highlight p {
    margin-bottom: 0;
    color: #555555;
}

.case-final-highlight {
    padding: 28px;
    margin-top: 30px;
    background: #F8F9FA;
    border-left: 4px solid var(--theme-color, #EB292C);
    border-top: 1px solid #E5E8ED;
    border-right: 1px solid #E5E8ED;
    border-bottom: 1px solid #E5E8ED;
    border-radius: 0 8px 8px 0;
}

.case-final-highlight p {
    margin-bottom: 0;
    color: #555555;
}

/* In-Content Social Share Box */
.post-share-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    padding: 20px 25px;
    margin: 40px 0 30px;
    background-color: #F8F9FA;
    border: 1px solid #E5E8ED;
    border-radius: 8px;
}

.post-share-box h4 {
    margin: 0;
    font-family: var(--title-font, 'Manrope', sans-serif);
    font-size: 16px;
    font-weight: 700;
    color: var(--secondary-color, #0A0F20);
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-share-box h4 i {
    color: var(--theme-color, #EB292C);
}

/* Social Share Icons */
.share-icon-list {
    display: flex;
    gap: 12px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.share-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #E5E8ED;
    background-color: #F8F9FA;
    color: #555555;
    font-size: 14px;
    transition: all 300ms ease;
}

.share-icon-link:hover {
    color: #ffffff;
    border-color: var(--theme-color, #EB292C);
}

.share-icon-link.facebook-share:hover {
    background-color: #1877F2;
    border-color: #1877F2;
}

.share-icon-link.linkedin-share:hover {
    background-color: #0A66C2;
    border-color: #0A66C2;
}

.share-icon-link.twitter-share:hover {
    background-color: #000000;
    border-color: #000000;
}

/* Call-to-Action Box */
.case-study-cta {
    position: relative;
    background-color: var(--secondary-color, #0A0F20);
    background-image: radial-gradient(circle at 90% 10%, rgba(235, 41, 44, 0.18) 0%, transparent 55%);
    color: #ffffff;
    padding: 45px 35px;
    margin-top: 40px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #0A0F20;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.05);
}

.case-study-cta h2 {
    color: #ffffff;
    font-family: var(--title-font, 'Manrope', sans-serif);
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 15px;
}

.case-study-cta p {
    color: #b5bbcd;
    font-family: var(--text-font, 'Inter', sans-serif);
    font-size: 15px;
    line-height: 26px;
    max-width: 620px;
    margin: 0 auto 25px;
}

.case-study-cta .theme-btn {
    display: inline-block;
    padding: 14px 35px;
    background-color: var(--theme-color, #EB292C);
    color: #ffffff !important;
    font-family: var(--title-font, 'Manrope', sans-serif);
    font-size: 15px;
    font-weight: 700;
    border-radius: 8px;
    transition: all 300ms ease;
    box-shadow: 0px 4px 15px rgba(235, 41, 44, 0.2);
}

.case-study-cta .theme-btn:hover {
    background-color: #ffffff;
    color: var(--theme-color, #EB292C) !important;
    transform: translateY(-2px);
    box-shadow: 0px 4px 15px rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Related Case Studies Section
   ========================================================================== */

.related-articles-section {
    position: relative;
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid #E5E8ED;
}

.related-articles-section h3 {
    font-family: var(--title-font, 'Manrope', sans-serif);
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary-color, #0A0F20);
    margin-bottom: 30px;
}

.related-card {
    position: relative;
    background-color: #ffffff;
    border: 1px solid #E5E8ED;
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
    transition: all 400ms ease;
}

.related-card:hover {
    transform: translateY(-5px);
    border-color: var(--theme-color, #EB292C);
    box-shadow: 0px 10px 25px rgba(235, 41, 44, 0.05);
}

.related-card-img {
    height: 180px;
    overflow: hidden;
    background-color: #0A0F20;
}

.related-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 500ms ease;
}

.related-card:hover .related-card-img img {
    transform: scale(1.05);
}

.related-card-content {
    padding: 20px;
}

.related-card-content span.date {
    font-family: var(--text-font, 'Inter', sans-serif);
    font-size: 12px;
    color: #888888;
    display: block;
    margin-bottom: 8px;
}

.related-card-content h4 {
    font-family: var(--title-font, 'Manrope', sans-serif);
    font-size: 16px;
    line-height: 24px;
    font-weight: 700;
    color: var(--secondary-color, #0A0F20);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-card-content h4 a {
    color: inherit;
    transition: color 300ms ease;
}

.related-card-content h4 a:hover {
    color: var(--theme-color, #EB292C);
}

.related-read-more {
    font-family: var(--title-font, 'Manrope', sans-serif);
    font-size: 13px;
    font-weight: 700;
    color: var(--theme-color, #EB292C);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 300ms ease;
}

.related-read-more:hover {
    color: var(--secondary-color, #0A0F20);
    gap: 8px;
}


/* ==========================================================================
   Responsive
   ========================================================================== */

@media only screen and (max-width: 991px) {
    .case-studies-section,
    .case-study-details {
        padding: 70px 0;
    }
}

@media only screen and (max-width: 767px) {
    .case-studies-section,
    .case-study-details {
        padding: 60px 0;
    }

    .case-study-details .post-main-card {
        padding: 25px 20px;
    }

    .case-study-details .post-main-image {
        height: 240px;
        margin-bottom: 25px;
    }

    .case-study-header h1 {
        font-size: 28px;
        line-height: 38px;
    }

    .case-study-section h2 {
        font-size: 22px;
    }

    .case-study-heading {
        align-items: flex-start;
    }

    .case-study-cta {
        padding: 30px 20px;
    }

    .post-share-box {
        flex-direction: column;
        align-items: flex-start;
    }
}
