<?php

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

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

$isAr=
($lang==='ar');

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

$q=
$db->prepare("

SELECT *

FROM conference_home_sections

WHERE conference_id=?

AND section_key='About'

LIMIT 1

");

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

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

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

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

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

$bg=
$sec['background_value']
??
'linear-gradient(135deg,#0f172a,#2957d7)';

?>

<section
class="container py-4">

<div
class="
rounded-5
overflow-hidden
shadow-lg
"

style="
background:
<?= pcb_h($bg) ?>;
color:#fff;
">

<div
class="
p-5
">

<h2
style="
font-size:2.3rem;
font-weight:800;
margin-bottom:18px;
">

<?= pcb_h($title) ?>

</h2>

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

<div
style="
color:#FFD54A;
font-weight:700;
font-size:1.15rem;
margin-bottom:20px;
">

<?= pcb_h($subtitle) ?>

</div>

<?php endif; ?>

<div
style="
font-size:1.04rem;
line-height:2;
max-width:100%;
opacity:.96;
white-space:pre-line;
">

<?= pcb_h($content) ?>

</div>

</div>

</div>

</section>

