/* =========================================
   WordPress Theme Extras - Al-Mahdi Channel
   Additional styles for WP-specific elements
========================================= */

/* ── WordPress Pagination ── */
.almahdi-pagination {
    text-align: center;
    padding: 5px 0 10px;
}

/* ── Hide Categories & Archives widgets in footer ── */
.site-footer-new .widget_categories,
.site-footer-new .widget_archive {
    display: none;
}

.almahdi-pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.almahdi-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    background: #fff;
    color: var(--text-main);
    border: 1px solid #dff0f0;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.almahdi-pagination .page-numbers:hover {
    background: var(--c-teal-dark);
    color: #fff;
    border-color: var(--c-teal-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(62,156,156,0.3);
}

.almahdi-pagination .page-numbers.current {
    background: var(--c-teal-dark);
    color: #fff;
    border-color: var(--c-teal-dark);
    box-shadow: 0 6px 18px rgba(62,156,156,0.3);
}

.almahdi-pagination .page-numbers.dots {
    background: transparent;
    border: none;
    box-shadow: none;
    color: var(--text-muted);
}

/* ── WordPress Page Content ── */
.almahdi-page-body {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    line-height: 2;
    font-size: 1.05rem;
    color: var(--text-main);
    margin-bottom: 60px;
}

.almahdi-page-body h1,
.almahdi-page-body h2,
.almahdi-page-body h3,
.almahdi-page-body h4 {
    color: var(--c-teal-dark);
    margin-top: 30px;
    margin-bottom: 15px;
}

.almahdi-page-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.almahdi-page-body a {
    color: var(--c-teal-dark);
    text-decoration: underline;
}

.almahdi-page-body a:hover {
    color: var(--c-gold);
}

/* ── WordPress Admin Bar Offset ── */
body.admin-bar .main-header-stack {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .main-header-stack {
        top: 46px;
    }
}

/* ── WordPress Block Editor Content ── */
.almahdi-page-body .wp-block-image {
    margin: 20px 0;
}

.almahdi-page-body .wp-block-gallery {
    margin: 20px 0;
}

/* ── Screen Reader Text (Accessibility) ── */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* ── WordPress Navigation Menu Styling ── */
.main-nav .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--c-teal-dark);
    border-radius: 0 0 12px 12px;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 1000;
    padding: 8px 0;
}

.main-nav li:hover > .sub-menu {
    display: block;
}

.main-nav .sub-menu li a {
    display: block;
    padding: 10px 20px;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.main-nav .sub-menu li:last-child a {
    border-bottom: none;
}

/* ── Dark mode: WP page body ── */
body.dark-mode .almahdi-page-body {
    background: #1e2e2e;
}

body.dark-mode .almahdi-pagination .page-numbers {
    background: #1e2e2e;
    border-color: #2a4040;
    color: #eee;
}

body.dark-mode .almahdi-pagination .page-numbers:hover,
body.dark-mode .almahdi-pagination .page-numbers.current {
    background: var(--c-teal-dark);
    color: #fff;
}

/* ── Folder card image fix ── */
.folder-card .fc-img[style] {
    width: 100%;
    height: 200px;
}

/* ── Premium card link reset ── */
a.premium-card {
    text-decoration: none;
    color: inherit;
}

a.premium-card:hover {
    color: inherit;
}

a.folder-card {
    text-decoration: none;
    color: inherit;
}

/* ── Player description WordPress content ── */
.player-description p {
    margin-bottom: 10px;
}

.player-description a {
    color: var(--c-teal-dark);
    text-decoration: underline;
}
