/* ================================================
   AUTHORS PAGE — /assets/css/authors-style.css
   صفحة الكُتاب ودور النشر
================================================ */

 
.authors-page {
    position: relative;
    z-index: 1;
    padding-top: 80px;
    min-height: 100vh;
}

 
.ap-hero {
    padding: 80px 24px 80px;
    text-align: center;
    position: relative;
}
.ap-hero__inner {
    max-width: 640px;
    margin: 0 auto;
}
.ap-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 18px;
    border-radius: 50px;
    background: rgba(79,209,255,0.1);
    border: 1px solid rgba(79,209,255,0.25);
    color: #0ea5e9;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 20px;
}
.ap-hero__badge::before { content: '✦'; font-size: 0.6rem; }
.ap-hero__title {
    font-family: 'Amiri', serif;
    font-size: clamp(2.4rem, 6vw, 3.6rem);
    font-weight: 700;
    background: linear-gradient(135deg, #0ea5e9, #A855F7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0 0 16px;
    line-height: 1.2;
}
.ap-hero__desc {
    font-size: 1.05rem;
    color: #64748b;
    line-height: 1.7;
    margin: 0;
}

 
.ap-tabs-wrap {
    position: sticky;
    top: 80px;
    z-index: 100;
    background: rgba(248,249,252,0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(79,209,255,0.12);
    padding: 0 24px;
}
.ap-tabs {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 4px;
}
.ap-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    position: relative;
    bottom: -1px;
}
.ap-tab:hover { color: #0ea5e9; }
.ap-tab.active {
    color: #0ea5e9;
    border-bottom-color: #0ea5e9;
}
.ap-tab__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 50px;
    background: rgba(79,209,255,0.12);
    color: #0ea5e9;
    font-size: 0.75rem;
    font-weight: 700;
    transition: all 0.25s;
}
.ap-tab.active .ap-tab__count {
    background: #0ea5e9;
    color: #fff;
}

 
.ap-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px;
}
.ap-section--publishers {
    padding-top: 20px;
}
.ap-section__head {
    margin-bottom: 40px;
    text-align: center;
}
.ap-section__title {
    font-family: 'Amiri', serif;
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px;
    position: relative;
    display: inline-block;
}
.ap-section__title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #0ea5e9, #A855F7);
    border-radius: 2px;
    margin: 10px auto 0;
}
.ap-section__sub {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
}

 
.ap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

 
.ap-card {
    background: rgba(255,255,255,0.75);
    border: 1px solid rgba(79,209,255,0.15);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.22,1,0.36,1),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
    cursor: default;
    opacity: 0;
    transform: translateY(22px);
}
.ap-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.55s cubic-bezier(0.22,1,0.36,1),
                transform 0.55s cubic-bezier(0.22,1,0.36,1),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
}
.ap-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(14,165,233,0.14);
    border-color: rgba(79,209,255,0.35);
}

 
.ap-card__img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: linear-gradient(135deg, #e0f7ff, #f3eeff);
}
.ap-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.ap-card:hover .ap-card__img { transform: scale(1.06); }

 
.ap-card__img-wrap::after {
    content: 'Hroof';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(14,165,233,0.30) 0%,
        rgba(168,85,247,0.25) 60%,
        rgba(14,165,233,0.18) 100%
    );
     
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 12px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.88);
    text-shadow: 0 1px 6px rgba(14,165,233,0.6);
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.ap-card:hover .ap-card__img-wrap::after {
    opacity: 0.75;
}

 
.ap-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(79,209,255,0.1), rgba(168,85,247,0.1));
    font-family: 'Amiri', serif;
    font-size: 3.5rem;
    color: rgba(14,165,233,0.5);
    font-weight: 700;
}

 
.ap-card__publisher-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #0ea5e9, #A855F7);
    color: #fff;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 700;
}

 
.ap-card__body {
    padding: 18px;
    text-align: center;
}
.ap-card__name {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 6px;
    line-height: 1.3;
}
.ap-card__type {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 50px;
    background: rgba(79,209,255,0.08);
    color: #0ea5e9;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 16px;
}
.ap-card__type::before { content: '✦'; font-size: 0.5rem; }

 
.ap-card--publisher .ap-card__type {
    background: rgba(168,85,247,0.08);
    color: #A855F7;
}
.ap-card--publisher .ap-card__type::before { content: '◆'; }

.ap-card__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px 16px;
    border-radius: 50px;
    background: linear-gradient(135deg, rgba(79,209,255,0.12), rgba(168,85,247,0.08));
    border: 1px solid rgba(79,209,255,0.2);
    color: #0ea5e9;
    font-family: 'Cairo', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
}
.ap-card__btn:hover {
    background: linear-gradient(135deg, #0ea5e9, #A855F7);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(14,165,233,0.3);
}
.ap-card--publisher .ap-card__btn {
    background: linear-gradient(135deg, rgba(168,85,247,0.10), rgba(79,209,255,0.06));
    border-color: rgba(168,85,247,0.2);
    color: #A855F7;
}
.ap-card--publisher .ap-card__btn:hover {
    background: linear-gradient(135deg, #A855F7, #0ea5e9);
    color: #fff;
    box-shadow: 0 8px 20px rgba(168,85,247,0.3);
}

 
.ap-loading {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 0;
    color: #94a3b8;
    font-size: 0.9rem;
}
.ap-loading__spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(79,209,255,0.2);
    border-top-color: #0ea5e9;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

 
.ap-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 24px;
    color: #94a3b8;
}
.ap-empty svg { margin-bottom: 16px; opacity: 0.3; }
.ap-empty p { font-size: 1rem; margin: 0; }

 
.ap-section { display: block; }
.ap-section.hidden { display: none; }

 
.ap-divider {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    border: none;
    border-top: 1px solid rgba(79,209,255,0.1);
}

 
.ap-load-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 220px;
    margin: 32px auto 0;
    padding: 13px 24px;
    border-radius: 50px;
    background: linear-gradient(135deg, rgba(79,209,255,0.12), rgba(168,85,247,0.08));
    border: 1px solid rgba(79,209,255,0.25);
    color: #0ea5e9;
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}
.ap-load-more-btn:hover,
.ap-load-more-btn:active {
    background: linear-gradient(135deg, #0ea5e9, #A855F7);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 24px rgba(14,165,233,0.3);
}
.ap-load-more-btn--publisher {
    background: linear-gradient(135deg, rgba(168,85,247,0.10), rgba(79,209,255,0.06));
    border-color: rgba(168,85,247,0.2);
    color: #A855F7;
}
.ap-load-more-btn--publisher:hover,
.ap-load-more-btn--publisher:active {
    background: linear-gradient(135deg, #A855F7, #0ea5e9);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 24px rgba(168,85,247,0.3);
}

 
@media (max-width: 900px) {
    .ap-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; }
}
@media (max-width: 600px) {
    .authors-page { padding-top: 72px; }
    .ap-hero { padding: 50px 16px 50px; }
    .ap-tabs-wrap { top: 72px; padding: 0 12px; }
    .ap-tab { padding: 12px 14px; font-size: 0.85rem; }
    .ap-section { padding: 40px 16px; }
    .ap-grid { grid-template-columns: 1fr !important; gap: 14px; }
    .ap-card__body { padding: 14px; }
    .ap-card__name { font-size: 0.9rem; }
    .ap-load-more-btn { width: calc(100% - 32px); }
}
@media (max-width: 380px) {
    .ap-card__btn { font-size: 0.78rem; padding: 8px 10px; }
}