:root {
    --bg-body: #f7f8fa;
    --text-main: #191828;
    --text-secondary: #666;
    --purple-light: #f0eff8;
    --purple-border: #d1cde8;
    --purple-text: #423C87;
    --red-light: #FDE8E8;
    --red-border: #F8B4B4;
    --red-text: #9B1C1C;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Tajawal', sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* --- Header & Background --- */
.header-container {
    position: relative;
    width: 100%;
    /* استخدام صورة الخلفية الأصلية من الكود المصدري */
    background-image: url('header-mobile-Bri6g_KO.jpg');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    padding-bottom: 50px; /* مساحة للتداخل مع البطاقة */
    height: 500px;
}

/* طبقة تعتيم خفيفة فوق الصورة لضمان وضوح النص */
.header-container::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(30, 28, 70, 0.4); 
    z-index: 1;
}

.top-nav {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 15px;
}

.burger-icon {
    cursor: pointer;
    display: flex;
    align-items: center;
}

.logo-center {
    text-align: center;
    color: white;
}

.logo-center h1 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.logo-center .en-text {
    font-size: 8px;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    opacity: 0.9;
}

.logo-center .tayseer-text {
    font-size: 10px;
    font-weight: 500;
}

.logo-icon-left {
    width: 40px;
}

.page-title {
    position: relative;
    z-index: 2;
    text-align: right;
    color: white;
    font-size: 28px;
    font-weight: 700;
    margin-top: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    margin-right: 20px;
}

/* --- Main Container --- */
.main-content {
    position: relative;
    z-index: 10;
    margin-top: -330px; /* سحب المحتوى للأعلى ليتداخل مع الخلفية */
    padding: 0 15px 40px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* --- Cards General --- */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* --- Alert Card --- */
.alert-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.6;
    padding: 20px;
}

.alert-card svg {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
}

/* --- Main Details Card --- */
.details-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Entity Header */
.entity-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: 20px;
    gap: 15px;
}

.entity-title-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.entity-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    max-width: 200px;
}

.saudi-logo {
    width: 50px;
    height: auto;
}

.entity-tags-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.tag {
    font-size: 13px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid;
    display: inline-block;
}

.tag-red {
    background-color: #e9fde8;
    border-color: #0e4f00;
    color: #046c00;
}

.tag-gray {
    background-color: #fff;
    border-color: #ccc;
    color: #333;
}

.tag-purple {
    background-color: var(--purple-light);
    border-color: var(--purple-border);
    color: var(--purple-text);
}

.vertical-divider {
    width: 1px;
    height: 25px;
    background-color: #e0e0e0;
}

/* Status Box */
.status-box {
    background-color: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.status-box svg {
    width: 20px;
    height: 20px;
    margin-top: 3px;
    flex-shrink: 0;
}

.status-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.status-desc {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 5px;
}

.status-desc::before {
    content: "•";
    font-size: 20px;
    line-height: 1;
    color: #333;
}

/* Data Grid */
.data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 15px;
}

.data-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.data-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.4;
}

.data-value {
    font-size: 15px;
    font-weight: 700;
    color: #000;
}

/* Date Tags */
.date-tags {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.date-tag {
    display: flex;
    align-items: center;
    border: 1px solid var(--purple-border);
    background-color: var(--purple-light);
    color: var(--purple-text);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    overflow: hidden;
    width: fit-content;
}

.date-tag span:first-child {
    background-color: #d1cde8;
    padding: 4px 10px;
}

.date-tag span:last-child {
    padding: 4px 12px;
    direction: ltr;
}

/* Capital */
.capital-row {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* محاذاة لليسار */
    gap: 8px;
    margin-top: 5px;
}

.capital-value {
    display: flex;
    align-items: center;
    gap: 5px;
    direction: ltr;
    font-weight: 700;
    font-size: 16px;
}

/* Section Titles */
.section-title {
    font-size: 18px;
    font-weight: 700;
    margin: 10px 0;
    color: #000;
}

/* Activity Box */
.activity-box {
    background-color: #e7e4f2;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    color: #222;
    line-height: 1.6;
    margin-top: 15px;
}

/* --- Footer --- */
.footer {
    background-color: #fff;
    padding: 20px 15px;
    border-top: 1px solid #eee;
    margin-top: auto;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo img {
    height: 35px;
}

.footer-logo-text {
    font-size: 11px;
    color: #333;
    font-weight: 700;
    max-width: 120px;
    line-height: 1.4;
}

.footer-links {
    display: flex;
    gap: 15px;
}

.footer-links a {
    color: #333;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
}

.footer-bottom {
    text-align: center;
    font-size: 12px;
    color: #333;
    line-height: 1.8;
    font-weight: 500;
}

/* Adjustments for Mobile */
@media (max-width: 400px) {
    .entity-title { font-size: 18px; }
    .data-grid { gap: 15px 10px; }
    .data-label { font-size: 13px; }
    .data-value { font-size: 14px; }
    .page-title { font-size: 24px; }
}