@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Tajawal:wght@400;500;700&display=swap');

* {
    box-sizing: border-box;
}

:root {
    --primary-gold: #C5A466;
    --primary-color: #C5A466; /* نفس لون الذهب */
    --secondary-color: #ff6b6b; /* لون أحمر مميز */
    --dark-bg: #2C2C2C;
    --light-bg: #F9F9F9;
    --text-color: #333;
    --white: #fff;
    --border-color: #ddd;
}

body {
    direction: rtl;
    text-align: right;
    font-family: 'Tajawal', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--light-bg);
    color: var(--text-color);
    /* Sticky Footer Setup */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header {
    background-color: #f4f1ea;
    padding: 10px 0;
    text-align: center;
    border-bottom: 5px solid var(--primary-gold);
    position: relative;
    z-index: 1000;
    margin: 0;
}

.header-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Mobile Toggle - Hidden on Desktop */
.mobile-menu-toggle {
    display: none;
    position: absolute;
    left: 20px; /* Position on left because RTL */
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.8rem;
    color: var(--text-color);
    cursor: pointer;
    z-index: 1002;
    padding: 5px;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.logo-img {
    max-width: 450px;
    width: auto;
    height: auto;
    max-height: 120px; /* Limit height on desktop */
}

.nav-bar {
    background-color: #333;
    padding: 10px 0;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
}

.nav-bar a {
    color: var(--white);
    text-decoration: none;
    padding: 10px 20px;
    font-weight: bold;
    display: inline-block;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
    font-size: 1.1em;
}

.nav-bar a:hover {
    color: var(--primary-gold);
    background: rgba(255,255,255,0.05);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header {
        position: sticky;
        top: 0;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        padding: 5px 0;
        z-index: 1000;
    }
    
    .mobile-menu-toggle {
        display: block;
    }

    .logo-img {
        max-width: 150px; 
        max-height: 50px;
    }

    .nav-bar {
        background-color: #333;
        max-height: 0;
        overflow: hidden;
        padding: 0;
        position: fixed !important;
        top: 75px;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 9999; /* Increased Z-index */
        transition: max-height 0.3s ease;
        box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    }

    .nav-bar.active {
        max-height: 500px;
        padding: 0;
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
    }

    .nav-bar a {
        display: block;
        width: 100%;
        text-align: center;
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        font-size: 1em;
    }
    
    .nav-bar a:last-child {
        border-bottom: none;
    }
    
    .nav-visitor-badge {
        margin: 10px auto;
        padding: 8px 15px;
    }
}


.container {
    max-width: 1100px;
    width: 100%; /* Ensure it takes width in flex context */
    margin: 30px auto;
    padding: 0 20px;
    min-height: 600px;
}

/* Breadcrumb Styling */
.breadcrumb {
    background: var(--white);
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    font-size: 1.1em;
    color: #666;
    display: flex;
    align-items: center;
    gap: 12px;
    border-right: 4px solid var(--primary-gold);
    font-family: 'Tajawal', sans-serif;
    white-space: nowrap;
    overflow: hidden;
}

@media (max-width: 768px) {
    .breadcrumb {
        padding: 12px 15px;
        font-size: 0.95em;
        gap: 8px;
    }
}

.breadcrumb a {
    color: var(--primary-gold);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0; /* يمنع تصغير الرابط الرئيسي */
}

.breadcrumb a:hover {
    color: #b8941f;
    transform: translateX(-2px);
}

.breadcrumb .separator {
    font-size: 0.8em;
    color: #ccc;
    flex-shrink: 0; /* يمنع تصغير السهم */
}

.breadcrumb .current {
    color: #333;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis; /* يضيف ثلاث نقاط (...) إذا كان النص طويلاً */
    white-space: nowrap;
}

.chapter-box {
    background: var(--white);
    border: 1px solid var(--border-color);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.chapter-box:hover {
    transform: translateY(-3px);
    border-color: var(--primary-gold);
}

.chapter-title {
    color: var(--primary-gold);
    font-size: 1.5em;
    font-family: 'Amiri', serif;
    margin-bottom: 10px;
}

.intro-text {
    font-family: 'Amiri', serif;
    font-size: 1.25em;
    line-height: 1.8;
    text-align: justify;
    /* white-space: pre-wrap; REMOVED to support WYSIWYG HTML */
}

/* Fix for centered text in editor */
.intro-text .text-center, 
.intro-text [style*="text-align: center"],
.intro-text [style*="text-align:center"],
.intro-text [align="center"],
.intro-text center,
.intro-text .align-center {
    text-align: center !important;
    display: block; /* Ensure block level for alignment */
    width: 100%;
}

/* Fix for right-aligned text in editor */
.intro-text [style*="text-align: right"],
.intro-text [style*="text-align:right"],
.intro-text [align="right"] {
    text-align: right !important;
}

/* Fix for left-aligned text in editor */
.intro-text [style*="text-align: left"],
.intro-text [style*="text-align:left"],
.intro-text [align="left"] {
    text-align: left !important;
}

.article-card {
    background: var(--white);
    border-right: 4px solid var(--primary-gold);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.article-header {
    font-weight: bold;
    color: #555;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
}

.btn-comment {
    background: var(--primary-gold);
    color: white;
    padding: 5px 15px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
}

.comment-form {
    margin-top: 20px;
    background: #f8f8f8;
    padding: 15px;
    border-radius: 5px;
    display: none; /* Hidden by default */
}

.comment-form input, .comment-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Tajawal', sans-serif;
}

.btn-submit {
    background: #333;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
}

footer {
    background-color: var(--dark-bg);
    color: var(--white);
    text-align: center;
    padding: 20px;
    margin-top: auto; /* Pushes footer to bottom */
    width: 100%;
    font-size: 0.9em;
}

/* Form Styling */
.form-group { margin-bottom: 15px; }
.form-control { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px;}

/* Slider Styles */
.slider-container {
    position: relative;
    width: 100%; /* Full width */
    max-width: 100%; /* No maximum width - full screen */
    margin: 0;
    overflow: hidden;
    height: 550px; /* Increased height */
    margin-bottom: 0;
    min-height: 550px; 
    max-height: 550px; 
    flex-shrink: 0; /* Prevent shrinking */
    background: #222;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15); /* Subtle shadow for depth */
}

.slide {
    display: none;
    width: 100%;
    height: 550px !important; /* Force fixed height */
    object-fit: cover;
    object-position: center center; /* Center the image */
    filter: brightness(0.9); /* Slightly darken to make text readable */
}

.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from {opacity: .6} 
    to {opacity: 1}
}

.slider-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: right; /* Standard Arabic alignment */
    color: #fff;
    padding: 30px 50px; /* Spacious padding */
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); /* Professional Gradient */
    box-sizing: border-box;
    font-size: 1.4em;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* Mobile Slider Adjustments */
@media (max-width: 768px) {
    /* Reduce slider height for mobile */
    .slider-container { 
        height: 250px !important;
        min-height: 250px !important;
        max-height: 250px !important;
    }
    
    .slide {
        height: 250px !important;
    }

    /* Fix Caption Bar */
    .slider-caption { 
        font-size: 0.9em; 
        padding: 8px 15px; 
        text-align: center; 
        width: 100%;
        bottom: 0;
        background: rgba(0,0,0,0.7); /* Darker for readability */
        line-height: 1.4;
    }

    /* Fix Navigation Arrows */
    .slider-nav { 
        display: flex !important; /* Force show */
        padding: 0 10px; /* Tighter padding */
    }
    
    .prev, .next { 
        width: 35px; 
        height: 35px; 
        font-size: 16px; 
        background-color: rgba(197, 164, 102, 0.6); /* Gold transparent */
        border: 1px solid rgba(255,255,255,0.3);
    }
    
    /* Content Adjustments */
    .intro-section h2.chapter-title {
        font-size: 1.4em !important;
        margin-top: 10px;
    }
    
    /* Make intro text readable on mobile */
    .intro-text p {
        font-size: 1.1em;
        line-height: 1.6;
        text-align: justify;
        padding: 0 5px;
    }

    /* Reduce huge margins */
    .container { margin-top: 10px; min-height: 300px; }
    
    
    .chapter-card {
        flex-direction: column;
        text-align: center;
        padding: 20px 15px; /* Adequate padding */
        margin: 0 10px 20px 10px; /* Side margins to prevent touching edges */
    }
    
    .chapter-content {
        padding: 0;
        margin-bottom: 15px;
        width: 100%; /* Ensure content stays within */
    }

    .chapter-image {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 3px solid var(--primary-gold);
    }

    h1 { font-size: 1.8em !important; }
    h2 { font-size: 1.5em !important; }

    /* Tables Responsive Wrapper */
    table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* Chapters Page Styles */
.chapters-page-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.chapter-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    margin-bottom: 25px; /* Increased spacing */
}

.chapter-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    /* Removed bottom border, added card style */
    border: 1px solid transparent;
    border-radius: 16px; /* Smooth rounded corners */
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04); /* Subtle ambient shadow */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Nice spring effect */
}

.chapter-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(197, 164, 102, 0.15); /* Gold glow on hover */
    border-color: rgba(197, 164, 102, 0.3);
}

.chapter-content {
    flex: 2;
    padding-left: 30px; /* More breathing room */
}

.chapter-image {
    flex: 0 0 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 140px;
    background: #fdfcf8; /* Very light gold tint bg for image area */
    border-radius: 50%; /* Circle background for logo */
    padding: 15px;
    border: 1px solid #f0eee6;
}

.chapter-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.chapter-label {
    display: block;
    font-size: 0.85em;
    color: var(--primary-gold);
    margin-bottom: 8px;
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.chapter-title-text {
    font-size: 1.6em;
    font-weight: 800;
    margin: 0 0 12px 0;
    color: #222;
    line-height: 1.3;
}

.chapter-desc {
    color: #666;
    line-height: 1.7;
    font-size: 1.05em;
    text-align: justify;
    margin: 0;
}

.chapter-card:hover .chapter-title-text {
    color: var(--primary-gold);
}

@media (max-width: 768px) {
    .chapter-card {
        flex-direction: column-reverse;
        padding: 20px;
        text-align: center;
    }
    
    .chapter-content {
        padding-left: 0;
    }
    
    .chapter-image {
        margin: 0 auto 20px auto;
        width: 120px;
        height: 120px;
    }
    
    .chapter-desc {
        text-align: center;
        font-size: 0.95em;
    }
}


/* Admin Form Styles */
.card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
    font-size: 1em;
}

.form-control, textarea, input[type='text'], input[type='email'], input[type='password'] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Tajawal', sans-serif;
    font-size: 1em;
    box-sizing: border-box; /* Important for padding */
    transition: border-color 0.3s;
}

.form-control:focus, textarea:focus, input[type='text']:focus {
    border-color: var(--primary-gold);
    outline: none;
    box-shadow: 0 0 0 3px rgba(197, 164, 102, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* File Input Styling */
input[type='file'] {
    background: #f8f9fa;
    padding: 10px;
    border: 1px dashed #ccc;
    cursor: pointer;
}

/* Buttons */
button, .btn-submit, .login-btn {
    background-color: var(--primary-gold);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
    font-family: 'Tajawal', sans-serif;
}

button:hover, .btn-submit:hover, .login-btn:hover {
    background-color: #b08d4e;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    display: inline-block;
}

.btn-secondary:hover {
    background-color: #5a6268;
}


/* Scroll to Top Button */
#scrollTopBtn {
    display: none; /* Hidden by default */
    position: fixed; /* Fixed/sticky position */
    bottom: 20px; /* مسافة من الأسفل */
    right: 30px; /* نقل الزر إلى اليمين - الحل الأفضل */
    z-index: 101; /* يظهر فوق الفوتر */
    border: none; /* Remove borders */
    outline: none; /* Remove outline */
    background-color: var(--primary-gold); /* Set background color */
    color: white; /* Text color */
    cursor: pointer; /* Add a mouse pointer on hover */
    padding: 15px; /* Some padding */
    border-radius: 50%; /* Rounded corners */
    font-size: 18px; /* Increase font size */
    transition: background-color 0.3s, transform 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

#scrollTopBtn:hover {
    background-color: #333; /* Add a dark-grey background on hover */
    transform: translateY(-3px);
}


/* =========================================
   PROFESSIONAL ADMIN PANEL STYLES
   ========================================= */

/* Layout Structure */
body.admin-body {
    display: flex;
    min-height: 100vh;
    background-color: #f4f6f9;
    font-family: 'Tajawal', sans-serif;
    margin: 0;
    overflow-x: hidden;
}

.admin-sidebar {
    width: 260px;
    background: #1e272e; /* Dark Blue-Grey */
    color: #fff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: all 0.3s;
    box-shadow: 4px 0 10px rgba(0,0,0,0.1);
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 1000;
}

.admin-main {
    flex-grow: 1;
    margin-right: 260px; /* Same as sidebar width */
    padding: 30px;
    background-color: #f4f6f9;
    min-height: 100vh;
    transition: margin-right 0.3s;
    display: flex;
    flex-direction: column;
}

/* Admin Main Content Area */
.admin-main > *:not(footer) {
    flex: 1;
}

/* Admin Footer - Always at bottom */
.admin-main footer {
    margin-top: auto;
    padding: 20px;
    text-align: center;
    color: #777;
    border-top: 1px solid #eee;
}

/* Sidebar Branding */
.sidebar-brand {
    padding: 25px 20px;
    text-align: center;
    background: #161d23;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-brand h2 {
    margin: 0;
    font-size: 1.4em;
    color: var(--primary-gold);
    font-weight: 700;
    letter-spacing: 1px;
}

.sidebar-brand span {
    color: #fff;
    font-size: 0.9em;
    display: block;
    margin-top: 5px;
    opacity: 0.7;
}

/* Sidebar Navigation */
.sidebar-menu {
    padding: 20px 0;
    list-style: none;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: #b2bec3;
    text-decoration: none;
    transition: all 0.3s;
    border-right: 3px solid transparent;
    font-size: 1.05em;
}

.sidebar-menu a i {
    margin-left: 15px; /* RTL margin */
    width: 20px;
    text-align: center;
    font-size: 1.2em;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-right-color: var(--primary-gold);
}

.sidebar-footer {
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    text-align: center;
    font-size: 0.85em;
    color: #777;
}

/* Top Header */
.admin-top-header {
    background: #fff;
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-radius: 8px;
}

.header-title h3 {
    margin: 0;
    font-size: 1.4em;
    color: #2d3436;
}

.header-actions a {
    text-decoration: none;
    margin-right: 15px;
    color: #636e72;
    transition: color 0.3s;
    font-size: 1.1em;
}

.header-actions a:hover {
    color: var(--primary-gold);
}

.logout-btn {
    background: #ff7675;
    color: white !important;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 0.9em !important;
}

.logout-btn:hover {
    background: #d63031;
}

/* Dashboard Cards (Stats) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.3s;
    border-top: 4px solid transparent;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
}

.stat-info h4 {
    margin: 0 0 5px 0;
    color: #636e72;
    font-size: 0.9em;
}

.stat-info p {
    margin: 0;
    font-size: 1.8em;
    font-weight: 700;
    color: #2d3436;
}

/* Color Variants for Stats */
.stat-primary { border-color: #0984e3; }
.stat-primary .stat-icon { background: rgba(9, 132, 227, 0.1); color: #0984e3; }

.stat-success { border-color: #00b894; }
.stat-success .stat-icon { background: rgba(0, 184, 148, 0.1); color: #00b894; }

.stat-warning { border-color: #fdcb6e; }
.stat-warning .stat-icon { background: rgba(253, 203, 110, 0.1); color: #e17055; }

.stat-danger { border-color: #d63031; }
.stat-danger .stat-icon { background: rgba(214, 48, 49, 0.1); color: #d63031; }

.stat-gold { border-color: var(--primary-gold); }
.stat-gold .stat-icon { background: rgba(197, 164, 102, 0.1); color: var(--primary-gold); }


/* Tables Redesign */
.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 15px;
}

.modern-table thead th {
    background: #f8f9fa;
    color: #636e72;
    font-weight: 600;
    padding: 15px;
    text-align: right;
    border-bottom: 2px solid #dfe6e9;
    font-size: 0.95em;
}

.modern-table tbody tr {
    transition: background 0.2s;
}

.modern-table tbody tr:hover {
    background: #fcfcfc;
}

.modern-table td {
    padding: 15px;
    border-bottom: 1px solid #f1f2f6;
    color: #2d3436;
    vertical-align: middle;
}

.modern-table td:first-child { border-radius: 0 8px 8px 0; }
.modern-table td:last-child { border-radius: 8px 0 0 8px; }

/* Action Buttons in Table */
.action-btn {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    text-decoration: none;
    margin-left: 5px;
    transition: opacity 0.3s;
}

.action-btn:hover { opacity: 0.85; }

.btn-edit { background: #0984e3; color: white; }
.btn-delete { background: #d63031; color: white; }
.btn-view { background: #00b894; color: white; }

/* Responsive */
@media (max-width: 992px) {
    .admin-sidebar {
        width: 70px;
        overflow: hidden;
    }
    .admin-sidebar:hover {
        width: 260px;
    }
    .admin-main {
        margin-right: 70px;
    }
    .sidebar-brand h2, .sidebar-brand span, .sidebar-menu a span {
        display: none; /* Hide text on collapsed, show on hover via JS or CSS logic (simple css hover works) */
    }
    .admin-sidebar:hover .sidebar-brand h2, 
    .admin-sidebar:hover .sidebar-brand span, 
    .admin-sidebar:hover .sidebar-menu a span {
        display: inline;
    }
}


/* Footer Fix */
.admin-footer {
    text-align: center;
    padding: 20px 30px;
    color: #999;
    border-top: 1px solid #eee;
    margin-top: auto; /* Push to bottom in flex container */
    background: #fff;
    width: 100%;
    box-sizing: border-box;
}

/* Quick Links Cards in Admin */
.link-admin-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.link-admin-card i {
    font-size: 1.2em;
    color: var(--primary-gold);
    margin-left: 10px;
}


/* Slider Navigation Buttons */
.slider-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 40px;
    box-sizing: border-box;
    transform: translateY(-50%);
    z-index: 10;
    pointer-events: none; /* Let clicks pass through except buttons */
}

.prev, .next {
    cursor: pointer;
    width: 50px;
    height: 50px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: 0.3s ease;
    border-radius: 50%;
    background-color: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    pointer-events: auto; /* Re-enable clicks */
    text-decoration: none;
}

.prev:hover, .next:hover {
    background-color: var(--primary-gold);
    color: white;
}


/* ========================================= */
/* FORCE ALIGNMENT OVERRIDES (Admin Editor)  */
/* ========================================= */
/* Ensures text alignment from editor works despite global justify */
.intro-text [style*='text-align: center'],
.intro-text [style*='text-align:center'],
.intro-text [align='center'],
.intro-text .text-center {
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    margin-right: auto !important;
    margin-left: auto !important;
}

.intro-text [style*='text-align: left'],
.intro-text [style*='text-align:left'],
.intro-text [align='left'] {
    text-align: left !important;
    display: block !important;
    width: 100% !important;
}

.intro-text [style*='text-align: right'],
.intro-text [style*='text-align:right'],
.intro-text [align='right'] {
    text-align: right !important;
    display: block !important;
    width: 100% !important;
}

