/* --- START OF FILE case-study-detail.css --- */
/* Shared styles for case study detail pages (case-study-detail-*.html) */

/* --- Case Study Header Section --- */
.case-study-header {
    /* Inherits base .page-header-section styles */
    padding-top: 2rem;
    padding-bottom: 3rem;
    text-align: start;
}
html[lang="ar"] .case-study-header { text-align: right; }
.case-study-header h1 { text-align: center; margin-top: 1rem; font-size: clamp(1.8rem, 5vw, 2.8rem); color: var(--primary-dark); }
:root.dark-mode .case-study-header h1 { color: var(--primary-light-dark); }
.case-study-header-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.8rem 1.8rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px dashed var(--border-color); font-size: 0.9rem; color: var(--text-muted-color); }
:root.dark-mode .case-study-header-meta { color: var(--text-muted-color-dark); border-top-color: var(--border-color-dark); }
.case-study-header-meta span { display: inline-flex; align-items: center; gap: 0.5em; }
.case-study-header-meta i { color: var(--primary-color); font-size: 1.1em; }
:root.dark-mode .case-study-header-meta i { color: var(--primary-color-dark); }

/* --- Case Study Body Layout --- */
.case-study-body { /* Uses base .section-padding */ }
.case-study-container { display: grid; grid-template-columns: 1fr; gap: 3rem; }
@media (min-width: 992px) {
    .case-study-container { grid-template-columns: 2fr 1fr; }
    html[lang="ar"] .case-study-container { grid-template-columns: 1fr 2fr; }
    html[lang="ar"] .case-study-main-content { grid-column: 2 / 3; }
    html[lang="ar"] .case-study-sidebar { grid-column: 1 / 2; grid-row: 1 / 2; }
}

/* --- Main Content Area --- */
.case-study-main-content h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 2.5rem; margin-bottom: 1rem; color: var(--primary-dark); border-bottom: 2px solid var(--border-color); padding-bottom: 0.5rem; text-align: start; }
:root.dark-mode .case-study-main-content h2 { color: var(--primary-light-dark); border-bottom-color: var(--border-color-dark); }
.case-study-main-content h2:first-of-type { margin-top: 0; }
.case-study-main-content p { font-size: 1.05rem; line-height: 1.8; margin-bottom: 1.5rem; color: var(--text-muted-color); text-align: justify; } /* Changed from text-color to muted */
:root.dark-mode .case-study-main-content p { color: var(--text-muted-color-dark); } /* Changed from text-color-dark */

/* Figures and Captions */
.case-study-figure { margin: 2rem 0; text-align: center; }
.case-study-figure img { max-width: 100%; height: auto; border-radius: var(--border-radius); box-shadow: var(--box-shadow); margin-bottom: 0.8rem; border: 1px solid var(--border-color); }
:root.dark-mode .case-study-figure img { box-shadow: var(--box-shadow-dark); border-color: var(--border-color-dark); }
.case-study-figure figcaption { font-size: 0.9rem; color: var(--text-muted-color); font-style: italic; padding: 0 1rem; }
:root.dark-mode .case-study-figure figcaption { color: var(--text-muted-color-dark); }

/* Results List */
.results-list { list-style: none; padding: 0; margin: 2rem 0; }
.results-list li { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; padding: 1.25rem; background-color: var(--bg-light); border-radius: var(--border-radius); border-left: 4px solid var(--secondary-color); transition: var(--transition-base); }
html[lang="en"] .results-list li { border-left: none; border-right: 4px solid var(--secondary-color); }
:root.dark-mode .results-list li { background-color: var(--bg-light-dark); border-left-color: var(--secondary-color-dark); }
html[lang="en"]:root.dark-mode .results-list li { border-right-color: var(--secondary-color-dark); }
.results-list li:hover { transform: translateX(-4px); box-shadow: var(--box-shadow); }
html[lang="en"] .results-list li:hover { transform: translateX(4px); }
:root.dark-mode .results-list li:hover { box-shadow: var(--box-shadow-dark); }
.results-list i { font-size: 1.6rem; color: var(--secondary-color); margin-top: 0.2em; flex-shrink: 0; width: 1.5em; text-align: center; }
:root.dark-mode .results-list i { color: var(--secondary-color-dark); }
.results-list strong { display: block; margin-bottom: 0.3rem; font-weight: var(--bold-font-weight); color: var(--text-color); font-size: 1.05rem; }
:root.dark-mode .results-list strong { color: var(--text-color-dark); }
.results-list span { color: var(--text-muted-color); font-size: 0.95rem; line-height: 1.6; }
:root.dark-mode .results-list span { color: var(--text-muted-color-dark); }

/* --- Sidebar Area --- */
.case-study-sidebar { position: sticky; top: 100px; align-self: start; }
/* Uses .sidebar-widget from base style.css */
.related-links { list-style: none; padding: 0; margin: 0; }
.related-links li { margin-bottom: 0.5rem; }
.related-links a { color: var(--primary-color); text-decoration: none; display: flex; align-items: center; gap: 0.6em; font-size: 0.9rem; transition: var(--transition-base); padding: 0.3rem 0; }
:root.dark-mode .related-links a { color: var(--primary-color-dark); }
.related-links a:hover { color: var(--accent-color); text-decoration: none; transform: translateX(-3px); }
html[lang="en"] .related-links a:hover { transform: translateX(3px); }
:root.dark-mode .related-links a:hover { color: var(--accent-color-dark); }
.related-links i { color: var(--secondary-color); font-size: 0.9em; width: 1.2em; text-align: center; transition: color 0.3s ease; }
:root.dark-mode .related-links i { color: var(--secondary-color-dark); }
.related-links a:hover i { color: var(--accent-color); }
:root.dark-mode .related-links a:hover i { color: var(--accent-color-dark); }

/* --- Case Study Navigation --- */
.case-study-navigation { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border-color); }
:root.dark-mode .case-study-navigation { border-top-color: var(--border-color-dark); }
.case-study-navigation .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.case-study-navigation .btn { display: inline-flex; align-items: center; gap: 0.5em; }
.case-study-navigation .btn i { line-height: 1; }

/* Responsive Adjustments */
@media (max-width: 991px) {
    .case-study-container { grid-template-columns: 1fr; }
    .case-study-sidebar { position: static; top: auto; }
}
@media (max-width: 768px) {
    .case-study-body { padding-top: 3rem; padding-bottom: 3rem; }
    .case-study-main-content h2 { font-size: clamp(1.4rem, 4vw, 1.8rem); }
    .case-study-main-content p { font-size: 1rem; }
    .results-list li { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .results-list i { margin-bottom: 0.5rem; }
    .case-study-navigation .container { flex-direction: column; gap: 1rem; align-items: stretch; }
    .case-study-navigation .btn { width: 100%; justify-content: center; }
}
/* --- END OF FILE case-study-detail.css --- */