/* ============================================ explore.css - تصميم صفحة الاستكشاف العامة ============================================ */
:root {
    --bg-dark: #0a0a1a;
    --bg-card: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --primary: #6c5ce7;
    --primary-light: #a29bfe;
    --accent: #00cec9;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --gradient-primary: linear-gradient(135deg, #6c5ce7, #a29bfe);
    --gradient-accent: linear-gradient(135deg, #00cec9, #6c5ce7);
}

/* ---- Hero Section ---- */
.hero-section {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 60px 20px 80px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(108, 92, 231, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 206, 201, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(108, 92, 231, 0.08) 0%, transparent 60%);
    z-index: 0;
}

.hero-stars {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(2px 2px at 10% 20%, rgba(255, 255, 255, 0.4) 0%, transparent 100%),
        radial-gradient(2px 2px at 30% 60%, rgba(255, 255, 255, 0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 50% 30%, rgba(255, 255, 255, 0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 70% 70%, rgba(255, 255, 255, 0.3) 0%, transparent 100%),
        radial-gradient(2px 2px at 90% 40%, rgba(255, 255, 255, 0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 20% 80%, rgba(255, 255, 255, 0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 60% 10%, rgba(255, 255, 255, 0.5) 0%, transparent 100%),
        radial-gradient(2px 2px at 80% 90%, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
    animation: twinkle 4s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes twinkle {
    0% {
        opacity: 0.6;
    }

    100% {
        opacity: 1;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(108, 92, 231, 0.15);
    border: 1px solid rgba(108, 92, 231, 0.3);
    padding: 8px 20px;
    border-radius: 50px;
    color: var(--primary-light);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 25px;
    animation: fadeInDown 0.8s ease;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-title .gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 35px;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-btns {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 35px;
    border-radius: 16px;
    background: var(--gradient-primary);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(108, 92, 231, 0.4);
    transition: all 0.3s;
}

.btn-hero-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(108, 92, 231, 0.5);
}

.btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 35px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ---- Section Base ---- */
.explore-section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.section-header h2 i {
    margin-left: 10px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

.section-divider {
    height: 1px;
    max-width: 1200px;
    margin: 0 auto;
    background: linear-gradient(90deg, transparent, rgba(108, 92, 231, 0.3), transparent);
}

/* ---- News Cards ---- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.news-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.3s;
    animation: fadeInUp 0.5s ease both;
}

.news-card:hover {
    transform: translateY(-5px);
    border-color: rgba(108, 92, 231, 0.3);
}

.news-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card-body {
    padding: 20px;
}

.news-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.news-card-meta img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(108, 92, 231, 0.3);
}

.news-card-meta .meta-info span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.news-card-meta .meta-info strong {
    font-size: 0.9rem;
    color: var(--text-main);
}

.news-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.5;
    color: var(--text-main);
}

.news-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ---- Featured Posts ---- */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.featured-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 24px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 0 18px 18px 0;
}

.featured-card:hover {
    transform: translateY(-4px);
    border-color: rgba(108, 92, 231, 0.3);
}

.featured-card .post-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.featured-card .post-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.featured-card .post-text {
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-card .post-stats {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ---- NASA Section ---- */
.nasa-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 400px;
}

.nasa-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 400px;
}

.nasa-info {
    padding: 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.nasa-info .nasa-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    width: fit-content;
}

.nasa-info h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.4;
}

.nasa-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Stats Section ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 30px 24px;
    text-align: center;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(108, 92, 231, 0.3);
}

.stat-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 5px;
}

/* ---- Courses Preview ---- */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.course-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 24px;
    transition: all 0.3s;
}

.course-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 206, 201, 0.3);
}

.course-card .course-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 15px;
    background: rgba(0, 206, 201, 0.1);
    color: var(--accent);
}

.course-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.course-card .course-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

/* ---- Top Students ---- */
.students-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.student-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s;
}

.student-card:hover {
    transform: translateY(-4px);
}

.student-card img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
    border: 3px solid rgba(108, 92, 231, 0.3);
}

.student-card h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.student-card span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.student-card .student-badge {
    display: inline-block;
    margin-top: 10px;
    background: rgba(108, 92, 231, 0.1);
    color: var(--primary-light);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* ---- FAQ Section ---- */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
}

.faq-item:hover {
    border-color: rgba(108, 92, 231, 0.3);
}

.faq-question {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-weight: 700;
    font-size: 1rem;
}

.faq-question i {
    color: var(--primary);
    transition: transform 0.3s;
}

.faq-item.open .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.faq-item.open .faq-answer {
    max-height: 300px;
    padding: 0 24px 20px;
}

/* ---- CTA Section ---- */
.cta-section {
    text-align: center;
    padding: 80px 20px;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(108, 92, 231, 0.1) 0%, transparent 70%);
}

.cta-section h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 15px;
    position: relative;
}

.cta-section p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 30px;
    position: relative;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    margin-top: 20px;
}

/* ---- Login Prompt ---- */
.login-prompt {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(108, 92, 231, 0.08);
    border: 1px solid rgba(108, 92, 231, 0.2);
    padding: 8px 18px;
    border-radius: 12px;
    color: var(--primary-light);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s;
    margin-top: 15px;
}

.login-prompt:hover {
    background: rgba(108, 92, 231, 0.15);
}

/* ---- Animations ---- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .hero-section {
        min-height: 70vh;
        padding: 40px 15px 60px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-desc {
        font-size: 1rem;
    }

    .hero-btns {
        flex-direction: column;
        align-items: center;
    }

    .nasa-card {
        grid-template-columns: 1fr;
    }

    .nasa-img {
        min-height: 250px;
    }

    .nasa-info {
        padding: 20px;
    }

    .news-grid,
    .featured-grid,
    .courses-grid,
    .students-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-header h2 {
        font-size: 1.4rem;
    }

    .explore-section {
        padding: 40px 15px;
    }

    .cta-section {
        padding: 50px 20px;
    }

    .cta-section h2 {
        font-size: 1.5rem;
    }
}

/* ---- Social Actions & Modal ---- */
.action-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.3s;
    font-family: inherit;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.action-btn.liked {
    color: #e91e63;
}

.action-btn.comment-btn:hover {
    color: #00cec9;
}

.action-btn.share-btn:hover {
    color: #74b9ff;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 26, 0.9);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Content */
.modal-content {
    background: #1e293b;
    width: 90%;
    max-width: 900px;
    height: 85vh;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    overflow: hidden;
    transform: scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

/* Modal Layout (Split View) */
.modal-layout {
    display: flex;
    width: 100%;
    height: 100%;
}

.modal-media-col {
    flex: 1.5;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.modal-media-col img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.modal-side-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 350px;
    background: #1e293b;
}

/* Side Column Header */
.modal-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(108, 92, 231, 0.5);
}

.modal-author-info {
    display: flex;
    flex-direction: column;
}

.modal-author-name {
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.95rem;
}

.modal-author-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.close-modal-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal-btn:hover {
    color: #ff6b6b;
}

/* Scrollable Content Area */
.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.modal-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-main);
    margin-bottom: 25px;
    white-space: pre-line;
}

/* Stats Row */
.modal-stats {
    display: flex;
    justify-content: space-between;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Action Buttons inside Modal */
.modal-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.modal-action-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    font-family: inherit;
}

.modal-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.modal-action-btn.liked {
    color: #ff6b6b;
    border-color: rgba(255, 107, 107, 0.3);
    background: rgba(255, 107, 107, 0.1);
}

/* Comments Section */
.modal-comments-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comment-item {
    display: flex;
    gap: 10px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 14px;
    border-radius: 12px;
    max-width: 85%;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 0.85rem;
}

.comment-author {
    font-weight: 700;
    color: var(--text-main);
}

.comment-date {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.comment-text {
    font-size: 0.9rem;
    color: #e2e8f0;
    line-height: 1.4;
}

/* Footer (Comment Input) */
.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: #1e293b;
}

.comment-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.modal-footer .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.modal-footer input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 10px 15px;
    color: white;
    outline: none;
    transition: border-color 0.2s;
}

.modal-footer input:focus {
    border-color: var(--primary);
}

.send-comment-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.send-comment-btn:hover {
    transform: scale(1.1);
}

/* Read More Button */
.read-more-btn {
    background: none;
    border: none;
    color: #6c5ce7;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 5px 0;
    margin-top: 5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
    font-family: inherit;
}

.read-more-btn:hover {
    color: #5f50d4;
    text-decoration: underline;
}

.view-post-link {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-right: 10px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.view-post-link:hover {
    opacity: 1;
    color: #6c5ce7;
}

.post-content-wrapper {
    position: relative;
}

/* Mobile Responsiveness for Modal */
@media (max-width: 768px) {
    .modal-layout {
        flex-direction: column;
        overflow-y: auto;
    }

    .modal-media-col {
        flex: none;
        height: 300px;
        border-left: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .modal-side-col {
        min-width: auto;
        overflow: visible;
    }

    .modal-content {
        height: 90vh;
        overflow-y: auto;
    }

    .modal-body {
        overflow: visible;
    }

    .modal-footer {
        position: sticky;
        bottom: 0;
        z-index: 10;
    }
}