<?php

$db=
\App\Core\Database::getInstance();

$lang=
$_SESSION['lang']
?? 'en';

$isAr=
$lang==='ar';

$conferenceId=
(int)(
$conference['id']
??0
);

$stmt=
$db->prepare("

SELECT *

FROM conference_home_sections

WHERE
conference_id=?
AND section_key='About'

LIMIT 1

");

$stmt->execute([
$conferenceId
]);

$sec=
$stmt->fetch(PDO::FETCH_ASSOC)
?:[];

$title=
$isAr
?
(
$sec['title_ar']
??
$sec['title']
??
$sec['title_en']
??
'حول المؤتمر'
)
:
(
$sec['title_en']
??
$sec['title']
??
$sec['title_ar']
??
'About'
);

$subtitle=
$isAr
?
(
$sec['subtitle_ar']
??
$sec['subtitle_en']
??
''
)
:
(
$sec['subtitle_en']
??
$sec['subtitle_ar']
??
''
);

$content=
$isAr
?
(
$sec['description_ar']
??
$sec['content_ar']
??
$sec['description_en']
??
''
)
:
(
$sec['description_en']
??
$sec['content_en']
??
$sec['description_ar']
??
''
);

$theme=
$sec['background_value']
??
'linear-gradient(135deg,#0f172a,#2563eb)';

?>

<section
class="
container
py-5
">

<div
class="
card
border-0
shadow-lg
rounded-5
overflow-hidden
"
style="
background:
<?= pcb_h($theme) ?>;
color:white;
">

<div
class="
card-body
p-5
">

<div class="row">

<div class="col-lg-8">

<?php if(!empty($subtitle)): ?>

<div
class="
text-warning
fw-bold
mb-3
">

<?= pcb_h($subtitle) ?>

</div>

<?php endif; ?>

<h1
class="
display-4
fw-bold
mb-4
">

<?= pcb_h($title) ?>

</h1>

<div
style="
line-height:2;
font-size:1.1rem;
white-space:pre-line;
"
>

<?= pcb_h($content) ?>

</div>

</div>

<div
class="
col-lg-4
text-center
align-self-center
">

<i
class="
fa
<?= pcb_h(
$sec['icon']
?? 'fa-circle-info'
) ?>
"
style="
font-size:140px;
opacity:.12;
">
</i>

</div>

</div>

</div>

</div>

</section>

