/*
 * EduNoor - Component Styles
 * Hero, Categories, Quiz, Podcast, Dashboard, Testimonials, FAQ, Newsletter
 */

/* ===== HERO SECTION ===== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 80px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(108,99,255,0.15) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 50%, rgba(0,210,255,0.1) 0%, transparent 60%);
}

.hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-light);
    border-radius: 50%;
    opacity: 0.3;
    animation: particleFloat 8s infinite ease-in-out;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 6px 16px;
    background: rgba(108,99,255,0.15);
    border: 1px solid rgba(108,99,255,0.3);
    border-radius: var(--radius-full);
    font-size: var(--fs-sm);
    color: var(--primary-light);
    font-weight: var(--fw-medium);
    margin-bottom: var(--space-xl);
}

.hero-title {
    font-size: var(--fs-hero);
    font-weight: var(--fw-extrabold);
    line-height: var(--lh-tight);
    margin-bottom: var(--space-lg);
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: var(--fs-lg);
    color: var(--text-secondary);
    line-height: var(--lh-normal);
    margin-bottom: var(--space-2xl);
    max-width: 560px;
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-3xl);
    flex-wrap: wrap;
}

.hero-search {
    display: flex;
    max-width: 500px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-3xl);
    backdrop-filter: blur(10px);
}

.hero-search input {
    flex: 1;
    padding: 0.875rem 1.5rem;
    background: transparent;
    color: var(--text-primary);
}

.hero-search input::placeholder { color: var(--text-muted); }

.hero-search button {
    padding: 0 1.5rem;
    background: var(--primary);
    color: #fff;
    border-radius: 0 var(--radius-full) var(--radius-full) 0;
}

.hero-stats {
    display: flex;
    gap: var(--space-3xl);
}

.hero-stat {
    text-align: center;
}

.hero-stat .stat-number {
    font-size: var(--fs-3xl);
    font-weight: var(--fw-extrabold);
    color: var(--text-primary);
}

.hero-stat .stat-label {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    margin-top: 2px;
}

.hero-visual {
    position: absolute;
    right: -5%;
    top: 50%;
    transform: translateY(-50%);
    width: 45%;
    z-index: 1;
}

.hero-float-icon {
    position: absolute;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--fs-xl);
    animation: floatIcon 6s infinite ease-in-out;
    color: var(--primary-light);
}

.hero-float-icon:nth-child(1) { top: 15%; right: 10%; animation-delay: 0s; }
.hero-float-icon:nth-child(2) { top: 35%; right: 30%; animation-delay: 1s; }
.hero-float-icon:nth-child(3) { top: 55%; right: 5%; animation-delay: 2s; }
.hero-float-icon:nth-child(4) { top: 75%; right: 25%; animation-delay: 3s; }
.hero-float-icon:nth-child(5) { top: 25%; right: 50%; animation-delay: 4s; }

/* ===== CATEGORIES SECTION ===== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-lg);
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    cursor: pointer;
}

.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow-sm);
}

.category-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: var(--fs-2xl);
    margin-bottom: var(--space-md);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
}

.category-card h3 {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    margin-bottom: var(--space-xs);
}

.category-card span {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

/* ===== REVISION / FLASHCARD SECTION ===== */
.flashcard-preview {
    perspective: 1000px;
    cursor: pointer;
}

.flashcard-inner {
    position: relative;
    width: 100%;
    min-height: 250px;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flashcard-preview.flipped .flashcard-inner {
    transform: rotateY(180deg);
}

.flashcard-front,
.flashcard-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: var(--fs-xl);
    text-align: center;
}

.flashcard-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, rgba(108,99,255,0.1), rgba(0,210,255,0.1));
}

/* ===== AI PREDICTION SECTION ===== */
.ai-prediction-card {
    padding: var(--space-2xl);
    background: linear-gradient(135deg, rgba(108,99,255,0.08), rgba(0,210,255,0.08));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.ai-prediction-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(108,99,255,0.1), transparent);
    animation: pulse 4s infinite;
}

.ai-glow-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    color: #fff;
    margin-bottom: var(--space-md);
}

.prediction-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: var(--space-sm) 0;
}

.prediction-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 1s ease;
}

/* ===== QUIZ PREVIEW SECTION ===== */
.quiz-preview-card {
    padding: var(--space-2xl);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.quiz-type-badge {
    display: inline-flex;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    margin-right: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.quiz-type-badge.mcq { background: rgba(108,99,255,0.15); color: var(--primary-light); }
.quiz-type-badge.tf { background: rgba(46,213,115,0.15); color: var(--success); }
.quiz-type-badge.fill { background: rgba(0,210,255,0.15); color: var(--secondary); }
.quiz-type-badge.long { background: rgba(255,165,2,0.15); color: var(--warning); }

.quiz-option-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quiz-option-item:hover {
    border-color: var(--primary);
    background: rgba(108,99,255,0.05);
}

/* ===== PODCAST SECTION ===== */
.podcast-card {
    display: flex;
    gap: var(--space-lg);
    padding: var(--space-lg);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.podcast-card:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

.podcast-thumb {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: var(--fs-2xl);
}

.podcast-info h3 { font-size: var(--fs-base); font-weight: var(--fw-semibold); margin-bottom: 4px; }
.podcast-info p { font-size: var(--fs-sm); color: var(--text-muted); }
.podcast-meta { display: flex; gap: var(--space-md); font-size: var(--fs-xs); color: var(--text-muted); margin-top: var(--space-sm); }

/* ===== DASHBOARD PREVIEW ===== */
.dash-preview {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    overflow: hidden;
}

.dash-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.dash-stat {
    text-align: center;
    padding: var(--space-lg);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.dash-stat .stat-num {
    font-size: var(--fs-2xl);
    font-weight: var(--fw-extrabold);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dash-stat .stat-label { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 4px; }

/* ===== TESTIMONIALS ===== */
.testimonial-card {
    padding: var(--space-2xl);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.testimonial-stars { color: var(--warning); margin-bottom: var(--space-md); font-size: var(--fs-lg); }

.testimonial-text {
    font-size: var(--fs-base);
    line-height: var(--lh-normal);
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: var(--space-lg);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.testimonial-author img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-author .author-name { font-weight: var(--fw-semibold); font-size: var(--fs-sm); }
.testimonial-author .author-role { font-size: var(--fs-xs); color: var(--text-muted); }

/* ===== FAQ ===== */
.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    overflow: hidden;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    background: var(--bg-glass);
    cursor: pointer;
    font-weight: var(--fw-semibold);
    transition: background var(--transition-fast);
    width: 100%;
    text-align: left;
    color: var(--text-primary);
}

.faq-question:hover { background: var(--bg-card); }

.faq-icon { transition: transform var(--transition-base); font-size: var(--fs-lg); }
.faq-item.active .faq-icon { transform: rotate(45deg); }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base);
}

.faq-item.active .faq-answer { max-height: 300px; }

.faq-answer-inner {
    padding: 0 var(--space-lg) var(--space-lg);
    color: var(--text-secondary);
    line-height: var(--lh-normal);
    font-size: var(--fs-sm);
}

/* ===== NEWSLETTER ===== */
.newsletter-section {
    background: linear-gradient(135deg, rgba(108,99,255,0.1), rgba(0,210,255,0.08));
    border-radius: var(--radius-xl);
    padding: var(--space-4xl);
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: var(--space-xl) auto 0;
    gap: var(--space-sm);
}

.newsletter-form input {
    flex: 1;
    padding: 0.875rem 1.5rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-primary);
}

.newsletter-form input::placeholder { color: var(--text-muted); }

/* ===== SEARCH MODAL ===== */
.search-modal {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
}

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

.search-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
}

.search-modal-content {
    position: relative;
    width: 90%;
    max-width: 640px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.search-modal-input {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: transparent;
    color: var(--text-primary);
    font-size: var(--fs-lg);
    border-bottom: 1px solid var(--border-color);
}

.search-results-list {
    max-height: 400px;
    overflow-y: auto;
    padding: var(--space-sm);
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.search-result-item:hover { background: var(--bg-glass); }

/* ===== MOBILE NAV ===== */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: var(--space-sm) 0;
    backdrop-filter: blur(20px);
}

.mobile-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--space-sm);
    color: var(--text-muted);
    font-size: var(--fs-xs);
    transition: color var(--transition-fast);
}

.mobile-nav-item.active,
.mobile-nav-item:hover { color: var(--primary); }

.mobile-nav-item .edunoor-icon { font-size: 1.25rem; }

/* ===== DARK MODE TOGGLE ===== */
.dark-mode-toggle {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.dark-mode-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ===== LEADERBOARD ===== */
.leaderboard-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
}

.leaderboard-rank {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: var(--fw-bold);
    font-size: var(--fs-sm);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.leaderboard-item:nth-child(1) .leaderboard-rank { background: linear-gradient(135deg, #FFD700, #FFA502); color: #fff; }
.leaderboard-item:nth-child(2) .leaderboard-rank { background: linear-gradient(135deg, #C0C0C0, #A0A0A0); color: #fff; }
.leaderboard-item:nth-child(3) .leaderboard-rank { background: linear-gradient(135deg, #CD7F32, #B06020); color: #fff; }
