@charset "UTF-8";

/* ============================================================
   Dr. Zobair Sultan Rabbani — site styles
   Primary: English (LTR)  |  Secondary: Arabic (RTL)
   ============================================================ */

:root {
    --bg:        #fbf8f1;
    --surface:   #ffffff;
    --ink:       #1a1a1a;
    --muted:     #6b6b6b;
    --primary:   #0e3a2f;      /* deep Islamic green */
    --primary-2: #145a48;
    --accent:    #b8893b;      /* muted gold */
    --border:    #e6e0d0;
    --radius:    14px;
    --shadow:    0 10px 30px rgba(0,0,0,.07);
    --font-sans: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-arabic: 'Noto Naskh Arabic', 'Amiri', 'Segoe UI', serif;
    --font-serif: 'Georgia', 'Amiri', serif;
    --maxw: 1180px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.dir-rtl {
    font-family: var(--font-arabic), var(--font-sans);
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent); }

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ============== HEADER ============== */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    gap: 1rem;
}
.brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
}
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary);
    color: #d4b46a;
    font-family: var(--font-serif);
    font-size: 1.05rem;
    letter-spacing: .5px;
}
.brand-name { font-family: var(--font-serif); }

.primary-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.primary-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.4rem;
}
.primary-nav a {
    color: var(--ink);
    font-weight: 500;
    position: relative;
    padding: .4rem 0;
}
.primary-nav a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .25s ease;
}
.primary-nav a:hover::after,
.primary-nav a.is-active::after { transform: scaleX(1); }
.primary-nav a.is-active { color: var(--primary); }

.lang-switch {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: .35rem .9rem;
    font-size: .9rem;
    color: var(--primary);
    background: var(--bg);
}
.lang-switch:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    cursor: pointer;
    width: 40px; height: 40px;
    flex-direction: column;
    gap: 5px;
    padding: 0;
    align-items: center;
    justify-content: center;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--primary);
    transition: transform .2s ease;
}

@media (max-width: 880px) {
    .nav-toggle { display: flex; }
    .primary-nav {
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: var(--surface);
        flex-direction: column;
        align-items: stretch;
        padding: 1rem 1.5rem 1.5rem;
        border-bottom: 1px solid var(--border);
        display: none;
    }
    .primary-nav.is-open { display: flex; }
    .primary-nav ul {
        flex-direction: column;
        gap: .8rem;
    }
    .lang-switch { align-self: flex-start; }
}

/* ============== HERO ============== */
.hero {
    background:
        radial-gradient(circle at 20% 10%, rgba(180,137,59,.08), transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(14,58,47,.10), transparent 50%),
        var(--bg);
    padding: 5rem 0 4rem;
    border-bottom: 1px solid var(--border);
}
.hero-inner {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 3rem;
    align-items: center;
}
.hero-greeting {
    color: var(--accent);
    font-size: 1rem;
    letter-spacing: .5px;
    margin: 0 0 1rem;
    font-style: italic;
}
.hero-heading {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.15;
    margin: 0 0 1rem;
    color: var(--primary);
}
.hero-subtitle {
    font-size: 1.15rem;
    color: var(--muted);
    margin: 0 0 2rem;
    font-weight: 500;
}
.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.btn {
    display: inline-block;
    padding: .8rem 1.6rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all .2s ease;
    text-align: center;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover { background: var(--primary-2); color: #fff; }
.btn-ghost {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
}
.btn-ghost:hover { background: var(--primary); color: #fff; }
.btn-lg { padding: 1rem 2.2rem; font-size: 1.1rem; }

.hero-portrait { display: flex; justify-content: center; }
.portrait-frame {
    width: 320px;
    aspect-ratio: 4/5;
    border-radius: 200px 200px 18px 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 6px solid var(--surface);
    background: #d4b46a;
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 880px) {
    .hero-inner { grid-template-columns: 1fr; text-align: center; }
    .hero-cta { justify-content: center; }
    .hero-portrait { order: -1; }
    .portrait-frame { width: 200px; }
}

/* ============== BIO SECTION ============== */
.bio-section { padding: 4rem 0; }
.bio-card {
    background: var(--surface);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-inline-start: 5px solid var(--accent);
    max-width: 900px;
    margin: 0 auto;
}
.bio-card p { margin: 0 0 1rem; }
.bio-lead { font-size: 1.15rem; font-weight: 500; color: var(--ink); }

/* ============== FEATURED ============== */
.featured { padding: 4rem 0; background: var(--surface); }
.section-title {
    font-family: var(--font-serif);
    color: var(--primary);
    text-align: center;
    margin: 0 0 2.5rem;
    font-size: 2rem;
}
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}
.feature-card {
    background: var(--bg);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all .25s ease;
    display: block;
    color: inherit;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}
.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px; height: 50px;
    border-radius: 12px;
    background: var(--primary);
    color: var(--accent);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.feature-card h3 {
    color: var(--primary);
    margin: 0 0 .75rem;
    font-family: var(--font-serif);
}
.feature-card p { color: var(--muted); margin: 0; font-size: .95rem; }

/* ============== CONTACT CTA ============== */
.contact-cta { padding: 3rem 0 5rem; text-align: center; }

/* ============== BIOGRAPHY PAGE ============== */
.bio-hero {
    background: var(--surface);
    padding: 4rem 0 3.5rem;
    border-bottom: 1px solid var(--border);
}
.bio-hero-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 3rem;
    align-items: center;
}
.bio-tagline {
    color: var(--accent);
    font-style: italic;
    margin: 0 0 .75rem;
    font-size: .95rem;
    letter-spacing: .5px;
}
.bio-name {
    font-family: var(--font-serif);
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    color: var(--primary);
    margin: 0 0 1rem;
    line-height: 1.2;
}
.bio-position {
    color: var(--muted);
    font-size: 1.05rem;
    margin: 0 0 2rem;
    line-height: 1.6;
}
.bio-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}
.fact {
    background: var(--bg);
    padding: 1rem 1.1rem;
    border-radius: 10px;
    border-inline-start: 3px solid var(--accent);
    display: flex;
    flex-direction: column;
    gap: .35rem;
}
.fact-label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--muted);
    font-weight: 600;
}
.fact-value {
    font-weight: 600;
    color: var(--primary);
    font-size: .98rem;
}
.bio-hero-portrait img {
    width: 100%;
    max-width: 360px;
    aspect-ratio: 4/5;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 0 auto;
}

.bio-content { padding: 4rem 0 2rem; }
.bio-article h2 {
    font-family: var(--font-serif);
    color: var(--primary);
    font-size: 1.45rem;
    margin: 2.5rem 0 1rem;
    position: relative;
    padding-bottom: .5rem;
}
.bio-article h2::after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}
.bio-article h2:first-child { margin-top: 0; }
.bio-article p {
    font-size: 1.05rem;
    line-height: 1.9;
    color: #2a2a2a;
    margin: 0 0 1rem;
}
.bio-flow {
    font-size: 1.08rem !important;
    line-height: 2 !important;
    text-align: justify;
    hyphens: auto;
    text-justify: inter-word;
}
body.dir-rtl .bio-flow {
    text-align: justify;
}
.bio-philosophy {
    margin: 1rem 0 2rem;
    padding: 1.25rem 1.5rem;
    padding-inline-start: 1.75rem;
    border-inline-start: 4px solid var(--accent);
    background: var(--surface);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 1.08rem;
    line-height: 1.95;
    color: #1a1a1a;
    font-style: italic;
}
body.dir-rtl .bio-philosophy {
    border-radius: var(--radius) 0 0 var(--radius);
}

@media (max-width: 880px) {
    .bio-hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .bio-hero-portrait { order: -1; }
    .bio-facts { grid-template-columns: 1fr; }
    .bio-article h2::after { inset-inline-start: 50%; transform: translateX(-50%); }
}

/* ============== PUBLICATIONS ARCHIVE ============== */
.pub-toolbar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 4px 14px rgba(0,0,0,.04);
}
.pub-search {
    position: relative;
    display: flex;
    align-items: center;
}
.pub-search-icon {
    position: absolute;
    inset-inline-start: 1rem;
    width: 20px;
    height: 20px;
    color: var(--muted);
    pointer-events: none;
}
.pub-search input {
    width: 100%;
    padding: .85rem 2.5rem .85rem 2.75rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    font: inherit;
    color: var(--ink);
    transition: border-color .2s, box-shadow .2s;
}
body.dir-rtl .pub-search input {
    padding: .85rem 2.75rem .85rem 2.5rem;
}
.pub-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14,58,47,.12);
}
.pub-search-clear {
    position: absolute;
    inset-inline-end: .85rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--muted);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.1rem;
    line-height: 1;
}
.pub-search-clear:hover { background: var(--primary); color: #fff; }

.pub-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.pub-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem 1rem;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--ink);
    font-size: .9rem;
    font-weight: 500;
    transition: all .2s ease;
}
.pub-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--surface);
}
.pub-chip.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.pub-chip-count {
    background: rgba(255,255,255,.2);
    color: inherit;
    font-size: .75rem;
    padding: .1rem .5rem;
    border-radius: 999px;
    min-width: 22px;
    text-align: center;
}
.pub-chip:not(.is-active) .pub-chip-count {
    background: var(--border);
    color: var(--muted);
}

.pub-meta {
    color: var(--muted);
    font-size: .9rem;
    margin: 0 0 1.5rem;
    padding-inline-start: .25rem;
}

.pub-empty {
    text-align: center;
    padding: 4rem 1rem;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px dashed var(--border);
    color: var(--muted);
}

.pub-section {
    margin-bottom: 3.5rem;
}
.pub-section-title {
    font-family: var(--font-serif);
    color: var(--primary);
    font-size: 1.5rem;
    margin: 0 0 1.25rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--accent);
    display: flex;
    align-items: baseline;
    gap: .75rem;
}
.pub-section-count {
    font-size: .9rem;
    color: var(--muted);
    font-weight: 400;
    background: var(--bg);
    padding: .15rem .65rem;
    border-radius: 999px;
    border: 1px solid var(--border);
}

.pub-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.25rem;
}

.pub-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-inline-start: 4px solid var(--accent);
    border-radius: var(--radius);
    padding: 1.5rem 1.75rem;
    box-shadow: 0 4px 14px rgba(0,0,0,.04);
    transition: transform .2s, box-shadow .2s;
    position: relative;
}
.pub-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.pub-card.is-featured {
    border-inline-start-color: var(--primary);
    background: linear-gradient(180deg, rgba(212,180,106,.06) 0%, var(--surface) 60%);
}
.pub-card.is-featured::before {
    content: "★";
    position: absolute;
    top: 1rem;
    inset-inline-end: 1.25rem;
    color: var(--accent);
    font-size: 1.2rem;
}

.pub-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .65rem;
    flex-wrap: wrap;
}
.pub-type-badge {
    display: inline-block;
    padding: .2rem .65rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    background: var(--bg);
    color: var(--primary);
    border: 1px solid var(--border);
}
.pub-type-badge[data-type="book"]    { background: rgba(14,58,47,.1); color: var(--primary); border-color: var(--primary); }
.pub-type-badge[data-type="peer"]    { background: rgba(180,137,59,.15); color: #8a6429; border-color: var(--accent); }
.pub-type-badge[data-type="study"]   { background: rgba(107,107,107,.1); color: var(--muted); }
.pub-type-badge[data-type="article"] { background: rgba(14,90,72,.1); color: var(--primary-2); }
.pub-type-badge[data-type="opinion"] { background: rgba(180,137,59,.08); color: var(--accent); border-color: var(--accent); }

.pub-year {
    font-family: var(--font-serif);
    font-weight: 700;
    color: var(--accent);
    font-size: 1rem;
}

.pub-title {
    font-family: var(--font-serif);
    color: var(--primary);
    font-size: 1.2rem;
    margin: 0 0 .5rem;
    line-height: 1.35;
}
.pub-title a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color .2s;
}
.pub-title a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.pub-venue {
    margin: 0 0 .75rem;
    color: var(--ink);
    font-size: .95rem;
}
.pub-venue-label {
    color: var(--muted);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 600;
}

.pub-abstract {
    color: #2a2a2a;
    font-size: .98rem;
    line-height: 1.7;
    margin: 0 0 .85rem;
}

.pub-co {
    font-size: .88rem;
    color: var(--muted);
    margin: 0 0 .75rem;
}
.pub-co-label {
    font-weight: 600;
    color: var(--ink);
}

.pub-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem;
    margin: 0 0 1rem;
    font-size: .85rem;
}
.pub-tags-label {
    color: var(--muted);
    font-weight: 600;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-inline-end: .25rem;
}
.pub-tag {
    background: var(--bg);
    color: var(--primary-2);
    padding: .15rem .6rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-size: .78rem;
}

.pub-actions {
    display: flex;
    gap: .65rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.btn-sm {
    padding: .5rem 1rem;
    font-size: .85rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

@media (max-width: 720px) {
    .pub-toolbar { padding: 1rem; }
    .pub-card { padding: 1.25rem 1.25rem; }
    .pub-card.is-featured::before { display: none; }
}

/* ============== ACTIVITIES ============== */
.timeline-card {
    display: grid;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: 0 4px 14px rgba(0,0,0,.04);
}
.activity-image {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    border-radius: 10px;
    display: block;
}
.activity-summary {
    color: var(--primary);
    font-weight: 600;
}
.timeline-body p {
    margin: 0 0 .75rem;
}

/* ============== INNER PAGES ============== */
.page-header {
    background: var(--primary);
    color: #fff;
    padding: 3.5rem 0;
    text-align: center;
}
.page-header h1 {
    margin: 0;
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    color: #fff;
}
.page-subtitle { color: rgba(255,255,255,.85); margin-top: .5rem; }

.content-section { padding: 4rem 0; }
.prose { max-width: 760px; margin: 0 auto; }
.prose p { font-size: 1.05rem; color: #2a2a2a; }

.muted { color: var(--muted); font-size: .9rem; }

.card-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.25rem;
    max-width: 900px;
    margin: 0 auto;
}
.card {
    background: var(--surface);
    padding: 1.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    border-inline-start: 4px solid var(--accent);
    box-shadow: 0 4px 12px rgba(0,0,0,.04);
}
.card h3 { margin: 0 0 .5rem; color: var(--primary); font-family: var(--font-serif); }
.card p  { margin: .25rem 0; }

.timeline {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    max-width: 800px;
    position: relative;
}
.timeline::before {
    content: "";
    position: absolute;
    top: 0; bottom: 0;
    inset-inline-start: 110px;
    width: 2px;
    background: var(--border);
}
.timeline li {
    display: flex;
    gap: 2rem;
    padding: 1rem 0 1.5rem;
}
.timeline .time {
    flex: 0 0 90px;
    color: var(--accent);
    font-weight: 700;
    text-align: end;
    font-family: var(--font-serif);
}
.timeline div h3 { margin: 0 0 .25rem; color: var(--primary); }
.timeline div p  { margin: 0; color: var(--muted); }

.article {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}
.article h3 { color: var(--primary); margin: 0 0 .5rem; font-family: var(--font-serif); }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}
.gallery-item {
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}
.gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}
.media-link {
    display: block;
    background: linear-gradient(135deg, rgba(180,137,59,.18), rgba(14,58,47,.14));
}
.gallery-thumb {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, rgba(180,137,59,.24), rgba(14,58,47,.16));
}
.video-thumb { flex-direction: column; gap: .6rem; }
.media-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(14,58,47,.9);
    color: #fff;
    padding: .3rem .7rem;
    border-radius: 999px;
    font-size: .8rem;
}
.media-label {
    font-size: 2.5rem;
    color: var(--primary);
}
.gallery-item figcaption {
    padding: 1rem 1rem 1.2rem;
    display: grid;
    gap: .4rem;
}
.gallery-item h3 {
    margin: 0;
    color: var(--primary);
    font-family: var(--font-serif);
    font-size: 1.1rem;
}
.gallery-item p {
    margin: 0;
    color: var(--muted);
    font-size: .95rem;
}
.gallery-category {
    display: inline-block;
    width: fit-content;
    padding: .25rem .6rem;
    border-radius: 999px;
    background: rgba(180,137,59,.15);
    color: var(--primary);
    font-size: .8rem;
    font-weight: 600;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}
.contact-info {
    line-height: 1.9;
    background: linear-gradient(135deg, rgba(14,58,47,.04), rgba(180,137,59,.08));
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.contact-info h1 {
    margin: .25rem 0 1rem;
    color: var(--primary);
    font-family: var(--font-serif);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}
.contact-list {
    list-style: none;
    padding: 0;
    margin: .25rem 0 1rem;
    display: grid;
    gap: .4rem;
}
.contact-list a {
    color: var(--primary);
    font-weight: 600;
}
.contact-form {
    display: grid;
    gap: 1rem;
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.contact-form label {
    display: grid;
    gap: .35rem;
    font-size: .9rem;
    color: var(--muted);
    font-weight: 500;
}
.contact-form input,
.contact-form textarea {
    font: inherit;
    padding: .75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--ink);
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14,58,47,.1);
}
.alert {
    padding: 1rem;
    border-radius: 8px;
    font-size: .95rem;
}
.alert-error { background: #fde8e8; color: #7a1f1f; }
.alert-success { background: #e6f4ec; color: #1e5a3f; }

@media (max-width: 720px) {
    .contact-grid { grid-template-columns: 1fr; }
    .timeline::before { inset-inline-start: 70px; }
    .timeline .time { flex-basis: 60px; }
}

/* ============== ADMIN PANEL ============== */
.admin-shell {
    padding: 4rem 0;
}
.admin-layout {
    display: grid;
    gap: 2rem;
}
.admin-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
}
.admin-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.admin-tabs {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.admin-form {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}
.admin-form.stack {
    gap: 1.2rem;
}
.admin-form label {
    display: grid;
    gap: .35rem;
    font-weight: 600;
    color: var(--muted);
}
.admin-form input,
.admin-form textarea,
.admin-form select {
    font: inherit;
    padding: .75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--ink);
}
.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14,58,47,.1);
}
.admin-form button,
.ghost-btn,
.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: .75rem 1.2rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.primary-btn {
    background: var(--primary);
    color: #fff;
    width: fit-content;
}
.ghost-btn {
    background: var(--bg);
    color: var(--primary);
    border: 1px solid var(--border);
}
.ghost-btn.danger {
    color: #8a2424;
}
.admin-message {
    padding: .85rem 1rem;
    border-radius: 8px;
    font-size: .95rem;
}
.admin-message.success {
    background: #e6f4ec;
    color: #1e5a3f;
}
.admin-message.error {
    background: #fde8e8;
    color: #7a1f1f;
}
.helper-text {
    color: var(--muted);
    font-size: .9rem;
    margin: 0;
}
.form-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.form-grid.two-column {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
}
.featured-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: .75rem;
}
.featured-toggle input {
    width: 18px;
    height: 18px;
}
.admin-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .75rem;
}
.admin-list li {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.1rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}
.gallery-admin-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}
.media-preview {
    width: 84px;
    height: 84px;
    flex: 0 0 84px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(20, 92, 64, 0.08), rgba(20, 92, 64, 0.16));
    display: flex;
    align-items: center;
    justify-content: center;
}
.media-preview img,
.media-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.media-preview-placeholder {
    color: var(--muted);
    font-size: .85rem;
    text-align: center;
    padding: 0 .4rem;
}
.gallery-admin-meta {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    min-width: 0;
}
.gallery-admin-meta strong {
    font-size: 1rem;
}
.gallery-admin-meta span {
    color: var(--muted);
    font-size: .95rem;
}
.contact-message-item {
    align-items: flex-start;
    width: 100%;
}
.contact-message-body {
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.7;
    color: #2a2a2a;
    background: rgba(20, 92, 64, 0.04);
    border: 1px solid rgba(20, 92, 64, 0.1);
    border-radius: 8px;
    padding: .8rem .9rem;
    margin-top: .25rem;
}
.contact-message-date {
    font-size: .82rem;
    color: var(--muted);
    margin-top: .2rem;
}
.admin-actions {
    display: flex;
    gap: .75rem;
    align-items: center;
    flex-wrap: wrap;
}
.inline-form {
    display: inline-flex;
}
@media (max-width: 720px) {
    .form-grid.two-column,
    .form-grid {
        grid-template-columns: 1fr;
    }
    .admin-panel { padding: 1.25rem; }
}

/* ============== FOOTER ============== */
.site-footer {
    background: var(--primary);
    color: rgba(255,255,255,.85);
    padding: 2.5rem 0;
    text-align: center;
    margin-top: 4rem;
}
.footer-tagline {
    font-style: italic;
    color: rgba(255,255,255,.9);
    margin: 0 0 .5rem;
    font-family: var(--font-serif);
}
.footer-copy { margin: 0; font-size: .9rem; color: rgba(255,255,255,.7); }

/* ============== RTL TWEAKS ============== */
body.dir-rtl .hero-heading { letter-spacing: 0; }
body.dir-rtl .brand { font-family: var(--font-arabic), var(--font-serif); }

/* ============== ACCESSIBILITY ============== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
