/* ===== Global & Base Styles ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

#wrapper { overflow: visible; }

/* ===== New site-footer ===== */
.site-footer { background-color: #333333 !important; color: #ffffff; }
.site-footer * { box-sizing: border-box; }
.site-footer a { color: inherit; text-decoration: none; }

/* Reduce over-large bottom padding on home sections that had a wave divider */
.home-articles,
.home-books,
.home-audios,
.home-shorts,
.home-videos { padding-bottom: 60px !important; }

body {
    font-family: 'Poppins', 'Inter', sans-serif;
    color: #4a4a4a;
    line-height: 1.6;
    background-color: #FBFBFB;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { color: #1a1a1a; font-weight: 600; letter-spacing: -0.025em; }

.text-gradient-brand {
    background: linear-gradient(90deg, #00A79D 0%, #000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

:root {
    --primary-teal: #00A79D;
    --dark-text: #333;
    --light-gray: #F4F4F4;
    --gray-text: rgba(74, 85, 101, 1);
    --white: #fff;
    --icon-bg: #C8FFFC;
    --dark-icon: #323232;
    --brand: #00A79D;
    --brand-light: #F3FCFB;
    --text-dark: #333333;
    --text-gray: #717680;
    --border-light: #DFDFDC;
    --card-border: #D5D5D5;
}

/* ===== Chat & Messaging Styles ===== */
.user-message { display: flex; justify-content: flex-end; margin-bottom: 2rem; }

.user-message-content {
    max-width: 63%;
    padding: 2rem 3rem;
    border-radius: 18px 18px 0px 20px;
    border: 1px solid var(--border-light);
    background-color: var(--brand-light);
    color: var(--text-dark);
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 400;
    line-height: 1.5;
}

.ai-answer { color: var(--text-dark); font-size: clamp(1rem, 2vw, 1.5rem); font-weight: 400; line-height: 1.3; margin-bottom: 2rem; }
.ai-answer-title { color: var(--brand); font-weight: 500; font-size: clamp(1.25rem, 2.5vw, 2rem); display: block; margin-bottom: 0.25rem; }

.chat-input-container {
    border-radius: 20px;
    border: 2px solid var(--border-light);
    background-color: white;
    overflow: hidden;
    width: 100%;
    margin-top: 2rem;
}

.chat-input-fixed-wrapper {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(180deg, rgba(251, 251, 251, 0) 0%, #FBFBFB 20%, #FBFBFB 100%);
    padding: 1.5rem 0 2rem;
    z-index: 1000;
}

.chat-input-fixed-wrapper .chat-input-container {
    max-width: 1168px;
    margin: 0 auto;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.has-fixed-chat { padding-bottom: 180px; }

.chat-textarea {
    width: 100%;
    padding: 2rem 1.5rem 1rem;
    border: none;
    resize: none;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5rem;
    color: var(--text-dark);
    background-color: transparent;
}

.chat-textarea::placeholder { color: var(--text-gray); }
.chat-textarea:focus { outline: none; }

.chat-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0 1.5rem 1.25rem;
}

.action-button {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 22px;
    border: 1px solid #E6E7EB;
    background-color: white;
    cursor: pointer;
    box-shadow: 0 4px 11px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    font-size: 0.875rem;
    font-weight: 400;
    color: black;
}

.action-button:hover { background-color: #f9fafb; border-color: var(--brand); }
.send-button { border-color: var(--brand); background-color: var(--brand); color: white !important; }
.send-button:hover { background-color: #00968f; }
.send-button svg path { stroke: white; }

/* ===== Shared Buttons ===== */
.cta-button, .see-all-button, .exp2-cta-button, .popular2-btn-teal, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 40px;
    background-color: var(--primary-teal);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
}

.cta-button, .see-all-button, .exp2-cta-button { padding: 18px 20px; font-size: 20px; text-transform: capitalize; }
.btn { padding: 12px 24px; font-size: 24px; letter-spacing: 0.12px; }
.btn-secondary { background-color: transparent; border: 2px solid var(--white); }
.cta-button:hover, .see-all-button:hover, .exp2-cta-button:hover, .popular2-btn-teal:hover, .btn:hover { opacity: 0.9; transform: translateY(-2px); }

/* ===== Explore Hero Section ===== */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 120px 20px;
    gap: 56px;
    position: relative;
    overflow: hidden;
}

.hero-title {
    font-size: 60px;
    font-weight: 700;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    max-width: 1026px;
}

.hero-title h1 { font-size: clamp(42px, 6vw, 62px); max-width: 500px; line-height: 1.2; color: #000; text-align: center; }
.hero-title p { font-size: clamp(16px, 2vw, 17px); font-weight: 400; line-height: 26px; color: #1d1d1d; max-width: 600px; text-align: center; }

.exp2-container { max-width: 1000px; margin: 0 auto; }

/* ===== Avatar Cards ===== */
.avatar-layout { display: flex; justify-content: center; align-items: center; gap: 40px; flex-wrap: wrap; margin-top: 40px; }
.avatar-card { position: relative; width: 200px; }
.avatar-image { width: 148px; height: 180px; border-radius: 12px; overflow: hidden; display: flex; justify-content: center; align-items: center; }
.avatar-image img { width: 100%; height: 100%; object-fit: cover; }

.stat-card { position: absolute; width: 163px; border-radius: 12px; background-color: #fff; border: 1px solid #e7e6e6; padding: 8px; display: flex; gap: 10px; align-items: center; }
.stat-card-left { left: -20px; bottom: -20px; }
.stat-card-right { right: -20px; bottom: -20px; }
.stat-icon { width: 40px; height: 40px; border-radius: 8px; background-color: #f4f4f4; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-icon svg { width: 24px; height: 24px; }
.stat-content { display: flex; flex-direction: column; gap: 4px; }
.stat-number { font-size: 13px; font-weight: 600; line-height: 20px; color: #000; }
.stat-label { font-size: 13px; font-weight: 600; line-height: 20px; color: #333; }

/* ===== Category Tabs ===== */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 0 20px;
    margin-bottom: 60px;
}

.tab-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 40px;
    border: 1px solid #e3e3e3;
    background-color: #fff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 400;
    color: #000;
    transition: all 0.3s ease;
}

.tab-button.active { background-color: #00a79d; border-color: #00a79d; color: #fff; }
.tab-button:hover { border-color: #00a79d; }

.tab-icon { width: 24px; height: 24px; border-radius: 8px; padding: 6px; display: flex; align-items: center; justify-content: center; }
.tab-button.videos .tab-icon { background-color: #fff3f8; }
.tab-button.articles .tab-icon { background-color: #e0eefd; }
.tab-button.books .tab-icon { background-color: #feefe0; }
.tab-button.shorts .tab-icon { background-color: #e5f8f3; }
.tab-button.audios .tab-icon { background-color: #f5f8e5; }
.tab-button.questions .tab-icon { background-color: #f1e5f8; }
.tab-button.cards .tab-icon { background-color: #f1e5f8; }

/* ===== Articles & Videos Sections ===== */
.articles-section, .videos-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    padding: 88px 20px;
    background-color: #fff;
    width: 100%;
    
    
}

.section-title { font-family: 'Poppins', sans-serif; font-size: clamp(36px, 6vw, 54px); font-weight: 500; line-height: 1.2; text-align: center; color: #000; margin: 0; }

.articles-grid, .videos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%;
    max-width: 1000px;
}

.video-card { border: 1.5px solid #D5D7DA; }
.article-card, .video-card { display: flex; flex-direction: column; gap: 24px; border-radius: 16px; overflow: hidden; transition: transform 0.3s ease; }
.article-card:hover, .video-card:hover { transform: translateY(-4px); }

.article-image { width: 100%; height: 320px; border-radius: 16px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.article-image img { width: 100%; height: 100%; object-fit: cover; }

.video-thumbnail { height: 227px; position: relative; border-radius: 20px 20px 0 0; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; }

.play-button {
    width: 41px; height: 41px; border-radius: 50%; background-color: #f4f4f4;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 3.68px rgba(255,255,255,0.25), 0 0 0 7.361px rgba(255,255,255,0.25);
}
.play-button svg { width: 18px; height: 18px; }

.article-content, .video-content { display: flex; flex-direction: column; gap: 12px; padding: 0 12px 16px; }
.article-meta { display: flex; align-items: center; gap: 12px; font-size: 15px; color: #333; }
.article-meta-divider { width: 1px; height: 14px; background-color: #333; }
.article-title, .video-title { font-size: 23px; font-weight: 600; line-height: 32px; color: #000; }
.video-description { font-size: 16px; font-weight: 400; line-height: 24px; color: #000; }

/* ===== Popular2 Sections (Books & Cards) ===== */
.popular2-section { padding: 80px 40px; background-color: #fff; }
.popular2-cards-section { padding-top: 0; }
.popular2-container { max-width: 1000px; margin: 0 auto; }
.popular2-title { font-family: 'Poppins', sans-serif; font-size: 54px; font-weight: 500; color: #111; text-align: center; margin-bottom: 40px; letter-spacing: -0.5px; }

.popular2-books-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.popular2-book-card { display: flex; gap: 18px; align-items: flex-start; }
.popular2-book-img { width: 120px; height: 100px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.popular2-book-info { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.popular2-book-meta { font-size: 13px; color: #888; }
.popular2-book-heading { font-size: 15px; font-weight: 700; color: #111; line-height: 1.45; }

.popular2-cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 40px; }
.popular2-media-card { display: flex; flex-direction: column; gap: 14px; }
.popular2-media-card-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; }
.popular2-media-card-caption { font-size: 16px; font-weight: 700; color: #111; line-height: 1.4; }

/* ===== Questions Section ===== */
.exp2-questions-section { background-color: #f4f4f4; padding: 88px 40px; }
.exp2-section-title { font-family: 'Poppins', sans-serif; font-size: 54px; font-weight: 500; text-align: center; margin-bottom: 40px; color: #000; letter-spacing: 0.27px; }
.exp2-questions-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: start; }
.exp2-questions-column { display: flex; flex-direction: column; gap: 22px; }

.exp2-question-card { background-color: #fff; border-radius: 14.5px; padding: 32px; display: flex; flex-direction: column; gap: 24px; }
.exp2-featured-image { width: 100%; height: 100%; border-radius: 14.5px; object-fit: cover; min-height: 350px; }
.exp2-icon-wrapper { width: 45px; height: 45px; background-color: #f4f4f4; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.exp2-icon-wrapper svg { width: 22px; height: 22px; }
.exp2-question-title { font-size: 20px; font-weight: 600; color: #000; line-height: 1.45; }
.exp2-question-description { font-size: 15px; font-weight: 400; color: #1d1d1d; line-height: 1.57; }

/* ===== Audios Section ===== */
.exp2-audios-section { background-color: #333; padding: 88px 40px; }
.exp2-audios-section .exp2-section-title { color: #fff; }
.exp2-audios-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 40px; }
.exp2-audio-card { background-color: #fff; border-radius: 14.5px; padding: 32px; display: flex; flex-direction: column; gap: 24px; }
.exp2-play-icon-wrapper { width: 46px; height: 47px; background-color: #f4f4f4; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.exp2-play-icon-wrapper svg { width: 30px; height: 30px; }
.exp2-see-more-button { background-color: transparent; border: 2px solid #fff; color: #fff; padding: 24px 32px; border-radius: 100px; font-size: 24px; font-weight: 500; }

/* ===== Shorts Section ===== */
.exp2-shorts-section { background-color: #fff; padding: 88px 40px; }
.exp2-shorts-grid.owl-theme .owl-nav [class*='owl-'] {
    background-color: #00a79d; border-radius: 50%; width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
}
.exp2-short-card { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 9/16; }
.exp2-short-image { width: 100%; height: 100%; object-fit: cover; }
.exp2-short-play-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,0.5); border-radius: 50%; width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; pointer-events: none; transition: background 0.2s; }
.exp2-short-card:hover .exp2-short-play-btn { background: rgba(0,167,157,0.8); }
.exp2-short-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 44%, #000 100%);
    display: flex; flex-direction: column; justify-content: flex-end; padding: 24px;
}
.exp2-short-title { font-size: 23px; font-weight: 600; color: #fff; line-height: 1.4; }
.exp2-short-author { font-size: 19px; font-weight: 500; color: #fff; text-decoration: underline; }
.exp2-short-date { font-size: 17px; font-weight: 400; color: #c6c5c5; }

/* ===== About Page Hero ===== */
.hero {
    background-color: #333333;
    color: #fff;
    padding: 60px 141px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
}

.hero-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 130px;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
}

.hero-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    max-width: 580px;
}

.hero-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(42px, 6vw, 68px);
    font-weight: 700;
    color: #fff;
    line-height: 1.05;
    letter-spacing: -0.5px;
    margin: 0;
}

.hero-subtitle { font-size: 16px; font-weight: 300; line-height: 1.7; color: rgba(255,255,255,0.85); margin: 0; }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-image-wrapper { display: flex; justify-content: center; align-items: center; flex-shrink: 0; }

.chat-bubble-wrapper {
    cursor: pointer;
    width: 540px;
    height: 540px;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.chat-bubble-wrapper:hover { transform: scale(1.02); }
.bubble-shape { width: 100%; height: 100%; filter: drop-shadow(0px 12px 32px rgba(0,0,0,0.4)); }

/* ===== Lightbox ===== */
.video-lightbox { display: none; position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.88); align-items: center; justify-content: center; }
.video-lightbox.active { display: flex; }
.video-lightbox-inner { position: relative; width: 90%; max-width: 960px; aspect-ratio: 16/9; background: #000; border-radius: 16px; overflow: hidden; }
.video-lightbox-inner iframe { width: 100%; height: 100%; }
.lightbox-close { position: absolute; top: -44px; right: 0; color: #fff; font-size: 36px; cursor: pointer; background: none; border: none; line-height: 1; }

/* ===== Features Section (About Page) ===== */
.features-section { padding: 80px 40px; background-color: white; }
.features-container { max-width: 1165px; margin: 0 auto; }
.features-content { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.features-left { display: flex; flex-direction: column; gap: 32px; }
.section-subtitle { font-size: 20px; font-weight: 300; color: var(--gray-text); line-height: 1.5; margin-top: 32px; letter-spacing: 0.12px; }
.features-list { display: flex; flex-direction: column; gap: 14px; }
.feature-item { display: flex; align-items: center; gap: 12px; }
.feature-badge { width: 28px; height: 28px; background-color: var(--primary-teal); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.feature-badge svg { width: 16px; height: 16px; stroke: white; stroke-width: 1.5; }
.feature-text { font-size: 18px; font-weight: 500; color: var(--dark-text); letter-spacing: 0.09px; }

.features-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 32px;
    align-items: start;
}

.features-right .feature-card:nth-child(1),
.features-right .feature-card:nth-child(3) { margin-top: 60px; }

.features-right .feature-card:nth-child(2),
.features-right .feature-card:nth-child(4) { margin-top: 0; }

.feature-card {
    background-color: white;
    border-radius: 8px;
    padding: 20px 24px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.09);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feature-card-icon { width: 44px; height: 44px; background-color: var(--icon-bg); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 0; }
.feature-card-icon svg { width: 24px; height: 24px; stroke: var(--dark-icon); stroke-width: 1.5; }
.feature-card-title { font-size: 20px; font-weight: 500; margin-bottom: 0; letter-spacing: 0.1px; color: #111; }
.feature-card-text { font-size: 14px; font-weight: 500; color: var(--dark-text); line-height: 1.78; letter-spacing: 0.07px; }

/* ===== Path Section (About Page) ===== */
.path-section { padding: 80px 40px; background-color: white; }
.path-container { max-width: 1165px; margin: 0 auto; }
.path-header { text-align: center; margin-bottom: 40px; }
.path-title { font-size: 54px; font-weight: 500; margin-bottom: 20px; letter-spacing: 0.27px; }
.path-description { font-size: 24px; font-weight: 500; color: var(--gray-text); line-height: 1.61; max-width: 900px; margin: 0 auto; letter-spacing: 0.12px; }
.path-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.path-card { background-color: white; border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 4px 14px rgba(0,0,0,0.09); }
.path-card-image { width: 100%; height: 216px; object-fit: cover; border-radius: 20px 20px 0 0; }
.path-card-badge { width: 72px; height: 72px; background-color: var(--primary-teal); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: -36px auto 0; position: relative; z-index: 1; flex-shrink: 0; }
.path-card-badge svg { width: 40px; height: 40px; stroke: white; stroke-width: 3; fill: none; }
.path-card-content { padding: 20px; text-align: center; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.path-card-title { font-size: 24px; font-weight: 500; margin-bottom: 12px; letter-spacing: 0.12px; }
.path-card-text { font-size: 20px; font-weight: 300; color: var(--gray-text); line-height: 1.5; letter-spacing: 0.1px; }

/* ===== Mobile Responsive ===== */
@media (max-width: 1024px) {
    .chat-bubble-wrapper { width: 380px; height: 380px; }
    .hero-content { gap: 24px; }
    .features-content { grid-template-columns: 1fr 1fr; }
    .path-cards { grid-template-columns: repeat(2, 1fr); }
    .popular2-books-grid { gap: 24px; }
}

@media (max-width: 768px) {

    /* Hero section mobile */
.hero-section {
    padding: 60px 20px 40px;
}
.islamic-typography p{
     padding-left: 0;
    padding-right: 0;
    margin-top: 12px;
    margin-bottom: 12px;
}

/* إخفاء الكروت الجانبية في الموبايل */
.hero-section > div[style*="position: absolute"] {
    position: static !important;
    transform: none !important;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
}

/* تحط الكارتين تحت بعض */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
    /* Hero */
    .hero { padding: 60px 24px; min-height: auto; }
    .hero-content { flex-direction: column; align-items: center; text-align: center; gap: 32px; }
    .hero-text { align-items: center; max-width: 100%; }
    .hero-buttons { justify-content: center; }
    .chat-bubble-wrapper { width: 280px; height: 280px; }
    .hero-image-wrapper { margin-right: 0; justify-content: center; }

    /* Features */
    .features-section { padding: 60px 24px; }
    .features-content { grid-template-columns: 1fr; gap: 40px; }
    .features-right { grid-template-columns: 1fr 1fr; gap: 16px; }
    .features-right .feature-card:nth-child(1),
    .features-right .feature-card:nth-child(2),
    .features-right .feature-card:nth-child(3),
    .features-right .feature-card:nth-child(4) { margin-top: 0; }

    /* Explore */
    .hero-section { padding: 60px 20px; gap: 40px; }
    .hero-title h1, .exp2-section-title { font-size: 36px; }
    .avatar-layout { gap: 20px; }
    .category-tabs { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; gap: 8px; padding-bottom: 8px; scrollbar-width: none; }
    .category-tabs::-webkit-scrollbar { display: none; }
    .tab-button { flex: 0 0 auto; }

    .articles-section, .videos-section, .exp2-questions-section, .exp2-audios-section, .exp2-shorts-section { padding: 60px 24px; gap: 30px; }
    .section-title { font-size: 32px; }
    .exp2-featured-image { min-height: 250px; }

    /* Grids → horizontal scroll on mobile */
    .articles-grid, .videos-grid, .exp2-questions-grid, .exp2-audios-grid, .popular2-books-grid, .popular2-cards-grid {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto;
        overflow-y: visible;
        gap: 14px;
        padding-bottom: 12px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        max-height: none !important;
        grid-template-columns: unset !important;
        grid-template-rows: unset !important;
    }

    .articles-grid::-webkit-scrollbar,
    .videos-grid::-webkit-scrollbar,
    .exp2-questions-grid::-webkit-scrollbar,
    .exp2-audios-grid::-webkit-scrollbar,
    .popular2-books-grid::-webkit-scrollbar,
    .popular2-cards-grid::-webkit-scrollbar { display: none; }

    .exp2-shorts-grid.owl-carousel { display: block !important; }

    .article-card        { flex: 0 0 240px; scroll-snap-align: start; }
    .video-card          { flex: 0 0 260px; scroll-snap-align: start; }
    .exp2-question-card  { flex: 0 0 280px; scroll-snap-align: start; }
    .exp2-audio-card     { flex: 0 0 200px; scroll-snap-align: start; }
    .popular2-book-card  { flex: 0 0 200px; scroll-snap-align: start; flex-direction: column !important; gap: 12px !important; }
    .popular2-media-card { flex: 0 0 170px; scroll-snap-align: start; }

    /* Path */
    .path-cards { grid-template-columns: 1fr; }
    .path-title { font-size: 32px; }
    .path-description { font-size: 18px; }
    .path-section { padding: 40px 20px; }

    /* Popular */
    .popular2-books-grid { grid-template-columns: 1fr; }
    .popular2-cards-grid { grid-template-columns: 1fr; }
    .popular2-title { font-size: 36px; }

    /* Buttons */
    #attach-btn, #voice-btn, #send-btn { font-size: 0; padding: 10px 14px; }
    #attach-btn svg, #voice-btn svg, #send-btn svg { width: 20px; height: 20px; }

    /* Suggested questions */
    .suggested-question { font-size: 12px; padding: 8px 14px; white-space: nowrap; }

    .chat-input-fixed-wrapper { padding: 1rem 20px 1.5rem; }
}

@media (max-width: 640px) {
    .hero-title { font-size: 36px; }
    .hero-subtitle { font-size: 18px; }
    .btn { padding: 16px 24px; font-size: 18px; }
    .hero-buttons { flex-direction: column; width: 100%; }
    .section-title { font-size: 32px; }
    .section-subtitle { font-size: 18px; }
    .feature-text { font-size: 16px; }
    .features-right { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hero-title h1 { font-size: 32px; line-height: 1.3; text-align: center; }
    .hero-title p { font-size: 14px; }
    .cta-button span { font-size: 16px; }
    .section-title { font-size: 36px; }
    .stat-card { width: 140px; padding: 6px; }
    .stat-number, .stat-label { font-size: 12px; }
    .article-title, .video-title { font-size: 18px; line-height: 26px; }
}
/* ===== Footer Social Icons ===== */
.footer-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #fff;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
}
.footer-social-icon:hover {
    background: #00A79D;
    color: #fff;
}

/* ===== Floating Chat Button ===== */
.floating-chat-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00A79D, #007a72);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 167, 157, 0.4);
    cursor: pointer;
    z-index: 9999;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.floating-chat-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(0, 167, 157, 0.5);
}
@media (max-width: 768px) {
    .exp2-featured {
        display: none !important;
    }
    
   
    .exp2-questions-grid {
    display: flex !important;
    flex-direction: column !important;
    overflow-x: visible !important;
}

.exp2-questions-column {
    flex: none !important;
    width: 100% !important;
}

.exp2-featured {
    display: none !important;
}
}
.cq-search-section {
    background-color: #f4f4f4;
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}
.cq-search-bar {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1.5px solid #e3e3e3;
}
.cq-search-icon {
    padding: 0 14px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.cq-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 13px 8px;
    background: transparent;
    color: #333;
    font-family: inherit;
}
.cq-search-input::placeholder { color: #bbb; }
.cq-go-btn {
    background: #00A79D;
    color: #fff;
    border: none;
    padding: 13px 32px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 1px;
    transition: background 0.2s;
    flex-shrink: 0;
    font-family: inherit;
}
.cq-go-btn:hover { background: #00968f; }
/* ===== Common Questions Search ===== */
.cq-search-section {
    background-color: #f4f4f4;
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}
.cq-search-bar {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1.5px solid #e3e3e3;
}
.cq-search-icon {
    padding: 0 14px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.cq-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 13px 8px;
    background: transparent;
    color: #333;
    font-family: inherit;
}
.cq-search-input::placeholder { color: #bbb; }
.cq-go-btn {
    background: #00A79D;
    color: #fff;
    border: none;
    padding: 13px 32px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 1px;
    transition: background 0.2s;
    flex-shrink: 0;
    font-family: inherit;
}
.cq-go-btn:hover { background: #00968f; }

/* ===== Common Questions Category Tabs ===== */
.cq-cat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.cq-cat-btn {
     display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: 30px;
    border: 1.5px solid #e3e3e3;
    background: #fff;
    font-size: 0.875rem;
    color: #333;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}
.cq-cat-btn:hover,
.cq-cat-btn.active {
    background: #00A79D;
    border-color: #00A79D;
    color: #fff;
    text-decoration: none;
}
.cq-clear-btn {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 30px;
    border: 1.5px solid #e3e3e3;
    background: #fff3f3;
    font-size: 0.875rem;
    color: #e55;
    text-decoration: none;
    transition: all 0.2s;
}
.cq-clear-btn:hover { background: #ffe0e0; color: #c00; text-decoration: none; }

/* ===== Show page content padding ===== */
.article-content {
    padding: 0 40px !important;
}
.article-content .text-justify {
    padding-left: 0 !important;
    padding-right: 0 !important;
}
@media (max-width: 768px) {
    .article-content {
        padding: 0 16px !important;
    }
}

/* ===== Accordion Footer - smaller action buttons ===== */
.common-questions .accordion-footer .actions .btn {
    width: 28px !important;
    height: 28px !important;
    font-size: 12px !important;
    margin-right: 6px !important;
    padding: 0 !important;
}
.share-question span {
    font-size: 13px;
}
.share-question .jssocials-share-link .jssocials-share-logo {
    font-size: 20px !important;
}

/* ===== Fix jsSocials share icons in accordion ===== */
.share-question .jssocials-shares {
    display: inline-flex !important;
    align-items: center;
    flex-wrap: nowrap;
}
.share-question .jssocials-share {
    display: inline-flex !important;
    margin: 0 6px;
}
.share-question .jssocials-share-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

/* ===== Custom Accordion (Common Questions) ===== */
.cq-accordion-item {
    border: 1px solid #e3e3e3;
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
    background: #fff;
}
.cq-accordion-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: #f8f8f8;
    border: none;
    text-align: start;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: background 0.2s;
}
.cq-accordion-btn:hover,
.cq-accordion-btn.open {
    background: #f0fafa;
}
.cq-accordion-title {
    flex: 1;
}
.cq-accordion-arrow {
    flex-shrink: 0;
    color: #00A79D;
    transition: transform 0.25s;
}
.cq-accordion-body {
    padding: 20px;
    border-top: 1px solid #e3e3e3;
    color: #444;
    line-height: 1.7;
}

/* ===== Shorts Section Grid ===== */
.shorts-section-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
@media (max-width: 1024px) {
    .shorts-section-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .shorts-section-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 480px) {
    .shorts-section-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* ===== Mobile Fixes ===== */
@media (max-width: 768px) {

    /* 1. Search bar - GO button visible */
    .cq-search-section {
        padding: 0.75rem;
    }
    .cq-search-input {
        font-size: 0.875rem;
        padding: 11px 6px;
        min-width: 0;
    }
    .cq-go-btn {
        padding: 11px 18px;
        font-size: 0.875rem;
        letter-spacing: 0;
        flex-shrink: 0;
    }

    /* 2. Category tabs - horizontal scroll on one line */
    .cq-cat-tabs {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        overflow-y: visible;
        padding-bottom: 6px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .cq-cat-tabs::-webkit-scrollbar { display: none; }
    .cq-cat-item { flex-shrink: 0; }
    .cq-cat-btn { white-space: nowrap; flex-shrink: 0; }
    .cq-clear-btn { flex-shrink: 0; }

    /* 3. Accordion number circles - don't squish */
    .accordion-button .num {
        flex-shrink: 0 !important;
        min-width: 32px !important;
        width: 32px !important;
        height: 32px !important;
    }
    .accordion-button {
        gap: 10px;
        align-items: flex-start !important;
        padding: 14px 12px !important;
        font-size: 0.9rem;
    }
}
/* Dropdown active link */
.cq-dropdown a.active {
    background: #f0faf9;
    color: #00A79D;
    font-weight: 600;
}
/* Mobile dropdown */
@media (max-width: 768px) {
    .cq-dropdown {
        position: fixed;
        left: 1rem;
        right: 1rem;
        top: auto;
        min-width: unset;
        z-index: 999;
    }
}
.cq-cat-item {
    position: relative;
}

.cq-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 220px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 9999;
    padding: 6px 0;
    border: 1px solid #eee;
    max-height: 300px;
    overflow-y: auto;
    max-width: 280px;
    width: max-content;
}

.cq-dropdown a {
    display: block !important;
    padding: 10px 18px;
    color: #444;
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s;
}

.cq-dropdown a:hover,
.cq-dropdown a.active {
    background: #f0faf9;
    color: #00A79D;
    text-decoration: none;
}
.common-questions .accordion-body .accordion-footer {
    margin-top: 20px;
}
.item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 24px;
}
.item-tag-badge {
    display: inline-block !important;
    background: transparent !important;
    color: #888 !important;
    border: 1px solid #ccc !important;
    border-radius: 20px !important;
    padding: 4px 14px !important;
    font-size: 13px !important;
    text-decoration: none !important;
    transition: all 0.2s;
}
.item-tag-badge:hover {
    border-color: #00A79D !important;
    color: #00A79D !important;
}
.related-items-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
@media (max-width: 768px) {
    .related-items-grid {
        grid-template-columns: repeat(3, 280px);
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 12px;
    }
}
.audioplayer.skin-wave .ap-controls .con-playpause .playbtn {
    border-radius: 50% !important;
    width: 46px !important;
    height: 46px !important;
}
.video-desc .islamic-typography p {
    text-align: left !important;
    text-indent: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
@media (max-width: 768px) {
    .common-questions .accordion .accordion-item .accordion-collapse .accordion-body .accordion-footer {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    .common-questions .accordion .accordion-item .accordion-collapse .accordion-body .accordion-footer .actions {
        justify-content: flex-start !important;
    }
    .common-questions .accordion .accordion-item .accordion-collapse .accordion-body .accordion-footer .share-question {
        justify-content: flex-start !important;
        margin-top: 8px !important;
    }
}

/* ===== Hide OWL Carousel arrows on mobile ===== */
@media (max-width: 767px) {
    .exp2-shorts-grid.owl-theme .owl-nav,
    .exp2-shorts-grid .owl-nav {
        display: none !important;
    }
}
.popular2-books-grid {
    grid-template-columns: unset !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
}
.popular2-books-grid .article-card {
    flex: 0 0 240px !important;
}