/* =========================
   RIWAYA PREMIUM UI (NEW STYLE)
   ========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    direction: rtl;

    /* 🎨 NEW SOFT COLOR SYSTEM */
    background: #f5f7fa;
    color: #1e293b;
}

/* ================= HERO ================= */
.hero {
    position: relative;
    height: 90vh;
    overflow: hidden;
}

/* SLIDER */
.slider {
    position: absolute;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;

    background-size: cover;
    background-position: center;

    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

/* OVERLAY */
.hero-overlay {
    position: relative;
    z-index: 2;

    height: 100%;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    text-align: center;

    background: rgba(15,23,42,0.55); /* deep navy overlay */

    color: white;
    padding: 20px;
}

/* TITLE */
.hero h1 {
    font-size: 42px;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

/* TEXT */
.hero p {
    font-size: 18px;
    margin-bottom: 25px;
    max-width: 600px;
    opacity: 0.9;
}

/* BUTTON */
.hero-btn {
    background: linear-gradient(135deg, #6366f1, #3b82f6);
    padding: 14px 26px;
    border-radius: 14px;
    text-decoration: none;
    color: white;
    font-size: 16px;
    transition: 0.3s;
}

.hero-btn:hover {
    transform: scale(1.05);
}

/* ================= HEADER ================= */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 18px 25px;

    background: white;

    border-bottom: 1px solid #e2e8f0;
}

.header h2 {
    color: #3b82f6;
}

/* SEARCH */
#search {
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

/* ADMIN BUTTON */
.admin-btn {
    background: #3b82f6;
    color: white;
    padding: 10px 16px;
    border-radius: 12px;
    text-decoration: none;
}

/* ================= STORIES ================= */
.stories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    padding: 30px;
}

/* CARD */
.story-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;

    background: white;

    box-shadow: 0 8px 25px rgba(0,0,0,0.08);

    transition: 0.3s;
}

.story-card:hover {
    transform: translateY(-8px);
}

/* IMAGE */
.story-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

/* OVERLAY */
.overlay {
    position: absolute;
    bottom: 0;
    width: 100%;

    padding: 16px;

    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);

    color: white;

    transform: translateY(100%);
    transition: 0.4s;
}

.story-card:hover .overlay {
    transform: translateY(0);
}

/* TEXT */
.overlay h3 {
    font-size: 18px;
}

.overlay p {
    font-size: 13px;
    opacity: 0.85;
}

/* BUTTON */
.overlay a {
    display: block;
    margin-top: 10px;

    background: #6366f1;

    padding: 10px;

    border-radius: 10px;

    text-align: center;
    color: white;
    text-decoration: none;
}

/* ================= FOOTER ================= */
.footer {
    text-align: center;
    padding: 18px;
    background: white;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
}
/* =========================
   READER PAGE - RIWAYA
   FULL SCREEN READING UI
   ========================= */

.reader-page {
    background: #f4f6f9;
    font-family: 'Cairo', sans-serif;
}

/* STRUCTURE FIX */
.reader-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.reader-page .content {
    flex: 1;
}

/* ================= HEADER ================= */
.reader-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 15px 20px;

    background: #ffffff;

    border-bottom: 1px solid #e5e7eb;

    position: sticky;
    top: 0;
    z-index: 10;
}

/* TITLE */
.reader-header h2 {
    font-size: 18px;
    color: #1e293b;
}

/* BACK BUTTON */
.back-btn {
    background: #3b82f6;
    color: white;

    border: none;

    padding: 10px 16px;

    border-radius: 12px;

    cursor: pointer;

    font-size: 14px;

    transition: 0.3s;
}

.back-btn:hover {
    transform: scale(1.05);
    background: #2563eb;
}

/* ================= READER ================= */
.reader-container {
    width: 100%;
    height: 90vh;

    padding: 10px;
}

/* PDF FRAME */
.reader-container iframe {
    width: 100%;
    height: 100%;

    border: none;

    border-radius: 14px;

    box-shadow: 0 10px 25px rgba(0,0,0,0.08);

    background: white;
}

/* ================= FOOTER ================= */
.footer {
    text-align: center;

    padding: 16px;

    background: #ffffff;

    border-top: 1px solid #e5e7eb;

    color: #6b7280;

    font-size: 14px;
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {

    .reader-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .reader-container {
        height: 85vh;
        padding: 5px;
    }

    .back-btn {
        width: 100%;
    }
}
/* ================= MOBILE ================= */
@media (max-width: 768px) {

    .hero h1 {
        font-size: 26px;
    }

    .hero p {
        font-size: 15px;
    }

    .header {
        flex-direction: column;
        gap: 10px;
    }

    .stories {
        grid-template-columns: 1fr;
    }

    .story-card img {
        height: 320px;
    }
}