/* --- Variables & Base Styles --- */
:root {
    --color-primary: #0057D9; 
    --color-text-body: #222222;
    --color-bg: #F5F5F5; 
    
    --font-body: 'Noto Serif', serif;
    --font-heading: 'Playfair Display', serif;
    --font-ui: 'Roboto', sans-serif;
    --font-headline: 'Phudu', cursive;

    --width-content: 660px;
    --spacing-text: 18px; 
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--color-bg);
    color: var(--color-text-body);
    font-family: var(--font-body);
    font-size: 18px; 
    line-height: 1.8;
    overflow-x: hidden;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    min-height: 100vh;
}

/* --- Media Alignment --- */
.media-container { position: relative; width: 100%; display: flex; justify-content: center; flex-direction: column; margin-bottom: 20px; }

/* --- Embed Container --- */
.embed-container { width: 100%; display: flex; justify-content: center; }
.embed-content { max-width: 100%; }

/* --- Table CSS --- */
.cms-table-wrapper { margin-bottom: 28px; width: 100%; overflow-x: auto; }
.cms-table { width: 100%; border-collapse: collapse; }
.cms-table td { 
    vertical-align: top; 
    padding: 10px; 
    min-width: 50px; 
    position: relative;
}
.cms-table td img { max-width: 100%; height: auto; }

/* --- Link Wrapper Utility --- */
a.block-link-wrapper { text-decoration: none; color: inherit; display: block; }
a.block-link-wrapper:hover { opacity: 0.9; }

/* --- Chart container --- */
.chart-wrapper {
    width: 100%; 
    max-width: 100%;
    height: 400px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 28px;
}

/* --- Widget specific styles --- */
.widget-scrollbar::-webkit-scrollbar { width: 0px; background: transparent; }
.widget-no-scrollbar::-webkit-scrollbar { display: none; }
.widget-no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.widget-slide-up-hidden { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.widget-slide-up-visible { opacity: 1; transform: translateY(0); }
.widget-fade-in { animation: widgetFadeIn 0.4s ease-out; }
@keyframes widgetFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- Typography & Layout --- */
.title-wrapper { padding: 60px 20px 40px 20px; text-align: center; max-width: 1100px; margin: 0 auto; }

.main-title {
    font-family: var(--font-headline) !important; 
    font-weight: 700; 
    font-size: 40pt;
    color: var(--color-primary); 
    line-height: 1.2; 
    max-width: 980px;
    margin: 0 auto 30px auto; 
    text-align: center; 
    letter-spacing: -1px;
}

@media (max-width: 768px) {
    .main-title { font-size: 24pt; } 
}

.article-body { width: 100%; max-width: var(--width-content); margin: 0 auto; padding: 0 15px; position: relative; z-index: 1; }

.article-body p:not([class]) { 
    margin-bottom: var(--spacing-text); 
    text-align: justify; 
    line-height: 1.8;
    font-size: 18px;
}

.article-body h2:not([class]) {
    color: #0057D9; 
    font-weight: 900 !important; 
    font-size: 36px !important; 
    margin-top: 20px; 
    margin-bottom: var(--spacing-text);
    line-height: 1.2;
    font-family: var(--font-body);
}

.sapo { font-weight: 700; font-size: 22px; margin-bottom: 30px; }
.dropcap {
    float: left; font-family: var(--font-heading); font-size: 5.8rem;
    line-height: 0.8; font-weight: 900; color: var(--color-primary);
    margin-right: 16px; margin-top: 5px;
}
i { font-style: italic; } 

.media-container {
    width: 100%; max-width: 660px; 
    margin: 0 auto var(--spacing-text) auto; 
    position: relative; display: flex; justify-content: center;
    flex-direction: column; 
}
.media-img { width: 100%; height: auto; display: block; object-fit: cover; }
.media-video { width: 100%; height: auto; display: block; }
.media-audio { height: 50px; background: #f1f3f4; border-radius: 30px; width: 100%; }

.caption {
    font-family: var(--font-ui); font-size: 14px; color: #777;
    font-style: italic; text-align: center; 
    margin-top: 10px; 
    display: block;
}

.caption:empty { display: none; margin-top: 0; }

.full-width-media {
    width: 100vw; position: relative; left: 50%; margin-left: -50vw;
    margin-bottom: var(--spacing-text);
}
.full-width-media img {
    width: 100%;
    height: auto;
    display: block;
}
.full-width-media .caption {
    width: 100%;
    max-width: var(--width-content);
    margin: 10px auto 0;
    padding: 0 15px;
}

/* --- Credits --- */
.credit-wrapper-soha {
    max-width: 660px; margin: 60px auto 40px auto;
    border-left: 3px solid var(--color-primary); padding: 20px;
    font-family: var(--font-ui); background: #f9f9f9; 
}
.credit-row { display: grid; grid-template-columns: 120px 1fr; margin-bottom: 8px; align-items: baseline; font-size: 16px; }
.credit-row:last-child { margin-bottom: 0; }
.credit-label { font-weight: 700; text-transform: uppercase; color: #666; font-size: 14px; }
.credit-value { color: #222; font-weight: 500; }

/* --- Lightbox --- */
.lightbox-modal {
    display: none; position: fixed; z-index: 9999; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.9); align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease;
}
.lightbox-modal.active { display: flex; opacity: 1; }
.lightbox-content { max-width: 95%; max-height: 95%; object-fit: contain; box-shadow: 0 0 20px rgba(0,0,0,0.5); transform: scale(0.9); transition: transform 0.3s ease; }
.lightbox-modal.active .lightbox-content { transform: scale(1); }
.lightbox-close { position: absolute; top: 20px; right: 30px; color: #fff; font-size: 40px; font-weight: bold; cursor: pointer; z-index: 10000; }