/**
 * Case Study Single Template Styles
 */


/* Case Study Card Styles */
.case-studies-container {
    padding: 12rem 0 0 0;
}

@media (max-width: 767px){
    .case-studies-container {
    padding: 5% 0 0 0;
}
}

.case-studies-header-wrapper{
    position:relative;
    width: 100%;
    padding-top: 4rem;


}

@media (max-width: 767px){
    .case-studies-header-wrapper{
    padding-top: 2%;


}
}

.case-studies-header{
    font-size: 44px;
        color: #13131c;
    font-weight: 700;
line-height: 93%; /* 66.96px */
letter-spacing: -2.16px;
}


.case-studies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    column-gap: 6%;
    position: relative;

}


/* Create the staggered effect by offsetting every 3rd card */
.case-study-card:nth-child(3n+1) {
    transform: translateY(0);
}

.case-study-card:nth-child(3n+2) {
    transform: translateY(-120px);
}

.case-study-card:nth-child(3n+3) {
    transform: translateY(-240px);
}

.case-study-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}



.case-study-image {
    border-radius: 20px;
    position: relative;
    height: 500px;
    overflow: hidden;
}

@media (max-width: 767px){
.case-study-image {
    height: 300px;
}

}

.case-study-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.raffle-type-chip {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: white;
    padding: 0.35rem 1rem;
    border-radius: 9999px;
    font-size: 16px;
    display: flex;
    gap: 10px;
    color: #13131c;
}
.raffle-type-chip p{
    font-weight: 600;
}

.case-study-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.case-study-meta-card {
    display: flex;
    justify-content: space-between;
    color: #13131c;
    padding: 2% 0 0 0;
}

.meta-card-break {
    margin: 0 10px;
}

.case-study-title-card {
    font-size: 22px;
    font-weight: 600;
    margin: 2% 0 4% 0;
    color: #13131c;
    line-height: 110%;
}

@media (max-width: 767px){
    .case-study-meta-card{
        padding: 6% 0 2% 0;
    }
    .case-study-title-card{
        margin-bottom: 15px;
    }
}

/* Adjust the "View More" button positioning */
.view-more-container {
    margin-top: 60px; /* Account for the staggered cards */
    display: flex;
    justify-content:center;
    align-items: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .case-study-card:nth-child(n) {
        transform: translateY(0); /* Remove stagger on mobile */
    }
    
    .case-study-card:nth-child(n):hover {
        transform: translateY(-10px); /* Consistent hover on mobile */
    }
}


/**
 * Updated Case Study Template Styles
 */

/* Main container */
.raffle-case-study {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    line-height: 1.6;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

/* Banner with overlay styling */
.case-study-banner {
    position: relative;
    width: 100vw;
    min-height: 350px; /* Changed to min-height to allow expansion */
    margin-bottom: 3rem;
    overflow: hidden;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    display: flex;
    justify-content: center;
}

@media (max-width: 767px){
    .case-study-banner {
        min-height: 450px;
        margin-bottom: 0;
    }
}

/* Image as absolute element */
.case-study-banner img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Overlay as absolute element */
.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, var(--Dark-Green, rgba(22, 101, 52, 0.90)) 0%, var(--Green, rgba(74, 180, 97, 0.90)) 100%);
    z-index: 1;
}

/* Text container as relative element */
.case-study-text-container {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 60px 0; /* Added padding top and bottom */
}

.case-study-header-content {
    width: 70%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.case-study-name {
    font-size: 38px;
    font-weight: 700;
    color: white;
    text-align: left;
    line-height: 110%;
    padding-bottom: 10px;
}

.case-study-impact {
    font-size: 18px;
    color: white;
    text-align: left;
}

@media (max-width: 767px){
    .case-study-header-content {
        width: 100%;
        padding: 40px 0;
    }
    .case-study-name {
        font-size: 28px;
    }
    .case-study-impact {
        font-size: 16px;
    }
}

/* Two column layout for content and sidebar */
.case-study-content-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 992px) {
    .case-study-content-layout {
        flex-direction: row;
    }
    
    .case-study-main-column {
        flex: 2;
        padding-right: 2rem;
    }
    
    .case-study-side-column {
        flex: 1;
    }
}

/* Main content column */
.case-study-main-column {
    line-height: 1.7;
}

.case-study-main-content h2 {
    font-size: 28px;
    color: #13131c;
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.case-study-main-content p {
    margin-bottom: 1.5rem;
}

/* Side column styling - meta details and latest posts */
.case-study-side-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Meta details card */
.case-study-meta {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.organization-logo {
    max-width: 150px;
    margin-bottom: 1rem;
}

.organization-logo img {
    max-width: 100%;
    height: auto;
}

.total-raised, .raffle-type, .campaign-frequency, .campaign-duration {
    padding-bottom: 10px;
    font-size: 0.95rem;
    font-weight: 600;
}

.raffle-type-data{
    font-weight: 500 !important;
}

.total-raised {
    font-weight: bold;
}

.total-amount {
    font-size: 2rem;
    color: #13131c;
    margin-top: 0.5rem;
}

/* Latest posts sidebar */
.latest-posts-sidebar {
    padding: 20px;
}

.latest-posts-sidebar h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e5e5;
    font-size: 1.25rem;
    color: #13131c;
}

.latest-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.latest-post-item {
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.latest-post-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.latest-post-link {
    display: flex;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.latest-post-thumbnail {
    width: 80px;
    flex-shrink: 0;
}

.latest-post-thumbnail img {
    width: 100%;
    height: 80px;
    border-radius: 4px;
    object-fit: cover;
}

.latest-post-content {
    flex: 1;
}

.latest-post-title {
    margin: 0 0 5px;
    font-size: 1rem;
    line-height: 1.3;
    color: #333;
}

.latest-post-raised {
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: #666;
}

.read-more {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: bold;
    color: #2c8e57;
    margin-top: 5px;
}

.view-all-link {
    margin-top: 20px;
    text-align: center;
}



/* Social sharing */
.social-share-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.social-share-container h4 {
    margin: 0;
    color: white;
}

.social-share-icons {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.social-share-icons li {
    margin-right: 15px;
}

.social-share-icons li:last-child {
    margin-right: 0;
}



/* Keys to success section */
.keys-to-success {
    margin: 3rem 0;
}

.keys-to-success h2 {
    font-size: 28px;
    color: #13131c;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
}

.keys-to-success ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.keys-to-success li {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: relative;
    padding: 10%;
}

.keys-to-success li img{
  height: 65px;
  width: 65px;
  margin-bottom: 10px;
}


.keys-to-success li strong {
    display: block;
    margin-bottom: 0.5rem;

}


/* Card styles general class */
.card-styles {
    background-color: white;
    border-radius: 8px;
}

.testimonial-section {
    display: flex;
    max-width: 100%;
    margin: 40px 0;
    border-radius: 10px;
    overflow: hidden;
    background-color: #fff;
    height: 400px;
}

.testimonial-image {
    flex: 0 0 33.333%;
    position: relative;
}

.testimonial-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.testimonial-content {
    flex: 0 0 66.666%;
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.quote-icon {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 50px;
    height: auto;
}

.testimonial-quote {
    font-size: 24px;
    line-height: 140%;
    color: #13131c;
    margin-bottom: 20px;
    margin-top: 0;
    max-width: 90%;
}

.testimonial-author {
    font-weight: 600;
    margin-bottom: 5px;
        font-size: 22px;

    color: #13131c;
}

.testimonial-position {
    color: #13131c;
    font-size: 18px;
}

@media (max-width: 768px) {
    .testimonial-quote{
        font-size: 18px;
            max-width: 85%;

    }

    .testimonial-section {
        flex-direction: column;
        height: auto;
    }
    
    .testimonial-image {
        flex: 0 0 200px;
        height: 300px;
    }
    
    .testimonial-content {
        flex: 1;
        padding: 20px 20px;
    }
    .quote-icon{
    top: 26px;
    right: 15px;
    width: 30px;
    }

    .testimonial-author{
        font-size: 16px;

    }
    .testimonial-position{
        font-size: 16px;

    }
}

.social-share-container-case-studies{}
.social-share-container-case-studies h4{
    color: #13131c;
}