/* ============================================
   RESEARCH DETAILS PAGE STYLES
   Clean, Modern, Academic Design
   ============================================ */

:root {
    --primary-color: #e03a3c;
    --primary-dark: #c62d2f;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.research-detail-hero {
    position: relative;
    height: 600px; /* Increased height */
    display: flex;
    align-items: flex-end;
    padding: 40px 0;
    overflow: hidden;
    background-color: #1a1a1a; /* Dark background for sides */
}

/* Actual photo - centered and contained */
.research-detail-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: inherit;
    background-size: contain; /* CHANGED from cover to contain */
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

/* Blurred background for sides */
.research-detail-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: inherit;
    background-size: cover;
    background-position: center;
    filter: blur(20px); /* Blur the sides */
    transform: scale(1.1); /* Prevent blur edge cutoff */
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3); /* Simple dark overlay */
    z-index: 2;
}
/* ============================================
   MAIN CONTENT
   ============================================ */

.research-detail-content {
    padding: 60px 0;
    background: var(--white);
}

/* ============================================
   HEADER SECTION
   ============================================ */

.research-header {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 60px;
}

.status-badge {
    display: inline-block;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 20px;
    margin-bottom: 24px;
}

.status-badge.ongoing {
    background: rgba(224, 58, 60, 0.1);
    color: var(--primary-color);
}

.status-badge.completed {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.research-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
    margin: 0;
}

/* ============================================
   INTRODUCTION SECTION
   ============================================ */

.intro-section {
    max-width: 900px;
    margin: 0 auto 80px;
    padding: 40px;
    background: var(--bg-light);
    border-radius: 16px;
    border-left: 4px solid var(--primary-color);
}

.intro-text {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-dark);
    margin: 0;
}

/* ============================================
   GALLERY SECTION
   ============================================ */

.research-gallery-section {
    max-width: 1000px;
    margin: 0 auto 80px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

.gallery-main {
    position: relative;
    margin-bottom: 24px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--bg-light);
}

.gallery-main img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    display: block;
    background: var(--bg-light);
}

.gallery-caption {
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    font-size: 15px;
    text-align: center;
    margin: 0;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.thumbnail {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.thumbnail:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.thumbnail.active {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.thumbnail:hover img {
    transform: scale(1.1);
}

/* ============================================
   RESEARCH SECTIONS
   ============================================ */

.research-sections {
    max-width: 900px;
    margin: 0 auto;
}

.research-section {
    margin-bottom: 60px;
}

.research-section:last-child {
    margin-bottom: 0;
}

.section-content {
    margin-top: 20px;
}

.section-content p {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.section-content p:last-child {
    margin-bottom: 0;
}

/* ============================================
   RELATED RESEARCH SECTION
   ============================================ */

.related-research-section {
    margin-top: 100px;
    padding-top: 60px;
    border-top: 2px solid var(--border-color);
}

.section-title-main {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 50px;
}

.related-research-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.related-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.related-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.related-card-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: var(--bg-light);
}

.related-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.related-card:hover .related-card-image img {
    transform: scale(1.08);
}

.related-status {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.95);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.related-status.ongoing {
    color: var(--primary-color);
}

.related-status.completed {
    background: rgba(40, 167, 69, 0.95);
    color: var(--white);
}

.related-card-body {
    padding: 24px;
}

.related-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-card-excerpt {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.related-card-link:hover {
    gap: 12px;
    color: var(--primary-dark);
}

.related-card-link svg {
    transition: var(--transition);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablets */
@media (max-width: 992px) {
    .research-detail-hero {
        height: 300px;
    }
    
    .research-title {
        font-size: 34px;
    }
    
    .intro-section {
        padding: 30px;
    }
    
    .intro-text {
        font-size: 17px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .section-content p {
        font-size: 16px;
    }
    
    .related-research-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .research-detail-hero {
        height: 250px;
        padding: 30px 0;
    }
    
    .breadcrumb-link {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .research-detail-content {
        padding: 40px 0;
    }
    
    .research-header {
        margin-bottom: 40px;
    }
    
    .status-badge {
        font-size: 12px;
        padding: 6px 16px;
        margin-bottom: 16px;
    }
    
    .research-title {
        font-size: 28px;
    }
    
    .intro-section {
        padding: 24px;
        margin-bottom: 50px;
    }
    
    .intro-text {
        font-size: 16px;
        line-height: 1.7;
    }
    
    .research-gallery-section {
        margin-bottom: 50px;
    }
    
    .section-title {
        font-size: 22px;
        margin-bottom: 24px;
        padding-bottom: 12px;
    }
    
    .gallery-main img {
        max-height: 400px;
    }
    
    .gallery-caption {
        padding: 16px;
        font-size: 14px;
    }
    
    .gallery-thumbnails {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 12px;
        margin-top: 16px;
    }
    
    .thumbnail {
        border: 2px solid transparent;
    }
    
    .research-section {
        margin-bottom: 40px;
    }
    
    .section-content p {
        font-size: 15px;
        line-height: 1.7;
    }
    
    .related-research-section {
        margin-top: 60px;
        padding-top: 40px;
    }
    
    .section-title-main {
        font-size: 26px;
        margin-bottom: 32px;
    }
    
    .related-research-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .related-card-image {
        height: 200px;
    }
    
    .related-card-body {
        padding: 20px;
    }
    
    .related-card-title {
        font-size: 17px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .research-detail-hero {
        height: 200px;
    }
    
    .research-title {
        font-size: 24px;
    }
    
    .intro-section {
        padding: 20px;
        border-left-width: 3px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .gallery-thumbnails {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 8px;
    }
    
    .related-card-image {
        height: 180px;
    }
}

/* Print Styles */
@media print {
    .breadcrumb-link,
    .related-research-section {
        display: none;
    }
    
    .research-detail-hero {
        height: 200px;
        break-after: avoid;
    }
    
    .research-section {
        break-inside: avoid;
    }
    
    .gallery-thumbnails {
        display: none;
    }
}
/* ============================================
   BACK BUTTON AT BOTTOM
   ============================================ */

.back-to-research-bottom {
    padding: 60px 0;
    background: var(--bg-light);
    text-align: center;
}

.btn-back-bottom {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 40px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.btn-back-bottom:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--white);
}

.btn-back-bottom svg {
    transition: var(--transition);
}

.btn-back-bottom:hover svg {
    transform: translateX(-4px);
}

@media (max-width: 768px) {
    .back-to-research-bottom {
        padding: 40px 0;
    }
    
    .btn-back-bottom {
        width: 90%;
        justify-content: center;
        padding: 14px 30px;
    }
}