/*==================================================
  RESET
==================================================*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Skip navigation — visually hidden, visible on focus */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: #1a1a2e;
    color: #fff;
    padding: 0.75rem 1.5rem;
    z-index: 10000;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 0 0 8px 0;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 0;
}

body {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    overflow-x: hidden;
    min-height: 100vh;
    background: url('../images/background.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #222;
}

@supports not (background-image: url('data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiTmcAA==')) {
    body {
        background-image: url('../images/background.png');
    }
}

@media (max-width: 768px) {
    body {
        background-attachment: scroll;
    }
}

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

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 94%;
    max-width: 1300px;
    margin: auto;
    padding: 0 1rem;
}

/*==================================================
  HEADER
==================================================*/

header {
    background: #fff;
    border-radius: 0 0 18px 18px;
    box-shadow: 0 8px 25px rgba(0,0,0,.10);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    height: 82px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/*==================================================
  LOGO
==================================================*/

.logo {
    display: flex;
    align-items: center;

    gap:15px;

}

.logo-icon{

    width:70px;
    height:70px;

    position:relative;

    display:flex;
    justify-content:center;
    align-items:center;

}

.logo-icon .book{

    font-size:62px;

    color:#1d4f69;

}

.logo-icon .feather{

    position:absolute;

    top:-6px;

    right:-8px;

    color:#d8ab4e;

    font-size:38px;

    transform:rotate(18deg);

}

.logo-text{

    display:flex;

    flex-direction:column;

}

.logo-text h1{

    font-size:52px;

    line-height:1;

    color:#1d4f69;

    font-weight:800;

}

.logo-text p{

    margin-top:5px;

    font-size:14px;

    color:#333;

}

/*==================================================
  NAVBAR
==================================================*/

nav{

    display:flex;

    align-items:center;

    gap:35px;

}

nav a{

    font-size:21px;

    color:#231b56;

    font-weight:600;
}

nav a:hover{

    color:#c19343;

}

nav a i{

    margin-left:6px;

}

/*==================================================
  MENU TOGGLE
==================================================*/

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    color: #1d4f69;
    cursor: pointer;
}

/*==================================================
  SEARCH
==================================================*/

.search{
    display:flex;
    justify-content:center;
    margin-top:35px;
}

.search-box{
    width:94%;
    max-width:1300px;
    height:56px;
    background:#fff;
    border:3px solid #d7b06b;
    border-radius:18px;
    overflow:hidden;
    display:flex;
    align-items:stretch;
    box-shadow:0 8px 25px rgba(0,0,0,.08);
}

.search-box input{
    flex:1;
    border:none;
    outline:none;
    padding:0 22px;
    font-size:1.15rem;
    font-family:'Cairo',sans-serif;
    background:#fff;
    color:#222;
    direction:rtl;
    text-align:right;
}

.search-box input::placeholder{
    color:#888;
    font-size:1.05rem;
}

.search-box button{
    width:72px;
    border:none;
    background:#d9aa53;
    color:#fff;
    cursor:pointer;
    font-size:22px;
    display:flex;
    align-items:center;
    justify-content:center;
    transition:background .25s ease;
    flex-shrink:0;
}

.search-box button:hover{
    background:#c79234;
}

/* ===========================
   PREMIUM
=========================== */

.premium{
    display:flex;
    justify-content:center;
    margin:35px 0;
}

.premium-box{

    width:94%;
    max-width:1300px;

    background:linear-gradient(90deg,#29125e,#f0a545);

    color:#fff;

    padding:18px 25px;

    border-radius:18px;

    display:flex;

    justify-content:space-between;

    align-items:center;

    font-size: 19px;

    box-shadow:0 12px 25px rgba(0,0,0,.15);

}

.premium button{

    background:#d7a850;

    color:#150a30;
    font-weight:700;

    border:none;

    padding:10px 25px;

    border-radius:12px;

    cursor:pointer;

    font-size:18px;
}

.premium button:hover{
    background:#e2bb69;
}
/* ===========================
   CATEGORIES
=========================== */

.categories{
width:94%;
max-width:1300px;

margin:auto;

background:rgba(255,255,255,.25);

backdrop-filter:blur(8px);

padding:18px;

border-radius:28px;

box-shadow:0 20px 40px rgba(0,0,0,.15);

}

.grid{

display:grid;

grid-template-columns:repeat(5,1fr);

gap:18px;

}

.card{

background:white;

border-radius:20px;

height:120px;

display:flex;

flex-direction:row;

justify-content:center;

align-items:center;
gap: 15px;

font-size:22px;

font-weight:700;

transition: box-shadow .25s;

box-shadow:0 10px 20px rgba(0,0,0,.12);

}

.card i{

margin: 0;

font-size:36px;

color:#b98b42;

}

.large{

grid-column:span 2;
grid-row:span 2;

height:100%;

background:linear-gradient(135deg,#173450,#32596c);

color:#deb160;

position:relative;

overflow:hidden;
display:flex;
align-items:center;
justify-content:flex-start;
padding-right:50px;

}

.large h2{
font-size: 45px;
}

.poetry-icon {
    position: absolute;
    left: 10px;
    bottom: 25px;
    width: 140px;
    height: 140px;
}

.poetry-icon .scroll {
    position: absolute;
    font-size: 110px;
    color: #e9d2a0;
    left: 20px;
    bottom: 5px;
    z-index: 1;
}

.poetry-icon .feather {
    position: absolute;
    font-size: 95px;
    color: #172d38; /* dark teal matching background */
    -webkit-text-stroke: 3px #e9d2a0; /* gold outline */
    left: 50px;
    bottom: 30px;
    transform: rotate(20deg);
    z-index: 2;
}

.poetry-icon .spark1, .poetry-icon .spark2 {
    position: absolute;
    color: #e9d2a0;
    font-size: 20px;
    z-index: 1;
}
.poetry-icon .spark1 { left: 10px; top: 30px; font-size: 15px; }
.poetry-icon .spark2 { right: 10px; bottom: 40px; font-size: 12px; }

.novel{

height:100%;
grid-row:span 2;

background:linear-gradient(#f4b15b,#ca6f4d);

color:white;
display:flex;
flex-direction:column;
justify-content:center;
gap:20px;

}

.novel h3{
font-size: 30px;
}

.novel-icon {
    position: relative;
    width: 100%;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.novel-icon .book {
    position: absolute;
    bottom: 0;
    font-size: 85px;
    color: #ffe9b5;
    z-index: 2;
}

.novel-icon .city {
    position: absolute;
    bottom: 35px;
    font-size: 65px;
    color: #ffe9b5;
    z-index: 1;
    text-shadow: 0 0 35px rgba(255, 255, 255, 0.9);
}
/*==============================
  ANNOUNCEMENT
===============================*/

.announce{
    width:94%;
    max-width:1300px;
    margin:30px auto;
    padding:18px;
    text-align:center;
    background:linear-gradient(90deg,#29125e,#f0a545);
    border-radius:18px;
    font-size:20px;
    font-weight:700;
    color:#fff;
    box-shadow:0 10px 25px rgba(0,0,0,.12);
}


/*==================================================
  FOOTER
==================================================*/

.footer{

    display:flex;

    justify-content:center;

    margin:45px 0 35px;

}

.footer-container{

    width:94%;
    max-width:1300px;

    height:58px;

    background:#fff;

    border-radius:18px;

    display:flex;

    justify-content:center;

    align-items:center;

    gap:18px;

    box-shadow:0 10px 25px rgba(0,0,0,.12);

}

.footer-container a{

    color:#b98b42;

    font-size:20px;

    font-weight:600;
}

.footer-container a:hover{

    color:#8c6327;

}

.footer-container span{

    color:#c9a45d;

}


/*==================================================
  SCROLLBAR
==================================================*/

::-webkit-scrollbar{

    width:10px;

}

::-webkit-scrollbar-track{

    background:#f2f2f2;

}

::-webkit-scrollbar-thumb{

    background:#c89a46;

    border-radius:20px;

}

/*==================================================
  ANIMATION
==================================================*/

.card,
.search-box,
.premium-box{

    animation:fadeUp .6s ease;

}

@keyframes fadeUp{

    from{

        opacity:0;

        transform:translateY(25px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}

/*==================================================
  AUTHENTICATION FORMS
  Matches NOTE design language: colors, typography, RTL
==================================================*/

.form-card {
    width: 100%;
    max-width: 480px;
    margin: 3rem auto;
    padding: 2.5rem;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,.12);
    text-align: center;
}

.form-card h1 {
    font-size: 32px;
    color: #1d4f69;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
}

.form-error,
.form-success {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
}

.form-error {
    background: #fdebec;
    color: #dc3545;
    border: 1px solid #f5c6cb;
}

.form-success {
    background: #eaf6ef;
    color: #28a745;
    border: 1px solid #b8e5c7;
}

.form-card form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    text-align: right;
}

.form-card label {
    display: block;
    font-weight: 600;
    color: #1d4f69;
    margin-bottom: 0.5rem;
    font-size: 16px;
    text-align: right;
}

.form-card label .muted {
    font-weight: 400;
    font-size: 13px;
    color: #b98b42;
}

.form-card input[type="text"],
.form-card input[type="email"],
.form-card input[type="password"],
.form-card textarea,
.form-card select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    color: #222;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    direction: rtl;
    text-align: right;
}

.form-card input[type="text"]:focus,
.form-card input[type="email"]:focus,
.form-card input[type="password"]:focus,
.form-card textarea:focus,
.form-card select:focus {
    outline: none;
    border-color: #b98b42;
    box-shadow: 0 0 0 3px rgba(185, 139, 66, 0.15);
}

.form-card input::placeholder,
.form-card textarea::placeholder {
    color: #b98b42;
    opacity: 0.6;
}

.form-card button[type="submit"] {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(90deg, #29125e, #f0a545);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: 'Cairo', sans-serif;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
margin-top: 0.5rem;
}

.form-card button[type="submit"]:hover {
box-shadow: 0 8px 20px rgba(41, 18, 94, 0.3);
}

.form-card button[type="submit"]:active {
    transform: translateY(0);
}

.form-card button.linklike {
    background: none;
    border: none;
    color: #b98b42;
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    margin: 0;
}

.form-card button.linklike:hover {
    color: #1d4f69;
}

.form-card .muted {
    color: #b98b42;
    font-size: 14px;
}

.form-card a {
    color: #b98b42;
    font-weight: 600;
    text-decoration: none;
    transition: color .2s;
}

.form-card a:hover {
    color: #1d4f69;
    text-decoration: underline;
}

.form-card .notice,
.form-card p.notice {
    text-align: center;
    color: #b98b42;
    padding: 2rem;
    font-size: 18px;
}

.form-card .list-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 15px;
}

.form-card .list-table th,
.form-card .list-table td {
    padding: 0.75rem 1rem;
    text-align: right;
    border-bottom: 1px solid #e8e8e8;
}

.form-card .list-table th {
    font-weight: 700;
    color: #1d4f69;
    background: #f5ebe4;
}

.form-card .list-table tr:last-child td {
    border-bottom: none;
}

.form-card .list-table a {
    color: #b98b42;
    font-weight: 600;
}

.form-card .list-table a:hover {
    color: #1d4f69;
}

/* Checkbox in form */
.form-card label input[type="checkbox"] {
    width: auto;
    margin-left: 0.5rem;
    accent-color: #b98b42;
}

/* Pagination in form-card context */
.form-card .pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.form-card .pagination a,
.form-card .pagination strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border-radius: 10px;
    font-weight: 600;
    color: #1d4f69;
    background: #fff;
    border: 2px solid #e8e8e8;
    transition: all .2s;
}

.form-card .pagination a:hover {
    background: #f5ebe4;
    border-color: #b98b42;
    color: #b98b42;
    text-decoration: none;
}

.form-card .pagination strong {
    background: linear-gradient(90deg, #29125e, #f0a545);
    color: #fff;
    border-color: transparent;
}

/*==================================================
  BUTTON SYSTEM — Shared NOTE components
==================================================*/

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
border: none;
    text-decoration: none;
    white-space: nowrap;
    direction: rtl;
}

.btn--primary {
    background: linear-gradient(90deg, #29125e, #f0a545);
    color: #fff;
}

.btn--primary:hover {
box-shadow: 0 8px 20px rgba(41, 18, 94, 0.3);
}

.btn--outline {
    background: #fff;
    color: #1d4f69;
    border: 2px solid #e8e8e8;
}

.btn--outline:hover {
    background: #f5ebe4;
    border-color: #b98b42;
    color: #b98b42;
}

.btn--link {
    background: none;
    color: #b98b42;
    text-decoration: underline;
    padding: 0;
    font-weight: 600;
}

.btn--link:hover {
    color: #1d4f69;
}

.btn--sm {
    padding: 0.625rem 1rem;
    font-size: 14px;
    min-width: auto;
}

.btn--lg {
    padding: 1rem 2rem;
    font-size: 18px;
}

/*==================================================
  PAGINATION — Shared NOTE components
==================================================*/

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
    direction: rtl;
}

.pagination__item,
.pagination__item--active,
.pagination__item--prev,
.pagination__item--next,
.pagination__item--disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 0.875rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s;
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    direction: rtl;
}

.pagination__item {
    color: #1d4f69;
    background: #fff;
    border: 2px solid #e8e8e8;
}

.pagination__item:hover {
    background: #f5ebe4;
    border-color: #b98b42;
    color: #b98b42;
}

.pagination__item--active {
    background: linear-gradient(90deg, #29125e, #f0a545);
    color: #fff;
    border-color: transparent;
    cursor: default;
}

.pagination__item--prev,
.pagination__item--next {
    padding: 0 1rem;
    color: #1d4f69;
    background: #fff;
    border: 2px solid #e8e8e8;
}

.pagination__item--prev:hover,
.pagination__item--next:hover {
    background: #f5ebe4;
    border-color: #b98b42;
    color: #b98b42;
}

.pagination__item--disabled {
    color: #ccc;
    background: #f5f5f5;
    border-color: #e0e0e0;
    cursor: not-allowed;
    pointer-events: none;
}

/*==================================================
  EMPTY STATE — Shared NOTE components
==================================================*/

.empty {
    text-align: center;
    padding: 5rem 2rem;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,.10);
}

.empty__icon {
    font-size: 80px;
    color: #b98b42;
    margin-bottom: 1.5rem;
    opacity: 0.6;
}

.empty__title {
    font-size: 28px;
    color: #1d4f69;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.empty__text {
    font-size: 16px;
    color: #666;
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.empty--with-action .empty__action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(90deg, #29125e, #f0a545);
    color: #fff;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
}

.empty--with-action .empty__action:hover {
box-shadow: 0 8px 20px rgba(41, 18, 94, 0.3);
}

/*==================================================
  CARD SYSTEM — Shared NOTE components
  Base .card exists at line 375; extend with modifiers here
==================================================*/

/* Card padding modifier — standardized internal padding */
.card--pad {
    padding: 1.5rem;
}

/* Muted gold modifier — gold accent text color */
.muted--gold {
    color: #b98b42 !important;
}

/* Article card variant — flex column, no fixed height, image + body */
.card--article {
    display: flex;
    flex-direction: column;
    height: auto;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

/* Card thumbnail area — 16:10 aspect ratio, image scales on hover */
.card__thumb {
    aspect-ratio: 16 / 10;
    position: relative;
    overflow: hidden;
    background: #f5ebe4;
}

.card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Placeholder when no featured image */
.card__thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b98b42;
    font-size: 48px;
    background: linear-gradient(135deg, #f5ebe4 0%, #e8d5c0 100%);
}

/* Card body — content area */
.card__body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card__title {
    font-size: 20px;
    font-weight: 700;
    color: #1d4f69;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card__excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* Card meta — author, date, etc. */
.card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 13px;
    color: #888;
    padding-top: 0.5rem;
    border-top: 1px solid #f0f0f0;
}

.card__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 500;
}

.card__meta-item i {
    color: #b98b42;
    font-size: 12px;
}

/* Grid for article cards — reuses .grid but with article-specific minmax */
.grid--articles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 1200px) {
    .grid--articles {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .grid--articles {
        grid-template-columns: 1fr;
    }

    .card__thumb {
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 480px) {
    .card__title {
        font-size: 18px;
    }

    .card__body {
        padding: 1rem;
    }
}

/*==================================================
  FORM FIELD SYSTEM — Shared NOTE components
  Reusable form field, select, search input
==================================================*/

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-field__label {
    display: block;
    font-weight: 600;
    color: #1d4f69;
    font-size: 16px;
    text-align: right;
}

.form-field__label .muted {
    font-weight: 400;
    font-size: 13px;
    color: #b98b42;
}

.form-field__input,
.form-field__textarea,
.form-field__select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    color: #222;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    direction: rtl;
    text-align: right;
}

.form-field__input:focus,
.form-field__textarea:focus,
.form-field__select:focus {
    outline: none;
    border-color: #b98b42;
    box-shadow: 0 0 0 3px rgba(185, 139, 66, 0.15);
}

.form-field__input::placeholder,
.form-field__textarea::placeholder {
    color: #b98b42;
    opacity: 0.6;
}

/* Search field with icon */
.form-field--search {
    position: relative;
}

.form-field--search .form-field__input {
    padding-right: 3rem;
}

.form-field--search .form-field__icon {
    position: absolute;
    right: 1rem;
    top: calc(50% + 0.875rem); /* label height + half input */
    transform: translateY(-50%);
    color: #b98b42;
    font-size: 20px;
    pointer-events: none;
}

/* Select field with custom arrow */
.form-field__select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b98b42' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 1rem center;
    background-size: 20px;
    padding-left: 2.5rem;
}

/* Inline form field for filter bars */
.form-field--inline {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .form-field--inline {
        min-width: 100%;
    }
}

/*==================================================
  FILTER BAR SYSTEM — Shared NOTE components
  Reusable filter/sort bar for articles, poets, etc.
==================================================*/

.filter-bar {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 25px rgba(0,0,0,.10);
}

.filter-bar__header {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1rem;
}

.filter-bar__label {
    font-size: 22px;
    font-weight: 700;
    color: #1d4f69;
    margin-bottom: 0;
}

.filter-bar__form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    width: 100%;
}

.filter-bar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #e8e8e8;
    margin-top: 1rem;
}

.filter-bar__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.filter-bar__chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: #f5ebe4;
    border-radius: 20px;
    font-size: 13px;
    color: #1d4f69;
    font-weight: 600;
}

.filter-bar__chip-remove {
    color: #b98b42;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
    transition: color .2s;
}

.filter-bar__chip-remove:hover {
    color: #1d4f69;
}

.filter-bar__clear {
    margin-right: auto;
    color: #b98b42;
    font-size: 13px;
    font-weight: 600;
    text-decoration: underline;
    transition: color .2s;
}

.filter-bar__clear:hover {
    color: #1d4f69;
}

.filter-bar__count {
    margin-top: 0.75rem;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Filter chip group (for poets filter tabs) */
.filter-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all .3s;
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.filter-chip--active {
    background: linear-gradient(90deg, #29125e, #f0a545);
    color: #fff;
}

.filter-chip:not(.filter-chip--active) {
    background: #fff;
    color: #1d4f69;
}

.filter-chip:not(.filter-chip--active):hover {
    background: #f5ebe4;
    color: #b98b42;
}

/*==================================================
  SECTION TITLE — Shared NOTE components
  Reusable heading typography for section labels
==================================================*/

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: #1d4f69;
    margin-bottom: 1rem;
}

/* Responsive section title */
@media (max-width: 768px) {
    .section-title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 18px;
    }
}

/*==================================================
  BADGE — Shared NOTE components
  Reusable badge for era, country, status indicators
==================================================*/

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 1rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    white-space: nowrap;
}

.badge--gold {
    background: #f5ebe4;
    color: #1d4f69;
}

.badge--primary {
    background: linear-gradient(90deg, #29125e, #f0a545);
    color: #fff;
}

/*==================================================
  LIST ITEM — Shared NOTE components
  Reusable list item for repeated list entries
==================================================*/

.list-item {
    margin: 1rem 0;
    padding: 1rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 18px rgba(0,0,0,.10);
}

/*==================================================
  UTILITIES — Extracted from inline styles
  Values copied verbatim from templates — no new values
==================================================*/

/* Page header — used on section headers across templates */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

/* Page title (h1) — 42px, #1d4f69, margin-bottom: 0.5rem */
.page-title {
    font-size: 42px;
    color: #1d4f69;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

/* Subsection title (h1 with line-height 1.3) — used on single-item pages */
.subsection-title {
    font-size: 42px;
    color: #1d4f69;
    margin-bottom: 1rem;
    line-height: 1.3;
    font-weight: 700;
}

/* Plain link — color:inherit; text-decoration:none; */
.link-plain {
    color: inherit;
    text-decoration: none;
}

/* List reset — list-style:none; padding:0; margin:0; */
.list-reset {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Responsive grid utilities */
.grid--auto-sm {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.grid--auto-sm-tight {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.grid--auto-md {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.grid--auto-lg {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Meta row — flex row for badges/meta */
.meta-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 16px;
}

.meta-row--center {
    justify-content: center;
}

.meta-row--between {
    justify-content: space-between;
}

/* Section base */
.l-section {
    padding: 2rem 0;
}

/* Section gap modifiers */
.l-section--gap {
    margin-bottom: 2rem;
}

.l-section--gap-lg {
    margin-bottom: 3rem;
}

/* Card center modifier */
.card--center {
    text-align: center;
}

/* Excerpt text */
.excerpt {
    line-height: 1.8;
    color: #222;
}

/* Verse snippet on poetry search results (v2.4 STEP 11) */
.search-verse {
    margin: 0.6rem 0 0.5rem;
    padding: 0.6rem 0.9rem;
    background: #fbf6ec;
    border-inline-start: 3px solid #d4a857;
    border-radius: 6px;
    font-size: 1.02rem;
    line-height: 1.9;
    color: #3b2e27;
    direction: rtl;
    text-align: right;
}
.search-verse-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 800;
    color: #a8822f;
    margin-bottom: 0.15rem;
    text-transform: none;
}
.search-verse-text {
    display: block;
}
.search-verse mark {
    background: #ffe08a;
    color: #3b2e27;
    padding: 0 0.1em;
    border-radius: 3px;
    font-weight: 700;
}

/* Form field inline variants */
.form-field--grow {
    flex: 1;
    min-width: 250px;
    max-width: 500px;
}

.form-field--fixed {
    min-width: 180px;
    flex: 0 0 auto;
}

/* Card link (articles.php) */
.card__link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Reading meta — used on poet.php, poem.php, article.php */
.reading-meta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Post body — article.php, single.php, page.php */
.post-body {
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 20px rgba(0,0,0,.12);
    line-height: 2;
    font-size: 20px;
    color: #222;
    direction: rtl;
    text-align: right;
}

/* Empty box variant */
.empty--box {
    text-align: center;
    padding: 3rem;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,.12);
}

/* Visually hidden — used for accessible labels */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/*==================================================
  COMMENT SYSTEM — Extracted from inline styles
==================================================*/

.comment {
    background: #fff;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 8px 18px rgba(0,0,0,.10);
}

.comment__meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.comment__author {
    font-size: 18px;
    color: #1d4f69;
    font-weight: 700;
}

.comment__time {
    color: #b98b42;
    font-size: 14px;
}

.comment__content {
    line-height: 1.8;
    color: #222;
}

.comment-form {
    margin-top: 2rem;
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 20px rgba(0,0,0,.12);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 700;
    color: #1d4f69;
    margin-bottom: 0.5rem;
}

.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-family: inherit;
    font-size: 18px;
    resize: vertical;
}

/*==================================================
  ALERT — Extracted from inline styles
==================================================*/

.alert--danger {
    background: #fdebec;
    color: #dc3545;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

/*==================================================
  SECTION LABEL — Extracted from inline styles
  Used in poem.php (22px) and article.php (22px)
==================================================*/

.section-label {
    font-size: 22px;
    font-weight: 700;
    color: #1d4f69;
    margin-bottom: 1rem;
}

/* Section label large — comments.php (28px) */
.section-label--lg {
    font-size: 28px;
    font-weight: 700;
    color: #1d4f69;
    margin-bottom: 1.5rem;
}

/*==================================================
  BUTTON GRADIENT — Extracted from inline styles
  poem.php, 404.php
==================================================*/

.btn--gradient {
    background: linear-gradient(90deg, #29125e, #f0a545);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 18px;
    text-decoration: none;
    display: inline-block;
}

/*==================================================
  BADGE VARIANTS — Extracted from poem.php inline styles
  Values copied verbatim from poem.php
==================================================*/

.badge--cream {
    background: #f5ebe4;
    color: #1d4f69;
    padding: 0.4rem 1rem;
    border-radius: 12px;
    font-weight: 600;
}

.badge--grey {
    background: #e8e8e8;
    color: #1d4f69;
    padding: 0.4rem 1rem;
    border-radius: 12px;
    font-weight: 600;
}

.badge--gradient {
    background: linear-gradient(90deg, #29125e, #f0a545);
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: 12px;
    font-weight: 600;
}

.list-item:hover {
box-shadow: 0 12px 25px rgba(0,0,0,.12);
}

.list-item__title {
    text-decoration: none;
    color: #1d4f69;
    font-weight: 700;
    font-size: 20px;
    display: block;
    margin-bottom: 0.5rem;
}

.list-item__title:hover {
    color: #b98b42;
}

.list-item__meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    color: #b98b42;
    font-size: 16px;
    font-weight: 500;
}

/*==================================================
  RESPONSIVE
==================================================*/

@media(max-width:1200px){

    .categories,
    .premium-box,
    .announce{

        width:94%;

    }

    .grid{

        grid-template-columns:repeat(2,1fr);

    }

    .poetry{

        grid-column:1 / 3;

    }

    .novel{

        grid-column:1;

    }

}

@media(max-width:768px){

    header{
        position: relative;
    }

    header .container{

        flex-direction:row;

        flex-wrap: wrap;

        justify-content: space-between;

        height:auto;

        padding:15px;

    }

    .menu-toggle {
        display: block;
    }

    nav{

        display: none;

        flex-direction: column;

        flex-wrap:nowrap;

        justify-content:center;

        text-align: center;

        gap:15px;

        width: 100%;

        padding-top: 15px;

        border-top: 1px solid rgba(0,0,0,0.05);

    }

    nav.active {
        display: flex;
        animation: fadeDown .3s ease forwards;
    }

    @keyframes fadeDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .search-box{

        width:95%;

    }

    .premium-box{

        flex-direction:column;

        height:auto;

        padding:15px;

        gap:15px;

        text-align:center;

    }

    .grid{

        grid-template-columns:1fr;

    }

    .poetry,
    .novel{

        grid-column:auto;

        grid-row:auto;

        min-height:220px;

    }

    .footer-container{

        width:95%;

        flex-wrap:wrap;

        height:auto;

        padding:18px;

        gap:12px;

    }

    .footer-container span{

        display:none;

    }

    /* Auth forms responsive */
    .form-card {
        margin: 1.5rem auto;
        padding: 1.5rem;
        max-width: 95%;
    }

    .form-card h1 {
        font-size: 26px;
    }

    /* User dropdown — visible on mobile even when nav is collapsed */
    .user-nav-dropdown {
        position: relative;
        flex-shrink: 0;
    }

    .user-nav-dropdown .user-nav-menu {
        left: auto;
        right: 0;
    }

}


@media(max-width:480px){

    .logo-text h1{

        font-size:38px;

    }

    .logo-text p{

        font-size:12px;

    }

    nav a{

        font-size:16px;

    }

    .card{

        font-size:18px;

    }

    .card h3{

        font-size:18px;

    }

    .poetry h2{

        font-size:36px;

    }

    .search-box input{

        font-size:17px;

    }

}

/*==================================================
  ARTICLES PAGE — Page-specific layout (not shared components)
  Uses shared: .filter-bar, .form-field, .btn, .grid--articles, .card--article,
  .empty, .pagination
==================================================*/

.articles-page {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.articles-header {
    text-align: center;
    margin-bottom: 2rem;
}

.articles-title {
    font-size: 42px;
    color: #1d4f69;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.articles-subtitle {
    font-size: 20px;
    color: #b98b42;
    font-weight: 500;
}

.articles-content {
    /* content wrapper, no specific styles needed */
}

/* Responsive for articles page — only page-specific adjustments */
@media (max-width: 768px) {
    .articles-title {
        font-size: 32px;
    }

    .articles-subtitle {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .articles-title {
        font-size: 26px;
    }
}

/* === PAGE: profile.php — Profile & Settings === */

/* ==========================================================
   PROFILE & SETTINGS COMMON STYLES
   ========================================================== */
.profile-page-wrapper {
    max-width: 1300px;
    margin: 1.5rem auto 3rem;
    padding: 0 15px;
    direction: rtl;
    font-family: 'Cairo', sans-serif;
    color: #2c2523;
}

/* 1. Header Banner Card (Common for Profile & Settings) */
.profile-banner-card {
    background: linear-gradient(135deg, #442621 0%, #7d262d 45%, #462520 100%);
    border-radius: 18px;
    color: #ffffff;
    padding: 2rem 2.2rem 1.6rem;
    box-shadow: 0 10px 30px rgba(68, 38, 33, 0.18);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.profile-banner-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
}

.profile-user-main {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.profile-avatar-box {
    position: relative;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    border: 3px solid #ffffff;
    background: #e2ded8;
    overflow: visible;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.profile-avatar-box img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.profile-avatar-box i.fa-user {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    color: #ffffff;
}

.profile-avatar-camera-btn {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 28px;
    height: 28px;
    background: #294c60;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid #ffffff;
    font-size: 13px;
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.profile-avatar-camera-btn:hover {
background: #1d4f69;
}

.profile-user-info {
    text-align: right;
}
.profile-display-name {
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 0.15rem;
    line-height: 1.2;
}
.profile-handle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.82);
    margin: 0 0 0.25rem;
    direction: ltr;
    display: inline-block;
}
.profile-member-date {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
}
.profile-poet-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    vertical-align: middle;
    margin-inline-start: 0.5rem;
    background: linear-gradient(135deg, #f5d48f 0%, #e0aa5a 100%);
    color: #442621;
    font-size: 0.72rem;
    font-weight: 800;
    border-radius: 20px;
    padding: 0.22rem 0.7rem;
}
.profile-poet-badge i {
    font-size: 0.72rem;
}
.profile-bio {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.7;
    margin: 0.4rem 0 0.5rem;
    max-width: 560px;
}

/* Action Buttons */
.profile-banner-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.profile-pill-action {
    background: #8b232e;
    color: #ffffff !important;
    border: none;
    border-radius: 25px;
    padding: 0.5rem 1.3rem;
    font-size: 0.92rem;
    font-weight: 700;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    text-decoration: none;
box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}
.profile-pill-action:hover {
    background: #a42b38;
box-shadow: 0 5px 12px rgba(0, 0, 0, 0.22);
}

/* Bottom Stats Row */
.profile-banner-stats {
    display: flex;
    gap: 1.25rem;
}
.profile-stat-box {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 0.85rem 1.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(4px);
    transition: background-color 0.2s ease;
    text-decoration: none;
    color: #ffffff;
}
.profile-stat-box:hover {
    background: rgba(255, 255, 255, 0.14);
}
.profile-stat-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.95rem;
    font-weight: 700;
}
.profile-stat-hint {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 400;
}
.profile-stat-num {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.15rem 0.65rem;
    border-radius: 12px;
}

/* 2. PROFILE VIEW (Tabs & Composer) */
.profile-tabs-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding: 0.4rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}
.profile-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: transparent;
    color: #64748b;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 0.6rem 1.4rem;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.18s ease;
}
.profile-tab-btn i {
    font-size: 0.9rem;
    color: #94a3b8;
    transition: color 0.18s ease;
}
.profile-tab-btn:hover {
    background: #f8fafc;
    color: #1e293b;
}
.profile-tab-btn:hover i {
    color: #f97316;
}
.profile-tab-btn.active {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.28);
}
.profile-tab-btn.active i {
    color: #ffffff;
}

.profile-composer-card {
    background: #ffffff;
    border: 1px solid #e7ded5;
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    margin-bottom: 2rem;
}
.profile-composer-inner {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}
.profile-composer-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid #dcd5cb;
    background: #eee9e2;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.profile-composer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-composer-avatar i {
    font-size: 20px;
    color: #9c8e83;
}
.profile-composer-textarea {
    flex: 1;
    background: #fdfbf7;
    border: 1px solid #ebdccb;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    font-family: inherit;
    font-size: 0.95rem;
    color: #3b2e27;
    resize: vertical;
    min-height: 85px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}
.profile-composer-textarea:focus {
    border-color: #503d36;
    box-shadow: 0 0 0 3px rgba(80, 61, 54, 0.08);
}
.profile-composer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.5rem;
}
.profile-composer-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.profile-btn-publish {
    background: #503d36;
    color: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 0.4rem 1.4rem;
    font-size: 0.92rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: background-color 0.2s ease;
}
.profile-btn-publish:hover {
    background: #685046;
}
.profile-privacy-select {
    background: #ffffff;
    border: 1px solid #ded6cd;
    border-radius: 16px;
    padding: 0.35rem 1rem;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: #4a3e38;
    outline: none;
    cursor: pointer;
}
.profile-composer-tools {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: #8c7f76;
    font-size: 1.15rem;
}
.profile-composer-tools i {
    cursor: pointer;
    transition: color 0.15s ease;
}
.profile-composer-tools i:hover {
    color: #503d36;
}
.profile-empty-feed {
    text-align: center;
    color: #8c7f76;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 2rem 0;
}

/* Posts tab — published-article feed (real data, social post cards) */
.profile-posts-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.profile-post-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    height: auto;
    padding: 0;
    gap: 0;
    text-align: right;
    direction: rtl;
    background: #ffffff;
    border: 1px solid #ece2d6;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(68, 38, 33, 0.06);
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.profile-post-card i {
    margin: 0;
    font-size: inherit;
    color: inherit;
}
.profile-post-card:hover {
    border-color: #e0c9a8;
    box-shadow: 0 10px 28px rgba(68, 38, 33, 0.12);
    transform: translateY(-2px);
}
.profile-post-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 16px 20px 0;
}
.profile-post-author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0e8dc;
    border: 2px solid #f5ebe4;
}
.profile-post-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-post-author-avatar i {
    font-size: 18px;
    color: #a89a8d;
}
.profile-post-author-info {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
    min-width: 0;
}
.profile-post-author-name {
    font-size: 0.98rem;
    font-weight: 800;
    color: #2b231f;
}
.profile-post-author-username {
    font-size: 0.8rem;
    color: #8c7f76;
}
.profile-post-author .profile-post-date {
    margin-inline-start: auto;
}
.profile-post-date,
.profile-post-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.83rem;
    color: #8c7f76;
    font-weight: 600;
}
.profile-post-date i,
.profile-post-meta-item i {
    color: #b98b42;
}
.profile-post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 14px 20px 0;
}
.profile-post-meta .badge i {
    color: #b98b42;
}
.profile-post-title {
    padding-inline: 20px;
    font-size: 1.28rem;
    font-weight: 700;
    color: #1d4f69;
    margin: 12px 0 0;
    line-height: 1.6;
}
.profile-post-title a {
    color: inherit;
    text-decoration: none;
}
.profile-post-title a:hover {
    color: #b4532c;
    text-decoration: underline;
}
.profile-post-excerpt {
    padding-inline: 20px;
    font-size: 0.92rem;
    color: #61554f;
    line-height: 1.75;
    margin: 6px 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.profile-post-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 14px;
    padding: 12px 20px 14px;
    border-top: 1px solid #f1e9dc;
    background: #fdfaf6;
    font-size: 0.85rem;
}
.profile-post-link {
    font-weight: 800;
    color: #b4532c;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #fdf6ec;
    border: 1px solid #f0ddc4;
    border-radius: 22px;
    padding: 0.4rem 1.05rem;
    font-size: 0.88rem;
    white-space: nowrap;
    transition: background 0.18s ease, border-color 0.18s ease;
}
.profile-post-link:hover {
    background: #f7e7d2;
    border-color: #e2c69e;
    text-decoration: none;
}
.profile-posts-empty {
    text-align: center;
    padding: 2rem 1rem 1.2rem;
    color: #8c7f76;
}
.profile-posts-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: #f5ebe4;
    color: #b98b42;
    font-size: 1.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.profile-posts-empty p {
    margin: 0.4rem 0;
    font-weight: 700;
    font-size: 1rem;
    color: #4a3e38;
}
.profile-posts-empty p.profile-posts-empty-hint {
    font-size: 0.86rem;
    font-weight: 500;
    color: #8c7f76;
}
.profile-posts-empty .btn {
    margin-top: 1rem;
}
.profile-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.75rem 0 2rem;
}
.profile-pagination a,
.profile-pagination span {
    min-width: 42px;
    height: 42px;
    padding: 0 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e7ded5;
    color: #1d4f69;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.16s ease;
}
.profile-pagination a:hover {
    background: #f5ebe4;
    border-color: #d8c5a9;
}
.profile-pagination .is-current {
    background: #1d4f69;
    border-color: #1d4f69;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(29, 79, 105, 0.25);
}

/* =========================================================
   profile.php — redesigned social profile (ملفي الشخصي)
   Namespaced .profile-social-* / .profile-info-* styles.
   Reuses .profile-tabs-nav / .profile-tab-btn.
   (my-posts.php keeps the original .profile-banner-* styles,
   which are NOT used here.)
   ========================================================= */
.profile-social-wrap {
    max-width: 1300px;
    margin: 0 auto;
    padding: 2rem 15px 2.5rem;
}

.profile-social-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.75rem;
    padding: 2.25rem 2.5rem;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #edf2f7;
    color: #334155;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.profile-social-avatar {
    position: relative;
    width: 118px;
    height: 118px;
    flex: 0 0 118px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #ffffff;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.28);
}
.profile-social-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.profile-social-avatar i {
    font-size: 3rem;
    color: #ffffff;
}
.profile-social-avatar-camera {
    position: absolute;
    right: 50%;
    bottom: -2px;
    transform: translateX(50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f97316;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 3px 8px rgba(249, 115, 22, 0.3);
    transition: background 0.16s ease;
}
.profile-social-avatar-camera:hover {
    background: #ea580c;
}
.profile-social-avatar-camera i {
    font-size: 0.9rem;
    line-height: 1;
}

.profile-social-hero-main {
    flex: 1 1 auto;
    min-width: 0;
}
.profile-social-name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0 0 0.35rem;
    font-size: clamp(1.6rem, 3.2vw, 2.1rem);
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.profile-social-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #ea580c;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 999px;
}
.profile-social-badge i {
    font-size: 0.75rem;
}
.profile-social-handle {
    color: #94a3b8;
    font-size: 1rem;
    margin-bottom: 0.4rem;
    overflow-wrap: anywhere;
}
.profile-social-bio {
    max-width: 640px;
    color: #475569;
    font-size: 0.98rem;
    line-height: 1.7;
    margin: 0 0 1rem;
}

.profile-social-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.profile-social-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    background: #ffffff;
    color: #475569;
    border: 1px solid #e2e8f0;
    transition: all 0.16s ease;
}
.profile-social-action:hover {
    background: #f8fafc;
    color: #334155;
    border-color: #cbd5e1;
}
.profile-social-action--primary {
    background: #f97316;
    border-color: #f97316;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35);
}
.profile-social-action--primary:hover {
    background: #ea580c;
    border-color: #ea580c;
    color: #ffffff;
}
.profile-social-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    font: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
}
.profile-social-follow-error {
    color: #dc2626;
    font-size: 0.82rem;
    margin-bottom: 0.5rem;
}

.profile-social-stats {
    display: grid;
    grid-template-columns: repeat(5, auto);
    gap: 0.75rem;
    flex-basis: 100%;
    width: 100%;
    margin-top: 0.3rem;
    border-top: 1px solid #f1f5f9;
    padding-top: 1.25rem;
}
.profile-social-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.35rem 1rem;
    border-radius: 12px;
    color: #334155;
    text-decoration: none;
    transition: background 0.16s ease;
}
.profile-social-stat:hover {
    background: #f8fafc;
}
.profile-social-stat-num {
    font-size: 1.35rem;
    font-weight: 800;
    color: #f97316;
    line-height: 1.1;
}
.profile-social-stat-label {
    font-size: 0.82rem;
    color: #64748b;
}

/* ---- Information card ---- */
.profile-info-card {
    margin-top: 1.75rem;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #edf2f7;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    padding: 1.5rem 1.75rem;
}
.profile-info-title {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
}
.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem 2rem;
}
.profile-info-item {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    font-size: 0.93rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #f1f5f9;
}
.profile-info-key {
    color: #64748b;
    min-width: 84px;
}
.profile-info-value {
    color: #0f172a;
    font-weight: 700;
}
.profile-info-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.1rem;
}
.profile-info-social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    border-radius: 9999px;
    background: #ffffff;
    color: #475569;
    border: 1px solid #e2e8f0;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.16s ease;
}
.profile-info-social-link:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}
.profile-info-social-icon {
    color: #f97316;
}

/* ---- Contributions section ---- */
.profile-social-contributions {
    margin-top: 1.75rem;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #edf2f7;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    padding: 1.5rem 1.75rem;
}
.profile-social-contributions-title {
    margin: 0 0 0.9rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
}
.profile-social-contributions-body {
    margin: 0;
    color: #475569;
    line-height: 1.7;
}
.profile-social-contributions-empty {
    margin: 0;
    color: #94a3b8;
}

/* ---- Responsive: social profile ---- */
@media (max-width: 1366px) {
    .profile-social-wrap {
        max-width: 1040px;
        padding-left: 15px;
        padding-right: 15px;
    }
}
@media (max-width: 1024px) {
    .profile-social-wrap {
        max-width: 100%;
    }
    .profile-social-hero {
        gap: 1.25rem;
        padding: 1.75rem;
    }
}
@media (max-width: 768px) {
    .profile-social-hero {
        flex-direction: column;
        text-align: center;
        padding: 1.75rem 1.25rem;
        gap: 0.9rem;
    }
    .profile-social-name {
        justify-content: center;
        font-size: 1.55rem;
    }
    .profile-social-bio {
        margin-left: auto;
        margin-right: auto;
    }
    .profile-social-avatar {
        width: 100px;
        height: 100px;
        flex-basis: 100px;
    }
    .profile-social-actions {
        justify-content: center;
    }
    .profile-social-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
    }
    .profile-info-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 420px) {
    .profile-social-wrap {
        padding: 1.25rem 0.9rem 1.75rem;
    }
    .profile-social-hero {
        padding: 1.5rem 0.9rem;
    }
    .profile-social-name {
        font-size: 1.35rem;
    }
    .profile-social-action {
        width: 100%;
        justify-content: center;
    }
}

/* =========================================================
   my-posts.php (مشاركاتي) — redesigned social feed.
   Scoped .my-posts-* only; reuses .profile-page-wrapper base.
   ========================================================= */
.my-posts-page {
    max-width: 1180px;
    color: #2c2523;
}

/* Context header — social profile context card */
.my-posts-context {
    position: static;
    top: auto;
    z-index: auto;
    background: #ffffff;
    border: 1px solid #ece2d6;
    border-top: 3px solid #8b232e;
    border-radius: 18px;
    padding: 1.4rem 1.5rem 1.1rem;
    box-shadow: 0 6px 20px rgba(68, 38, 33, 0.07);
    margin-bottom: 1.15rem;
}
.my-posts-context-main {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    flex-wrap: wrap;
}
.my-posts-context-avatar {
    width: 74px;
    height: 74px;
    flex: 0 0 74px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0e8dc;
    border: 3px solid #f5ebe4;
    box-shadow: 0 3px 10px rgba(68, 38, 33, 0.12);
}
.my-posts-context-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.my-posts-context-avatar i {
    font-size: 26px;
    color: #a89a8d;
}
.my-posts-context-identity {
    display: flex;
    flex-direction: column;
    line-height: 1.45;
    min-width: 0;
}
.my-posts-context-name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    font-size: 1.3rem;
    font-weight: 800;
    color: #2b231f;
    overflow-wrap: anywhere;
}
.my-posts-context-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: linear-gradient(135deg, #f5d48f 0%, #e0aa5a 100%);
    color: #442621;
    font-size: 0.72rem;
    font-weight: 800;
    border-radius: 20px;
    padding: 0.22rem 0.7rem;
    white-space: nowrap;
}
.my-posts-context-username {
    font-size: 0.88rem;
    color: #8c7f76;
    overflow-wrap: anywhere;
}
.my-posts-context-joined {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    color: #a09287;
}
.my-posts-context-joined i {
    color: #c89b3f;
    font-size: 0.78rem;
}
.my-posts-context-titles {
    margin-inline-start: auto;
    text-align: end;
}
.my-posts-context-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: #3b2e27;
    line-height: 1.2;
}
.my-posts-context-desc {
    margin: 0.15rem 0 0;
    font-size: 0.85rem;
    color: #8c7f76;
}
.my-posts-context-stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #eee2d3;
}
.my-posts-context-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: #fdf6ec;
    border: 1px solid #f0ddc4;
    border-radius: 999px;
    padding: 0.35rem 0.95rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #6a5a50;
}
.my-posts-context-stat strong {
    color: #b4532c;
    font-size: 0.95rem;
}

/* Navigation — underline tab bar (social profile style) */
.my-posts-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    background: #ffffff;
    border: 1px solid #e7ded5;
    border-radius: 16px;
    padding: 0.35rem 0.5rem;
    box-shadow: 0 3px 12px rgba(68, 38, 33, 0.05);
    margin-bottom: 1.25rem;
}
.my-posts-nav-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1.15rem;
    border-radius: 10px 10px 0 0;
    border-bottom: 3px solid transparent;
    font-size: 0.93rem;
    font-weight: 800;
    color: #6a5a50;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.18s ease;
}
.my-posts-nav-item i {
    font-size: 0.86rem;
    color: #a89a8d;
    transition: color 0.18s ease;
}
.my-posts-nav-item:hover {
    background: #fbf8f4;
    color: #503d36;
}
.my-posts-nav-item:hover i {
    color: #503d36;
}
.my-posts-nav-item.is-active {
    background: #fdf6ec;
    color: #8b232e;
    border-bottom-color: #8b232e;
}
.my-posts-nav-item.is-active i {
    color: #b4532c;
}

/* Feed column (single-column social feed) */
.my-posts-inner {
    max-width: 780px;
    margin-inline: auto;
    width: 100%;
}

/* Composer CTA (real link to publish-poem.php, not a fake form box) */
.my-posts-composer {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: #ffffff;
    border: 1px solid #ece2d6;
    border-radius: 18px;
    padding: 1rem 1.2rem;
    box-shadow: 0 4px 16px rgba(68, 38, 33, 0.05);
    margin-bottom: 1.5rem;
}
.my-posts-composer-avatar {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0e8dc;
    border: 1.5px solid #dcd5cb;
}
.my-posts-composer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.my-posts-composer-avatar i {
    font-size: 19px;
    color: #9c8e83;
}
.my-posts-composer-prompt {
    flex: 1;
    min-width: 0;
    margin: 0;
    background: #fdfbf7;
    border: 1px solid #ebdccb;
    border-radius: 12px;
    padding: 0.75rem 1.1rem;
    font-size: 0.95rem;
    color: #9c8e83;
}
.my-posts-composer-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: #8b232e;
    color: #ffffff;
    border-radius: 999px;
    padding: 0.6rem 1.35rem;
    font-size: 0.92rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 3px 8px rgba(68, 38, 33, 0.14);
    transition: background 0.18s ease, box-shadow 0.18s ease;
}
.my-posts-composer-btn:hover {
    background: #a42b38;
    color: #ffffff;
    box-shadow: 0 5px 14px rgba(68, 38, 33, 0.2);
}
.my-posts-composer-btn:focus-visible {
    outline: 3px solid rgba(139, 35, 46, 0.35);
    outline-offset: 2px;
}

/* Social post card */
.my-posts-feed {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}
.my-posts-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #ece2d6;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(68, 38, 33, 0.06);
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.my-posts-card:hover {
    border-color: #e0c9a8;
    box-shadow: 0 12px 30px rgba(68, 38, 33, 0.13);
    transform: translateY(-2px);
}
.my-posts-card-head {
    position: static;
    top: auto;
    z-index: auto;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 16px 20px 0;
}
.my-posts-card-avatar {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0e8dc;
    border: 2px solid #f5ebe4;
}
.my-posts-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.my-posts-card-avatar i {
    font-size: 18px;
    color: #a89a8d;
}
.my-posts-card-author {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
    min-width: 0;
}
.my-posts-card-name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.98rem;
    font-weight: 800;
    color: #2b231f;
    overflow-wrap: anywhere;
}
.my-posts-card-verified {
    color: #c89b3f;
    font-size: 0.9rem;
}
.my-posts-card-username {
    font-size: 0.8rem;
    color: #8c7f76;
    overflow-wrap: anywhere;
}
.my-posts-card-date {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-inline-start: auto;
    font-size: 0.8rem;
    font-weight: 600;
    color: #8c7f76;
}
.my-posts-card-date i {
    color: #b98b42;
    font-size: 0.78rem;
}
.my-posts-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 13px 20px 0;
}
.my-posts-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, #fdf6ec, #f7e7d2);
    border: 1px solid #f0ddc4;
    color: #8a5a20;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.28rem 0.85rem;
}
.my-posts-card-badge i {
    color: #c89b3f;
    font-size: 0.72rem;
}
.my-posts-card-meter {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #fbf8f4;
    border: 1px solid #e7ddd0;
    color: #6a5a50;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.28rem 0.85rem;
}
.my-posts-card-meter i {
    color: #c89b3f;
    font-size: 0.72rem;
}
.my-posts-card-title {
    padding-inline: 20px;
    margin: 12px 0 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.55;
}
.my-posts-card-title a {
    color: #1d4f69;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.my-posts-card-title a:hover {
    color: #b4532c;
}
.my-posts-card-excerpt {
    margin: 6px 0 0;
    padding-inline: 20px;
    font-size: 0.92rem;
    line-height: 1.75;
    color: #61554f;
    overflow-wrap: anywhere;
}
.my-posts-card-foot {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 14px;
    padding: 12px 20px 14px;
    border-top: 1px solid #f1e9dc;
    background: #fdfaf6;
}
.my-posts-card-views {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.83rem;
    font-weight: 600;
    color: #7a6b62;
}
.my-posts-card-views i {
    color: #b98b42;
}
.my-posts-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-inline-start: auto;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    background: #fdf6ec;
    border: 1px solid #f0ddc4;
    color: #b4532c;
    font-size: 0.88rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.18s ease, border-color 0.18s ease;
}
.my-posts-card-cta:hover {
    background: #f7e7d2;
    border-color: #e2c69e;
    color: #b4532c;
}
.my-posts-card-cta:focus-visible {
    outline: 3px solid rgba(180, 83, 44, 0.35);
    outline-offset: 2px;
}

/* Empty state */
.my-posts-empty {
    background: #ffffff;
    border: 1px solid #ece2d6;
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(68, 38, 33, 0.06);
    text-align: center;
    padding: 2.5rem 1.5rem 2rem;
}
.my-posts-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: #f5ebe4;
    color: #b98b42;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.my-posts-empty-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #4a3e38;
}
.my-posts-empty-desc {
    margin: 0.35rem 0 0;
    font-size: 0.88rem;
    color: #8c7f76;
}
.my-posts-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 1.25rem;
    background: #8b232e;
    color: #ffffff;
    border-radius: 999px;
    padding: 0.6rem 1.5rem;
    font-size: 0.92rem;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 3px 8px rgba(68, 38, 33, 0.14);
    transition: background 0.18s ease, box-shadow 0.18s ease;
}
.my-posts-empty-btn:hover {
    background: #a42b38;
    color: #ffffff;
}
.my-posts-empty-btn:focus-visible {
    outline: 3px solid rgba(139, 35, 46, 0.35);
    outline-offset: 2px;
}

/* Pagination */
.my-posts-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.25rem 0 2rem;
}
.my-posts-pagination a,
.my-posts-pagination span {
    min-width: 42px;
    height: 42px;
    padding: 0 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e7ded5;
    color: #503d36;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.16s ease;
}
.my-posts-pagination a:hover {
    background: #f5ebe4;
    border-color: #d8c5a9;
}
.my-posts-pagination a:focus-visible {
    outline: 3px solid rgba(80, 61, 54, 0.35);
    outline-offset: 2px;
}
.my-posts-pagination .is-current {
    background: #503d36;
    border-color: #503d36;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(80, 61, 54, 0.25);
}

/* Responsive */
@media (max-width: 1024px) {
    .my-posts-context {
        padding: 1.25rem 1.1rem 0.95rem;
    }
}
@media (max-width: 768px) {
    .my-posts-context-main {
        align-items: flex-start;
    }
    .my-posts-context-avatar {
        width: 60px;
        height: 60px;
        flex-basis: 60px;
    }
    .my-posts-context-name {
        font-size: 1.15rem;
    }
    .my-posts-context-titles {
        margin-inline-start: 0;
        text-align: start;
        width: 100%;
    }
    .my-posts-nav {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .my-posts-nav::-webkit-scrollbar {
        display: none;
    }
    .my-posts-nav-item {
        flex: 0 0 auto;
    }
}
@media (max-width: 560px) {
    .my-posts-page {
        padding: 0 12px;
    }
}
@media (max-width: 480px) {
    .my-posts-context {
        padding: 1.1rem 1rem 0.9rem;
    }
    .my-posts-context-avatar {
        width: 54px;
        height: 54px;
        flex-basis: 54px;
    }
    .my-posts-context-title {
        font-size: 1.3rem;
    }
    .my-posts-context-stat {
        flex: 1;
        justify-content: center;
    }
    .my-posts-nav {
        gap: 0.1rem;
        padding: 0.3rem 0.35rem;
    }
    .my-posts-nav-item {
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }
    .my-posts-composer {
        flex-wrap: wrap;
        padding: 0.9rem 1rem;
    }
    .my-posts-composer-avatar,
    .my-posts-card-avatar {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }
    .my-posts-composer-btn {
        width: 100%;
        justify-content: center;
    }
    .my-posts-card-head {
        padding: 13px 15px 0;
    }
    .my-posts-card-date {
        flex-basis: 100%;
        margin-inline-start: 0;
        margin-top: 0.25rem;
    }
    .my-posts-card-meta {
        padding: 10px 15px 0;
    }
    .my-posts-card-title,
    .my-posts-card-excerpt {
        padding-inline: 15px;
    }
    .my-posts-card-title {
        font-size: 1.12rem;
    }
    .my-posts-card-foot {
        padding: 10px 15px 12px;
    }
    .my-posts-card-cta {
        flex: 1;
        justify-content: center;
    }
}
@media (max-width: 390px) {
    .my-posts-context-main {
        gap: 0.85rem;
    }
    .my-posts-context-joined {
        font-size: 0.78rem;
    }
    .my-posts-nav-item {
        padding: 0.55rem 0.65rem;
    }
}
@media (max-width: 360px) {
    .my-posts-context-stats {
        justify-content: center;
    }
    .my-posts-context-stat {
        font-size: 0.78rem;
    }
    .my-posts-composer-prompt {
        font-size: 0.85rem;
    }
    .my-posts-feed {
        gap: 1rem;
    }
    .my-posts-card-title {
        font-size: 1.05rem;
    }
}

/* Profile page — responsive */
@media (max-width: 768px) {
    .profile-banner-card {
        padding: 1.5rem 1.25rem 1.25rem;
    }
    .profile-banner-top {
        flex-direction: column;
        align-items: flex-start;
    }
    .profile-user-main {
        width: 100%;
    }
    .profile-avatar-box {
        width: 74px;
        height: 74px;
    }
    .profile-avatar-box i.fa-user {
        font-size: 34px;
    }
    .profile-display-name {
        font-size: 1.25rem;
    }
    .profile-banner-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    .profile-banner-actions .profile-pill-action {
        flex: 1;
        justify-content: center;
    }
    .profile-banner-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.7rem;
    }
    .profile-stat-box {
        padding: 0.7rem 1rem;
    }
    .profile-tabs-nav {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .profile-tabs-nav::-webkit-scrollbar {
        display: none;
    }
    .profile-tab-btn {
        flex: 0 0 auto;
        padding: 0.55rem 1.15rem;
        font-size: 0.9rem;
    }
    .profile-posts-list {
        gap: 1rem;
    }
    .profile-post-card {
        border-radius: 16px;
    }
    .profile-post-author {
        padding: 12px 16px 0;
    }
    .profile-post-meta {
        padding: 12px 16px 0;
    }
    .profile-post-title {
        padding-inline: 16px;
        font-size: 1.15rem;
    }
    .profile-post-excerpt {
        padding-inline: 16px;
    }
    .profile-post-meta-row {
        padding: 10px 16px 12px;
    }
    .profile-posts-empty-icon {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }
    .profile-pagination a,
    .profile-pagination span {
        min-width: 38px;
        height: 38px;
    }
}
@media (max-width: 400px) {
    .profile-user-main {
        gap: 0.9rem;
    }
    .profile-avatar-box {
        width: 66px;
        height: 66px;
    }
    .profile-avatar-box i.fa-user {
        font-size: 30px;
    }
    .profile-banner-stats {
        grid-template-columns: 1fr 1fr;
    }
    .profile-stat-box {
        padding: 0.6rem 0.8rem;
    }
    .profile-tab-btn {
        padding: 0.5rem 0.95rem;
        font-size: 0.85rem;
    }
    .profile-post-author {
        flex-wrap: wrap;
        row-gap: 0.5rem;
    }
    .profile-post-author .profile-post-date {
        width: 100%;
        margin-inline-start: 0;
    }
    .profile-post-title {
        font-size: 1.05rem;
    }
    .profile-post-meta-row {
        align-items: flex-start;
    }
    .profile-post-link {
        padding: 0.35rem 0.85rem;
    }
}

/* 3. SETTINGS VIEW (Edit Profile Page) */
.settings-main-card {
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    padding: 2rem 2.5rem;
    margin-bottom: 2rem;
}
.settings-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 1.5rem;
}
.settings-card-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}
.settings-btn-change-pass {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    padding: 0.45rem 1.25rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}
.settings-btn-change-pass:hover {
    background: #f97316;
    color: #ffffff;
    border-color: #f97316;
}

.settings-section-divider {
    background: #f8fafc;
    border-top: 1px solid #edf2f7;
    border-bottom: 1px solid #edf2f7;
    padding: 0.65rem 1.5rem;
    margin: 2rem -2.5rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #475569;
}
.settings-subsection-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 1rem;
}

.settings-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f8fafc;
}
.settings-toggle-label {
    color: #475569;
    font-size: 0.95rem;
    font-weight: 600;
}

.ios-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
    flex-shrink: 0;
}
.ios-switch input { opacity: 0; width: 0; height: 0; }
.ios-slider {
    position: absolute; cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #e2e8f0;
    transition: 0.3s;
    border-radius: 24px;
}
.ios-slider:before {
    position: absolute; content: "";
    height: 18px; width: 18px;
    left: 3px; bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
input:checked + .ios-slider { background-color: #f97316; }
input:checked + .ios-slider:before { transform: translateX(22px); }

.settings-form-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    gap: 1.5rem;
}
.settings-field-label {
    width: 220px;
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
    padding-top: 0.45rem;
    flex-shrink: 0;
}
.settings-field-input-wrap {
    flex: 1;
    max-width: 480px;
}
.settings-input, .settings-select, .settings-textarea {
    width: 100%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    font-family: inherit;
    font-size: 0.92rem;
    color: #334155;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    text-align: right;
    direction: rtl;
}
.settings-input:focus, .settings-select:focus, .settings-textarea:focus {
    border-color: #f97316;
    outline: none;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}
.settings-textarea {
    resize: vertical;
    min-height: 90px;
}
.settings-char-counter {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 0.3rem;
}

.pill-radio-group {
    display: flex;
    gap: 0.5rem;
}
.pill-radio-option { cursor: pointer; }
.pill-radio-option input { display: none; }
.pill-radio-label {
    display: inline-block;
    padding: 0.35rem 1.4rem;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #475569;
    background: #ffffff;
    transition: all 0.2s ease;
}
.pill-radio-option input:checked + .pill-radio-label {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
    border-color: #f97316;
}
.settings-btn-save {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
    border: none;
    border-radius: 9999px;
    padding: 0.55rem 2.2rem;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    margin-top: 0;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
    transition: opacity 0.2s ease;
}
.settings-btn-save:hover {
    opacity: 0.92;
}

.settings-form-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.settings-btn-cancel {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    padding: 0.55rem 2rem;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

.settings-btn-cancel:hover {
    background: #f8fafc;
    color: #334155;
    border-color: #cbd5e1;
}

/* Password Modal */
.settings-modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(3px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}
.settings-modal-backdrop.is-open { opacity: 1; visibility: visible; }
.settings-modal-window {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #edf2f7;
    width: 100%;
    max-width: 520px;
    padding: 2rem;
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
    transform: translateY(20px);
}
.settings-modal-backdrop.is-open .settings-modal-window { transform: translateY(0); }

/* Responsive */
@media (max-width: 768px) {
    .settings-main-card { padding: 1.25rem; }
    .settings-section-divider { margin: 1.5rem -1.25rem 1rem; }
    .settings-form-row { flex-direction: column; gap: 0.4rem; }
    .settings-field-label { width: 100%; }
    .settings-field-input-wrap { max-width: 100%; }
    .profile-banner-top { flex-direction: column; align-items: stretch; }
    .profile-banner-actions { justify-content: flex-start; }
    .profile-banner-stats { flex-direction: column; }
}

/* === PAGE: theme/note/poem.php — Diwan Poem Display === */

/* ==========================================================
   DIWAN POEM DISPLAY STYLES
   ========================================================== */
.diwan-wrapper {
    font-family: 'Cairo', system-ui, -apple-system, sans-serif;
    color: #2c2523;
    padding: 1.5rem 0 3rem;
    direction: rtl;
}

.diwan-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 1. Breadcrumb Bar */
.diwan-breadcrumb-bar {
    background: #503d36;
    color: #f7f3ee;
    padding: 0.85rem 1.5rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-family: 'Amiri', 'Cairo', serif;
    font-size: 1.25rem;
    font-weight: 700;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}
.diwan-breadcrumb-bar a {
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.2s ease;
}
.diwan-breadcrumb-bar a:hover {
    opacity: 0.85;
    text-decoration: underline;
}
.diwan-breadcrumb-bar .sep {
    color: #d4be9d;
    font-size: 1.1rem;
    user-select: none;
}
.diwan-breadcrumb-bar .current-title {
    color: #fcf8f2;
}

/* 2. Main Two-Column Grid */
.diwan-grid {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

/* Left Sidebar (in image positioned at left) */
.diwan-sidebar {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Right Content Area */
.diwan-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Common Card Style */
.diwan-card {
    background: #ffffff;
    border: 1px solid #e7dfd5;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(80, 61, 54, 0.04);
    padding: 1.5rem;
}

/* Author Profile Card */
.diwan-author-card {
    text-align: center;
    padding: 1.75rem 1.25rem;
}
.diwan-author-avatar-wrap {
    width: 80px;
    height: 80px;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    overflow: hidden;
    background: #eae2d6;
    border: 2px solid #dfd3c3;
    display: flex;
    align-items: center;
    justify-content: center;
}
.diwan-author-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.diwan-author-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #2b231f;
    margin: 0 0 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}
.diwan-verified-badge {
    color: #1d9bf0;
    font-size: 1rem;
}
.diwan-author-country {
    font-size: 0.88rem;
    color: #7a6e65;
    margin-bottom: 0.25rem;
}
.diwan-author-handle {
    font-size: 0.82rem;
    color: #9c8e83;
    direction: ltr;
    display: inline-block;
    margin-bottom: 0.85rem;
}
.diwan-btn-follow {
    display: inline-block;
    padding: 0.35rem 2rem;
    border: 1.5px solid #d4be9d;
    border-radius: 30px;
    background: transparent;
    color: #7b6243;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}
.diwan-btn-follow:hover, .diwan-btn-follow.active {
    background: #503d36;
    color: #ffffff;
    border-color: #503d36;
}
.diwan-author-stats {
    display: flex;
    justify-content: space-around;
    padding: 0.85rem 0;
    margin: 1rem 0;
    border-top: 1px solid #f0e9df;
    border-bottom: 1px solid #f0e9df;
}
.diwan-stat-block {
    text-align: center;
}
.diwan-stat-num {
    font-size: 1.15rem;
    font-weight: 700;
    color: #3b2f29;
    display: block;
}
.diwan-stat-lbl {
    font-size: 0.82rem;
    color: #8c7d72;
}
.diwan-author-bio {
    font-size: 0.88rem;
    line-height: 1.7;
    color: #61554d;
    margin-bottom: 1rem;
    text-align: center;
}
.diwan-author-more-link {
    font-size: 0.92rem;
    font-weight: 700;
    color: #4a362e;
    text-decoration: none;
    transition: color 0.2s ease;
}
.diwan-author-more-link:hover {
    color: #b98b42;
    text-decoration: underline;
}

/* Sidebar Section Headers */
.diwan-side-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #3b2e27;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid #f0e9df;
}
.diwan-side-title i {
    font-size: 1.15rem;
    color: #503d36;
}

/* Follow Suggestions List */
.diwan-suggest-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.diwan-suggest-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f7f3ee;
}
.diwan-suggest-item:last-child {
    border-bottom: none;
}
.diwan-suggest-user {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
}
.diwan-suggest-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e8e2d8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.diwan-suggest-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.diwan-suggest-info {
    text-align: right;
}
.diwan-suggest-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: #3b2e27;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.diwan-suggest-handle {
    font-size: 0.78rem;
    color: #9c8e83;
    direction: ltr;
    display: block;
}
.diwan-btn-mini-follow {
    padding: 0.25rem 0.85rem;
    border: 1px solid #d4be9d;
    border-radius: 16px;
    background: transparent;
    color: #7b6243;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.diwan-btn-mini-follow:hover, .diwan-btn-mini-follow.active {
    background: #503d36;
    color: #ffffff;
    border-color: #503d36;
}

/* Related Poems by Poet */
.diwan-poet-poems-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.diwan-poet-poems-list li {
    border-bottom: 1px solid #f2ece3;
}
.diwan-poet-poems-list li:last-child {
    border-bottom: none;
}
.diwan-poet-poems-list a {
    display: block;
    padding: 0.65rem 0.5rem;
    color: #685a50;
    text-decoration: none;
    font-size: 0.95rem;
    text-align: center;
    transition: all 0.2s ease;
}
.diwan-poet-poems-list a:hover {
    color: #503d36;
    background: #faf6f0;
    border-radius: 4px;
    font-weight: 600;
}

/* ==========================================================
   MAIN POEM CARD (Right Side)
   ========================================================== */
.diwan-poem-box {
    position: relative;
    padding: 1.75rem 2rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Toolbar */
.diwan-poem-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #f0e9df;
    font-size: 0.88rem;
    color: #685a50;
}
.diwan-tools-right {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}
.diwan-tool-badge {
    color: #503d36;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.diwan-tool-btn {
    background: none;
    border: none;
    padding: 0.25rem 0.5rem;
    font-family: inherit;
    font-size: 0.88rem;
    color: #503d36;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}
.diwan-tool-btn:hover {
    background: #f4eee5;
    color: #b98b42;
}

.diwan-tools-center {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.diwan-stat-chip {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #7b6f66;
}

.diwan-tools-left {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.diwan-action-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e7dfd5;
    background: #ffffff;
    border-radius: 50%;
    color: #503d36;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}
.diwan-action-icon:hover {
    background: #503d36;
    color: #ffffff;
    border-color: #503d36;
}

/* Verses Body */
.diwan-verses-body {
    padding: 1rem 0 2rem;
}
.diwan-bayt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3.5rem;
    padding: 0.85rem 1rem;
    margin-bottom: 0.5rem;
    transition: background-color 0.2s ease, gap 0.3s ease;
    border-radius: 6px;
}
.diwan-bayt:hover {
    background: rgba(80, 61, 54, 0.02);
}
.diwan-shatr {
    flex: 1;
    font-family: 'Amiri', 'Traditional Arabic', serif;
    font-size: 1.45rem;
    font-weight: 500;
    line-height: 2.2;
    color: #2b231f;
    letter-spacing: 0.3px;
}
.diwan-shatr--first {
    text-align: right;
}
.diwan-shatr--second {
    text-align: left;
}
.diwan-bayt-notes {
    width: 100%;
    font-size: 0.88rem;
    color: #b98b42;
    text-align: center;
    margin-top: 0.2rem;
}

/* Wide Spacing Mode Toggle */
.diwan-verses-body.is-wide-spacing .diwan-bayt {
    gap: 6rem;
}

/* Tashkeel Hidden Mode */
.diwan-verses-body.no-tashkeel .diwan-shatr {
    /* handeled via JS text replacement or regex */
}

/* Poem Box Night Mode */
.diwan-poem-box.night-mode {
    background: #1f1b19;
    color: #eae1d7;
    border-color: #3b322e;
}
.diwan-poem-box.night-mode .diwan-shatr {
    color: #f7eee2;
}
.diwan-poem-box.night-mode .diwan-poem-toolbar {
    border-bottom-color: #362e2a;
    color: #b3a598;
}
.diwan-poem-box.night-mode .diwan-tool-badge,
.diwan-poem-box.night-mode .diwan-tool-btn {
    color: #dfd2c4;
}
.diwan-poem-box.night-mode .diwan-action-icon {
    background: #2a2421;
    border-color: #423833;
    color: #dfd2c4;
}
.diwan-poem-box.night-mode .diwan-action-icon:hover {
    background: #503d36;
    color: #ffffff;
}
.diwan-poem-box.night-mode .diwan-poem-divider {
    color: #8c7f74;
}
.diwan-poem-box.night-mode .diwan-poem-divider::before,
.diwan-poem-box.night-mode .diwan-poem-divider::after {
    border-bottom-color: #3b322e;
}

/* Bottom Divider & Tags */
.diwan-poem-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #9c8e83;
    font-size: 0.95rem;
    margin: 2rem 0 1.25rem;
}
.diwan-poem-divider::before,
.diwan-poem-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e7dfd5;
}
.diwan-poem-divider span {
    padding: 0 1rem;
}

.diwan-poem-tags {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}
.diwan-tag-pill {
    display: inline-block;
    padding: 0.35rem 1.4rem;
    background: #503d36;
    color: #ffffff !important;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
}
.diwan-tag-pill:hover {
    background: #685046;
}

/* Previous Page / Pagination Box */
.diwan-prev-card {
    text-align: center;
    padding: 1rem 1.5rem;
    margin-right: auto;
    width: 240px;
}
.diwan-prev-label {
    display: block;
    color: #b98b42;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.diwan-prev-title {
    color: #3b2e27;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
}
.diwan-prev-title:hover {
    text-decoration: underline;
}

/* Toast Message */
#diwan-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #503d36;
    color: #ffffff;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 0.95rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}
#diwan-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Comments Section Enhancement */
.diwan-comments-box {
    margin-top: 1.5rem;
}
.diwan-comments-box h2 {
    font-size: 1.25rem;
    color: #3b2e27;
    margin-bottom: 1.25rem;
}

/* Responsive Rules */
@media (max-width: 900px) {
    .diwan-grid {
        flex-direction: column-reverse;
    }
    .diwan-sidebar {
        width: 100%;
    }
    .diwan-poem-box {
        padding: 1.25rem;
    }
    .diwan-bayt {
        gap: 1.5rem;
        padding: 0.6rem 0.25rem;
    }
    .diwan-shatr {
        font-size: 1.2rem;
        line-height: 2;
    }
    .diwan-prev-card {
        width: 100%;
        margin: 0;
    }
}
@media (max-width: 580px) {
    .diwan-bayt {
        flex-direction: column;
        gap: 0.4rem;
        text-align: center !important;
    }
    .diwan-shatr--first,
    .diwan-shatr--second {
        text-align: center;
    }
    .diwan-poem-toolbar {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
}

/* ==========================================================
   MY FAVORITES PAGE STYLES (Matching Diwan Design)
   ========================================================== */
.favorites-wrapper {
    max-width: 1300px;
    margin: 1.5rem auto 3.5rem;
    padding: 0 15px;
    direction: rtl;
    font-family: 'Cairo', sans-serif;
    color: #334155;
}

/* 1. Header Bar */
.favorites-header-bar {
    background: #ffffff;
    color: #0f172a;
    padding: 0.95rem 1.75rem;
    border-radius: 16px;
    border: 1px solid #edf2f7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    margin-bottom: 1.5rem;
}

.favorites-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.favorites-title i {
    color: #f97316;
    font-size: 1.25rem;
}

.favorites-count-badge {
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #fed7aa;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.2rem 0.75rem;
    border-radius: 14px;
}

/* 2. Main Content Card */
.favorites-main-card {
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    padding: 4.5rem 2rem;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Empty State */
.favorites-empty-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.favorites-empty-icon {
    font-size: 56px;
    color: #f97316;
    opacity: 0.85;
    margin-bottom: 1.25rem;
    display: inline-block;
}

.favorites-empty-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.5rem;
}

.favorites-empty-desc {
    font-size: 1rem;
    color: #64748b;
    margin: 0 0 1.5rem;
    font-weight: 400;
}

.favorites-btn-explore {
    background: #f97316;
    color: #ffffff !important;
    padding: 0.5rem 1.6rem;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
}
.favorites-btn-explore:hover {
    background: #ea580c;
}

/* Populated List */
.favorites-list {
    width: 100%;
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: right;
}

.favorites-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
}
.favorites-item:last-child {
    border-bottom: none;
}
.favorites-item:hover {
    background: #f8fafc;
    border-radius: 8px;
}

.favorites-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.favorites-heart-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff7ed;
    color: #f97316;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.favorites-text h4 {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    font-weight: 700;
}
.favorites-text h4 a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.2s;
}
.favorites-text h4 a:hover {
    color: #ea580c;
}

.favorites-meta {
    font-size: 0.85rem;
    color: #64748b;
}
.favorites-meta a {
    color: #f97316;
    font-weight: 600;
    text-decoration: none;
}
.favorites-meta a:hover {
    text-decoration: underline;
}

.favorites-btn-remove {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 0.3rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #dc2626;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.15s ease;
}
.favorites-btn-remove:hover {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
}

/* Pagination */
.favorites-pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 0.4rem;
}
.favorites-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.15s ease;
}
.favorites-page-link:hover, .favorites-page-link.active {
    background: #f97316;
    color: #ffffff;
    border-color: #f97316;
}

/* ==========================================================
   MY POEMS PAGE STYLES (Matching Diwan Design)
   ========================================================== */
.my-poems-wrapper {
    max-width: 1300px;
    margin: 1.5rem auto 3.5rem;
    padding: 0 15px;
    direction: rtl;
    font-family: 'Cairo', sans-serif;
    color: #2c2523;
}

/* 1. Header Bar */
.my-poems-header-bar {
    background: #503d36;
    color: #ffffff;
    padding: 0.95rem 1.75rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(80, 61, 54, 0.12);
    margin-bottom: 1.5rem;
}

.my-poems-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.my-poems-title i {
    color: #d4be9d;
    font-size: 1.25rem;
}

.my-poems-count-badge {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.2rem 0.75rem;
    border-radius: 14px;
}

/* 2. Main Content Card */
.my-poems-main-card {
    background: #ffffff;
    border: 1px solid #e7ded5;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    padding: 4.5rem 2rem;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Empty State */
.my-poems-empty-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.my-poems-empty-icon {
    font-size: 56px;
    color: #d4be9d;
    opacity: 0.85;
    margin-bottom: 1.25rem;
    display: inline-block;
}

.my-poems-empty-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #3b2e27;
    margin: 0 0 0.5rem;
}

.my-poems-empty-desc {
    font-size: 1rem;
    color: #8c7f76;
    margin: 0 0 1.5rem;
    font-weight: 400;
}

.my-poems-btn-explore {
    background: #503d36;
    color: #ffffff !important;
    padding: 0.5rem 1.6rem;
    border-radius: 20px;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
}
.my-poems-btn-explore:hover {
    background: #685046;
}

/* Populated List */
.my-poems-list {
    width: 100%;
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: right;
}

.my-poems-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem 1rem;
    border-bottom: 1px solid #f2ece3;
    transition: background-color 0.2s ease;
}
.my-poems-item:last-child {
    border-bottom: none;
}
.my-poems-item:hover {
    background: #fdfaf6;
    border-radius: 8px;
}

.my-poems-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}
.my-poems-avatar-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f5efe6;
    color: #503d36;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    border: 1px solid #e7dfd5;
}

.my-poems-text h4 {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    font-weight: 700;
}
.my-poems-text h4 a {
    color: #2c2523;
    text-decoration: none;
    transition: color 0.2s;
}
.my-poems-text h4 a:hover {
    color: #b98b42;
}

.my-poems-meta {
    font-size: 0.85rem;
    color: #8c7f76;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.my-poems-meta a {
    color: #503d36;
    font-weight: 600;
    text-decoration: none;
}
.my-poems-meta a:hover {
    text-decoration: underline;
}

/* Status badges */
.my-poems-status {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}
.my-poems-status--pending {
    background: #fff8e1;
    color: #f57f17;
}
.my-poems-status--published {
    background: #e8f5e9;
    color: #2e7d32;
}
.my-poems-status--archived {
    background: #fce4ec;
    color: #c62828;
}
.my-poems-status--draft {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* Rejection reason display */
.my-poems-rejection {
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    background: #fff3e0;
    border: 1px solid #ffe0b2;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #e65100;
    text-align: right;
}
.my-poems-rejection-label {
    font-weight: 700;
    color: #bf360c;
    margin-bottom: 0.25rem;
    display: block;
}

/* Action buttons */
.my-poems-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
}
.my-poems-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    border: none;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.my-poems-btn--edit {
    background: #503d36;
    color: #ffffff;
}
.my-poems-btn--edit:hover {
    background: #685046;
}
.my-poems-btn--view {
    background: #f5efe6;
    color: #503d36;
    border: 1px solid #e7dfd5;
}
.my-poems-btn--view:hover {
    background: #e7ded5;
}

/* Pagination */
.my-poems-pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 0.4rem;
}
.my-poems-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border: 1px solid #ded5cb;
    border-radius: 6px;
    color: #503d36;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.15s ease;
}
.my-poems-page-link:hover, .my-poems-page-link.active {
    background: #503d36;
    color: #ffffff;
    border-color: #503d36;
}

/* Edit mode notice */
.my-poems-edit-notice {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    color: #1565c0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.my-poems-edit-notice i {
    font-size: 1.25rem;
}

/* === PAGE: header.php — User Navigation Dropdown === */
/* Profile Pill & Dropdown Styles */
.user-nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.user-nav-btn {
    background: #503d36;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 5px 12px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    font-weight: 700;
box-shadow: 0 2px 6px rgba(80, 61, 54, 0.2);
}
.user-nav-btn:hover, .user-nav-dropdown.active .user-nav-btn {
    background: #634c44;
}
.user-nav-name {
    color: #ffffff;
    line-height: 1;
}
.user-nav-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    background: #dfd8d0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.user-nav-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.user-nav-avatar i {
    font-size: 15px;
    color: #ffffff;
}
.user-nav-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    background: #ffffff;
    border: 1px solid #e7ded5;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
    padding: 6px 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
}
.user-nav-dropdown.active .user-nav-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.user-nav-item-top {
    display: block;
    padding: 9px 18px;
    color: #2b231f;
    font-size: 15px;
    font-weight: 700;
    text-align: right;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.user-nav-item-top:hover {
    background: #fbf8f4;
    color: #503d36;
}
.user-nav-logout-btn {
    all: unset;
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 9px 18px;
    color: #2b231f;
    font-size: 15px;
    font-weight: 700;
    text-align: right;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease, color 0.15s ease;
}
.user-nav-logout-btn:hover {
    background: #fbf8f4;
    color: #503d36;
}
.user-nav-divider {
    border-top: 1px solid #ede5dc;
    margin: 6px 0;
}
.user-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 18px;
    color: #2b231f;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.user-nav-item:hover {
    background: #fbf8f4;
    color: #503d36;
}
.user-nav-item i {
    font-size: 16px;
    color: #2b231f;
    width: 20px;
    text-align: center;
    transition: color 0.15s ease;
}
.user-nav-item:hover i {
    color: #503d36;
}

/* === PAGE: notifications.php — Notification Center === */
/* ==========================================================
   NOTIFICATIONS PAGE STYLES (Matching Provided Design)
   ========================================================== */
.notifications-wrapper {
    max-width: 1300px;
    margin: 1.5rem auto 3.5rem;
    padding: 0 15px;
    direction: rtl;
    font-family: 'Cairo', sans-serif;
    color: #334155;
}

/* 1. Header Bar */
.notifications-header-bar {
    background: #ffffff;
    color: #0f172a;
    padding: 0.95rem 1.75rem;
    border-radius: 16px;
    border: 1px solid #edf2f7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    margin-bottom: 1.5rem;
}

.notifications-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.notifications-title i {
    color: #f97316;
    font-size: 1.25rem;
}

.notifications-mark-all-btn {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 0.35rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}
.notifications-mark-all-btn:hover {
    background: #f1f5f9;
}

/* 2. Main Content Card */
.notifications-main-card {
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    padding: 4.5rem 2rem;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Empty State */
.notifications-empty-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.notifications-empty-icon {
    font-size: 56px;
    color: #f97316;
    opacity: 0.85;
    margin-bottom: 1.25rem;
    display: inline-block;
}

.notifications-empty-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.5rem;
}

.notifications-empty-desc {
    font-size: 1rem;
    color: #64748b;
    margin: 0;
    font-weight: 400;
}

/* Notification Item List (when populated) */
.notifications-list {
    width: 100%;
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: right;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.25rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
}
.notification-item:last-child {
    border-bottom: none;
}
.notification-item.unread {
    background: #fff7ed;
    border-radius: 8px;
}

.notification-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.notification-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff7ed;
    color: #f97316;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.notification-text h4 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}
.notification-text p {
    margin: 0 0 0.35rem;
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
}
.notification-time {
    font-size: 0.8rem;
    color: #94a3b8;
}

.notification-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}
.notification-btn-read {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 0.25rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}
.notification-btn-read:hover {
    background: #f97316;
    color: #ffffff;
    border-color: #f97316;
}

@media (max-width: 460px) {
    .notification-item {
        flex-wrap: wrap;
    }
    .notification-content {
        flex: 1 1 100%;
        min-width: 0;
    }
    .notification-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* === PAGE: my-followed-poets.php — Followed Poets List === */
/* ==========================================================
   MY FOLLOWED POETS PAGE STYLES (Matching Diwan Design)
   ========================================================== */
.follows-wrapper {
    max-width: 1300px;
    margin: 1.5rem auto 3.5rem;
    padding: 0 15px;
    direction: rtl;
    font-family: 'Cairo', sans-serif;
    color: #2c2523;
}

/* 1. Header Bar */
.follows-header-bar {
    background: #503d36;
    color: #ffffff;
    padding: 0.95rem 1.75rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(80, 61, 54, 0.12);
    margin-bottom: 1.5rem;
}

.follows-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.follows-title i {
    color: #d4be9d;
    font-size: 1.25rem;
}

.follows-count-badge {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.2rem 0.75rem;
    border-radius: 14px;
}

/* 2. Main Content Card */
.follows-main-card {
    background: #ffffff;
    border: 1px solid #e7ded5;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    padding: 4.5rem 2rem;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Empty State */
.follows-empty-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.follows-empty-icon {
    font-size: 56px;
    color: #d4be9d;
    opacity: 0.85;
    margin-bottom: 1.25rem;
    display: inline-block;
}

.follows-empty-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #3b2e27;
    margin: 0 0 0.5rem;
}

.follows-empty-desc {
    font-size: 1rem;
    color: #8c7f76;
    margin: 0 0 1.5rem;
    font-weight: 400;
}

.follows-btn-explore {
    background: #503d36;
    color: #ffffff !important;
    padding: 0.5rem 1.6rem;
    border-radius: 20px;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
}
.follows-btn-explore:hover {
    background: #685046;
}

/* Populated List */
.follows-list {
    width: 100%;
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: right;
}

.follows-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem 1rem;
    border-bottom: 1px solid #f2ece3;
    transition: background-color 0.2s ease;
}
.follows-item:last-child {
    border-bottom: none;
}
.follows-item:hover {
    background: #fdfaf6;
    border-radius: 8px;
}

.follows-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.follows-avatar-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f5efe6;
    color: #503d36;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    border: 1px solid #e7dfd5;
}

.follows-text h4 {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    font-weight: 700;
}
.follows-text h4 a {
    color: #2c2523;
    text-decoration: none;
    transition: color 0.2s;
}
.follows-text h4 a:hover {
    color: #b98b42;
}

.follows-meta {
    font-size: 0.85rem;
    color: #8c7f76;
}

.follows-btn-remove {
    background: none;
    border: 1px solid #ded5cb;
    border-radius: 16px;
    padding: 0.3rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #8c7f76;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.15s ease;
}
.follows-btn-remove:hover {
    background: #c62828;
    color: #ffffff;
    border-color: #c62828;
}

/* Pagination */
.follows-pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 0.4rem;
}
.follows-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border: 1px solid #ded5cb;
    border-radius: 6px;
    color: #503d36;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.15s ease;
}
.follows-page-link:hover, .follows-page-link.active {
    background: #503d36;
    color: #ffffff;
    border-color: #503d36;
}

/*==================================================
  COMMUNITY MY FEED (قصائدي المتجدّدة)
==================================================*/
.feed-wrapper {
    max-width: 1300px;
    margin: 1.5rem auto 3.5rem;
    padding: 0 15px;
    direction: rtl;
    font-family: 'Cairo', sans-serif;
    color: #334155;
}

.feed-header-bar {
    background: #ffffff;
    color: #0f172a;
    padding: 0.95rem 1.75rem;
    border-radius: 16px;
    border: 1px solid #edf2f7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    margin-bottom: 1.5rem;
}

.feed-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.feed-title i {
    color: #f97316;
    font-size: 1.25rem;
}

.feed-count-badge {
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #fed7aa;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.2rem 0.75rem;
    border-radius: 14px;
}

.feed-main-card {
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    padding: 2rem 1.25rem;
}

/* Empty State */
.feed-empty-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2.5rem 1rem;
}

.feed-empty-icon {
    font-size: 56px;
    color: #f97316;
    opacity: 0.85;
    margin-bottom: 1.25rem;
    display: inline-block;
}

.feed-empty-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.5rem;
}

.feed-empty-desc {
    font-size: 1rem;
    color: #64748b;
    margin: 0 0 1.5rem;
    font-weight: 400;
}

.feed-btn-explore {
    background: #f97316;
    color: #ffffff !important;
    padding: 0.5rem 1.6rem;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
}
.feed-btn-explore:hover {
    background: #ea580c;
}
.feed-btn-ghost {
    background: transparent;
    color: #475569 !important;
    border: 1px solid #e2e8f0;
}
.feed-btn-ghost:hover {
    background: #f8fafc;
}

/* Populated List */
.feed-list {
    width: 100%;
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: right;
}

.feed-item {
    padding: 1.1rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
}
.feed-item:last-child {
    border-bottom: none;
}
.feed-item:hover {
    background: #f8fafc;
    border-radius: 8px;
}

.feed-item-main h4 {
    margin: 0 0 0.4rem;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.feed-poem-title a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.2s;
}
.feed-poem-title a:hover {
    color: #ea580c;
}

.feed-new-badge {
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #fed7aa;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.15rem 0.6rem;
    border-radius: 12px;
    white-space: nowrap;
}

.feed-poem-meta {
    font-size: 0.9rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.feed-poet {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 700;
    color: #f97316;
}
.feed-poet a {
    color: #f97316;
    text-decoration: none;
}
.feed-poet a:hover {
    color: #ea580c;
}

.feed-item-date {
    margin-top: 0.5rem;
    font-size: 0.82rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Pagination */
.feed-pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 0.4rem;
}
.feed-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.15s ease;
}
.feed-page-link:hover, .feed-page-link.active {
    background: #f97316;
    color: #ffffff;
    border-color: #f97316;
}

/*==================================================
  DISCOVERY PAGE (اكتشف الشعر)
==================================================*/
.discovery-container {
    width: 94%;
    max-width: 1300px;
    margin: 2rem auto 4rem;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
}

.discovery-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.discovery-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.discovery-grid-ai-trans {
    display: grid;
    grid-template-columns: 1fr 2.1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.discovery-grid-quotes {
    display: grid;
    grid-template-columns: 1fr 2.2fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.discovery-card {
    background: #ffffff;
    border: 1px solid #e5ddd5;
    border-radius: 12px;
    padding: 1.4rem 1.25rem 1.25rem;
    box-shadow: 0 2px 8px rgba(78, 67, 63, 0.03);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.discovery-card:hover {
    box-shadow: 0 6px 18px rgba(78, 67, 63, 0.08);
}

.discovery-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
}

.discovery-card-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #382e2b;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.discovery-card-title .card-heading-text {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.discovery-card-icon {
    font-size: 1.35rem;
    color: #382e2b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.discovery-links-col-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem 0.5rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.discovery-links-col-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem 0.6rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.discovery-text-link {
    color: #635750;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    padding: 0.25rem 0.35rem;
    border-radius: 6px;
    transition: all 0.15s ease;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.discovery-text-link:hover {
    color: #b98b42;
    background: #fdf9f5;
}

.discovery-card-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.2rem;
    padding-top: 0.5rem;
}

.discovery-btn-dark {
    background: #4e433f;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-family: inherit;
    min-width: 90px;
}

.discovery-btn-dark:hover {
    background: #382e2b;
    color: #ffffff;
box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.discovery-chips-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.65rem 0.85rem;
    margin: 1.75rem 0 1.25rem;
    font-size: 0.95rem;
    color: #4e433f;
}

.discovery-strip-label {
    font-weight: 800;
    color: #554a44;
    margin-left: 0.25rem;
}

.discovery-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid #3b82f6;
    color: #2563eb;
    border-radius: 4px;
    padding: 0.2rem 0.7rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    background: #f8fafc;
    transition: all 0.15s ease;
}

.discovery-chip i {
    font-size: 0.8rem;
}

.discovery-chip:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.discovery-alphabet-bar {
    background: #4e433f;
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    margin: 1rem 0 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 0.85rem;
    flex-wrap: wrap;
    box-shadow: 0 3px 10px rgba(78, 67, 63, 0.1);
}

.discovery-alphabet-label {
    color: #ffffff;
    font-weight: 800;
    font-size: 1.15rem;
    margin-left: 0.75rem;
    white-space: nowrap;
}

.discovery-alphabet-letter {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    transition: all 0.15s ease;
    display: inline-block;
    min-width: 1.5rem;
    text-align: center;
}

.discovery-alphabet-letter:hover {
    color: #fbd38d;
    background: rgba(255, 255, 255, 0.15);
}

.discovery-pills-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    justify-content: center;
    margin: 0.5rem 0 1.25rem;
}

.discovery-pill {
    border: 1px solid #d6cdc4;
    border-radius: 24px;
    padding: 0.45rem 1.15rem;
    color: #554a44;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    background: #ffffff;
    transition: all 0.2s ease;
    display: inline-block;
}

.discovery-pill:hover {
    border-color: #4e433f;
    color: #2d2522;
    background: #faf6f2;
box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.discovery-card-translated {
    background: #4e433f;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    box-shadow: 0 4px 14px rgba(78, 67, 63, 0.2);
}

.discovery-card-translated-icon {
    font-size: 2rem;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.discovery-card-translated-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    line-height: 1.4;
}

.discovery-btn-outline-white {
    border: 1px solid rgba(255, 255, 255, 0.7);
    color: #ffffff;
    border-radius: 6px;
    padding: 0.45rem 1.75rem;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
}

.discovery-btn-outline-white:hover {
    background: #ffffff;
    color: #4e433f;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .discovery-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .discovery-grid-ai-trans {
        grid-template-columns: 1fr;
    }
    .discovery-grid-quotes {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .discovery-grid-3,
    .discovery-grid-2 {
        grid-template-columns: 1fr;
    }
    .discovery-links-col-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .discovery-alphabet-bar {
        gap: 0.35rem 0.5rem;
    }
    .discovery-alphabet-letter {
        font-size: 1rem;
        min-width: 1.2rem;
    }
}

/*==================================================
  POETRY LISTING PAGE (صفحة تصفح الأشعار)
==================================================*/
.poetry-page-container {
    width: 94%;
    max-width: 1300px;
    margin: 2rem auto 4rem;
    padding: 0 15px;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
}

.poetry-hero {
    background: linear-gradient(135deg, #3d312e 0%, #564742 100%);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    color: #ffffff;
    text-align: center;
    box-shadow: 0 8px 24px rgba(61, 49, 46, 0.2);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.poetry-hero::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(251, 211, 141, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.poetry-hero-title {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 0.5rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.poetry-hero-desc {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.88);
    margin: 0 auto 1.5rem;
    max-width: 650px;
    line-height: 1.6;
}

.poetry-search-form {
    max-width: 600px;
    margin: 0 auto 1.75rem;
    display: flex;
    gap: 0.5rem;
    background: #ffffff;
    border-radius: 30px;
    padding: 0.35rem 0.5rem 0.35rem 1.25rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.poetry-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 1rem;
    color: #2d2522;
    background: transparent;
    padding: 0.4rem 0.5rem;
}

.poetry-search-btn {
    background: #b98b42;
    color: #ffffff;
    border: none;
    border-radius: 24px;
    padding: 0.55rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

.poetry-search-btn:hover {
    background: #9d7331;
}

.poetry-stats-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 1.25rem;
    margin-top: 1rem;
}

.poetry-stat-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

.poetry-stat-num {
    font-weight: 800;
    color: #fbd38d;
    font-size: 1.1rem;
}

/* Filter Bar */
.poetry-filter-bar {
    background: #ffffff;
    border: 1px solid #e7dfd6;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(78, 67, 63, 0.03);
}

.poetry-filter-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.poetry-filter-select {
    border: 1px solid #d8cec4;
    border-radius: 8px;
    padding: 0.45rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    color: #4a3e39;
    background: #ffffff;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.poetry-filter-select:hover,
.poetry-filter-select:focus {
    border-color: #b98b42;
}

.poetry-filter-reset {
    color: #c53030;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.poetry-filter-reset:hover {
    background: #fff5f5;
}

/* Poems Grid */
.poetry-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.poem-rich-card {
    background: #ffffff;
    border: 1px solid #e7dfd6;
    border-radius: 14px;
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(78, 67, 63, 0.03);
}

.poem-rich-card:hover {
box-shadow: 0 8px 20px rgba(78, 67, 63, 0.08);
    border-color: #cfc1b4;
}

.poem-poet-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.poem-poet-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.poem-poet-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f4ede4;
    color: #7d5e28;
    font-weight: 800;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2d6c8;
}

.poem-poet-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #4a3e39;
    text-decoration: none;
    transition: color 0.15s ease;
}

.poem-poet-name:hover {
    color: #b98b42;
}

.poem-badge-era {
    background: #f6efe7;
    color: #8c6a2e;
    border-radius: 6px;
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 700;
}

.poem-card-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #2c2421;
    margin: 0 0 0.85rem;
    line-height: 1.4;
}

.poem-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

.poem-card-title a:hover {
    color: #b98b42;
}

.poem-verse-box {
    background: #faf6f0;
    border-right: 3px solid #b98b42;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.15rem;
    text-align: center;
}

.poem-verse-hemistich-1,
.poem-verse-hemistich-2 {
    font-family: 'Amiri', 'Cairo', serif;
    font-size: 1.02rem;
    color: #423631;
    line-height: 1.6;
}

.poem-verse-divider {
    color: #b98b42;
    font-size: 0.8rem;
    margin: 0.15rem 0;
}

.poem-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #f0e8e0;
    padding-top: 0.85rem;
    margin-top: 0.5rem;
}

.poem-meta-chips {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.poem-meta-chip {
    font-size: 0.82rem;
    color: #7a6e67;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.poem-meta-chip i {
    color: #b98b42;
    font-size: 0.78rem;
}

.poem-read-btn {
    background: #4e433f;
    color: #ffffff;
    border-radius: 8px;
    padding: 0.4rem 1.15rem;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

.poem-read-btn:hover {
    background: #382e2b;
    color: #ffffff;
}

/* Empty State */
.poetry-empty-state {
    background: #ffffff;
    border: 1px dashed #d6ccc2;
    border-radius: 16px;
    padding: 3.5rem 2rem;
    text-align: center;
    margin: 2rem 0;
}

.poetry-empty-icon {
    font-size: 3rem;
    color: #c4b6a8;
    margin-bottom: 1rem;
}

.poetry-empty-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #4a3e39;
    margin: 0 0 0.5rem;
}

.poetry-empty-desc {
    color: #7e7169;
    font-size: 1rem;
    margin: 0 0 1.5rem;
}

@media (max-width: 680px) {
    .poetry-cards-grid {
        grid-template-columns: 1fr;
    }
    .poetry-hero {
        padding: 2rem 1.25rem;
    }
    .poetry-hero-title {
        font-size: 1.6rem;
    }
    .poetry-search-form {
        flex-direction: column;
        border-radius: 12px;
        padding: 0.5rem;
    }
    .poetry-search-btn {
        width: 100%;
        justify-content: center;
    }
    .poetry-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .poetry-filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    .poetry-filter-select {
        width: 100%;
    }
}

/* =========================================================
   PUBLISH POEM PAGE
   ========================================================= */

.publish-poem-page {
    padding: 2.5rem 0 4rem;
    direction: rtl;
    text-align: right;
}

.publish-poem-page .container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 15px;
}

/* User Profile Card (publish-poem.php) */
.publish-user-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 20px;
    padding: 1.25rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.publish-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.publish-user-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #edf2f7;
    flex-shrink: 0;
}

.publish-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.publish-user-details {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.publish-user-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    overflow-wrap: anywhere;
}

.publish-user-since {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

.publish-user-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: #f97316;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.28);
    transition: background 0.18s ease, transform 0.18s ease;
    flex-shrink: 0;
}

.publish-user-btn:hover {
    background: #ea580c;
    color: #ffffff;
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .publish-user-card {
        flex-wrap: wrap;
        padding: 1rem 1.25rem;
    }
    .publish-user-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Top Header Card */
.publish-header-box {
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 14px;
    padding: 1.25rem 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.publish-header-title {
    font-family: 'Amiri', 'Cairo', serif;
    font-size: 1.45rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.publish-header-title i {
    font-size: 1.15rem;
    color: #f97316;
}

/* Publishing Form Card */
.publish-card {
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 14px;
    padding: 2.25rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.publish-form {
    display: flex;
    flex-direction: column;
}

/* Form Groups */
.p-form-group {
    margin-bottom: 1.75rem;
    position: relative;
}

.p-form-label {
    display: block;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 1.02rem;
    color: #0f172a;
    margin-bottom: 0.35rem;
}

.p-form-hint {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.55;
    margin-bottom: 0.65rem;
}

/* Form Controls */
.p-form-control,
.p-form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    color: #0f172a;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.p-form-control:focus,
.p-form-select:focus,
.p-form-textarea:focus {
    background-color: #ffffff;
    border-color: #f97316;
    outline: none;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

.p-form-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 1rem center;
    background-size: 12px;
    padding-left: 2.5rem;
    appearance: none;
    -webkit-appearance: none;
}

/* File Input Wrapper */
.p-file-input-wrapper {
    background: #ffffff;
    border: 1px dashed #e2e8f0;
    border-radius: 8px;
    padding: 0.6rem 0.85rem;
    transition: border-color 0.2s ease;
}

.p-file-input-wrapper:hover {
    border-color: #f97316;
}

.p-file-control {
    width: 100%;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    color: #475569;
    cursor: pointer;
}

/* Character Counter */
.p-char-counter {
    font-size: 0.82rem;
    color: #94a3b8;
    text-align: left;
    direction: ltr;
    margin-top: 0.35rem;
}

/* Poem Example Card */
.poem-example-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.poem-example-header {
    background: #f1f5f9;
    color: #475569;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.poem-example-body {
    padding: 0.85rem 1rem;
    font-family: 'Amiri', 'Traditional Arabic', serif;
    font-size: 1.08rem;
    color: #334155;
    line-height: 1.85;
}

.poem-example-line {
    padding: 0.15rem 0;
}

/* Textarea */
.p-form-textarea {
    width: 100%;
    font-family: 'Amiri', 'Traditional Arabic', serif;
    font-size: 1.18rem;
    line-height: 1.95;
    color: #0f172a;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    box-sizing: border-box;
    resize: vertical;
    min-height: 260px;
    transition: all 0.2s ease;
}

/* Form Actions */
.p-form-actions {
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-start;
}

.btn-publish-submit {
    background: #f97316;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 2.5rem;
    font-family: 'Cairo', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.25);
}

.btn-publish-submit:hover {
    background: #ea580c;
    color: #ffffff;
box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35);
}

.btn-publish-submit:active {
    transform: translateY(0);
}

/* Alerts */
.publish-msg-alert {
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
}

.publish-msg-alert i {
    font-size: 1.25rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.publish-msg-alert--success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
}

.publish-msg-alert--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.publish-msg-actions {
    margin-top: 0.65rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-msg-link {
    background: #ffffff;
    border: 1px solid #a7f3d0;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #047857;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

.btn-msg-link:hover {
    background: #ecfdf5;
    color: #065f46;
}

@media (max-width: 600px) {
    .publish-card {
        padding: 1.5rem 1rem;
    }
    .publish-header-box {
        padding: 1rem 1.25rem;
    }
    .btn-publish-submit {
        width: 100%;
        justify-content: center;
    }
}

/* =========================================================
   MEMBERS & COMMUNITY PAGE
   ========================================================= */

.members-page-wrapper {
    padding: 2.5rem 0 4rem;
    direction: rtl;
    text-align: right;
}

.members-page-wrapper .container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Hero Section */
.members-hero-card {
    background: #ffffff;
    border: 1px solid #e8e2d8;
    border-radius: 16px;
    padding: 2.25rem 2.5rem;
    margin-bottom: 1.75rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.members-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: #f5efe6;
    color: #635248;
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.85rem;
}

.members-hero-title {
    font-family: 'Amiri', 'Cairo', serif;
    font-size: 1.85rem;
    font-weight: 800;
    color: #3b2e27;
    margin: 0 0 0.5rem;
}

.members-hero-desc {
    color: #7a6e65;
    font-size: 0.98rem;
    line-height: 1.6;
    margin: 0 0 1.75rem;
    max-width: 720px;
}

/* Stats Bar */
.members-stats-bar {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.members-stat-pill {
    background: #fcfaf7;
    border: 1px solid #eadfd4;
    border-radius: 12px;
    padding: 0.65rem 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.members-stat-pill i {
    color: #8c7d72;
    font-size: 1.1rem;
}

.members-stat-val {
    font-family: 'Cairo', sans-serif;
    font-weight: 800;
    font-size: 1.15rem;
    color: #3b2e27;
}

.members-stat-lbl {
    font-size: 0.85rem;
    color: #7a6e65;
}

/* Filter Box */
.members-filter-box {
    background: #ffffff;
    border: 1px solid #e8e2d8;
    border-radius: 14px;
    padding: 1.25rem 1.75rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.members-filter-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.members-search-group {
    position: relative;
    flex: 1 1 280px;
}

.members-search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9c8e83;
    pointer-events: none;
}

.members-search-input {
    width: 100%;
    padding: 0.7rem 2.6rem 0.7rem 1rem;
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    color: #2c221e;
    background-color: #fdfcfb;
    border: 1px solid #dcd5cc;
    border-radius: 8px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.members-search-input:focus,
.members-select-control:focus {
    background-color: #ffffff;
    border-color: #50453e;
    outline: none;
    box-shadow: 0 0 0 3px rgba(80, 69, 62, 0.08);
}

.members-filters-group {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    align-items: center;
}

.members-select-control {
    padding: 0.7rem 2.2rem 0.7rem 0.85rem;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    color: #2c221e;
    background-color: #fdfcfb;
    border: 1px solid #dcd5cc;
    border-radius: 8px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23665a52' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 0.85rem center;
    background-size: 11px;
    appearance: none;
    -webkit-appearance: none;
}

.btn-members-search {
    background: #463d37;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0.7rem 1.4rem;
    font-family: 'Cairo', sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: all 0.2s ease;
}

.btn-members-search:hover {
    background: #332c27;
}

.btn-members-reset {
    background: #f4ede4;
    color: #5b4c44;
    border: 1px solid #dcd2c5;
    border-radius: 8px;
    padding: 0.7rem 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-members-reset:hover {
    background: #e6dacd;
}

.members-results-info {
    margin-top: 0.85rem;
    font-size: 0.86rem;
    color: #8c7d72;
}

/* Members Grid */
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

/* Member Card */
.member-card {
    background: #ffffff;
    border: 1px solid #e8e2d8;
    border-radius: 14px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.member-card:hover {
    border-color: #d6ccc0;
box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
}

.member-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.15rem;
    padding-bottom: 1.15rem;
    border-bottom: 1px solid #f2ece4;
}

.member-avatar-wrap {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #f7f3ee;
    border: 2px solid #e5dcce;
    display: flex;
    align-items: center;
    justify-content: center;
}

.member-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: #ede3d6;
    color: #4a3e37;
    font-family: 'Amiri', serif;
    font-size: 1.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.member-identity {
    flex: 1;
    min-width: 0;
}

.member-username {
    font-family: 'Cairo', sans-serif;
    font-size: 1.12rem;
    font-weight: 700;
    color: #3b2e27;
    margin: 0 0 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-verified-icon {
    color: #b98b42;
    font-size: 0.92rem;
}

/* Badges */
.member-type-badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 12px;
    font-size: 0.76rem;
    font-weight: 700;
}

.badge-community-poet {
    background: #fbf0e1;
    color: #9c6819;
    border: 1px solid #f2dab7;
}

.badge-poet {
    background: #eef6f0;
    color: #2b7a4b;
    border: 1px solid #c9e8d4;
}

.badge-admin {
    background: #fde8e8;
    color: #b91c1c;
    border: 1px solid #f8b4b4;
}

.badge-member {
    background: #f4efe9;
    color: #706056;
    border: 1px solid #e2d7cb;
}

/* Body Stats */
.member-card-body {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.member-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    color: #63574e;
}

.member-detail-label {
    color: #8c7d72;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.member-detail-label i {
    font-size: 0.82rem;
}

.member-detail-val strong {
    color: #3b2e27;
}

/* Card Actions */
.member-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.btn-member-action {
    flex: 1;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

.btn-member-poet {
    background: #fcfaf7;
    color: #50453e;
    border: 1px solid #dcd2c5;
}

.btn-member-poet:hover {
    background: #f0e6d9;
    color: #2c221e;
}

.btn-member-msg {
    background: #463d37;
    color: #ffffff;
    border: 1px solid #463d37;
}

.btn-member-msg:hover {
    background: #332c27;
    border-color: #332c27;
    color: #ffffff;
}

/* Empty State */
.members-empty-state {
    background: #ffffff;
    border: 1px dashed #dcd2c5;
    border-radius: 16px;
    padding: 3.5rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.members-empty-icon {
    font-size: 3rem;
    color: #c9bbae;
    margin-bottom: 1rem;
}

.members-empty-title {
    font-family: 'Cairo', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: #4a3e39;
    margin: 0 0 0.5rem;
}

.members-empty-desc {
    color: #7e7169;
    font-size: 0.95rem;
    margin: 0 0 1.5rem;
}

.btn-members-clear {
    background: #463d37;
    color: #ffffff;
    padding: 0.65rem 1.75rem;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

.btn-members-clear:hover {
    background: #332c27;
}

/* Pagination */
.members-pagination-nav {
    display: flex;
    justify-content: center;
    margin: 2rem 0 1rem;
}

.members-pagination-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.4rem;
    align-items: center;
}

.members-page-link {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
    border-radius: 8px;
    border: 1px solid #dcd2c5;
    background: #ffffff;
    color: #4a3e39;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.members-page-link:hover {
    background: #f5ece1;
    border-color: #cbbcae;
    color: #2c221e;
}

.members-page-link.is-active {
    background: #463d37;
    border-color: #463d37;
    color: #ffffff;
}

.members-page-ellipsis {
    color: #9c8e83;
    padding: 0 0.3rem;
}

@media (max-width: 768px) {
    .members-hero-card {
        padding: 1.75rem 1.25rem;
    }
    .members-hero-title {
        font-size: 1.5rem;
    }
    .members-filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    .members-filters-group {
        flex-direction: column;
        align-items: stretch;
    }
    .btn-members-search {
        justify-content: center;
    }
}

/* =========================================
   V2.4 UI CONSISTENCY — MISSING NOTE CLASSES
   ========================================= */

.date-stamp {
    font-weight: 600;
}

/* =========================================
   V2.4 — READING MODE (poem view only; Create Poem page NOT affected)
   ========================================= */
.diwan-reading-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    padding: 0.75rem 1rem;
    margin: 0 0 0.5rem;
    background: #faf6ef;
    border: 1px solid #efe6d8;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #503d36;
}
.diwan-reading-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.diwan-reading-lbl {
    color: #8c7f76;
    margin-inline-end: 0.25rem;
    white-space: nowrap;
}
.diwan-reading-btn {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e7dfd5;
    background: #ffffff;
    border-radius: 6px;
    color: #503d36;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s ease;
}
.diwan-reading-btn:hover {
    background: #503d36;
    color: #ffffff;
    border-color: #503d36;
}
.diwan-reading-btn.active {
    background: #b98b42;
    color: #ffffff;
    border-color: #b98b42;
}
.diwan-reading-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-inline-start: auto;
}
.diwan-reading-pos {
    font-variant-numeric: tabular-nums;
    color: #8c7f76;
    min-width: 5.5rem;
    text-align: center;
}

/* Typography scaled via CSS custom properties set by JS */
.diwan-poem-box.reading-mode .diwan-verses-body {
    font-size: var(--rm-font, 1.45rem);
}
.diwan-poem-box.reading-mode .diwan-shatr {
    font-size: var(--rm-font, 1.45rem);
    line-height: var(--rm-line, 2.2);
}
.diwan-poem-box.reading-mode .diwan-verses-body.rm-width-narrow {
    max-width: 720px;
    margin-inline: auto;
}
.diwan-poem-box.reading-mode .diwan-verses-body.rm-width-wide {
    max-width: 100%;
}

/* Hide explanation focus (narration only) */
.diwan-poem-box.reading-mode.hide-expl .diwan-bayt-notes,
.diwan-poem-box.reading-mode.hide-expl .diwan-poem-divider,
.diwan-poem-box.reading-mode.hide-expl .diwan-poem-tags {
    display: none;
}

/* Verse focus (single-current-verse emphasis) */
.diwan-poem-box.reading-mode.verse-focus .diwan-bayt {
    opacity: 0.35;
    transition: opacity 0.25s ease;
    border-radius: 8px;
}
.diwan-poem-box.reading-mode.verse-focus .diwan-bayt.is-current {
    opacity: 1;
    background: rgba(185, 139, 66, 0.10);
}

@media (max-width: 700px) {
    .diwan-reading-nav {
        margin-inline-start: 0;
        width: 100%;
    }
}


/* ========================================================
   MAQ — Modern Editorial Article design
   Moved verbatim from theme/note/article.php inline <style>
   ======================================================== */

/* Reset & Container */
.maq-page-wrap {
    background: transparent;
    color: #334155;
    font-family: 'Cairo', 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
    direction: rtl;
    text-align: right;
    padding: 2.5rem 0 4rem;
    min-height: 85vh;
    box-sizing: border-box;
}

.maq-container {
    width: 94%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Two-column layout: Main on Right (1fr), Sidebar on Left (320px) */
.maq-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    grid-template-areas: "main side";
    gap: 2rem;
    align-items: start;
}

.maq-main {
    grid-area: main;
    min-width: 0;
}

.maq-sidebar {
    grid-area: side;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 2rem;
}

/* ========================================================
   MAIN ARTICLE CARD
   ======================================================== */
.maq-article-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #edf2f7;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    padding: 2.25rem 2.5rem;
    box-sizing: border-box;
}

/* Top Trail / Breadcrumb */
.maq-top-trail {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 0.75rem;
}

.maq-top-trail a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}

.maq-top-trail a:hover {
    color: #f97316;
}

.maq-trail-sep {
    color: #cbd5e1;
    font-size: 0.8rem;
}

/* Main Article Title */
.maq-article-title {
    font-size: clamp(1.75rem, 3.2vw, 2.35rem);
    font-weight: 800;
    color: #0f172a;
    line-height: 1.42;
    margin: 0 0 1.5rem 0;
    letter-spacing: -0.02em;
}

/* Meta Bar: Author (Right) + Stats (Left) */
.maq-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 1.75rem;
}

.maq-meta-author-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.maq-meta-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.25);
}

.maq-meta-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.maq-meta-author-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.maq-meta-author-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
}

.maq-meta-date {
    font-size: 0.8rem;
    color: #94a3b8;
}

.maq-meta-stats {
    display: flex;
    align-items: center;
    gap: 1.15rem;
}

.maq-stat-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.88rem;
    color: #64748b;
    font-weight: 500;
}

.maq-ico-star { color: #f59e0b; font-size: 0.9rem; }
.maq-ico-clock { color: #64748b; font-size: 0.9rem; }
.maq-ico-eye { color: #64748b; font-size: 0.9rem; }
.maq-stat-val { font-weight: 600; color: #475569; }

/* Featured Hero Image */
.maq-featured-hero {
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 2rem;
    background: #f1f5f9;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.maq-hero-img {
    width: 100%;
    max-height: 460px;
    object-fit: cover;
    display: block;
}

.maq-hero-default {
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 50%, #ffedd5 100%);
    padding: 3.5rem 2rem;
    text-align: center;
}

.maq-hero-tag {
    display: inline-block;
    background: #f97316;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.35rem 1rem;
    border-radius: 9999px;
    margin-bottom: 1rem;
}

.maq-hero-tagline {
    font-size: 1.6rem;
    font-weight: 800;
    color: #7c2d12;
    margin: 0;
    line-height: 1.4;
}

/* Article Body Content */
.maq-body-content {
    font-size: 1.08rem;
    line-height: 2.05;
    color: #334155;
    margin-bottom: 2.5rem;
}

.maq-body-content p {
    margin: 0 0 1.5rem 0;
}

.maq-body-content h2,
.maq-body-content h3,
.maq-body-content h4 {
    color: #0f172a;
    font-weight: 800;
    line-height: 1.45;
    margin: 2.2rem 0 1rem 0;
}

.maq-body-content h2 { font-size: 1.45rem; }
.maq-body-content h3 { font-size: 1.25rem; }

.maq-body-content ul,
.maq-body-content ol {
    margin: 1.25rem 0 1.75rem 0;
    padding-inline-start: 1.75rem;
}

.maq-body-content li {
    margin-bottom: 0.65rem;
}

.maq-body-content a {
    color: #f97316;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
}

.maq-body-content a:hover {
    color: #ea580c;
}

.maq-body-content blockquote {
    background: #f8fafc;
    border-right: 4px solid #f97316;
    padding: 1.25rem 1.5rem;
    border-radius: 8px;
    margin: 1.75rem 0;
    font-style: italic;
    color: #475569;
}

/* Editor-origin content elements (safe allowlist: pre/code/hr). */
.maq-body-content pre {
    direction: ltr;
    text-align: left;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem 1.1rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    font-family: "Courier New", Consolas, monospace;
    font-size: 0.92rem;
    line-height: 1.65;
}

.maq-body-content code {
    direction: ltr;
    font-family: "Courier New", Consolas, monospace;
    font-size: 0.92em;
    background: #f1f5f9;
    border-radius: 4px;
    padding: 0.1em 0.35em;
}

.maq-body-content pre code {
    background: transparent;
    border-radius: 0;
    padding: 0;
}

.maq-body-content hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 2rem 0;
}

.maq-empty-body {
    color: #94a3b8;
    font-style: italic;
    padding: 1rem 0;
}

/* Promotional In-Article Banner */
.maq-promo-banner {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    border-radius: 12px;
    padding: 2.25rem 2rem;
    margin: 2.5rem 0;
    color: #ffffff;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.25);
}

.maq-promo-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.maq-promo-title {
    font-size: 1.65rem;
    font-weight: 800;
    margin: 0 0 1.25rem 0;
    color: #ffffff;
    position: relative;
    z-index: 1;
}

.maq-promo-btn {
    display: inline-block;
    background: #f97316;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.65rem 2.25rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35);
    position: relative;
    z-index: 1;
}

.maq-promo-btn:hover {
    background: #ea580c;
}

/* Gallery Section */
.maq-gallery-section {
    margin: 2.5rem 0;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
}

.maq-section-heading {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.25rem;
}

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

.maq-gallery-card {
    margin: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.maq-gallery-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.maq-gallery-card:hover img {
    opacity: 0.95;
}

.maq-gallery-card figcaption {
    padding: 0.5rem 0.75rem;
    font-size: 0.78rem;
    color: #64748b;
    text-align: center;
}

/* Tags Chips */
.maq-tags-wrap {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
    padding-top: 1rem;
}

.maq-tags-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #475569;
}

.maq-tags-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.maq-tag-chip {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    background: #f1f5f9;
    color: #475569;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.maq-tag-chip:hover {
    background: #f97316;
    color: #ffffff;
}

/* Share Bar */
.maq-share-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1.25rem 0;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    margin: 2rem 0;
}

.maq-share-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.maq-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.maq-share-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    transition: all 0.2s;
}

.maq-share-pill:hover {
    border-color: #cbd5e1;
}

.maq-share-wa:hover { background: #25D366; color: #fff; border-color: #25D366; }
.maq-share-x:hover { background: #000000; color: #fff; border-color: #000000; }
.maq-share-tg:hover { background: #229ED9; color: #fff; border-color: #229ED9; }
.maq-share-fb:hover { background: #1877F2; color: #fff; border-color: #1877F2; }

/* Previous / Next Article Navigation */
.maq-prevnext-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

.maq-pn-box {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s;
}

.maq-pn-box:hover {
    background: #ffffff;
    border-color: #f97316;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.1);
}

.maq-pn-direction {
    font-size: 0.78rem;
    font-weight: 700;
    color: #f97316;
}

.maq-pn-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.4;
}

/* ========================================================
   SIDEBAR CARDS
   ======================================================== */
.maq-side-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #edf2f7;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
    padding: 1.35rem 1.25rem;
    box-sizing: border-box;
}

.maq-side-card-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.15rem;
}

.maq-side-head-ico {
    color: #f97316;
    font-size: 1.1rem;
}

.maq-side-head-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
}

/* 1. Related Articles List */
.maq-related-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.maq-rel-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid #f1f5f9;
    transition: transform 0.15s;
}

.maq-rel-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.maq-rel-item:hover .maq-rel-title {
    color: #f97316;
}

.maq-rel-thumb {
    width: 58px;
    height: 58px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f1f5f9;
}

.maq-rel-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.maq-rel-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.2rem;
}

.maq-thumb-color-1 { background: linear-gradient(135deg, #f43f5e, #fb7185); }
.maq-thumb-color-2 { background: linear-gradient(135deg, #0ea5e9, #38bdf8); }
.maq-thumb-color-3 { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.maq-thumb-color-4 { background: linear-gradient(135deg, #10b981, #34d399); }
.maq-thumb-color-5 { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }

.maq-rel-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.maq-rel-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.maq-rel-meta {
    font-size: 0.72rem;
    color: #94a3b8;
}

.maq-side-empty {
    color: #94a3b8;
    font-size: 0.85rem;
    text-align: center;
    margin: 0.5rem 0;
}

/* Pill buttons inside sidecards */
.maq-btn-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 1rem;
    padding: 0.55rem 1rem;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    box-sizing: border-box;
}

.maq-btn-pill:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #334155;
}

.maq-btn-pill--orange {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #ea580c;
    font-weight: 700;
}

.maq-btn-pill--orange:hover {
    background: #ffedd5;
    border-color: #fdba74;
}

/* 2. Categories List */
.maq-cat-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.maq-cat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.6rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s;
}

.maq-cat-item:hover {
    background: #f8fafc;
}

.maq-cat-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
}

.maq-cat-item:hover .maq-cat-name {
    color: #f97316;
}

.maq-cat-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 20px;
    padding: 0 0.4rem;
    border-radius: 9999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
}

/* 3. Newsletter Card */
.maq-newsletter-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 14px;
    padding: 1.5rem 1.25rem;
    color: #ffffff;
    text-align: center;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.15);
}

.maq-news-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 0.4rem 0;
}

.maq-news-subtitle {
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.5;
    margin: 0 0 1.15rem 0;
}

.maq-news-form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.maq-news-input {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    border: 1px solid #334155;
    background: #ffffff;
    color: #1e293b;
    font-size: 0.82rem;
    text-align: center;
    box-sizing: border-box;
    outline: none;
    font-family: inherit;
}

.maq-news-input:focus {
    border-color: #f97316;
}

.maq-news-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.65rem;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.maq-news-btn:hover {
    opacity: 0.95;
}

/* 4. Follow Us Card */
.maq-follow-card {
    text-align: center;
}

.maq-follow-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 1rem 0;
}

.maq-social-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.maq-social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1rem;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.maq-social-btn:hover {
    opacity: 0.9;
}

.maq-social--fb { background: #1877F2; }
.maq-social--tw { background: #0284c7; }
.maq-social--tg { background: #229ED9; }
.maq-social--yt { background: #ef4444; }

/* Empty state */
.maq-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

.maq-empty-icon {
    font-size: 3.5rem;
    color: #cbd5e1;
    margin-bottom: 1.25rem;
}

.maq-empty-title {
    font-size: 1.75rem;
    color: #0f172a;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
}

.maq-empty-desc {
    color: #64748b;
    margin: 0 0 1.5rem 0;
}

.maq-btn-primary {
    display: inline-block;
    padding: 0.65rem 1.75rem;
    border-radius: 9999px;
    background: #f97316;
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    transition: background 0.2s;
}

.maq-btn-primary:hover {
    background: #ea580c;
}

/* ========================================================
   MAQ — EDITOR FORMS (shared, used by article-submit)
   Editorial form/table/status components matching the
   maq design tokens (white cards, #f97316 accent, slate).
   ======================================================== */
.maq-form-group {
    margin-bottom: 1.5rem;
}

.maq-form-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.maq-required {
    color: #f97316;
    font-weight: 800;
}

.maq-form-control,
.maq-form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    font-family: inherit;
    font-size: 0.95rem;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    text-align: right;
    direction: rtl;
}

.maq-form-control:focus,
.maq-form-textarea:focus {
    border-color: #f97316;
    outline: none;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
    background: #ffffff;
}

.maq-form-textarea {
    min-height: 300px;
    line-height: 2;
    font-size: 1.02rem;
    resize: vertical;
}

.maq-table-wrap {
    overflow-x: auto;
}

.maq-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.maq-table th {
    text-align: right;
    font-weight: 700;
    color: #64748b;
    background: #f8fafc;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.maq-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}

.maq-table tr:last-child td {
    border-bottom: 0;
}

.maq-table tr:hover td {
    background: #f8fafc;
}

.maq-status {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.maq-status--pending   { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; }
.maq-status--published { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.maq-status--draft     { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.maq-status--archived  { background: #f8fafc; color: #94a3b8; border: 1px solid #e2e8f0; }
.maq-status--scheduled { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

.maq-pagination {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.maq-pagination a,
.maq-pagination strong {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
    border-radius: 8px;
    font-size: 0.85rem;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    color: #475569;
    background: #ffffff;
    box-sizing: border-box;
}

.maq-pagination a:hover {
    border-color: #f97316;
    color: #ea580c;
}

.maq-pagination strong {
    background: #f97316;
    border-color: #f97316;
    color: #ffffff;
}

/* ========================================================
   RESPONSIVE DESIGN
   ======================================================== */
@media (max-width: 992px) {
    .maq-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "main" "side";
    }

    .maq-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 640px) {
    .maq-article-card {
        padding: 1.5rem 1.25rem;
        border-radius: 12px;
    }

    .maq-article-title {
        font-size: 1.45rem;
    }

    .maq-meta-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .maq-meta-stats {
        width: 100%;
        justify-content: space-between;
        padding-top: 0.5rem;
        border-top: 1px dashed #f1f5f9;
    }

    .maq-prevnext-row {
        grid-template-columns: 1fr;
    }

    .maq-sidebar {
        grid-template-columns: 1fr;
    }
}

/*==================================================
  PERFORMANCE: Mobile GPU optimization
  Replace backdrop-filter blur with opaque fallbacks
  on mobile where GPU compositing is expensive.
==================================================*/
@media (max-width: 768px) {
    .categories {
        background: rgba(255, 255, 255, 0.85);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
    .filter-bar {
        background: rgba(255, 255, 255, 0.95);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
    .profile-stat-box {
        background: rgba(255, 255, 255, 0.15);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
    .settings-modal-backdrop {
        background: rgba(0, 0, 0, 0.7);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
}

/*==================================================
  MOBILE FULL-WIDTH UTILIZATION (95–98% of viewport)
  Mobile-only: no effect on Desktop (< 768px gate).
==================================================*/
@media (max-width: 768px) {
    .container,
    .categories,
    .poetry-page-container,
    .profile-page-wrapper,
    .my-posts-page {
        width: 100%;
        max-width: 100%;
        padding-left: 8px;
        padding-right: 8px;
    }

    .categories {
        padding: 8px;
    }

    .l-section {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .form-card {
        max-width: 100%;
    }

    .members-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/*==================================================
  MOBILE RESPONSIVE FIXES — Phase 2 (mobile-only, ≤ 768px)
  No effect on Desktop. No color/font/RTL/function changes.
==================================================*/
@media (max-width: 768px) {

    /* 1) Poetry + articles containers: beat inline 94% → 95–98% of viewport.
          (inline <style> blocks load after style.css, so !important is required) */
    .poetry-page-container,
    .rhyme-page-container,
    .meter-page-container,
    .topic-page-container,
    .tax-page-container,
    .search-page-wrapper,
    .maq-container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    /* 2) Search result grids: remove minmax(340px, 1fr) floor → no h-scroll @320 */
    .poems-grid,
    .articles-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    /* 3) Shared grids: 1fr → minmax(0, 1fr) so cards can never blow the viewport */
    .grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    /* 4) Taxonomy / meter / rhyme / topic quick pills: wrap instead of one long row */
    .tax-quick-pills,
    .meter-quick-pills,
    .rhyme-quick-pills,
    .topic-quick-pills,
    .tax-quick-genres-pills,
    .meter-quick-genres-pills,
    .topic-quick-genres-pills {
        flex-wrap: wrap;
    }

    /* Filter search fields: drop the 250px floor, each field takes its own row */
    .meter-search-field,
    .rhyme-search-field,
    .topic-search-field,
    .tax-search-field {
        flex: 1 1 100%;
        min-width: 0 !important;
    }

    /* 5) UserNav dropdown: hidden menu no longer inflates document width,
          pill stays right-anchored so the menu opens inside the viewport */
    .user-nav-dropdown {
        margin-inline-end: auto;
    }
    .user-nav-menu {
        display: none !important;
    }
    .user-nav-dropdown.active .user-nav-menu {
        display: block !important;
        right: 0 !important;
        left: auto !important;
        max-width: calc(100vw - 32px);
    }

    /* 6) Empty states: calm the excessive 4.5rem vertical padding on phones */
    .favorites-main-card,
    .follows-main-card,
    .notifications-main-card {
        padding: 2.5rem 1.25rem;
        min-height: 200px;
    }
    .feed-main-card {
        padding: 1.5rem 1rem;
    }

    /* 7) Publish & article content vertical rhythm on phones */
    .publish-poem-page,
    .maq-page-wrap {
        padding-top: 1.5rem;
        padding-bottom: 2.5rem;
    }

    /* 8) Touch targets ≥ 38px (visuals unchanged) */
    button,
    [type="submit"],
    .user-nav-btn,
    .tax-filter-submit,
    .meter-filter-submit,
    .rhyme-filter-submit,
    .topic-filter-submit {
        min-height: 38px;
    }
    .tax-quick-pill,
    .meter-quick-pill,
    .topic-quick-pill,
    .rhyme-quick-pill,
    .rhyme-letter-pill,
    .discovery-alphabet-letter {
        min-height: 38px !important;
    }
    .rhyme-quick-pill,
    .rhyme-letter-pill {
        min-width: 40px !important;
        height: 40px !important;
        width: auto !important;
    }
    a[class*="btn"] {
        min-height: 38px;
    }
    .poets-empty-box a[class*="btn"],
    .country-empty-card a[class*="btn"] {
        display: inline-block;
    }

    /* 10) Members cards: shrinkable tracks + identity ellipsis instead of overflow */
    .members-grid .member-card,
    .member-identity,
    .member-username,
    .member-card-header {
        min-width: 0;
    }
    .member-card .member-card-actions {
        flex-wrap: wrap;
    }
    .member-card .member-card-actions > * {
        min-width: 0;
    }

    /* 9) Hero search bars: stack input + button so no button is cut at 320px */
    .meter-hero-banner,
    .rhyme-hero-banner,
    .topic-hero-banner,
    .tax-hero-banner,
    .poets-hero-banner,
    .country-hero-banner {
        padding: 2rem 1.25rem !important;
    }
    .meter-search-box,
    .rhyme-search-box,
    .topic-search-box,
    .tax-search-box,
    .poets-search-box,
    .country-search-box {
        flex-wrap: wrap;
        border-radius: 22px;
    }
    .meter-search-input,
    .rhyme-search-input,
    .topic-search-input,
    .tax-search-input,
    .poets-search-input,
    .country-search-box input {
        flex: 1 1 100% !important;
        width: 100%;
    }
    .meter-search-btn,
    .rhyme-search-btn,
    .topic-search-btn,
    .tax-search-btn,
    .poets-search-btn {
        width: 100%;
    }

    /* 11) Archive / list cards: never blow the viewport with long words */
    .grid .card,
    .grid > article,
    .list-item {
        min-width: 0;
    }
    .grid .card h3,
    .grid .card .link-plain,
    .grid .card .excerpt,
    .list-item__title {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    .card .meta-row,
    .list-item__meta {
        flex-wrap: wrap !important;
    }
    .card .badge {
        white-space: normal !important;
        max-width: 100%;
    }

    /* 12) Poem card mobile: collapse horizontal padding to fill width */
    .diwan-poem-main-card {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }

    /* 14) Poem content mobile: larger verses to reduce the perceived side
          gaps vs card width; line-height 2.1 keeps Arabic tashkeel clear —
          desktop untouched, padding unchanged */
    .diwan-verses-wrapper > .diwan-bayt-row,
    .diwan-verses-wrapper .diwan-line {
        font-size: 1.8rem;
        line-height: 2.1;
        padding: 0.5rem 0.15rem;
    }

    /* 15) Mobile: bayt units clearly separated — wrapper gap 2rem (only
          between rows; the 0.3rem in-row gap, font-size and line-height
          stay untouched) */
    .diwan-poem-main-card .diwan-verses-wrapper {
        gap: 2rem;
    }

    /* 16) Mobile: hemistich-level zig-zag — within each bayt the FIRST
          hemistich sits to the right with a void on the left, the SECOND
          to the left with a void on the right; the row itself stays full
          width. Natural reading flow, text never clipped; font-size,
          line-height, vertical gaps unchanged; desktop untouched */
    .diwan-verses-wrapper > .diwan-bayt-row {
        align-items: stretch !important;
        width: 100%;
    }
    .diwan-verses-wrapper > .diwan-bayt-row > .diwan-bayt-first {
        width: calc(100% - 2.5rem) !important;
        margin-left: auto !important;
        margin-right: 0 !important;
        text-align: right !important;
    }
    .diwan-verses-wrapper > .diwan-bayt-row > .diwan-bayt-second {
        width: calc(100% - 2.5rem) !important;
        margin-left: 0 !important;
        margin-right: auto !important;
        text-align: left !important;
    }

    /* 17) Line mode: no artificial bayt-start spacing */
    .diwan-verses-wrapper > .diwan-line:nth-child(odd) {
        margin-top: 0;
    }

    /* 17) Line mode: each hemistich pair is a distinct bayt unit on phones */
    .diwan-verses-wrapper:has(> .diwan-mobile-bayt) {
        gap: 0;
    }
    .diwan-mobile-bayt {
        display: flex;
        flex-direction: column;
        gap: 0.3rem;
        margin-bottom: 1.6rem;
    }
    .diwan-mobile-bayt:last-child {
        margin-bottom: 0;
    }
}

/* Line-mode structural wrapper: transparent on desktop so layout stays byte-identical */
@media (min-width: 769px) {
    .diwan-mobile-bayt {
        display: contents;
    }
}

