/* ============================================
   Page Template Styles - الصفحات العامة
   البورصجية نيوز
   ============================================ */

/* ============================================
   Main Layout
   ============================================ */
.page-main {
    padding: 30px 0 50px;
    background: var(--bg-secondary);
    min-height: 60vh;
}

.page-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 20px;
}

.page-breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.page-breadcrumb a:hover {
    color: var(--primary-dark);
}

.page-breadcrumb i.fa-chevron-left {
    font-size: 0.6rem;
    color: #ccc;
}

.page-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 25px;
    align-items: flex-start;
}

/* ============================================
   Page Article
   ============================================ */
.page-article {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    overflow: hidden;
}

/* Page Header */
.page-header {
    padding: 30px;
    border-bottom: 3px solid var(--primary-color);
    position: relative;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    background: var(--primary-color);
}

.page-title {
    font-family: var(--font-family);
    font-size: 2.0rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px;
    line-height: 1.4;
}

.page-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.9rem;
    color: #888;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-item i {
    color: var(--primary-color);
}

/* ============================================
   Page Content - محتوى المحرر
   ============================================ */
.page-content {
    padding: 30px;
    font-size: 1.1rem;
    line-height: 1.9;
    color: #333;
}

/* Paragraphs */
.page-content p {
    margin: 0 0 20px;
}

/* Headings */
.page-content h2 {
    font-family: var(--font-family);
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 35px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

.page-content h2::before {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 80px;
    height: 2px;
    background: var(--primary-color);
}

.page-content h3 {
    font-family: var(--font-family);
    font-size: 1.3rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 25px 0 12px;
}

.page-content h4 {
    font-family: var(--font-family);
    font-size: 1.15rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 20px 0 10px;
}

/* Links */
.page-content a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.page-content a:hover {
    border-bottom-color: var(--primary-color);
}

/* Lists */
.page-content ul,
.page-content ol {
    margin: 0 0 20px;
    padding-right: 25px;
}

.page-content li {
    margin-bottom: 10px;
    position: relative;
}

.page-content ul li::marker {
    color: var(--primary-color);
}

.page-content ol li::marker {
    color: var(--primary-color);
    font-weight: 600;
}

/* Blockquote */
.page-content blockquote {
    margin: 25px 0;
    padding: 20px 25px;
    background: #faf8f5;
    border-right: 4px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
    font-size: 1.15rem;
    font-style: italic;
    color: #555;
    position: relative;
}

.page-content blockquote::before {
    content: '"';
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 3rem;
    color: var(--primary-color);
    opacity: 0.2;
    font-family: Georgia, serif;
}

/* Images */
.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
}

.page-content figure,
.page-content .wp-block-image {
    margin: 25px 0;
}

.page-content figcaption {
    font-size: 0.9rem;
    color: #888;
    text-align: center;
    margin-top: 10px;
    font-style: italic;
}

/* Tables */
.page-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 1.0rem;
}

.page-content table th,
.page-content table td {
    padding: 12px 15px;
    text-align: right;
    border: 1px solid var(--border-color);
}

.page-content table th {
    background: #1a1a1a;
    color: #fff;
    font-weight: 600;
}

.page-content table tr:nth-child(even) {
    background: #faf8f5;
}

.page-content table tr:hover {
    background: rgba(193, 158, 103, 0.1);
}

/* Video Embed */
.page-content .wp-block-embed,
.page-content .video-placeholder {
    margin: 25px 0;
}

.video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 300px;
    background: #1a1a1a;
    color: #fff;
    border-radius: 8px;
    font-size: 0.9rem;
}

.video-placeholder i {
    font-size: 3rem;
    color: #ff0000;
}

/* Code */
.page-content code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.9em;
    color: #c7254e;
}

.page-content pre {
    background: #1a1a1a;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 25px 0;
}

.page-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* Strong & Em */
.page-content strong {
    font-weight: 600;
    color: #1a1a1a;
}

/* ============================================
   Page Footer
   ============================================ */
.page-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    background: #faf8f5;
    border-top: 1px solid var(--border-color);
}

.page-share {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #666;
}

.share-btn {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
}

.share-btn.facebook {
    background: #1877f2;
}

.share-btn.twitter {
    background: #1da1f2;
}

.share-btn.whatsapp {
    background: #25d366;
}

.share-btn.copy {
    background: #1a1a1a;
}

.print-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.print-btn:hover {
    background: var(--primary-dark);
}

/* ============================================
   Sidebar
   ============================================ */
.page-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-widget {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    overflow: hidden;
}

.sidebar-widget-header {
    padding: 15px;
    border-bottom: 3px solid var(--primary-color);
    position: relative;
}

.sidebar-widget-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
}

.sidebar-widget-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--primary-color);
    margin: 0;
}

.sidebar-widget-title i {
    color: var(--accent-color);
}

/* Page Links */
.page-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border-bottom: 1px solid var(--bg-tertiary);
    text-decoration: none;
    color: #1a1a1a;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.page-link:last-child {
    border-bottom: none;
}

.page-link i {
    color: var(--primary-color);
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.page-link:hover {
    background: #faf8f5;
    padding-right: 20px;
}

.page-link:hover i {
    transform: translateX(-3px);
}

/* Contact Box */
.sidebar-contact {
    border: none;
}

.contact-box {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 25px;
    text-align: center;
}

.contact-box>i {
    font-size: 2rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.contact-box h3 {
    font-size: 1rem;
    margin: 0 0 5px;
}

.contact-box p {
    font-size: 0.8rem;
    opacity: 0.9;
    margin: 0 0 15px;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 25px;
    background: #fff;
    color: var(--primary-color);
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Ad Space */
.sidebar-ad {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 250px;
    background: #faf8f5;
    color: #888;
    font-size: 0.85rem;
}

.sidebar-ad i {
    font-size: 1.5rem;
    color: #aaa;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 992px) {
    .page-layout {
        grid-template-columns: 1fr;
    }

    .page-sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .sidebar-contact {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .page-main {
        padding: 20px 0 40px;
    }

    .page-header {
        padding: 20px;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .page-content {
        padding: 20px;
    }

    .page-footer {
        flex-direction: column;
        gap: 15px;
    }

    .page-sidebar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.3rem;
    }

    .page-content {
        padding: 15px;
        font-size: 1.05rem;
    }

    .page-content h2 {
        font-size: 1.3rem;
    }

    .page-content h3 {
        font-size: 1.15rem;
    }

    .page-content blockquote {
        padding: 15px 20px;
    }

    .print-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {

    .page-sidebar,
    .page-footer,
    .page-breadcrumb,
    #header-container,
    #footer-container {
        display: none !important;
    }

    .page-layout {
        grid-template-columns: 1fr;
    }

    .page-article {
        border: none;
    }

    .page-content a {
        color: #1a1a1a;
        text-decoration: underline;
    }
}