/* ═══════════════════════════════════════════════════
   محمد عيلان — حافظ ذاكرة الوطن
   Design arabesque patrimonial
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400;1,700&family=Tajawal:wght@300;400;500;700;800;900&display=swap');

:root {
    --green-deep: #1B4332;
    --green-medium: #2D6A4F;
    --green-light: #40916C;
    --gold-rich: #B8860B;
    --gold-light: #D4A843;
    --gold-pale: #E8D5A3;
    --ivory: #FAF6F0;
    --ivory-warm: #F5EDE0;
    --sand: #EDE0CC;
    --brown-ink: #3D2B1F;
    --brown-light: #6B5B4F;
    --cream: #FFF8F0;
    --white: #FFFFFF;
    --shadow-soft: rgba(29, 67, 50, 0.08);
    --shadow-gold: rgba(184, 134, 11, 0.15);

    --font-title: 'Tajawal', 'Amiri', sans-serif;
    --font-heading: 'Tajawal', 'Amiri', sans-serif;
    --font-body: 'Amiri', 'Tajawal', serif;

    --max-width: 1200px;
    --header-height: 80px;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 18px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--ivory);
    color: var(--brown-ink);
    direction: rtl;
    text-align: right;
    line-height: 1.9;
    min-height: 100vh;
}

/* ─── Arabesque SVG Pattern Background ─── */

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cpath d='M40 0 L80 40 L40 80 L0 40Z' fill='none' stroke='%231B4332' stroke-width='0.5'/%3E%3Cpath d='M40 10 L70 40 L40 70 L10 40Z' fill='none' stroke='%231B4332' stroke-width='0.3'/%3E%3Ccircle cx='40' cy='40' r='8' fill='none' stroke='%23B8860B' stroke-width='0.3'/%3E%3C/svg%3E");
    background-size: 80px 80px;
}

/* ─── Top Decorative Band ─── */

.top-band {
    height: 6px;
    background: linear-gradient(90deg, var(--green-deep), var(--gold-rich), var(--green-deep), var(--gold-rich), var(--green-deep));
    background-size: 200% 100%;
}

/* ─── Navigation ─── */

.navbar {
    background: var(--green-deep);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px var(--shadow-soft);
}

.navbar-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--gold-light);
}

.nav-brand-portrait {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px;
    max-width: 40px;
    min-height: 40px;
    max-height: 40px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 15%;
    border: 1.5px solid var(--gold-light);
    flex-shrink: 0;
}

.nav-brand-text {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ivory);
    white-space: nowrap;
    line-height: 1.3;
}

.nav-brand-text small {
    display: block;
    font-size: 0.6rem;
    font-weight: 400;
    color: var(--gold-pale);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.3rem;
    align-items: center;
}

.nav-links a {
    color: var(--ivory);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.5rem 0.9rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(212, 168, 67, 0.2);
    color: var(--gold-light);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--ivory);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* ─── Hero Section ─── */

.hero {
    background: linear-gradient(135deg, var(--green-deep) 0%, var(--green-medium) 50%, var(--green-deep) 100%);
    position: relative;
    overflow: hidden;
    padding: 5rem 2rem;
    text-align: center;
    color: var(--ivory);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.06;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cpath d='M60 0 L120 60 L60 120 L0 60Z' fill='none' stroke='%23D4A843' stroke-width='1'/%3E%3Cpath d='M60 15 L105 60 L60 105 L15 60Z' fill='none' stroke='%23D4A843' stroke-width='0.5'/%3E%3Cpath d='M60 30 L90 60 L60 90 L30 60Z' fill='none' stroke='%23D4A843' stroke-width='0.5'/%3E%3Ccircle cx='60' cy='60' r='12' fill='none' stroke='%23D4A843' stroke-width='0.5'/%3E%3Ccircle cx='60' cy='60' r='6' fill='none' stroke='%23D4A843' stroke-width='0.3'/%3E%3C/svg%3E");
    background-size: 120px 120px;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-ornament {
    color: var(--gold-light);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    word-spacing: 8px;
}

.hero h1 {
    font-family: var(--font-title);
    font-size: 3.5rem;
    color: var(--ivory);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.hero h2 {
    font-family: var(--font-title);
    font-size: 1.8rem;
    color: var(--gold-light);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.hero-description {
    font-size: 1.05rem;
    color: rgba(250, 246, 240, 0.85);
    max-width: 650px;
    margin: 0 auto 2rem;
    line-height: 2;
}

.hero-divider {
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
    margin: 0 auto;
}

/* ─── Decorative Zellige Divider ─── */

.zellige-divider {
    text-align: center;
    padding: 1.5rem 0;
    color: var(--gold-rich);
    font-size: 1.2rem;
    word-spacing: 6px;
    opacity: 0.6;
}

.section-divider {
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-rich), transparent);
    margin: 0 auto 2rem;
}

/* ─── Main Content ─── */

.content-wrapper {
    position: relative;
    z-index: 1;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* ─── Section Styles ─── */

.section {
    padding: 4rem 0;
}

.section-alt {
    background: var(--cream);
}

.section-title {
    font-family: var(--font-title);
    font-size: 2.2rem;
    color: var(--green-deep);
    text-align: center;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--brown-light);
    text-align: center;
    margin-bottom: 3rem;
}

/* ─── Cards ─── */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow-soft);
    transition: all 0.4s ease;
    border: 1px solid rgba(184, 134, 11, 0.1);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px var(--shadow-soft), 0 2px 10px var(--shadow-gold);
}

.card-header {
    background: linear-gradient(135deg, var(--green-deep), var(--green-medium));
    padding: 1.5rem;
    position: relative;
}

.card-header::after {
    content: '◆ ◇ ◆';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.5rem;
    color: var(--gold-light);
    word-spacing: 4px;
    background: var(--white);
    padding: 0 12px;
}

.card-header h3 {
    font-family: var(--font-title);
    color: var(--ivory);
    font-size: 1.3rem;
}

.card-header .card-meta {
    color: var(--gold-pale);
    font-size: 0.75rem;
    font-family: var(--font-heading);
    margin-top: 0.3rem;
}

.card-body {
    padding: 2rem 1.5rem 1.5rem;
}

.card-body p {
    color: var(--brown-light);
    line-height: 1.9;
    margin-bottom: 1rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--sand);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ─── Entry Cards (Home page) ─── */

.entry-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.entry-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: center;
    border: 1px solid var(--sand);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.entry-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-rich), var(--green-deep), var(--gold-rich));
}

.entry-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 45px var(--shadow-soft);
    border-color: var(--gold-pale);
}

.entry-card-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.2rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--green-deep), var(--green-medium));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-light);
    font-size: 1.8rem;
    border: 2px solid var(--gold-pale);
}

.entry-card h3 {
    font-family: var(--font-title);
    font-size: 1.4rem;
    color: var(--green-deep);
    margin-bottom: 0.8rem;
}

.entry-card p {
    color: var(--brown-light);
    font-size: 0.9rem;
    line-height: 1.8;
}

.entry-card-link {
    display: inline-block;
    margin-top: 1.2rem;
    color: var(--gold-rich);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.entry-card-link:hover {
    border-bottom-color: var(--gold-rich);
}

/* ─── Quote Block (for Arabic citations) ─── */

.quote-block {
    background: linear-gradient(135deg, var(--green-deep), var(--green-medium));
    border-radius: 12px;
    padding: 3rem;
    margin: 3rem 0;
    position: relative;
    text-align: center;
}

.quote-block::before,
.quote-block::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border: 2px solid rgba(212, 168, 67, 0.3);
    border-radius: 50%;
}

.quote-block::before {
    top: -15px;
    right: -15px;
}

.quote-block::after {
    bottom: -15px;
    left: -15px;
}

.quote-block blockquote {
    font-family: var(--font-title);
    font-size: 1.4rem;
    color: var(--ivory);
    line-height: 2.2;
    max-width: 700px;
    margin: 0 auto;
}

.quote-block cite {
    display: block;
    margin-top: 1rem;
    color: var(--gold-light);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-style: normal;
}

/* ─── Page Header (inner pages) ─── */

.page-header {
    background: linear-gradient(135deg, var(--green-deep), var(--green-medium));
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M30 0 L60 30 L30 60 L0 30Z' fill='none' stroke='%23D4A843' stroke-width='0.8'/%3E%3Ccircle cx='30' cy='30' r='8' fill='none' stroke='%23D4A843' stroke-width='0.4'/%3E%3C/svg%3E");
    background-size: 60px 60px;
}

.page-header h1 {
    font-family: var(--font-title);
    font-size: 2.5rem;
    color: var(--ivory);
    position: relative;
}

.page-header .ornament {
    color: var(--gold-light);
    margin-top: 0.8rem;
    font-size: 0.9rem;
    word-spacing: 6px;
    position: relative;
}

/* ─── Blog Styles ─── */

.blog-list {
    display: grid;
    gap: 2rem;
}

.blog-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow-soft);
    display: grid;
    grid-template-columns: 1fr 2fr;
    transition: all 0.3s ease;
    border: 1px solid rgba(184, 134, 11, 0.08);
}

.blog-card:hover {
    box-shadow: 0 8px 30px var(--shadow-soft);
}

.blog-card-image {
    background: linear-gradient(135deg, var(--green-deep), var(--green-medium));
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-light);
    font-size: 3rem;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card-content {
    padding: 2rem;
}

.blog-card-content h3 {
    font-family: var(--font-title);
    font-size: 1.4rem;
    color: var(--green-deep);
    margin-bottom: 0.8rem;
}

.blog-card-content h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.blog-card-content h3 a:hover {
    color: var(--gold-rich);
}

.blog-meta {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    color: var(--brown-light);
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.blog-excerpt {
    color: var(--brown-light);
    line-height: 1.9;
    margin-bottom: 1rem;
}

.read-more {
    color: var(--gold-rich);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.read-more:hover {
    border-bottom-color: var(--gold-rich);
}

/* ─── Blog Detail ─── */

.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 0;
}

.article-content h1 {
    font-family: var(--font-title);
    font-size: 2.2rem;
    color: var(--green-deep);
    margin-bottom: 1rem;
}

.article-content .prose {
    font-size: 1.05rem;
    line-height: 2.2;
    color: var(--brown-ink);
}

.article-content .prose p {
    margin-bottom: 1.5rem;
}

.article-content .prose h2 {
    font-family: var(--font-title);
    font-size: 1.6rem;
    color: var(--green-deep);
    margin: 2rem 0 1rem;
}

.article-content .prose h3 {
    font-family: var(--font-title);
    font-size: 1.3rem;
    color: var(--green-medium);
    margin: 1.5rem 0 0.8rem;
}

.article-content .prose blockquote {
    border-right: 4px solid var(--gold-rich);
    padding: 1rem 2rem;
    margin: 1.5rem 0;
    background: var(--ivory-warm);
    border-radius: 0 8px 8px 0;
    font-family: var(--font-title);
    font-size: 1.1rem;
    color: var(--green-deep);
}

.article-content .prose img {
    max-width: 100%;
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* ─── Comments ─── */

.comments-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 0;
    border-top: 2px solid var(--sand);
}

.comments-section h3 {
    font-family: var(--font-title);
    font-size: 1.5rem;
    color: var(--green-deep);
    margin-bottom: 2rem;
}

.comment {
    background: var(--white);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--sand);
    border-right: 3px solid var(--green-light);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.comment-author {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--green-deep);
    font-size: 0.9rem;
}

.comment-date {
    font-size: 0.75rem;
    color: var(--brown-light);
}

.comment-body {
    color: var(--brown-ink);
    line-height: 1.8;
}

.comment-reply {
    margin-right: 2rem;
    border-right-color: var(--gold-light);
}

/* ─── Forms ─── */

.form-elegant {
    max-width: 700px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 4px 20px var(--shadow-soft);
    border: 1px solid var(--sand);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--green-deep);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border: 2px solid var(--sand);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--brown-ink);
    background: var(--ivory);
    direction: rtl;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--green-light);
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.btn {
    display: inline-block;
    padding: 0.9rem 2.5rem;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--green-deep), var(--green-medium));
    color: var(--ivory);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--green-medium), var(--green-light));
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow-soft);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold-rich), var(--gold-light));
    color: var(--green-deep);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow-gold);
}

/* ─── Testimonials ─── */

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--sand);
    position: relative;
    transition: all 0.3s ease;
}

.testimonial-card::before {
    content: '❝';
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-size: 3rem;
    color: var(--gold-pale);
    font-family: serif;
    line-height: 1;
}

.testimonial-card:hover {
    box-shadow: 0 8px 30px var(--shadow-soft);
}

.testimonial-content {
    font-size: 1rem;
    line-height: 2;
    color: var(--brown-ink);
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-top: 1px solid var(--sand);
    padding-top: 1rem;
}

.testimonial-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--green-deep);
    color: var(--gold-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-title);
    font-size: 1.2rem;
}

.testimonial-info .name {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--green-deep);
    font-size: 0.9rem;
}

.testimonial-info .title {
    font-size: 0.75rem;
    color: var(--brown-light);
}

/* ─── Publication List ─── */

.pub-item {
    background: var(--white);
    border-radius: 10px;
    padding: 1.5rem 2rem;
    margin-bottom: 1rem;
    border: 1px solid var(--sand);
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    transition: all 0.3s ease;
}

.pub-item:hover {
    border-color: var(--gold-pale);
    box-shadow: 0 4px 15px var(--shadow-soft);
}

.pub-year {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--gold-rich);
    font-size: 1.1rem;
    min-width: 60px;
    text-align: center;
    padding-top: 0.3rem;
}

.pub-details h3 {
    font-family: var(--font-title);
    font-size: 1.2rem;
    color: var(--green-deep);
    margin-bottom: 0.3rem;
}

.pub-details .pub-type {
    display: inline-block;
    background: var(--green-deep);
    color: var(--ivory);
    font-family: var(--font-heading);
    font-size: 0.65rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.pub-details .pub-info {
    font-size: 0.85rem;
    color: var(--brown-light);
}

/* ─── Photo Gallery ─── */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.gallery-item {
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    aspect-ratio: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item .gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(27, 67, 50, 0.9));
    color: var(--ivory);
    padding: 2rem 1rem 1rem;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

/* ─── Footer ─── */

.footer {
    background: var(--green-deep);
    color: var(--ivory);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-rich), var(--green-light), var(--gold-rich), var(--green-light), var(--gold-rich));
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.footer-brand {
    font-family: var(--font-title);
    font-size: 1.8rem;
    color: var(--gold-light);
    margin-bottom: 0.5rem;
}

.footer-tagline {
    font-size: 0.85rem;
    color: rgba(250, 246, 240, 0.6);
    margin-bottom: 2rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.footer-links a {
    color: rgba(250, 246, 240, 0.7);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--gold-light);
}

.footer-ornament {
    color: var(--gold-light);
    opacity: 0.4;
    font-size: 0.9rem;
    word-spacing: 8px;
    margin-bottom: 1rem;
}

.footer-copyright {
    font-size: 0.75rem;
    color: rgba(250, 246, 240, 0.4);
    font-family: var(--font-heading);
}

/* ─── Biography Timeline ─── */

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, var(--gold-rich), var(--green-medium), var(--gold-rich));
}

.timeline-item {
    position: relative;
    width: 45%;
    padding: 1.5rem 2rem;
    background: var(--white);
    border-radius: 10px;
    border: 1px solid var(--sand);
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px var(--shadow-soft);
}

.timeline-item:nth-child(odd) {
    margin-right: 55%;
}

.timeline-item:nth-child(even) {
    margin-left: 55%;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 1.5rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gold-rich);
    border: 3px solid var(--ivory);
    box-shadow: 0 0 0 2px var(--gold-rich);
}

.timeline-item:nth-child(odd)::before {
    left: -7px;
}

.timeline-item:nth-child(even)::before {
    right: -7px;
}

.timeline-item h3 {
    font-family: var(--font-title);
    color: var(--green-deep);
    margin-bottom: 0.5rem;
}

.timeline-item .timeline-date {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    color: var(--gold-rich);
    font-weight: 700;
}

/* ─── Pagination ─── */

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination a,
.pagination span {
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s;
}

.pagination a {
    background: var(--white);
    color: var(--green-deep);
    border: 1px solid var(--sand);
}

.pagination a:hover {
    background: var(--green-deep);
    color: var(--ivory);
}

.pagination .current {
    background: var(--green-deep);
    color: var(--ivory);
}

/* ─── Messages ─── */

.messages {
    max-width: var(--max-width);
    margin: 1rem auto;
    padding: 0 2rem;
    list-style: none;
}

.messages li {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
    font-size: 0.85rem;
}

.messages .success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.messages .error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.messages .info {
    background: var(--ivory-warm);
    color: var(--brown-ink);
    border: 1px solid var(--sand);
}

/* ─── Empty State ─── */

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--brown-light);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state p {
    font-family: var(--font-heading);
    font-size: 0.95rem;
}

/* ─── Tag / Badge ─── */

.tag {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    border-radius: 20px;
    font-weight: 500;
}

.tag-green {
    background: rgba(45, 106, 79, 0.1);
    color: var(--green-medium);
}

.tag-gold {
    background: rgba(184, 134, 11, 0.1);
    color: var(--gold-rich);
}

/* ─── Responsive ─── */

@media (max-width: 768px) {
    html { font-size: 16px; }

    .nav-links { display: none; }
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        right: 0;
        left: 0;
        background: var(--green-deep);
        padding: 1rem;
        box-shadow: 0 10px 30px var(--shadow-soft);
    }
    .nav-toggle { display: block; }

    .hero h1 { font-size: 2.5rem; }
    .hero h2 { font-size: 1.3rem; }

    .entry-cards { grid-template-columns: 1fr; }
    .cards-grid { grid-template-columns: 1fr; }
    .testimonials-grid { grid-template-columns: 1fr; }

    .blog-card { grid-template-columns: 1fr; }

    .timeline::before { right: 20px; }
    .timeline-item {
        width: calc(100% - 50px);
        margin-right: 50px !important;
        margin-left: 0 !important;
    }
    .timeline-item::before {
        right: -27px !important;
        left: auto !important;
    }

    .form-elegant { padding: 1.5rem; }
    .section { padding: 2.5rem 0; }
    .page-header { padding: 2rem 1rem; }
    .page-header h1 { font-size: 1.8rem; }
}

@media (max-width: 480px) {
    .hero { padding: 3rem 1rem; }
    .hero h1 { font-size: 2rem; }
    .container { padding: 0 1rem; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Animation ─── */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* ─── Stats Counters ─── */

.stats-grid {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 1.5rem 2rem;
    min-width: 140px;
}

.stat-number {
    font-family: var(--font-title);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--green-deep);
    line-height: 1.2;
}

.stat-label {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    color: var(--brown-light);
    margin-top: 0.3rem;
}

@media (max-width: 768px) {
    .stats-grid { gap: 0; }
    .stat-item { min-width: 100px; padding: 1rem; }
    .stat-number { font-size: 1.8rem; }
}

/* ─── Lightbox ─── */

.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.lightbox-overlay.active { display: flex; }

.lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 0 60px rgba(0,0,0,0.5);
}

.lightbox-caption {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    background: rgba(0,0,0,0.6);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    max-width: 80vw;
    text-align: center;
}

.lightbox-close {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: rgba(0,0,0,0.4);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ─── Search ─── */

.search-box {
    max-width: 500px;
    margin: 0 auto 2rem;
    display: flex;
    gap: 0.5rem;
}

.search-box input {
    flex: 1;
    padding: 0.8rem 1.2rem;
    border: 2px solid var(--sand);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    direction: rtl;
    background: var(--white);
}

.search-box input:focus {
    outline: none;
    border-color: var(--green-light);
}

.search-box button {
    padding: 0.8rem 1.5rem;
    background: var(--green-deep);
    color: var(--ivory);
    border: none;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    cursor: pointer;
}

/* ─── Theses List ─── */

.thesis-item {
    background: var(--white);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 0.6rem;
    border: 1px solid var(--sand);
    border-right: 3px solid var(--green-light);
    transition: all 0.3s;
}

.thesis-item:hover {
    box-shadow: 0 2px 10px var(--shadow-soft);
}

.thesis-item .thesis-title {
    color: var(--green-deep);
    font-size: 0.95rem;
    line-height: 1.7;
}

.thesis-item .thesis-meta {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    color: var(--brown-light);
    margin-top: 0.3rem;
}

.thesis-item .thesis-role {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.6rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
}

.thesis-role-supervisor { background: rgba(45,106,79,0.1); color: var(--green-medium); }
.thesis-role-chair { background: rgba(184,134,11,0.1); color: var(--gold-rich); }
.thesis-role-member { background: rgba(107,91,79,0.1); color: var(--brown-light); }
