/* ===== Homepage — Newsreadeck Landing ===== */

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px; line-height: 1.6; color: #1a1a2e; background: #f4f5f7;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ===== Dark Mode ===== */
body.dark { background: #0d0f14; color: #e4e6eb; }

/* ===== Topbar ===== */
.topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 32px;
    background: rgba(244,245,247,0.85); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: background 0.3s;
}
body.dark .topbar { background: rgba(13,15,20,0.88); border-color: rgba(255,255,255,0.06); }

.topbar-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; color: #1a1a2e; }
body.dark .topbar-logo { color: #e4e6eb; }

.topbar-actions { display: flex; align-items: center; gap: 12px; }

.btn-download {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 20px; border-radius: 8px; font-size: 0.85rem; font-weight: 600;
    background: linear-gradient(135deg, #c90a6d, #ED4A5D); color: #fff;
    transition: transform 0.2s, box-shadow 0.2s; white-space: nowrap;
}
.btn-download:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(201,10,109,0.3); }

.theme-toggle {
    background: transparent; border: 1px solid rgba(0,0,0,0.1); color: #555;
    width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 14px;
    transition: background 0.2s, color 0.2s;
}
body.dark .theme-toggle { border-color: rgba(255,255,255,0.12); color: #e4e6eb; }
.theme-toggle:hover { background: rgba(0,0,0,0.05); }
body.dark .theme-toggle:hover { background: rgba(255,255,255,0.08); }

/* ===== Section Base ===== */
.section { padding: 80px 24px; max-width: 1200px; margin: 0 auto; }
.section-heading { text-align: center; margin-bottom: 48px; }
.section-heading h2 { font-size: 2rem; font-weight: 800; margin-bottom: 12px; }
.section-heading p { font-size: 1.05rem; color: #666; max-width: 600px; margin: 0 auto; }
body.dark .section-heading p { color: #9a9db0; }

/* ===== Hero ===== */
.hero {
    padding: 140px 24px 60px; max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center; gap: 48px;
}
.hero-content { flex: 1; min-width: 0; }
.hero-badge { margin-bottom: 20px; }
.hero-badge img { height: 40px; width: auto; }

.hero h1 {
    font-size: 3rem; font-weight: 900; line-height: 1.1; margin-bottom: 20px;
    background: linear-gradient(135deg, #1a1a2e 0%, #c90a6d 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
body.dark .hero h1 {
    background: linear-gradient(135deg, #e4e6eb 0%, #c90a6d 100%);
    -webkit-background-clip: text; background-clip: text;
}

.hero-subtitle { font-size: 1.15rem; color: #555; line-height: 1.7; margin-bottom: 28px; max-width: 480px; }
body.dark .hero-subtitle { color: #9a9db0; }

.hero-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }

.btn-hero {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 32px; border-radius: 12px; font-size: 1rem; font-weight: 700;
    background: linear-gradient(135deg, #c90a6d, #ED4A5D); color: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-hero:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(201,10,109,0.35); }

.hero-stars { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; color: #777; }
body.dark .hero-stars { color: #9a9db0; }
.hero-stars i { color: #f5a623; font-size: 0.85rem; }
.hero-stars .star-half { color: #ddd; }
body.dark .hero-stars .star-half { color: #444; }

.hero-image { flex: 1; min-width: 0; text-align: center; }
.hero-image img { max-height: 520px; margin: 0 auto; filter: drop-shadow(0 20px 40px rgba(0,0,0,0.1)); }

/* ===== News Section ===== */
.news-section { background: #fff; padding: 80px 0; }
body.dark .news-section { background: #13151a; }

.news-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Category tabs */
.category-tabs {
    display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
    margin-bottom: 36px;
}
.category-tab {
    padding: 10px 24px; border-radius: 24px; font-size: 0.9rem; font-weight: 600;
    border: 2px solid rgba(0,0,0,0.1); background: transparent; color: #555;
    cursor: pointer; transition: all 0.25s; white-space: nowrap;
}
body.dark .category-tab { border-color: rgba(255,255,255,0.12); color: #9a9db0; }
.category-tab:hover { border-color: #c90a6d; color: #c90a6d; }
.category-tab.active {
    background: linear-gradient(135deg, #c90a6d, #ED4A5D); color: #fff;
    border-color: transparent;
}
body.dark .category-tab.active { color: #fff; }

.category-block { margin-bottom: 48px; }
.category-block:last-child { margin-bottom: 0; }
.category-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px; padding: 0 4px;
}
.category-name { font-size: 1.3rem; font-weight: 700; }
.carousel-nav { display: flex; gap: 8px; }
.carousel-btn {
    width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.12); background: #fff; color: #333;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 14px; transition: all 0.2s;
}
body.dark .carousel-btn { background: #1e2028; border-color: rgba(255,255,255,0.1); color: #e4e6eb; }
.carousel-btn:hover { background: #c90a6d; color: #fff; border-color: #c90a6d; }

.carousel-track {
    display: flex; gap: 16px; overflow-x: auto;
    scroll-snap-type: x mandatory; scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    padding-bottom: 4px;
}
.carousel-track::-webkit-scrollbar { display: none; }

.article-card {
    flex: 0 0 calc(20% - 13px); min-width: 220px;
    scroll-snap-align: start;
    background: #fff; border-radius: 14px; overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex; flex-direction: column;
}
body.dark .article-card { background: #1e2028; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.article-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }

.article-card-image {
    width: 100%; height: 140px; object-fit: cover;
}
.article-card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.article-card-title {
    font-size: 0.85rem; font-weight: 600; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
    margin-bottom: 8px; flex: 1;
}
.article-card-meta { font-size: 0.75rem; color: #999; }
body.dark .article-card-meta { color: #666b7d; }

/* Skeleton for news */
.news-skeleton .carousel-track { gap: 16px; }
.news-skeleton-card {
    flex: 0 0 calc(20% - 13px); min-width: 220px;
    background: #fff; border-radius: 14px; overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
body.dark .news-skeleton-card { background: #1e2028; }
.skel-img { height: 140px; }
.skel-text { padding: 14px; }
.skel-line { height: 12px; border-radius: 4px; margin-bottom: 8px; }
.skel-line:nth-child(1) { width: 90%; }
.skel-line:nth-child(2) { width: 60%; }
.skel-line:last-child { width: 40%; margin-bottom: 0; }

.skeleton {
    background: linear-gradient(90deg, #e9ecef 25%, #f4f5f7 50%, #e9ecef 75%);
    background-size: 200% 100%; animation: shimmer 1.5s infinite;
}
body.dark .skeleton {
    background: linear-gradient(90deg, #2a2d35 25%, #33363f 50%, #2a2d35 75%);
    background-size: 200% 100%;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ===== Features Section ===== */
.features-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.feature-box {
    background: #fff; border-radius: 16px; padding: 32px 28px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
    transition: transform 0.2s;
}
body.dark .feature-box { background: #1e2028; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.feature-box:hover { transform: translateY(-4px); }

.feature-icon {
    width: 52px; height: 52px; border-radius: 14px; margin-bottom: 20px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: #fff;
    background: linear-gradient(135deg, #c90a6d, #ED4A5D);
}
.feature-box h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.feature-box p { font-size: 0.9rem; color: #666; line-height: 1.6; }
body.dark .feature-box p { color: #9a9db0; }

/* Screenshot carousel feature box */
.feature-box-screenshots {
    grid-column: span 2; display: flex; align-items: center; gap: 32px;
    padding: 32px;
}
.feature-screenshots-text { flex: 1; }
.feature-screenshots-text h3 { font-size: 1.3rem; margin-bottom: 12px; }
.feature-screenshots-text p { font-size: 0.95rem; }

.phone-carousel {
    position: relative; width: 260px; height: 480px; flex-shrink: 0;
}
.phone-frame {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 2; pointer-events: none;
}
.phone-screens {
    position: absolute; top: 22px; left: 18px; right: 18px; bottom: 22px;
    overflow: hidden; border-radius: 28px;
}
.phone-screens img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover;
    opacity: 0; transition: opacity 0.6s ease;
}
.phone-screens img.active { opacity: 1; }

/* ===== Sources Section ===== */
.sources-section { background: #fff; padding: 80px 0; }
body.dark .sources-section { background: #13151a; }
.sources-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Source icon grid */
.sources-grid {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 20px; max-width: 900px; margin: 0 auto;
}
.source-icon-link {
    display: flex; flex-direction: column; align-items: center;
    gap: 8px; width: 90px; text-decoration: none;
    transition: transform 0.2s;
}
.source-icon-link:hover { transform: translateY(-4px); }

.source-icon-img {
    width: 56px; height: 56px; border-radius: 16px; object-fit: cover;
    border: 2px solid rgba(0,0,0,0.06); background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: border-color 0.2s, box-shadow 0.2s;
}
body.dark .source-icon-img { border-color: rgba(255,255,255,0.08); background: #1e2028; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.source-icon-link:hover .source-icon-img { border-color: #c90a6d; box-shadow: 0 4px 16px rgba(201,10,109,0.2); }

.source-icon-name {
    font-size: 0.7rem; font-weight: 600; color: #555; text-align: center;
    max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body.dark .source-icon-name { color: #9a9db0; }

/* Source skeleton */
.sources-skeleton {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; max-width: 900px; margin: 0 auto;
}
.source-skel-item { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 90px; }
.source-skel-icon { width: 56px; height: 56px; border-radius: 16px; }
.source-skel-name { width: 60px; height: 10px; border-radius: 4px; }

.sources-stats {
    display: flex; justify-content: center; gap: 48px; margin-top: 48px; text-align: center;
}
.sources-stat-number { font-size: 2.5rem; font-weight: 900; color: #c90a6d; }
.sources-stat-label { font-size: 0.9rem; color: #666; margin-top: 4px; }
body.dark .sources-stat-label { color: #9a9db0; }

/* ===== FAQ Section ===== */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item {
    background: #fff; border-radius: 12px; margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden; transition: box-shadow 0.2s;
}
body.dark .faq-item { background: #1e2028; box-shadow: 0 1px 3px rgba(0,0,0,0.15); }

.faq-question {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px; cursor: pointer; font-weight: 600; font-size: 0.95rem;
    gap: 16px; width: 100%; border: none; background: transparent;
    color: inherit; text-align: left;
}
.faq-question i { font-size: 0.8rem; color: #999; transition: transform 0.3s; flex-shrink: 0; }
.faq-item.active .faq-question i { transform: rotate(180deg); }

.faq-answer {
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 24px; font-size: 0.9rem; color: #666; line-height: 1.7;
}
body.dark .faq-answer { color: #9a9db0; }
.faq-item.active .faq-answer { max-height: 300px; padding: 0 24px 20px; }

.faq-answer a { color: #c90a6d; text-decoration: underline; }

/* ===== CTA Banner ===== */
.cta-banner {
    text-align: center; padding: 80px 24px;
    background: linear-gradient(135deg, #c90a6d, #ED4A5D); color: #fff;
}
.cta-banner h2 { font-size: 2rem; font-weight: 800; margin-bottom: 12px; }
.cta-banner p { font-size: 1.05rem; opacity: 0.9; margin-bottom: 28px; max-width: 500px; margin-left: auto; margin-right: auto; }
.btn-cta {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 36px; border-radius: 12px; font-size: 1rem; font-weight: 700;
    background: #fff; color: #c90a6d; transition: transform 0.2s, box-shadow 0.2s;
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }

/* ===== Footer ===== */
.home-footer {
    background: #1a1a2e; color: rgba(255,255,255,0.7); padding: 60px 24px 32px;
}
body.dark .home-footer { background: #0a0b0f; }

.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-top { display: flex; gap: 48px; flex-wrap: wrap; margin-bottom: 40px; }

.footer-brand { flex: 1; min-width: 280px; }
.footer-brand-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand-logo span { font-weight: 700; font-size: 1.2rem; color: #fff; }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; max-width: 360px; }

.footer-links-group { min-width: 160px; }
.footer-links-group h4 { color: #fff; font-size: 0.9rem; font-weight: 700; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-links-group li { margin-bottom: 10px; }
.footer-links-group a { font-size: 0.85rem; transition: color 0.2s; }
.footer-links-group a:hover { color: #fff; }

.footer-social { display: flex; gap: 12px; margin-top: 16px; }
.footer-social a {
    width: 40px; height: 40px; border-radius: 10px;
    background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center;
    font-size: 16px; color: rgba(255,255,255,0.6); transition: all 0.2s;
}
.footer-social a:hover { background: #c90a6d; color: #fff; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 24px; display: flex; justify-content: space-between;
    align-items: center; flex-wrap: wrap; gap: 16px;
    font-size: 0.8rem; color: rgba(255,255,255,0.4);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .hero { flex-direction: column; text-align: center; padding-top: 120px; gap: 32px; }
    .hero-subtitle { margin: 0 auto 28px; }
    .hero-cta { justify-content: center; }
    .hero-stars { justify-content: center; }
    .hero-image img { max-height: 400px; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .feature-box-screenshots { grid-column: span 2; }
    .article-card { flex: 0 0 calc(33.33% - 11px); min-width: 200px; }
}

@media (max-width: 768px) {
    .topbar { padding: 10px 16px; }
    .btn-download span { display: none; }
    .btn-download { padding: 8px 12px; }
    .hero h1 { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1rem; }
    .section { padding: 60px 16px; }
    .section-heading h2 { font-size: 1.6rem; }
    .features-grid { grid-template-columns: 1fr; }
    .feature-box-screenshots { grid-column: span 1; flex-direction: column; }
    .phone-carousel { width: 200px; height: 370px; }
    .article-card { flex: 0 0 calc(50% - 8px); min-width: 160px; }
    .sources-stats { gap: 24px; }
    .sources-stat-number { font-size: 2rem; }
    .source-icon-link { width: 80px; }
    .source-icon-img { width: 48px; height: 48px; border-radius: 14px; }
    .footer-top { flex-direction: column; gap: 32px; }
    .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.8rem; }
    .article-card { flex: 0 0 75%; min-width: 180px; }
    .features-grid { gap: 16px; }
    .sources-stats { flex-direction: column; gap: 16px; }
    .source-icon-link { width: 70px; }
    .source-icon-img { width: 44px; height: 44px; border-radius: 12px; }
}
