/* =========================================
   CASE STUDY DETAIL PAGE STYLES
   ========================================= */

/* -----------------------------------------
   1. MAIN ARTICLE & TYPOGRAPHY
   ----------------------------------------- */
.case-study-detail-wrap {
    max-width: 1170px;
    width: 95%;
    margin: 0 auto;
    padding: 50px 0 0 0;
    font-family: 'Roboto', sans-serif;
    color: #40464a;
    box-sizing: border-box;
}

/* Page Title with Blue Underline */
.case-study-detail-wrap h2.h4 {
    font-size: 24px;
    font-weight: bold;
    color: #40464a;
    margin: 0 0 40px 0;
    padding: 0;
    position: relative;
    line-height: 1.3;
}

.case-study-detail-wrap h2.h4::after {
    content: '';
    width: 160px;
    height: 5px;
    border-bottom: 3px solid #21256d;
    position: absolute;
    bottom: -15px;
    left: 0;
}

/* Content Area */
.case-study-content {
    display: block;
    width: 100%;
    margin: 30px 0;
}

.case-study-content::after {
    content: "";
    display: table;
    clear: both;
}

.case-study-content p {
    font-size: 19px;
    line-height: 25px;
    text-align: justify;
    margin: 0 0 20px 0;
    color: #40464a;
}

.case-study-content a {
    font-weight: 600;
    color: #21256d;
    text-decoration: underline;
}

.case-study-content a:hover {
    text-decoration: none;
}

.case-study-content h3 {
    font-size: 22px;
    font-weight: 600;
    color: #21256d;
    margin: 30px 0 15px 0;
}

.case-study-meta {
    font-size: 16px;
    color: #747f86;
    margin-bottom: 25px;
}

/* Blockquote & Author Citation */
.case-study-content blockquote {
    padding: 15px 20px;
    margin: 25px 0;
    font-size: 16px;
    border-left: 5px solid #21256d;
    background-color: #f9f9f9;
}

.case-study-content blockquote cite,
.case-study-content blockquote .quote-author {
    display: block;
    font-size: 16px;
    font-weight: bold;
    color: #21256d;
    font-style: normal;
    margin-top: 15px;
    border: none;
    padding: 0;
    float: none;
    width: auto;
}

/* Right Floated Image */
.case-study-content .gallery-item.right-img {
    float: right;
    width: 49%;
    margin-left: 2%;
    margin-bottom: 15px;
    margin-top: 5px;
    display: block;
    position: relative;
    z-index: 5;
}

.case-study-content .gallery-item.right-img img {
    width: 100%;
    height: auto;
    display: block;
}

/* -----------------------------------------
   2. PERFORMANCE RESULTS GALLERY (FB SLIDER)
   ----------------------------------------- */
.galery {
    width: 100%;
    height: auto;
    padding: 40px 0 30px 0;
    font-family: 'Roboto', sans-serif;
    background: #f9f9f9;
    box-sizing: border-box;
}

.structure-galerie-block h2.h4 {
    font-size: 24px;
    font-weight: 400;
    color: #40464a;
    margin: 0 auto 30px auto;
    padding: 0;
    line-height: 1.3;
    text-align: center;
}

.structure-galerie-block h2.h4::after {
    display: none;
}

/* Slider Track & Viewport */
.galerie-wrap {
    position: relative;
    width: 100%;
    padding: 0 40px;
    box-sizing: border-box;
    display: block;
}

.galerie-viewport {
    position: relative;
    width: 100%; 
    overflow: hidden;
    display: block;
    margin: 0 auto;
}

.galerie-track {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    gap: 10px; 
    transition: transform 0.4s ease-out;
    margin: 0;
    padding: 0;
}

.gal-item {
    box-sizing: border-box;
}

.gal-item .img-wrap {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    margin-bottom: 0;
    overflow: hidden;
    position: relative;
}

.gal-item .img-wrap a.gal-slide {
    position: relative; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gal-item .img-wrap img.pic {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* Hover Overlay with Plus Icon */
.gal-item .img-wrap a.gal-slide span {
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(33, 37, 109, 0.7);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.gal-item .img-wrap a.gal-slide:hover span {
    opacity: 1;
}

.gal-item .img-wrap a.gal-slide:hover img.pic {
    transform: scale(1.05);
}

.gal-item .img-wrap a.gal-slide span img {
    width: 40px;
    height: auto;
}

/* Slider Controls & Navigation Arrows */
.galerie-wrap .arr {
    position: absolute;
    top: 50%;
    z-index: 10;
    cursor: pointer;
    width: 30px;
    transition: opacity 0.3s ease;
}

.galerie-wrap .arr:hover {
    opacity: 0.6;
}

.galerie-wrap .arr.prev {
    left: 0;
    transform: translateY(-50%);
}

.galerie-wrap .arr.next {
    right: 0;
    transform: translateY(-50%) rotate(180deg);
}

/* Slider Dots */
.gal-controls {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 15px;
    margin-bottom: 0;
    padding: 0;
}

.gal-dots-wrap {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.gal-dot {
    flex: none;
    width: 34px; 
    height: 6px;  
    background: #d6d6d6; 
    border: none;
    cursor: pointer;
    transition: background 0.3s ease-out;
    padding: 0;
    margin: 0;
    display: inline-block;
}

.gal-dot.active, 
.gal-dot:hover {
    background: #21256d; 
}

@media (max-width: 768px) {
    .gal-item {
        flex: 0 0 100%;
        min-width: 100%;
        max-width: 100%;
    }
}