/* ═══════════════════════════════════════════════════════════════════
   REPORTS.CSS — جمعية إرث وحضارة بالقريات
   صفحة الحوكمة — Institutional Governance Archive
   Design identity: exact match with activities.css
═══════════════════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS — identical to activities.css ── */
:root {
    --color-parchment:      #faf6ed;
    --color-parchment-mid:  #f5ede0;
    --color-parchment-deep: #ede3cf;
    --color-ink-dark:       #1e1610;
    --color-ink:            #3a2a1c;
    --color-ink-mid:        #4f3822;
    --color-ink-soft:       #5c4430;
    --color-ink-muted:      #6b4f35;
    --color-gold-bright:    #c09a62;
    --color-gold:           #b28a5a;
    --color-gold-deep:      #9c6e38;
    --color-gold-pale:      #e0c896;
    --color-gold-faint:     #cbae86;
    --color-amber:          #a07848;
    --color-amber-light:    #b07a3c;
    --color-canvas:         rgba(253, 250, 240, 0.70);
    --color-canvas-strong:  rgba(245, 237, 224, 0.88);
    --radius-card:          16px;
    --radius-pill:          100px;
    --shadow-soft:          0 4px 18px -5px rgba(40, 25, 8, 0.10);
    --shadow-deep:          0 14px 36px -10px rgba(40, 25, 8, 0.16);
    --transition-smooth:    cubic-bezier(0.22, 1, 0.36, 1);
    --font-arabic:          'Almarai', sans-serif;
    --font-latin:           'Montserrat', sans-serif;
}

/* ═══════════════════════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════════════════════ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--color-parchment);
    font-family: var(--font-arabic);
    color: var(--color-ink);
    line-height: 1.5;
    overflow-x: hidden;
    direction: rtl;
}

/* Heritage paper texture — identical to activities */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 1200" opacity="0.05"><path fill="none" stroke="%23b28b5e" stroke-width="1.2" d="M200 150 L250 120 L300 150 L350 120 L400 150 L450 120 L500 150 L550 120 L600 150 M150 350 L200 320 L250 350 L300 320 L350 350 L400 320 L450 350 M100 550 L150 520 L200 550 L250 520 L300 550 L350 520 L400 550 M180 750 L230 720 L280 750 L330 720 L380 750 L430 720 L480 750 M220 950 L270 920 L320 950 L370 920 L420 950 L470 920 L520 950 M500 180 L540 150 L580 180 L620 150 L660 180 L700 150 M600 380 L640 350 L680 380 L720 350 L760 380 M550 580 L590 550 L630 580 L670 550 L710 580 M580 780 L620 750 L660 780 L700 750 L740 780 M620 1000 L660 970 L700 1000 L740 970"/><circle cx="400" cy="500" r="25" stroke="%239c7a4b" fill="none" stroke-width="1.2"/></svg>');
    background-repeat: repeat;
    background-size: 160px;
    pointer-events: none;
    z-index: 0;
}

img { display: block; max-width: 100%; }
a   { text-decoration: none; color: inherit; }

/* ═══════════════════════════════════════════════════════════════
   LAYOUT SHELL
═══════════════════════════════════════════════════════════════ */
.site-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 2.5rem 0;
    position: relative;
    z-index: 2;
}

/* ═══════════════════════════════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════════════════════════════ */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 0.8rem 0 1.5rem;
    border-bottom: 1px solid rgba(175, 145, 100, 0.25);
    margin-bottom: 2.5rem;
}

.logo-area-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo-emblem {
    font-size: 1.9rem;
    color: #b48a5c;
}

.association-name-nav {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--color-ink-mid);
    letter-spacing: -0.3px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.nav-links a {
    color: var(--color-ink-soft);
    font-weight: 500;
    transition: color 0.2s, border-color 0.2s;
    border-bottom: 1px solid transparent;
    padding-bottom: 4px;
    font-size: 0.93rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-amber-light);
    border-bottom-color: var(--color-gold-faint);
}

.nav-links a.active { font-weight: 700; }

/* ═══════════════════════════════════════════════════════════════
   SECTION SHARED ATOMS
═══════════════════════════════════════════════════════════════ */
.sec-eyebrow-row {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.sec-eyebrow {
    font-family: var(--font-latin);
    font-size: 0.58rem;
    font-weight: 500;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--color-amber);
    white-space: nowrap;
    flex-shrink: 0;
}

.sec-rule {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(192, 154, 98, 0.45), transparent);
}

.sec-diamond {
    width: 5px;
    height: 5px;
    background: var(--color-gold-bright);
    transform: rotate(45deg);
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   PAGE INTRO — Calm institutional governance header
═══════════════════════════════════════════════════════════════ */
.gv-intro {
    margin-bottom: 3.2rem;
    padding-bottom: 2.6rem;
    border-bottom: 1px solid rgba(192, 154, 98, 0.15);
}

/* Top eyebrow row */
.gv-intro-eyebrow-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.7rem;
}

.gv-intro-rule {
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(192, 154, 98, 0.55));
    flex-shrink: 0;
}

.gv-intro-eyebrow {
    font-family: var(--font-latin);
    font-size: 0.58rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--color-amber);
    white-space: nowrap;
}

.gv-intro-diamond {
    width: 5px;
    height: 5px;
    background: var(--color-gold-bright);
    transform: rotate(45deg);
    flex-shrink: 0;
}

/* Main heading */
.gv-intro-title {
    font-size: clamp(2.1rem, 3.6vw, 3.2rem);
    font-weight: 800;
    color: var(--color-ink-dark);
    line-height: 1.15;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
}

.gv-intro-title::after {
    content: "";
    display: block;
    width: 48px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-gold-bright), var(--color-gold-pale));
    margin-top: 1rem;
}

/* Description */
.gv-intro-desc {
    font-size: 1.02rem;
    line-height: 2.05;
    color: var(--color-ink-muted);
    font-weight: 300;
    max-width: 68ch;
}

/* ═══════════════════════════════════════════════════════════════
   GOVERNANCE DOCUMENTS LIST
   A clean, professional vertical list of official documents.
═══════════════════════════════════════════════════════════════ */
.gv-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 5rem;
}

/* ── Single document row ── */
.gv-doc {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    background: var(--color-canvas-strong);
    border: 1px solid rgba(192, 154, 98, 0.20);
    border-radius: var(--radius-card);
    padding: 1.35rem 1.6rem;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
    transition:
        transform  0.45s var(--transition-smooth),
        box-shadow 0.45s var(--transition-smooth),
        border-color 0.35s;
}

.gv-doc:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-deep);
    border-color: rgba(192, 154, 98, 0.40);
}

/* Right accent bar (visible side in RTL) */
.gv-doc::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--color-gold-bright), var(--color-gold-deep));
    opacity: 0;
    transition: opacity 0.35s;
}

.gv-doc:hover::before {
    opacity: 1;
}

/* ── Document icon emblem ── */
.gv-doc-icon {
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg,
        rgba(30, 22, 8, 0.94) 0%,
        rgba(45, 31, 11, 0.97) 100%);
    border: 1px solid rgba(192, 154, 98, 0.28);
    position: relative;
}

.gv-doc-icon i {
    font-size: 1.4rem;
    color: var(--color-gold-bright);
}

/* Tiny PDF tag on the emblem corner */
.gv-doc-icon::after {
    content: "PDF";
    position: absolute;
    bottom: -7px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-latin);
    font-size: 0.42rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--color-gold-bright);
    background: var(--color-parchment-mid);
    border: 1px solid rgba(192, 154, 98, 0.30);
    padding: 0.08rem 0.34rem;
    border-radius: 3px;
    line-height: 1;
}

/* ── Document main (title) ── */
.gv-doc-main {
    flex: 1;
    min-width: 0;
}

.gv-doc-title {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    font-weight: 800;
    color: var(--color-ink-dark);
    line-height: 1.5;
    letter-spacing: -0.01em;
}

/* ── Document actions ── */
.gv-doc-actions {
    display: flex;
    gap: 0.6rem;
    flex-shrink: 0;
}

.gv-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.56rem 1.25rem;
    border-radius: 6px;
    font-family: var(--font-arabic);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        background 0.25s,
        color 0.25s,
        transform 0.22s var(--transition-smooth),
        box-shadow 0.25s,
        border-color 0.25s;
    white-space: nowrap;
    text-decoration: none;
}

.gv-btn i {
    font-size: 0.74rem;
}

/* View button — primary dark */
.gv-btn--view {
    background: var(--color-ink-dark);
    color: rgba(235, 215, 180, 0.95);
    border: 1px solid transparent;
}

.gv-btn--view:hover {
    background: #3a2410;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px -4px rgba(40, 25, 8, 0.22);
}

/* Download button — ghost gold */
.gv-btn--download {
    background: transparent;
    color: var(--color-amber);
    border: 1px solid rgba(192, 154, 98, 0.40);
}

.gv-btn--download:hover {
    background: rgba(192, 154, 98, 0.10);
    border-color: rgba(192, 154, 98, 0.62);
    transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════════════
   SCROLL REVEAL
═══════════════════════════════════════════════════════════════ */
[data-reveal] {
    opacity: 0;
    transition:
        opacity  0.8s var(--transition-smooth),
        transform 0.8s var(--transition-smooth);
}

[data-reveal="up"]   { transform: translateY(26px); }
[data-reveal="fade"] { transform: none; }

[data-reveal].revealed {
    opacity: 1;
    transform: none;
}

[data-delay="0"]   { transition-delay: 0s; }
[data-delay="80"]  { transition-delay: 0.08s; }
[data-delay="160"] { transition-delay: 0.16s; }
[data-delay="240"] { transition-delay: 0.24s; }

/* ═══════════════════════════════════════════════════════════════
   CLOSING SECTION
═══════════════════════════════════════════════════════════════ */
.gv-closing {
    text-align: center;
    padding: 4rem 0 3rem;
    position: relative;
}

.gv-closing-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2.6rem;
}

.gv-closing-line {
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(192, 154, 98, 0.38));
}

.gv-closing-line--rev {
    background: linear-gradient(90deg, rgba(192, 154, 98, 0.38), transparent) !important;
}

.gv-closing-title {
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--color-ink-dark);
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-bottom: 1.8rem;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.gv-closing-sub {
    display: block;
    color: var(--color-gold-deep);
    font-weight: 400;
    font-size: 0.62em;
    margin-top: 0.4rem;
}

.gv-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    background: var(--color-ink-dark);
    color: rgba(235, 215, 180, 0.96);
    padding: 0.88rem 2.2rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-arabic);
    letter-spacing: 0.02em;
    transition: background 0.3s, transform 0.25s;
}

.gv-back-btn:hover {
    background: #5a3820;
    transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════════ */
.footer-premium {
    margin-top: 4.5rem;
    padding: 2.5rem 0;
    border-top: 1px solid rgba(170, 135, 85, 0.28);
    text-align: center;
    font-size: 0.83rem;
    color: #a58660;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.footer-ornament-line {
    width: 72px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(192, 154, 98, 0.38));
}

.footer-ornament-line.r {
    background: linear-gradient(90deg, rgba(192, 154, 98, 0.38), transparent);
}

.footer-ornament-center {
    width: 7px;
    height: 7px;
    border: 1.5px solid rgba(192, 154, 98, 0.48);
    transform: rotate(45deg);
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   PDF VIEWER MODAL
═══════════════════════════════════════════════════════════════ */
.rp-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.rp-modal[hidden] {
    display: none;
}

.rp-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 7, 2, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: pointer;
}

.rp-modal-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 960px;
    height: 88vh;
    max-height: 860px;
    background: var(--color-parchment-mid);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 32px 80px -16px rgba(8, 4, 1, 0.45);
    border: 1px solid rgba(192, 154, 98, 0.28);
}

/* Modal top bar */
.rp-modal-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.4rem;
    background: var(--color-ink-dark);
    border-bottom: 1px solid rgba(192, 154, 98, 0.20);
    flex-shrink: 0;
    gap: 1rem;
}

.rp-modal-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(235, 215, 180, 0.90);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rp-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(192, 154, 98, 0.28);
    background: transparent;
    color: rgba(192, 154, 98, 0.7);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.rp-modal-close:hover {
    background: rgba(192, 154, 98, 0.15);
    border-color: rgba(192, 154, 98, 0.55);
    color: var(--color-gold-bright);
}

/* Modal iframe body */
.rp-modal-body {
    flex: 1;
    overflow: hidden;
}

.rp-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET  (≤ 960px)
═══════════════════════════════════════════════════════════════ */
@media (max-width: 960px) {

    .site-wrapper { padding: 1.5rem 1.8rem 0; }

    .nav-container { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .nav-links { gap: 0.6rem 1.2rem; row-gap: 0.4rem; }
    .nav-links a { font-size: 0.88rem; }
    .association-name-nav { font-size: 1.15rem; }

    .gv-intro-desc { max-width: 100%; }

    /* Modal */
    .rp-modal-shell { max-width: 100%; height: 90vh; }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE  (≤ 640px)
═══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {

    .site-wrapper { padding: 1rem 1rem 0; overflow-x: hidden; max-width: 100%; }

    .nav-links { gap: 0.5rem 0.9rem; }
    .nav-links a { font-size: 0.8rem; }

    /* Intro */
    .gv-intro { margin-bottom: 2.4rem; padding-bottom: 2rem; }
    .gv-intro-title { font-size: clamp(1.7rem, 7vw, 2.2rem); }
    .gv-intro-desc  { font-size: 0.95rem; }

    /* Document row → stack title above, actions below */
    .gv-doc {
        flex-wrap: wrap;
        gap: 1rem 1.1rem;
        padding: 1.25rem 1.3rem;
    }

    .gv-doc-main {
        flex: 1 1 auto;
        width: auto;
    }

    .gv-doc-title { font-size: 1.02rem; }

    .gv-doc-actions {
        flex: 1 1 100%;
        gap: 0.6rem;
    }

    .gv-btn {
        flex: 1;
        justify-content: center;
        font-size: 0.84rem;
        padding: 0.6rem 1rem;
    }

    /* Closing */
    .gv-closing { padding: 3rem 0 2rem; }

    /* Modal */
    .rp-modal-shell { border-radius: 12px; height: 92vh; }
    .rp-modal-title { font-size: 0.78rem; }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — SMALL PHONES  (≤ 400px)
═══════════════════════════════════════════════════════════════ */
@media (max-width: 400px) {

    .site-wrapper { padding: 0.8rem 0.85rem 0; }
    .gv-intro-title { font-size: clamp(1.5rem, 8vw, 1.9rem); }
    .association-name-nav { font-size: 1rem; }
    .nav-links a { font-size: 0.75rem; }

    .gv-doc-icon { width: 48px; height: 48px; }
    .gv-doc-icon i { font-size: 1.25rem; }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE LETTER-SPACING  (≤ 768px)
   Reduces excessive letter-spacing on small screens without
   changing desktop appearance, colors, layout, or design style.
═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* Eyebrow labels (section headers) */
    .sec-eyebrow           { letter-spacing: 0.13em; }

    /* Page intro eyebrow */
    .gv-intro-eyebrow      { letter-spacing: 0.14em; }
}
