/* =====================================================
   الشيخ أحمد إسماعيل الفشني - Khutab Pages Styles
   ===================================================== */

/* ============== Page Header (shared look) ============== */
.page-header {
    position: relative;
    padding: 150px 0 100px;
    background: var(--gradient-green);
    overflow: hidden;
}

.page-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(201, 162, 39, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(201, 162, 39, 0.1) 0%, transparent 40%);
}

.page-header-content {
    position: relative;
    text-align: center;
    color: var(--text-light);
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    color: var(--primary-gold-light);
}

.breadcrumb a {
    color: var(--primary-gold-light);
    transition: var(--transition-normal);
}

.breadcrumb a:hover {
    color: var(--primary-gold);
}

.breadcrumb i {
    font-size: 0.7rem;
}

.page-title {
    font-family: var(--font-calligraphy);
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--primary-gold);
    border-radius: var(--radius-full);
    color: var(--primary-green-dark);
}

.title-icon i {
    font-size: 1.5rem;
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--primary-gold-light);
    max-width: 700px;
    margin: 0 auto;
}

.page-header-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    line-height: 0;
}

.page-header-wave svg {
    width: 100%;
    height: 80px;
}

/* ============== Content ============== */
.khutab-section {
    padding: var(--spacing-xl) 0;
    background: var(--bg-primary);
}

.khutab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--spacing-md);
}

.khutab-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-md);
    border: 2px solid transparent;
    transition: var(--transition-normal);
    text-align: center;
}

.khutab-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary-gold);
    box-shadow: var(--shadow-lg);
}

.khutab-card .icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-green);
    border-radius: var(--radius-full);
    color: var(--primary-gold);
    box-shadow: var(--shadow-green);
}

.khutab-card .icon i {
    font-size: 1.7rem;
}

.khutab-card h3 {
    font-family: var(--font-calligraphy);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-green-dark);
}

.khutab-card p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.khutab-card a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    background: var(--gradient-gold);
    color: var(--primary-green-dark);
    font-weight: 600;
    transition: var(--transition-normal);
}

.khutab-card a:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

/* Disabled state for cards/links (coming soon) */
.khutab-card.disabled {
    position: relative;
    opacity: 0.85;
}

.khutab-card .disabled-link {
    pointer-events: none;
    filter: grayscale(0.3);
    cursor: not-allowed;
    opacity: 0.6;
}

.soon-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-gold);
    color: var(--primary-green-dark);
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: var(--shadow-gold);
}

.soon-note {
    background: rgba(201, 162, 39, 0.12);
    color: var(--primary-green-dark);
    border: 1px dashed rgba(201, 162, 39, 0.45);
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
}

/* ============== Written Khutab Listing ============== */
.khutab-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: var(--spacing-md) 0;
    flex-wrap: wrap;
}

.khutab-search {
    position: relative;
    flex: 1;
    min-width: min(520px, 100%);
}

.khutab-search i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.khutab-search input {
    width: 100%;
    padding: 0.95rem 1rem;
    padding-right: 2.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.khutab-search input:focus {
    outline: none;
    border-color: rgba(201, 162, 39, 0.6);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}

.khutab-stats {
    color: var(--text-secondary);
    font-weight: 600;
}

.khutab-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.khutab-item-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    transition: var(--transition-normal);
}

.khutab-item-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(201, 162, 39, 0.55);
}

.khutab-item-title {
    font-family: var(--font-calligraphy);
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    color: var(--primary-green-dark);
    line-height: 1.6;
}

.khutab-item-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.khutab-item-meta i {
    color: var(--primary-gold);
    margin-left: 0.35rem;
}

.khutab-item-excerpt {
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 1rem;
    min-height: 3.6em;
}

.khutab-item-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
}

.khutab-load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: var(--spacing-lg);
}

/* ============== Khutba Detail Page ============== */
.khutba-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin: 0 0 var(--spacing-md);
}

.khutba-content {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: clamp(1rem, 2.2vw, 1.5rem);
}

.khutba-article {
    line-height: 2.15;
    color: var(--text-primary);
    font-size: 1.08rem;
}

.khutba-article p {
    margin: 0.85rem 0;
}

.khutba-article a {
    color: var(--primary-gold);
    text-decoration: underline;
}

.khutba-body {
    direction: rtl;
    text-align: justify;
    line-height: 2.2;
    color: var(--text-primary);
    font-size: 1.125rem;
    font-family: var(--font-decorative);
    max-width: 900px;
    margin: 0 auto;
}

.khutba-heading {
    font-family: var(--font-calligraphy);
    color: var(--primary-green-dark);
    font-size: 1.6rem;
    line-height: 1.6;
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid rgba(201, 162, 39, 0.35);
}

.khutba-subheading {
    font-family: var(--font-decorative);
    color: var(--primary-green-dark);
    font-size: 1.2rem;
    margin: 1.1rem 0 0.35rem;
    line-height: 1.9;
}

.khutba-list {
    margin: 0.75rem 0 1.25rem;
    padding: 0 1.25rem 0 0;
}

.khutba-list li {
    margin: 0.55rem 0;
    line-height: 2.2;
}

.khutba-list-ordered {
    list-style: decimal;
}

.khutba-list-bullets {
    list-style: disc;
}

.khutba-paragraph {
    margin: 1.25rem 0;
    text-indent: 1.5em;
    line-height: 2.4;
    color: var(--text-primary);
}

.khutab-empty {
    background: var(--bg-card);
    border: 1px dashed var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    text-align: center;
    color: var(--text-secondary);
}

/* ============== Khutab Modal ============== */
.khutab-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    z-index: 2000;
}

.khutab-modal.active {
    display: flex;
}

.khutab-modal-content {
    width: min(980px, 100%);
    max-height: 86vh;
    overflow: auto;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.25rem 1.25rem 1rem;
    position: relative;
}

.khutab-modal-close {
    position: absolute;
    top: 0.85rem;
    left: 0.85rem;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-light);
    background: var(--bg-primary);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-normal);
}

.khutab-modal-close:hover {
    transform: translateY(-1px);
    border-color: rgba(201, 162, 39, 0.55);
}

.khutab-modal-title {
    font-family: var(--font-calligraphy);
    font-size: 1.65rem;
    color: var(--primary-green-dark);
    line-height: 1.7;
    padding-left: 3.25rem;
    margin-bottom: 0.5rem;
}

.khutab-modal-meta {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.khutab-modal-body {
    color: var(--text-primary);
    line-height: 2;
}

.khutab-modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.khutab-attachments {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-light);
}

.khutab-attachments h3 {
    font-family: var(--font-calligraphy);
    color: var(--primary-green-dark);
    margin-bottom: 0.75rem;
}

.khutab-attachments ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.khutab-attachments li {
    margin: 0.5rem 0;
}

.khutab-modal-body a {
    color: var(--primary-gold);
    text-decoration: underline;
}

.khutab-modal-footer {
    margin-top: 1.25rem;
    display: flex;
    justify-content: flex-end;
}
