
@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Scheherazade+New:wght@400;700&family=Aref+Ruqaa:wght@400;700&family=Noto+Naskh+Arabic:wght@400;700&family=Lateef:wght@400;700&family=Tajawal:wght@400;500;600;700;800&family=Cairo:wght@400;500;600;700;800&family=Almarai:wght@400;700;800&family=Changa:wght@400;500;600;700;800&family=El+Messiri:wght@400;500;600;700&family=Reem+Kufi:wght@400;500;600;700&family=Markazi+Text:wght@400;500;600;700&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=Readex+Pro:wght@400;500;600;700&family=Noto+Kufi+Arabic:wght@400;500;600;700&display=swap');

:root {
    --paper: #f8f4ea;
    --paper-dark: #efe7d6;
    --green: #173b2c;
    --green-deep: #102b20;
    --gold: #b58a47;
    --ink: #2c2923;
    --muted: #79746b;
    --border: #e5dccb;
    --font-ui: 'Tajawal', sans-serif;
    --font-poem: 'Amiri', serif;
    --poem-size: 25px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-ui);
    line-height: 1.8;
}

a { color: inherit; text-decoration: none; }

button, input, select { font: inherit; }

.container {
    width: min(1180px, 92%);
    margin-inline: auto;
}

.site-header {
    background: rgba(250, 247, 240, .97);
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 10;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    padding-block: 15px;
}

.brand {
    display: flex;
    flex-direction: column;
    font-family: var(--font-poem);
    color: var(--green-deep);
    font-size: 34px;
    font-weight: 700;
    line-height: 1.3;
}

.brand small {
    font-family: var(--font-ui);
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: .2px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

.nav-links a {
    font-size: 15px;
    font-weight: 700;
    transition: color .2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--gold); }

.hero {
    min-height: 490px;
    display: flex;
    align-items: center;
    background:
        linear-gradient(90deg, rgba(248,244,234,.97) 8%, rgba(248,244,234,.82) 48%, rgba(248,244,234,.12) 100%),
        url('/images/poetry-hero.jpg') center / cover;
    border-bottom: 1px solid var(--border);
}

.hero-content { max-width: 650px; }

.eyebrow {
    color: var(--gold);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
}

.hero h1 {
    color: var(--green);
    font-family: var(--font-poem);
    font-size: clamp(40px, 5.5vw, 73px);
    line-height: 1.5;
    margin: 15px 0;
}

.hero p {
    color: #555047;
    font-size: 18px;
    max-width: 510px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 25px;
    border-radius: 5px;
    font-weight: 700;
    border: 1px solid var(--green);
    transition: .2s;
}

.btn-primary {
    color: white;
    background: var(--green);
}

.btn-primary:hover {
    background: var(--green-deep);
    color: white;
    transform: translateY(-2px);
}

.btn-outline {
    color: var(--green);
    background: rgba(255,255,255,.55);
}

.btn-outline:hover { background: white; }

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.section { padding-block: 75px; }

.section-heading { text-align: center; margin-bottom: 35px; }

.section-heading h2,
.page-title {
    font-family: var(--font-poem);
    color: var(--green);
    font-size: clamp(34px, 4vw, 49px);
    margin: 10px 0;
}

.section-heading p { color: var(--muted); }

.ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--gold);
    font-size: 21px;
}

.ornament::before,
.ornament::after {
    content: '';
    width: 55px;
    height: 1px;
    background: var(--gold);
    opacity: .65;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.poetry-card {
    background: #fffdf8;
    border: 1px solid var(--border);
    border-radius: 9px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(54,39,18,.035);
    transition: transform .25s, box-shadow .25s;
}

.poetry-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(54,39,18,.1);
}

.card-art {
    height: 165px;
    background:
        linear-gradient(135deg, rgba(16,43,32,.12), rgba(16,43,32,.76)),
        radial-gradient(circle at 25% 20%, #d5ae70, transparent 45%),
        linear-gradient(120deg, #d8c4a0, #47634b);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f7e7c9;
    font-family: var(--font-poem);
    font-size: 45px;
}

.card-content { padding: 23px; }

.card-content h3 {
    font-family: var(--font-poem);
    font-size: 27px;
    line-height: 1.5;
    margin: 0 0 10px;
    color: var(--green);
}

.card-content p { color: var(--muted); margin: 0 0 15px; }

.card-link {
    color: #997037;
    font-weight: 700;
    font-size: 14px;
}

.page-banner {
    background:
        radial-gradient(circle at 80% 30%, #31523e, transparent 42%),
        linear-gradient(135deg, #102b20, #1c4231);
    color: #f6ebd8;
    padding: 68px 0;
    text-align: center;
}

.page-banner h1 {
    font-family: var(--font-poem);
    font-size: clamp(36px, 5vw, 57px);
    margin: 0;
}

.page-banner p { color: #d5c7aa; }

.page-content { min-height: 55vh; padding-block: 55px 90px; }

.breadcrumb {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 24px;
}

.breadcrumb a:hover { color: var(--gold); }

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    background: #fffdf8;
    padding: 55px 20px;
    border: 1px solid var(--border);
    border-radius: 9px;
}

.poem-reading {
    max-width: 850px;
    margin: 0 auto;
}

.poem-header { text-align: center; margin-bottom: 35px; }

.poem-header h1 {
    font-family: var(--font-poem);
    color: var(--green-deep);
    font-size: clamp(35px, 5vw, 52px);
    line-height: 1.5;
    margin: 15px 0;
}

.poem-body {
    background: #fffdf8;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: clamp(22px, 6vw, 65px);
    font-family: var(--font-poem);
    font-size: var(--poem-size);
    line-height: 2.5;
    text-align: center;
    overflow-wrap: anywhere;
    box-shadow: 0 12px 35px rgba(54,39,18,.04);
}

.poem-body img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 7px;
    margin: 25px auto;
}

.poem-body a {
    color: #997037;
    text-decoration: underline;
}

.poem-body p { margin: 0 0 18px; }

.pagination { margin-top: 40px; }

.site-footer {
    background: var(--green-deep);
    color: #e7ddc9;
    text-align: center;
    padding: 35px 15px;
}

.site-footer strong {
    font-family: var(--font-poem);
    font-size: 29px;
}

.site-footer p { font-size: 13px; color: #b9bcae; }

@media (max-width: 850px) {
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nav-links { gap: 17px; }
    .hero { min-height: 420px; }
}

@media (max-width: 600px) {
    .nav { flex-direction: column; }
    .nav-links { justify-content: center; gap: 15px; }
    .brand { text-align: center; }
    .hero {
        min-height: 430px;
        background:
            linear-gradient(rgba(248,244,234,.88), rgba(248,244,234,.94)),
            url('/images/poetry-hero.jpg') center / cover;
    }
    .hero h1 { font-size: 43px; }
    .hero p { font-size: 16px; }
    .grid { grid-template-columns: 1fr; }
    .section { padding-block: 48px; }
    .page-content { padding-block: 35px 65px; }
    .poem-body { font-size: min(var(--poem-size), 22px); }
}


/* Poem typography controlled by appearance settings */
.poem-body,
.poem-body p,
.poem-body div,
.poem-body span,
.poem-body li,
.poem-body blockquote,
.poem-body h1,
.poem-body h2,
.poem-body h3 {
    font-family: var(--font-poem) !important;
    font-size: var(--poem-size);
}

.poem-body img {
    max-width: 100%;
    height: auto;
}

/* Poem page titles */
main h1,
.poem-detail h1,
.poem-title {
    font-family: var(--font-poem) !important;
}


/* Simplified navigation and poem sharing */
.site-header {
    background: rgba(255, 253, 248, .97);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 3px 18px rgba(30, 36, 25, .035);
}

.site-header .nav {
    min-height: 88px;
    gap: 24px;
}

.site-header .brand {
    font-size: 29px;
    line-height: 1.25;
    white-space: nowrap;
}

.site-header .brand small {
    margin-top: 5px;
    font-size: 11px;
}

.site-header .nav-links {
    display: flex;
    align-items: center;
    gap: 7px;
}

.site-header .nav-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 41px;
    padding: 7px 17px;
    border-radius: 999px;
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 700;
    transition: background .2s, color .2s;
}

.site-header .nav-links a:hover {
    background: var(--paper-dark);
    color: var(--green);
}

.site-header .nav-links a.active {
    background: var(--green);
    color: #fff;
}

.poem-share {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.share-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 45px;
    padding: 10px 19px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fffdf8;
    color: var(--green-deep);
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s, background .2s;
}

.share-button:hover {
    transform: translateY(-2px);
    background: var(--paper-dark);
}

.share-button-primary {
    background: var(--green);
    border-color: var(--green);
    color: white;
}

.share-button-primary:hover {
    background: var(--green-deep);
}

.share-whatsapp {
    border-color: #b7d8c1;
    color: #187b43;
}

.share-feedback {
    min-height: 24px;
    text-align: center;
    color: var(--green);
    font-family: var(--font-ui);
    font-size: 13px;
}

@media (max-width: 600px) {
    .site-header .nav {
        flex-direction: column;
        gap: 12px;
        padding-block: 15px;
    }

    .site-header .brand {
        font-size: 27px;
        text-align: center;
    }

    .site-header .nav-links {
        width: 100%;
        justify-content: center;
        gap: 5px;
        flex-wrap: nowrap;
    }

    .site-header .nav-links a {
        flex: 1;
        padding: 8px 9px;
        font-size: 13px;
        white-space: nowrap;
    }

    .poem-share {
        gap: 8px;
    }

    .share-button {
        font-size: 13px;
        padding: 9px 14px;
    }
}


/* Literary redesign v1 */

:root {
    --literary-surface: #fffdf8;
    --literary-line: var(--border);
}

body {
    overflow-x: hidden;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 4px;
}

.literary-hero {
    position: relative;
    background: linear-gradient(145deg, #f9f6ef 0%, #eee6d6 100%);
    border-bottom: 1px solid var(--literary-line);
    overflow: hidden;
}

.literary-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
    align-items: center;
    gap: clamp(32px, 6vw, 100px);
    min-height: 560px;
    padding-block: 72px;
}

.literary-hero-content {
    max-width: 650px;
}

.literary-kicker {
    display: inline-block;
    color: var(--gold);
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .3px;
}

.literary-hero h1 {
    margin: 15px 0 18px;
    color: var(--green);
    font-family: var(--font-poem);
    font-size: clamp(54px, 6.5vw, 96px);
    font-weight: 700;
    line-height: 1.4;
}

.literary-lead {
    max-width: 490px;
    margin: 0;
    color: #666155;
    font-size: clamp(16px, 1.7vw, 19px);
    line-height: 2;
}

.literary-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.literary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 50px;
    padding: 11px 23px;
    border: 1px solid var(--green);
    border-radius: 7px;
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 700;
    transition: background .2s, transform .2s, color .2s;
}

.literary-button:hover {
    transform: translateY(-2px);
}

.literary-button-primary {
    background: var(--green);
    color: white;
}

.literary-button-primary:hover {
    background: var(--green-deep);
}

.literary-button-secondary {
    background: transparent;
    color: var(--green);
}

.literary-button-secondary:hover {
    background: #fffdf8;
}

.literary-hero-art {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 380px;
    padding: 38px;
    overflow: hidden;
    background: linear-gradient(155deg, var(--green), var(--green-deep));
    border: 1px solid rgba(181,138,71,.45);
    border-radius: 4px 32px 4px 32px;
    box-shadow: 20px 22px 0 rgba(181,138,71,.11);
    color: #f6edda;
}

.literary-hero-art::before {
    content: '';
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(225,197,142,.35);
    border-radius: 2px 24px 2px 24px;
    pointer-events: none;
}

.literary-art-top,
.literary-art-bottom {
    position: relative;
    z-index: 1;
    font-family: var(--font-ui);
    font-size: 13px;
    color: #d9c49d;
}

.literary-art-name {
    position: relative;
    z-index: 1;
    align-self: center;
    text-align: center;
    font-family: var(--font-poem);
    font-size: clamp(47px, 5vw, 72px);
    line-height: 1.6;
}

.literary-art-bottom {
    align-self: center;
}

.literary-section {
    padding-block: clamp(58px, 7vw, 100px);
}

.literary-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 25px;
    margin-bottom: 30px;
}

.literary-section-heading h2 {
    margin: 8px 0 0;
    color: var(--green);
    font-family: var(--font-poem);
    font-size: clamp(34px, 4vw, 49px);
    line-height: 1.5;
}

.literary-section-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.literary-categories {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.literary-category {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
    min-height: 305px;
    padding: clamp(26px, 4vw, 42px);
    background: var(--literary-surface);
    border: 1px solid var(--literary-line);
    border-radius: 12px;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}

.literary-category:hover,
.literary-poem-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold);
    box-shadow: 0 14px 35px rgba(39,43,30,.07);
}

.literary-category-number {
    align-self: flex-end;
    color: #c9bba2;
    font-family: var(--font-ui);
    font-size: 13px;
}

.literary-category-label {
    color: var(--gold);
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 700;
}

.literary-category h3 {
    margin: 6px 0 10px;
    color: var(--green);
    font-family: var(--font-poem);
    font-size: clamp(31px, 3vw, 40px);
    line-height: 1.5;
}

.literary-category p {
    max-width: 360px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.9;
}

.literary-category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 17px;
    border-top: 1px solid var(--literary-line);
    color: var(--green);
    font-size: 14px;
    font-weight: 700;
}

.literary-page-intro {
    padding-block: clamp(55px, 7vw, 95px);
    background: linear-gradient(135deg, var(--green-deep), var(--green));
    color: #f9f2e5;
    text-align: center;
}

.literary-page-intro h1 {
    margin: 12px 0;
    font-family: var(--font-poem);
    font-size: clamp(40px, 5vw, 66px);
    line-height: 1.5;
}

.literary-page-intro p {
    margin: 0;
    color: #e0d5bf;
    font-size: 15px;
}

.literary-listing {
    min-height: 55vh;
    padding-block: 35px 85px;
}

.literary-poem-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.literary-poem-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    justify-content: space-between;
    min-height: 205px;
    padding: 28px;
    background: var(--literary-surface);
    border: 1px solid var(--literary-line);
    border-radius: 11px;
    transition: transform .2s, box-shadow .2s, border-color .2s;
    min-width: 0;
}

.literary-poem-label {
    color: var(--gold);
    font-size: 12px;
    font-weight: 700;
}

.literary-poem-card h2 {
    width: 100%;
    margin: 0;
    color: var(--green);
    font-family: var(--font-poem);
    font-size: 28px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.literary-poem-read {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding-top: 14px;
    border-top: 1px solid var(--literary-line);
    color: var(--green);
    font-size: 13px;
    font-weight: 700;
}

.poem-reading {
    max-width: 780px;
}

.poem-header {
    margin-bottom: 28px;
}

.poem-body {
    border-radius: 12px;
    line-height: 2.3;
}

.poem-body p {
    line-height: inherit;
}

@media (max-width: 900px) {
    .literary-hero-inner {
        grid-template-columns: minmax(0, 1fr) minmax(220px, .75fr);
        gap: 30px;
    }

    .literary-hero-art {
        min-height: 320px;
        padding: 27px;
    }

    .literary-poem-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .literary-hero-inner {
        grid-template-columns: 1fr;
        min-height: 0;
        padding-block: 58px 55px;
    }

    .literary-hero h1 {
        font-size: clamp(47px, 12vw, 66px);
    }

    .literary-hero-art {
        display: none;
    }

    .literary-section-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 7px;
    }

    .literary-categories,
    .literary-poem-grid {
        grid-template-columns: 1fr;
    }

    .literary-category {
        min-height: 265px;
    }

    .literary-poem-card {
        min-height: 170px;
    }

    .literary-actions {
        align-items: stretch;
    }

    .literary-button {
        flex: 1 1 auto;
    }

    .literary-page-intro {
        padding-block: 48px;
    }

    .poem-body {
        padding: 24px 18px;
        line-height: 2.1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .literary-button,
    .literary-category,
    .literary-poem-card {
        transition: none;
    }
}


/* Poem cover cards v1 */

.literary-poem-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

.literary-poem-card-cover {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 0;
    gap: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
    background: #fffdf9;
    box-shadow: 0 6px 24px rgba(43, 36, 24, .045);
}

.literary-poem-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e8dfcf;
}

.literary-poem-cover > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.literary-poem-card-cover:hover .literary-poem-cover > img {
    transform: scale(1.035);
}

.literary-cover-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 253, 248, .94);
    color: var(--green-deep);
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .06);
}

.literary-cover-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background:
        radial-gradient(circle at 75% 25%, rgba(181,138,71,.23), transparent 43%),
        linear-gradient(135deg, var(--green), var(--green-deep));
    color: #f4ead5;
}

.literary-cover-fallback::before {
    content: '';
    position: absolute;
    inset: 13px;
    border: 1px solid rgba(235, 210, 165, .27);
    border-radius: 8px;
}

.literary-cover-symbol {
    color: #d8b77a;
    font-size: 25px;
}

.literary-cover-word {
    font-family: var(--font-poem);
    font-size: clamp(34px, 4vw, 49px);
    line-height: 1.4;
}

.literary-cover-line {
    width: 50px;
    height: 1px;
    background: #d8b77a;
}

.literary-poem-details {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 23px;
    padding: 24px;
}

.literary-poem-card-cover .literary-poem-details h2 {
    margin: 0;
    font-size: clamp(24px, 2.4vw, 30px);
    line-height: 1.65;
    color: var(--green-deep);
}

.literary-poem-read-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: auto;
    margin-top: auto;
    padding: 10px 18px;
    border: 0;
    border-radius: 999px;
    background: var(--green);
    color: white;
    font-size: 13px;
    font-weight: 700;
    transition: background .2s;
}

.literary-poem-card-cover:hover .literary-poem-read-button {
    background: var(--green-deep);
}

@media (max-width: 900px) {
    .literary-poem-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .literary-poem-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .literary-poem-cover {
        aspect-ratio: 16 / 9;
    }

    .literary-poem-details {
        padding: 20px;
        gap: 18px;
    }

    .literary-poem-card-cover .literary-poem-details h2 {
        font-size: 26px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .literary-poem-cover > img,
    .literary-poem-read-button {
        transition: none;
    }
}
