/**
 * WhatIs Theme — Homepage Styles
 *
 * Only loaded on the front page.
 *
 * @package WhatIs
 * @since   1.0.0
 */

/* Hero Section */
.hero-section {
	background: linear-gradient(135deg, var(--bg-body) 0%, var(--bg-surface) 100%);
	padding: var(--space-16) 0 var(--space-12);
	position: relative;
	overflow: hidden;
}

.hero-inner {
	max-width: 720px;
	margin: 0 auto;
	text-align: center;
}

.hero-title {
	font-size: var(--font-size-4xl);
	font-weight: var(--font-weight-extrabold);
	line-height: var(--line-height-tight);
	letter-spacing: var(--letter-spacing-tight);
	margin-bottom: var(--space-4);
	background: linear-gradient(135deg, var(--text-primary) 0%, var(--color-primary) 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.hero-subtitle {
	font-size: var(--font-size-lg);
	color: var(--text-secondary);
	line-height: var(--line-height-relaxed);
	margin-bottom: var(--space-8);
}

.hero-search {
	margin-bottom: var(--space-6);
}

.hero-search-wrapper {
	display: flex;
	align-items: center;
	background: var(--bg-card);
	border: 2px solid var(--border-color);
	border-radius: var(--radius-full);
	padding: var(--space-1);
	transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
	box-shadow: var(--shadow-lg);
}

.hero-search-wrapper:focus-within {
	border-color: var(--color-primary);
	box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1), var(--shadow-lg);
}

.hero-search-icon {
	margin-left: var(--space-4);
	color: var(--text-muted);
	flex-shrink: 0;
}

.hero-search-input {
	flex: 1;
	border: none;
	background: none;
	padding: var(--space-3) var(--space-4);
	font-size: var(--font-size-base);
	outline: none;
	min-width: 0;
}

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

.hero-search .btn {
	border-radius: var(--radius-full);
	padding: var(--space-3) var(--space-6);
}

.hero-popular-topics {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: var(--space-2);
	font-size: var(--font-size-sm);
}

.hero-popular-label {
	color: var(--text-muted);
	font-weight: var(--font-weight-medium);
}

.hero-topic-link {
	padding: var(--space-1) var(--space-3);
	background: var(--bg-card);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-full);
	font-size: var(--font-size-xs);
	color: var(--text-secondary);
	transition: all var(--transition-fast);
}

.hero-topic-link:hover {
	border-color: var(--color-primary);
	color: var(--color-primary);
	background: var(--color-primary-light);
}

/* Category Slider */
.category-slider {
	display: flex;
	gap: var(--space-4);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	padding: var(--space-2) 0;
}

.category-slider::-webkit-scrollbar {
	display: none;
}

.category-slide {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-2);
	min-width: 140px;
	padding: var(--space-5) var(--space-4);
	background: var(--bg-card);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-lg);
	scroll-snap-align: start;
	transition: all var(--transition-fast);
	text-align: center;
	text-decoration: none;
}

.category-slide:hover {
	border-color: var(--color-primary);
	transform: translateY(-2px);
	box-shadow: var(--shadow-md);
}

.category-slide-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: var(--radius-lg);
	background: var(--color-primary-light);
	color: var(--color-primary);
}

.category-slide-name {
	font-size: var(--font-size-sm);
	font-weight: var(--font-weight-semibold);
	color: var(--text-primary);
}

.category-slide-count {
	font-size: var(--font-size-xs);
	color: var(--text-muted);
}

/* Newsletter */
.newsletter-section {
	background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
	color: var(--color-white);
	padding: var(--space-16) 0;
}

.newsletter-section .section-title {
	color: var(--color-white);
}

.newsletter-section .section-subtitle {
	color: rgba(255, 255, 255, 0.8);
}

.newsletter-form-wrapper {
	display: flex;
	gap: var(--space-2);
	max-width: 480px;
	margin: 0 auto var(--space-3);
}

.newsletter-input {
	flex: 1;
	padding: var(--space-3) var(--space-5);
	border: 2px solid rgba(255, 255, 255, 0.2);
	border-radius: var(--radius-full);
	background: rgba(255, 255, 255, 0.1);
	color: var(--color-white);
	font-size: var(--font-size-base);
	transition: border-color var(--transition-fast);
}

.newsletter-input::placeholder {
	color: rgba(255, 255, 255, 0.6);
}

.newsletter-input:focus {
	border-color: var(--color-white);
	outline: none;
}

.newsletter-section .btn-primary {
	background: var(--color-white);
	color: var(--color-primary);
	border-radius: var(--radius-full);
}

.newsletter-section .btn-primary:hover {
	background: var(--color-gray-100);
}

.newsletter-privacy {
	font-size: var(--font-size-xs);
	color: rgba(255, 255, 255, 0.6);
	margin: 0;
}

/* Author Highlights */
.authors-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: var(--space-6);
}

.author-highlight-card {
	text-align: center;
	padding: var(--space-6);
	background: var(--bg-card);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-lg);
	transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.author-highlight-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-lg);
}

.author-highlight-photo {
	margin-bottom: var(--space-3);
}

.author-highlight-photo .author-avatar,
.author-highlight-photo img {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	object-fit: cover;
	margin: 0 auto;
}

.author-avatar-placeholder {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	background: var(--bg-surface);
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto;
	color: var(--text-muted);
}

.author-highlight-name {
	font-size: var(--font-size-base);
	font-weight: var(--font-weight-semibold);
	margin-bottom: var(--space-1);
}

.author-highlight-name a {
	color: var(--text-primary);
}

.author-highlight-name a:hover {
	color: var(--color-primary);
}

.author-highlight-role {
	font-size: var(--font-size-sm);
	color: var(--color-primary);
	margin-bottom: var(--space-2);
}

.author-highlight-bio {
	font-size: var(--font-size-sm);
	color: var(--text-secondary);
	line-height: var(--line-height-relaxed);
	margin-bottom: var(--space-3);
}

.author-highlight-social {
	display: flex;
	justify-content: center;
	gap: var(--space-3);
}

.author-highlight-social a {
	color: var(--text-muted);
	transition: color var(--transition-fast);
}

.author-highlight-social a:hover {
	color: var(--color-primary);
}

/* Top Reads */
.top-reads-list {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
}

.top-reads-item {
	display: flex;
	align-items: center;
	gap: var(--space-4);
	padding: var(--space-4) var(--space-5);
	background: var(--bg-card);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-lg);
	transition: all var(--transition-fast);
	text-decoration: none;
}

.top-reads-item:hover {
	border-color: var(--color-primary);
	transform: translateX(4px);
}

.top-reads-number {
	font-size: var(--font-size-3xl);
	font-weight: var(--font-weight-extrabold);
	color: var(--color-primary);
	opacity: 0.3;
	min-width: 48px;
	text-align: center;
	line-height: 1;
}

.top-reads-item:hover .top-reads-number {
	opacity: 1;
}

.top-reads-content {
	flex: 1;
	min-width: 0;
}

.top-reads-title {
	font-size: var(--font-size-base);
	font-weight: var(--font-weight-semibold);
	color: var(--text-primary);
	margin-bottom: var(--space-1);
	line-height: var(--line-height-snug);
}

.top-reads-meta {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	font-size: var(--font-size-xs);
}

.top-reads-time {
	color: var(--text-muted);
}

/* Footer CTA Section */
.footer-cta-section {
	background: var(--bg-surface);
	padding: var(--space-16) 0;
}

/* Sticky CTA Bar */
.sticky-cta {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: var(--bg-card);
	border-top: 1px solid var(--border-color);
	box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
	z-index: var(--z-sticky);
	padding: var(--space-3) 0;
}

.sticky-cta-inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-4);
}

.sticky-cta-text {
	font-size: var(--font-size-sm);
	font-weight: var(--font-weight-medium);
	margin: 0;
}

.sticky-cta-close {
	position: absolute;
	right: var(--space-4);
	background: none;
	border: none;
	cursor: pointer;
	color: var(--text-muted);
	padding: var(--space-2);
}

/* FAQ on Homepage */
.faq-accordion {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
}

.faq-item {
	background: var(--bg-card);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-lg);
	overflow: hidden;
	transition: border-color var(--transition-fast);
}

.faq-item:hover {
	border-color: var(--color-primary);
}

.faq-question {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: var(--space-4) var(--space-5);
	background: none;
	border: none;
	cursor: pointer;
	font-size: var(--font-size-base);
	font-weight: var(--font-weight-semibold);
	text-align: left;
	color: var(--text-primary);
	gap: var(--space-4);
}

.faq-icon {
	flex-shrink: 0;
	transition: transform var(--transition-fast);
	color: var(--text-muted);
}

.faq-item.active .faq-icon {
	transform: rotate(180deg);
}

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

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

.faq-answer-content {
	padding: 0 var(--space-5) var(--space-5);
	font-size: var(--font-size-sm);
	color: var(--text-secondary);
	line-height: var(--line-height-relaxed);
}

/* Responsive */
@media (min-width: 640px) {
	.hero-title {
		font-size: var(--font-size-5xl);
	}
}

@media (min-width: 1024px) {
	.hero-section {
		padding: var(--space-20) 0 var(--space-16);
	}
}
