/* Gallery Page Styles */

/* Breadcrumb */
.breadcrumb-section {
    padding: 3rem 0;
    margin-top: 80px;
    position: relative;
    background: linear-gradient(rgba(26, 61, 101, 0.85), rgba(221, 176, 51, 0.85));
    color: white;
    text-align: center;
}

.breadcrumb-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15;
    z-index: 1;
}

.breadcrumb-section .container {
    position: relative;
    z-index: 2;
}

.breadcrumb-section.gallery {
    background: linear-gradient(rgba(26, 61, 101, 0.9), rgba(221, 176, 51, 0.9));
}

.breadcrumb-section.gallery::before {
    background-image: url('../assets/images/gallary.png');
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
}

.breadcrumb-nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: var(--transition);
    padding: 5px 10px;
    border-radius: 5px;
}

.breadcrumb-nav a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.breadcrumb-nav .separator {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.breadcrumb-nav .current {
    color: var(--primary-color);
    font-weight: 700;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
}
/* Page Header */
.page-header {
    text-align: center;
    padding: 1rem 0 0;
    color: white;
}

.page-title {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 1rem auto 0;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}


/* Prayer Banner */
.prayer-banner {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    margin: 2rem 0 3rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.prayer-banner::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: url('assets/images/pattern.png');
    opacity: 0.1;
    pointer-events: none;
}

.prayer-content {
    position: relative;
    z-index: 2;
}

.prayer-content i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.prayer-content h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.prayer-content p {
    font-size: 1.3rem;
    opacity: 0.9;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.message-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    border-top: 4px solid var(--primary-color);
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.message-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-light);
}

.sender-info {
    flex: 1;
}

.sender-name {
    font-weight: 700;
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.message-date {
    color: var(--gray-color);
    font-size: 0.9rem;
}

.message-content {
    color: var(--dark-color);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.message-content p {
    margin: 0;
}

.message-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-light);
}

.like-btn {
    background: none;
    border: none;
    color: var(--gray-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: var(--transition);
    padding: 5px 10px;
    border-radius: 20px;
}

.like-btn:hover {
    color: var(--primary-color);
    background: rgba(221, 176, 51, 0.1);
}

.like-btn.liked {
    color: var(--primary-color);
}

.like-btn.liked i {
    animation: likeHeart 0.3s ease;
}

@keyframes likeHeart {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.share-btn {
    background: none;
    border: none;
    color: var(--gray-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: var(--transition);
    padding: 5px 10px;
    border-radius: 20px;
}

.share-btn:hover {
    color: var(--secondary-color);
    background: rgba(26, 61, 101, 0.1);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 3rem 0;
    padding: 1.5rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
}

.page-btn {
    padding: 10px 20px;
    background: white;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--secondary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.page-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
}

.page-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    color: var(--secondary-color);
    cursor: pointer;
    transition: var(--transition);
}

.page-number:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-number.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Add Message Section */
.add-message-section {
    background: var(--light-color);
    padding: 3rem;
    border-radius: var(--border-radius);
    margin: 4rem 0;
}

.add-message-section .section-title {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 2.2rem;
}

.add-message-section .section-subtitle {
    text-align: center;
    color: var(--gray-color);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.message-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.message-form .form-group {
    margin-bottom: 1.5rem;
}

.message-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.message-form input,
.message-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-arabic);
    font-size: 1rem;
    transition: var(--transition);
}

.message-form input:focus,
.message-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(221, 176, 51, 0.1);
}

.message-form textarea {
    resize: vertical;
    min-height: 150px;
}

.char-counter {
    text-align: left;
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.char-counter span {
    font-weight: 600;
}

.char-counter span.max {
    color: var(--accent-color);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.form-actions .btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Statistics */
.statistics-section {
    margin: 4rem 0;
}

.statistics-title {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    font-size: 2rem;
}

.statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.statistic-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.statistic-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.statistic-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.8rem;
}

.statistic-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.statistic-label {
    color: var(--gray-color);
    font-size: 1.1rem;
}

/* Featured Section */
.featured-section {
    margin: 4rem 0;
}

.featured-section .section-title {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 2.2rem;
}

.featured-section .section-subtitle {
    text-align: center;
    color: var(--gray-color);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.featured-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto 3rem;
    overflow: hidden;
    border-radius: var(--border-radius);
    background: white;
    box-shadow: var(--shadow-lg);
}

.featured-slide {
    display: none;
    padding: 3rem;
}

.featured-slide.active {
    display: block;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.featured-message {
    text-align: center;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-color);
}

.sender-info {
    text-align: right;
}

.sender-name {
    font-weight: 700;
    color: var(--secondary-color);
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

.message-date {
    color: var(--primary-color);
    font-weight: 600;
}

.featured-badge {
    background: var(--primary-color);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.message-content p {
    color: var(--dark-color);
    font-size: 1.3rem;
    line-height: 1.8;
    font-style: italic;
    margin: 0;
}

.slider-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.slider-btn {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

.slider-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.slider-dots {
    display: flex;
    gap: 0.5rem;
}

.slider-dots .dot {
    width: 12px;
    height: 12px;
    background: var(--gray-light);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.slider-dots .dot.active {
    background: var(--primary-color);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    position: relative;
    transform: translateY(-20px);
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 15px;
    left: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--gray-color);
    cursor: pointer;
    z-index: 1;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--primary-color);
}

.modal-body {
    padding: 3rem 2rem;
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 2.5rem;
}

.modal-body h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.modal-body p {
    color: var(--gray-color);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.modal-body .btn {
    margin-top: 1.5rem;
    padding: 12px 30px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .statistics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .featured-slide {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2.2rem;
    }
    
    .prayer-content h2 {
        font-size: 1.8rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .add-message-section {
        padding: 2rem;
    }
    
    .message-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    .statistics-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-slider {
        margin: 0 1rem 3rem;
    }
}

@media (max-width: 576px) {
    .page-title {
        font-size: 1.8rem;
    }
    
    .prayer-banner {
        padding: 2rem 1rem;
    }
    
    .prayer-content h2 {
        font-size: 1.5rem;
    }
    
    .message-card {
        padding: 1.5rem;
    }
    
    .pagination {
        flex-direction: column;
        gap: 1rem;
    }
    
    .page-numbers {
        order: 1;
    }
    
    .page-btn {
        width: 100%;
        justify-content: center;
    }
    
    .add-message-section {
        padding: 1.5rem;
    }
    
    .featured-slide {
        padding: 1.5rem;
    }
    
    .message-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .sender-info {
        text-align: center;
    }
}


/* في قسم message-header */
.message-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-light);
}

.sender-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid var(--primary-light);
}

.sender-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sender-info {
    flex: 1;
}

/* وفي قسم الرسائل المميزة */
.featured-message .message-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--light-color);
}

.featured-message .sender-avatar {
    width: 80px;
    height: 80px;
    border: 4px solid var(--primary-color);
}

.featured-message .sender-info {
    width: 100%;
}
/* تأكد من أن slider-controls ضمن featured-section */
.featured-section .slider-controls {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

/* إذا كان العنصر يطفو بشكل خاطئ */
.slider-controls {
    clear: both;
    position: relative;
    z-index: 10;
}

/* لمنع العناصر من الخروج من موقعها */
.featured-section {
    position: relative;
    
}

.featured-slider {
    margin-bottom: 2rem;
}

/* حاوية الترقيم */
.custom-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
    direction: rtl; /* لضمان الاتجاه الصحيح للعربية */
}

/* الأزرار (السابق والتالي) */
.page-btn {
    padding: 8px 20px;
    border-radius: 50px;
    background-color: #fff;
    color: var(--primary-color); /* لون بنفسجي هادئ أو اختر لون هويتك */
    border: 1px solid #e0e0e0;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-btn:hover:not(.disabled) {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.page-btn.disabled {
    color: #ccc;
    cursor: not-allowed;
    background-color: #f9f9f9;
}

/* أرقام الصفحات */
.page-numbers {
    display: flex;
    gap: 8px;
}

.page-number {
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background-color: #fff;
    color: #555;
    text-decoration: none;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.page-number:hover {
    border-color: var(--primary-color);
    color: #fff;
}

.page-number.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(142, 68, 173, 0.3);
}

/* تحسين للجوال */
@media (max-width: 480px) {
    .custom-pagination {
        gap: 5px;
    }
    .page-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    .page-number {
        width: 30px;
        height: 30px;
    }
}