/* Main Styling for Seerah Website */
:root {
    --primary-color: #0d3b2e;
    --secondary-color: #155e46;
    --gold-color: #d4af37;
    --light-bg: #f9f8f3;
    --card-bg: #ffffff;
    --text-color: #2c3e50;
    --border-color: #e0d7c6;
    --nav-bg: #09281f;
}

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

body {
    font-family: 'BahijNaskh', 'Amiri', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-color);
    direction: rtl;
    text-align: right;
    line-height: 1.8;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 15px;
}

/* Navbar Container */
.navbar {
    background-color: var(--nav-bg);
    padding: 12px 20px;
    border-bottom: 3px solid var(--gold-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    width: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-link {
    font-weight: bold;
    font-size: 1.1rem;
}

/* Desktop Links: Single Line Row */
.nav-links {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 15px;
    white-space: nowrap;
}

.nav-item {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 5px 10px;
    border-radius: 4px;
}

.nav-item:hover {
    color: var(--gold-color);
    background-color: rgba(212, 175, 55, 0.1);
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--gold-color);
    color: var(--gold-color);
    font-size: 1.2rem;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-toggle:hover {
    background-color: rgba(212, 175, 55, 0.15);
}

/* Sidebar Styling */
.sidebar {
    height: 100%;
    width: 0;
    position: fixed;
    right: 0;
    top: 0;
    background-color: var(--nav-bg);
    overflow-x: hidden;
    transition: 0.3s ease;
    padding-top: 60px;
    z-index: 1000;
    border-left: 2px solid var(--gold-color);
    box-shadow: -4px 0 15px rgba(0,0,0,0.3);
}

.sidebar.active {
    width: 260px;
}

.sidebar a {
    display: block;
    padding: 12px 20px;
    color: #e0e0e0;
    text-decoration: none;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.sidebar a:hover {
    background-color: rgba(212, 175, 55, 0.15);
    color: var(--gold-color);
    padding-right: 25px;
}

.closebtn {
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 30px;
    color: var(--gold-color) !important;
    border-bottom: none !important;
}

/* Sidebar Toggle Button */
.openbtn {
    font-size: 1.1rem;
    background-color: var(--primary-color);
    color: var(--gold-color);
    padding: 8px 16px;
    border: 1px solid var(--gold-color);
    cursor: pointer;
    margin-bottom: 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.openbtn:hover {
    background-color: var(--secondary-color);
}

/* Header Banner */
.header-banner {
    background: linear-gradient(135deg, #0d3b2e 0%, #174d3d 100%);
    color: #ffffff;
    border-radius: 12px;
    padding: 25px 20px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--gold-color);
}

.banner-grid {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.banner-cell {
    display: table-cell;
    vertical-align: middle;
    text-align: center;
}

.banner-side {
    width: 130px;
}

.banner-center {
    padding: 0 15px;
}

.header-img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--gold-color);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    margin: 0 auto;
}

.aya-text {
    font-family: 'Amiri', serif;
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--gold-color);
    margin-bottom: 8px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    line-height: 1.6;
}

/* Content Box */
.content-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}

.content-title {
    color: var(--primary-color);
    border-bottom: 2px solid var(--gold-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.6rem;
}

.text-body {
    font-size: 1.1rem;
    line-height: 2;
    color: #333;
    text-align: justify;
}

.atext {
    direction: rtl !important;
    unicode-bidi: isolate !important;
    text-align: right !important;
    font-family: "Amiri", serif;
    font-size: 1.25rem;
    color: var(--primary-color);
    background-color: #f4efe3;
    padding: 10px 15px;
    border-radius: 6px;
    border-right: 4px solid var(--gold-color);
    margin: 10px 0;
    display: block;
}

.side-title {
    display: inline-block;
    font-weight: bold;
    color: var(--primary-color);
    background-color: #e8f0fe;
    border-right: 4px solid var(--primary-color);
    padding: 4px 10px;
    margin: 10px 0 5px 0;
    border-radius: 4px;
}

/* Bottom Pagination */
.pagination-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 25px 0 35px 0;
}

.page-btn {
    display: inline-block;
    padding: 10px 24px;
    background-color: var(--primary-color);
    color: var(--gold-color) !important;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    border: 1px solid var(--gold-color);
    transition: all 0.3s ease;
    min-width: 90px;
    text-align: center;
}

.page-btn:hover {
    background-color: var(--secondary-color);
    color: #ffffff !important;
}

/* Mobile & Tablet Styles */
@media screen and (max-width: 992px) {
    .navbar {
        flex-direction: column;
        align-items: stretch;
        padding: 10px 15px;
    }

    .nav-brand {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .nav-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 10px;
        border-top: 1px solid rgba(212, 175, 55, 0.2);
        padding-top: 10px;
        white-space: normal;
    }

    .nav-links.active {
        display: flex !important;
    }

    .nav-item {
        width: 100%;
        text-align: right;
        padding: 10px 12px;
    }

    .banner-grid, .banner-cell {
        display: block;
        width: 100%;
    }

    .banner-side {
        width: 100%;
        margin-bottom: 12px;
    }

    .header-img {
        width: 85px;
        height: 85px;
    }

    .aya-text {
        font-size: 1.1rem;
    }

    .pagination-nav {
        gap: 8px;
    }

    .page-btn {
        padding: 8px 14px;
        font-size: 0.9rem;
    }
}
