/* Case Study Styles - Standardized with Home Page */

.casestudy-hero {
    position: relative;
    height: 65vh;
    /* Standard home page height */
    min-height: 580px;
    background-color: var(--color-black);
    /* background-image is handled by the component via inline style */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    text-align: center;
    padding: 0 20px;
}

.casestudy-hero-content {
    max-width: 1000px;
    z-index: 5;
    padding: 0 20px;
    transform: translateY(-40px);
    /* Matching home page content offset */
}

.hero-subtitle {
    font-size: 16px;
    letter-spacing: 2.5px;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 12px;
    text-transform: uppercase;
    display: block;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.casestudy-hero-content h1 {
    font-size: var(--font-size-h1);
    font-weight: 700;
    margin: 0 0 20px 0;
    /* Standardized margin */
    line-height: 1.25;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.9);
}

.casestudy-hero-content h1 .text-primary {
    color: var(--color-primary);
}

.casestudy-description {
    font-size: 18px;
    /* Matching .services-subtitle standard */
    line-height: 1.6;
    margin-bottom: 45px;
    font-weight: 500;
    /* Standardized font-weight from home page sections */
    color: var(--color-white);
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 1);
}

.casestudy-hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    border: 2px solid var(--color-white);
    /* White border for left button */
    padding: 14px 35px;
    border-radius: 50px;
    font-weight: 700;
    font-size: var(--font-size-body);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.hero-btn-primary:hover {
    background-color: var(--color-white);
    color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

.hero-btn-secondary {
    background-color: #eaf6e5;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    /* Green border for right button */
    padding: 14px 35px;
    border-radius: 50px;
    font-weight: 700;
    font-size: var(--font-size-body);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(84, 178, 72, 0.1);
}

.hero-btn-secondary:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(84, 178, 72, 0.3);
}

/* Tablet & Smaller Devices */
@media (max-width: 1024px) {
    .casestudy-hero {
        height: 55vh;
        min-height: 500px;
    }

    .casestudy-hero-content h1 {
        font-size: 38px;
    }
}

@media (max-width: 768px) {
    .casestudy-hero {
        height: auto;
        min-height: 480px;
        padding: 100px 20px;
    }

    .casestudy-hero-content {
        transform: translateY(0);
    }

    .casestudy-hero-content h1 {
        font-size: 30px;
        margin-bottom: 20px;
    }

    .casestudy-hero-content p {
        font-size: 16px;
        margin-bottom: 35px;
    }

    .casestudy-hero-btns {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .hero-btn-primary,
    .hero-btn-secondary {
        width: 90%;
        max-width: 320px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .casestudy-hero-content h1 {
        font-size: 26px;
    }
}

.casestudy-breadcrumb {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    font-size: 16px;
    font-weight: 500;
}

.casestudy-breadcrumb span {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--color-white);
}

.breadcrumb-dot {
    color: var(--color-primary); /* Green dot from mockup */
    font-size: 24px;
    font-weight: 700;
}

/* Case Study Grid Gallery Section */
.casestudy-grid-section {
    padding: 80px 40px;
    background-color: var(--color-black);
    /* Dark background as in screenshot */
}

.casestudy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.casestudy-card-link {
    text-decoration: none;
    display: block;
    color: inherit;
    transition: all 0.3s ease;
}

.casestudy-card {
    background-color: #eaf6e5;
    /* Light greenish section from screenshot */
    border-radius: 20px;
    /* Large rounded corners as shown in mockup */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border: none;
    height: 100%;
}

.casestudy-card-link:hover .casestudy-card {
    transform: translateY(-12px);
    box-shadow: 0 15px 40px rgba(84, 178, 72, 0.2);
}

.casestudy-card-img {
    width: 100%;
    aspect-ratio: 1 / 1;
}

.casestudy-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.casestudy-card-info {
    padding: 22px 25px;
    text-align: left;
}

.casestudy-card-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--color-primary);
    /* Green title as shown */
    margin-bottom: 10px;
    line-height: 1.3;
}

.casestudy-card-divider {
    width: 100%;
    height: 1.7px;
    background-color: #000;
    margin-bottom: 15px;
}

.casestudy-card-location {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

/* Responsive Overrides for Grid */
@media (max-width: 1200px) {
    .casestudy-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 991px) {
    .casestudy-grid-section {
        padding: 60px 25px;
    }
    
    .casestudy-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .casestudy-grid-section {
        padding: 50px 20px;
    }

    .casestudy-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        max-width: 480px;
        margin: 0 auto;
    }

    .casestudy-card-title {
        font-size: 17px;
    }
}