:root {
    --green-dark: #145533;
    --green: #1b5c3a;
    --green-deep: #0f3f26;
    --green-soft: #2e7d4f;
    --gold: #c9a227;
    --gold-bar: #e6d07a;
    --gold-bar-2: #edd889;
    --bg: #e7f0df;
    --bg-2: #eef4e8;
    --cream: #f7f4e8;
    --card: #f6f8f1;
    --white: #fffcf6;
    --text: #143d28;
    --muted: #4a6a56;
    --shadow: 0 8px 22px rgba(20, 85, 51, 0.12);
    --radius: 22px;
    --button: #1b5c3a;
    --button-text: #ffffff;
    --nav: #e6d07a;
    --nav-text: #145533;
    --nav-hover: #0f3f26;
    --nav-visited: #0f3f26;
    --nav-active: #0f3f26;
    --link-active: #0f3f26;
    --header-text: #0f3f26;
    --header-hover: #145533;
    --header-visited: #0f3f26;
    --org-text: #145533;
    --org-hover: #0f3f26;
    --org-visited: #0f3f26;
    --news-text: #145533;
    --news-hover: #0f3f26;
    --news-visited: #0f3f26;
    --journal-text: #145533;
    --journal-hover: #0f3f26;
    --journal-visited: #0f3f26;
    --card-small-text: #145533;
    --card-small-hover: #0f3f26;
    --card-small-visited: #0f3f26;
    --card-large-text: #145533;
    --card-large-hover: #0f3f26;
    --card-large-visited: #0f3f26;
    --footer: #1b5c3a;
    --footer-text: #ffffff;
    --footer-hover: #e6d07a;
    --footer-visited: #ffffff;
    --primary-rgb: 27, 92, 58;
    --gold-rgb: 201, 162, 39;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    line-height: 1.8;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font-family: inherit; }
.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.page-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-color: var(--bg);
    background-image: radial-gradient(circle at 12px 12px, rgba(var(--primary-rgb), 0.045) 2px, transparent 2.4px);
    background-size: 28px 28px;
}
.page-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-color: var(--green);
    opacity: 0.07;
    -webkit-mask-image: url("../img/logo-watermark.png");
    mask-image: url("../img/logo-watermark.png");
    -webkit-mask-repeat: repeat;
    mask-repeat: repeat;
    -webkit-mask-size: 240px 240px;
    mask-size: 240px 240px;
}

.site-header { padding-top: 18px; }
.brand { text-align: center; }
.brand-ornament { width: 110px; margin: 0 auto 6px; }
.logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--header-text);
}
.logo:visited { color: var(--header-visited); }
.logo:hover { color: var(--header-hover); }
.logo-text {
    font-family: 'Amiri', serif;
    font-weight: 700;
    font-size: clamp(28px, 3.6vw, 44px);
    line-height: 1.35;
    letter-spacing: 0;
}
.logo-text-img {
    height: clamp(48px, 8.4vw, 76px);
    width: auto;
    max-width: min(680px, calc(100vw - 150px));
    object-fit: contain;
}
.logo-mark { width: 86px; height: 86px; display: inline-block; }
.logo-mark svg { width: 100%; height: 100%; }
.logo-img {
    width: 86px;
    height: 86px;
    object-fit: contain;
    background: transparent;
}
.header-search {
    display: flex;
    width: min(520px, 100%);
    margin: 14px auto 4px;
    background: var(--white);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(var(--primary-rgb), 0.12);
}
.header-search input {
    flex: 1;
    border: 0;
    outline: 0;
    padding: 10px 18px;
    font-size: 15px;
    background: transparent;
}
.header-search button {
    width: 48px;
    border: 0;
    background: var(--button);
    color: var(--button-text);
    font-size: 16px;
    cursor: pointer;
}

.main-nav {
    margin-top: 16px;
    background: linear-gradient(var(--gold-bar-2), var(--nav));
    box-shadow: 0 2px 0 rgba(var(--gold-rgb), 0.35);
}
.nav-inner { position: relative; }
.nav-list {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 8px;
    min-height: 54px;
}
.nav-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    color: var(--nav-text);
    font-weight: 700;
    font-size: 16px;
    white-space: nowrap;
}
.nav-list a i { font-size: 15px; }
.nav-list a:visited,
.nav-list a.active { color: var(--nav-visited); }
.nav-list a:hover { color: var(--nav-hover); }
.nav-toggle {
    display: none;
    background: none;
    border: 0;
    color: var(--nav-text);
    font-size: 22px;
    padding: 10px;
}

.site-main { padding: 28px 0 40px; }

.home-top {
    display: grid;
    grid-template-columns: 0.95fr 1.35fr 0.95fr;
    gap: 22px;
    align-items: stretch;
}

.panel {
    background: var(--white);
    border-radius: 26px;
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid rgba(var(--primary-rgb), 0.08);
}

.journal-panel {
    background: linear-gradient(#fbfaf3, #f4f1e4);
    border-radius: 34px 22px 22px 34px;
    overflow: hidden;
}
.journal-head {
    background: linear-gradient(180deg, var(--green-soft), var(--green));
    color: #fff;
    text-align: center;
    padding: 22px 16px 18px;
    position: relative;
}
.journal-head .book {
    width: 54px;
    height: 54px;
    margin: 0 auto 8px;
    border: 2px solid rgba(255,255,255,0.35);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}
.journal-head h2 {
    font-family: 'Amiri', serif;
    font-size: 30px;
    line-height: 1.2;
}
.journal-head p {
    font-size: 12px;
    opacity: 0.92;
    margin-top: 4px;
}
.journal-head:after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -8px;
    width: 54px;
    height: 16px;
    transform: translateX(-50%);
    background: var(--gold);
    clip-path: polygon(50% 0, 68% 38%, 100% 42%, 76% 64%, 82% 100%, 50% 80%, 18% 100%, 24% 64%, 0 42%, 32% 38%);
}
.journal-menu { list-style: none; padding: 22px 8px 16px; }
.journal-menu a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 10px 22px;
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.08);
    color: var(--journal-text);
    font-weight: 700;
    font-size: 15px;
}
.journal-menu li:last-child a { border-bottom: 0; }
.journal-menu a span { text-align: right; }
.journal-menu a i,
.journal-menu .svg-icon {
    width: 22px;
    text-align: center;
    color: var(--green);
    font-size: 15px;
}
.journal-menu .svg-icon svg {
    fill: var(--green);
}
.journal-menu a:visited,
.journal-menu a.active { color: var(--journal-visited); }
.journal-menu a:hover { background: rgba(var(--primary-rgb), 0.04); color: var(--journal-hover); }

.news-panel { display: flex; flex-direction: column; min-height: 430px; }
.panel-head {
    background: var(--green);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 18px;
    font-weight: 800;
}
.panel-head a { font-size: 13px; font-weight: 700; opacity: 0.95; }
.news-body {
    flex: 1;
    background: var(--cream);
    padding: 14px 16px;
}
.news-item {
    display: block;
    background: #fff;
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 10px;
    border: 1px solid rgba(var(--primary-rgb), 0.08);
}
.news-item h3 { font-size: 15px; color: var(--news-text); margin-bottom: 4px; }
.news-item:visited h3 { color: var(--news-visited); }
.news-item:hover h3 { color: var(--news-hover); }
.news-item p { font-size: 13px; color: var(--muted); }
.news-item time { font-size: 12px; color: var(--green-soft); }
.news-empty {
    height: 100%;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9aa894;
    font-weight: 700;
}
.news-foot {
    background: var(--cream);
    border-top: 1px solid rgba(var(--primary-rgb), 0.12);
    text-align: center;
    padding: 8px;
}
.news-foot a { color: var(--news-text); font-weight: 800; font-size: 14px; }
.news-foot a:visited { color: var(--news-visited); }
.news-foot a:hover { color: var(--news-hover); }

.org-panel { background: linear-gradient(#f7faf4, #eef5ec); }
.org-list { padding: 22px 18px; }
.org-item {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    padding: 10px 0 22px;
}
.org-item:last-child { padding-bottom: 6px; }
.org-item:not(:last-child):after {
    content: "";
    position: absolute;
    right: 23px;
    top: 56px;
    bottom: -2px;
    width: 2px;
    background: rgba(var(--primary-rgb), 0.22);
}
.org-item:not(:last-child):before {
    content: "";
    position: absolute;
    right: 19px;
    bottom: 8px;
    width: 10px;
    height: 10px;
    background: var(--green-soft);
    transform: rotate(45deg);
    z-index: 2;
}
.org-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 0 rgba(var(--primary-rgb), 0.18);
    z-index: 1;
}
.org-item strong { font-size: 16px; color: var(--org-text); display: block; line-height: 1.4; }
.org-item:visited strong,
.org-item.active strong { color: var(--org-visited); }
.org-item:hover strong { color: var(--org-hover); }

.search-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    align-items: center;
    margin: 26px 0 34px;
}
.motto {
    font-family: 'Amiri', serif;
    font-size: 22px;
    color: var(--green);
    white-space: nowrap;
    opacity: 0.9;
}
.search-form {
    display: flex;
    background: #fff;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    max-width: 640px;
    margin-right: auto;
    margin-left: 40px;
}
.search-form input {
    flex: 1;
    border: 0;
    outline: 0;
    padding: 12px 18px;
    font-size: 15px;
    background: transparent;
}
.search-form button {
    width: 52px;
    border: 0;
    background: var(--green);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.section-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 34px 0 30px;
}
.section-divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to left, rgba(var(--gold-rgb), 0.05), rgba(var(--primary-rgb), 0.35), rgba(var(--gold-rgb), 0.05));
    position: relative;
}
.section-divider-line:before,
.section-divider-line:after {
    content: none;
}
.section-divider-line:first-child:after,
.section-divider-line:last-child:before {
    content: "";
    position: absolute;
    top: 50%;
    width: 7px;
    height: 7px;
    background: var(--gold);
    transform: translateY(-50%) rotate(45deg);
    opacity: 0.75;
}
.section-divider-line:first-child:after { left: 10px; }
.section-divider-line:last-child:before { right: 10px; }
.section-divider-ornament {
    width: 92px;
    flex-shrink: 0;
    line-height: 0;
}
.section-divider-ornament svg {
    width: 100%;
    height: auto;
    display: block;
}

.cards-6 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}
.mini-card {
    background: var(--card);
    border-radius: 22px;
    text-align: center;
    padding: 22px 10px 16px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(var(--primary-rgb), 0.08);
    min-height: 148px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.mini-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(var(--primary-rgb),0.16); }
.icon-circle {
    width: 54px;
    height: 54px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: var(--green);
    color: #fff !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    line-height: 1;
}
.icon-circle i,
.icon-circle .svg-icon,
.icon-circle svg {
    color: #fff !important;
    fill: #fff;
    width: 26px;
    height: 26px;
    display: block;
    font-weight: 900 !important;
    line-height: 1;
}
.org-icon i,
.org-icon .svg-icon,
.org-icon svg,
.journal-menu .svg-icon,
.journal-menu svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    display: block;
}
.mini-card .card-title {
    display: block;
    font-weight: 800;
    color: var(--card-small-text);
    font-size: 14px;
    line-height: 1.5;
}
.mini-card:visited .card-title,
.mini-card.active .card-title { color: var(--card-small-visited); }
.mini-card:hover .card-title { color: var(--card-small-hover); }

.cards-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 18px;
}
.large-card {
    background: var(--card);
    border-radius: 26px;
    min-height: 128px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 22px 18px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(var(--primary-rgb), 0.08);
    transition: transform 0.2s ease;
}
.large-card:hover { transform: translateY(-4px); }
.large-card .icon-circle { margin: 0; width: 58px; height: 58px; font-size: 24px; }
.large-card .icon-circle svg { width: 28px; height: 28px; }
.large-card .card-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--card-large-text);
}
.large-card:visited .card-title,
.large-card.active .card-title { color: var(--card-large-visited); }
.large-card:hover .card-title { color: var(--card-large-hover); }

.site-footer {
    background: var(--footer);
    color: var(--footer-text);
    padding: 16px 0 14px;
}
.footer-inner { text-align: center; }
.social { display: flex; justify-content: center; gap: 22px; font-size: 20px; }
.site-footer a { color: var(--footer-text); }
.site-footer a:visited { color: var(--footer-visited); }
.site-footer a:hover { color: var(--footer-hover); }
.copy { margin-top: 10px; font-size: 13px; opacity: 0.85; }

.page-hero {
    background: linear-gradient(180deg, var(--green-soft), var(--green));
    color: #fff;
    border-radius: 24px;
    padding: 28px 24px;
    margin-bottom: 22px;
    box-shadow: var(--shadow);
    text-align: center;
}
.page-hero h1 { font-family: 'Amiri', serif; font-size: 34px; }
.breadcrumb { margin-top: 8px; font-size: 14px; opacity: 0.9; }
.breadcrumb a { color: #fff; }
.content-card {
    background: var(--white);
    border-radius: 24px;
    padding: 28px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(var(--primary-rgb), 0.08);
}
.content-card h2, .content-card h3 { color: var(--green-dark); margin: 16px 0 8px; }
.content-card a { color: var(--green); }
.content-card a:visited { color: var(--link-active); }
.content-card p { margin-bottom: 12px; }
.content-card ul, .content-card ol { padding-right: 22px; margin-bottom: 12px; }
.content-card::after {
    content: "";
    display: table;
    clear: both;
}
.content-card img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}
.content-card img.img-align-center,
.content-card img.aligncenter {
    display: block;
    float: none;
    margin: 14px auto;
}
.content-card img.img-align-left,
.content-card img.alignleft {
    float: left;
    margin: 8px 16px 8px 0;
}
.content-card img.img-align-right,
.content-card img.alignright {
    float: right;
    margin: 8px 0 8px 16px;
}
.content-card p[style*="text-align: center"] img,
.content-card p[style*="text-align:center"] img {
    display: block;
    float: none;
    margin-left: auto;
    margin-right: auto;
}
.content-card p[style*="text-align: left"] img,
.content-card p[style*="text-align:left"] img {
    display: block;
    float: none;
    margin-left: 0;
    margin-right: auto;
}
.content-card p[style*="text-align: right"] img,
.content-card p[style*="text-align:right"] img {
    display: block;
    float: none;
    margin-right: 0;
    margin-left: auto;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
.news-card {
    background: var(--white);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.news-card img { width: 100%; height: 190px; object-fit: cover; background: var(--bg); }
.news-card-fallback {
    height: 160px;
    background: linear-gradient(var(--green), var(--green-soft));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 42px;
}
.news-card .body { padding: 16px; }
.news-card h2 { font-size: 20px; margin-bottom: 8px; color: var(--green-dark); }
.badge {
    display: inline-block;
    background: var(--green);
    color: #fff;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 12px;
    margin-bottom: 8px;
}

.form-grid { display: grid; gap: 14px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
label { font-weight: 700; color: var(--green-dark); display: block; margin-bottom: 4px; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="url"], textarea, select {
    width: 100%;
    border: 1px solid #d5e0d2;
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff;
    font-size: 15px;
}
textarea { min-height: 140px; resize: vertical; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--button);
    color: var(--button-text);
    border: 0;
    border-radius: 12px;
    padding: 10px 18px;
    font-weight: 800;
    cursor: pointer;
}
.btn:hover { background: var(--green-deep); }
.btn-gold { background: var(--gold); color: var(--button-text); }
.alert {
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-weight: 700;
}
.alert-success { background: #e5f6ea; color: #146c2e; }
.alert-error { background: #fde8e8; color: #9b1c1c; }
.alert-info { background: #eef4e8; color: var(--green-dark); }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 22px; }
.pagination a, .pagination span {
    min-width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--shadow);
    font-weight: 800;
}
.pagination .current { background: var(--button); color: var(--button-text); }
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.team-card {
    background: var(--white);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
    text-align: center;
    padding-bottom: 16px;
}
.team-card img, .team-photo {
    width: 100%;
    height: 210px;
    object-fit: cover;
    background: linear-gradient(var(--green), var(--green-soft));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 48px;
}
.team-card h3 { margin-top: 12px; }
.team-card p { color: var(--muted); }

.search-results li { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid #e4ece0; }

@media (max-width: 1100px) {
    .cards-6 { grid-template-columns: repeat(3, 1fr); }
    .home-top { grid-template-columns: 1fr; }
    .journal-panel { border-radius: 24px; }
    .header-search { width: 100%; }
}
@media (max-width: 800px) {
    .nav-toggle { display: block; }
    .nav-list {
        display: none;
        flex-direction: column;
        background: var(--gold-bar);
        position: absolute;
        inset: 54px 0 auto 0;
        z-index: 20;
        padding: 8px 0 16px;
    }
    .nav-list.open { display: flex; }
    .cards-3, .form-grid.two, .news-grid, .team-grid { grid-template-columns: 1fr; }
    .cards-6 { grid-template-columns: repeat(2, 1fr); }
    .search-row { grid-template-columns: 1fr; }
    .motto { text-align: center; }
    .logo { gap: 10px; }
    .logo-img { width: 58px; height: 58px; }
    .logo-text-img { height: 34px; max-width: calc(100vw - 120px); }
    .large-card { flex-direction: column; text-align: center; }
    .large-card .card-title { font-size: 18px; }
}
