/* ============================================================
   PideFast Blog CSS — Clean, Professional, Mobile-first
   ============================================================ */

/* Variables */
:root {
  --primary: #000;
  --accent: #25D366;
  --accent-dark: #1aaa52;
  --accent-light: #e8faf0;
  --text: #1a1a1a;
  --muted: #666;
  --bg: #fff;
  --bg-alt: #f8f8f8;
  --border: #e5e5e5;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --max-content: 760px;
  --max-layout: 1200px;
  --header-h: 64px;
  --font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }

/* ============================================================
   Typography
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--primary);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.75rem, 5vw, 2.5rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.35rem, 3vw, 1.875rem); margin-top: 2.5rem; margin-bottom: 1rem; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.375rem); margin-top: 2rem; margin-bottom: 0.75rem; }

p { margin-bottom: 1.25rem; }
ul, ol { margin-bottom: 1.25rem; padding-left: 1.5rem; }
li { margin-bottom: 0.4rem; }

strong { font-weight: 600; }

/* ============================================================
   Layout
   ============================================================ */

.page-container {
  max-width: var(--max-layout);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.btn-white {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}

.btn-white:hover {
  background: #f0f0f0;
  border-color: #f0f0f0;
}

.btn-large {
  padding: 0.875rem 2rem;
  font-size: 1rem;
  border-radius: 10px;
}

.btn-sm {
  padding: 0.5rem 1.125rem;
  font-size: 0.82rem;
}

.btn-block {
  display: flex;
  width: 100%;
  text-align: center;
}

/* ============================================================
   Header
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.97);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
  height: var(--header-h);
}

.site-header.scrolled {
  border-color: var(--border);
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: var(--max-layout);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-logo {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
}

.nav-link {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover {
  color: var(--primary);
  background: var(--bg-alt);
}

.header-cta { margin-left: 1rem; }

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}

.mobile-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: all 0.2s;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.25rem 1.25rem;
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  background: var(--primary);
  color: #fff;
  padding: 3rem 1.25rem;
  margin-top: 5rem;
}

.footer-inner {
  max-width: var(--max-layout);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  text-align: center;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
}

.footer-tagline {
  color: rgba(255,255,255,0.65);
  font-size: 0.875rem;
  margin-top: 0.4rem;
  margin-bottom: 0;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
  transition: color 0.15s;
}

.footer-link:hover { color: #fff; }

.footer-copy {
  color: rgba(255,255,255,0.45);
  font-size: 0.8rem;
  margin: 0;
}

/* ============================================================
   Homepage
   ============================================================ */

/* Hero */
.home-hero {
  padding: 5rem 0 4rem;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.875rem;
  border-radius: 50px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  letter-spacing: -0.04em;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Section header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.5rem;
  margin: 0;
}

.section-link {
  font-size: 0.9rem;
  color: var(--accent-dark);
  font-weight: 500;
}

.section-link:hover { text-decoration: underline; }

/* Home articles */
.home-articles { padding: 3rem 0; }

/* About section */
.home-about {
  background: var(--bg-alt);
  border-radius: 20px;
  padding: 4rem 2rem;
  margin: 2rem 0;
}

.about-inner {
  max-width: var(--max-layout);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-badge {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.875rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}

.about-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 1rem;
}

.about-text {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.about-features {
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
}

.about-features li {
  padding: 0.3rem 0;
  color: var(--text);
  font-size: 0.95rem;
}

/* Phone mockup */
.phone-mockup {
  width: 220px;
  margin: 0 auto;
  background: var(--primary);
  border-radius: 32px;
  padding: 16px;
  box-shadow: var(--shadow-lg);
}

.phone-screen {
  background: #fff;
  border-radius: 20px;
  padding: 16px;
  overflow: hidden;
}

.phone-store-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.store-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}

.phone-product {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.product-img-placeholder {
  width: 48px;
  height: 48px;
  background: var(--bg-alt);
  border-radius: 8px;
  flex-shrink: 0;
}

.product-info { flex: 1; display: flex; flex-direction: column; gap: 6px; justify-content: center; }

.product-name-line {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  width: 80%;
}

.product-price-line {
  height: 8px;
  background: var(--accent-light);
  border-radius: 4px;
  width: 50%;
}

.phone-cta-btn {
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 12px;
}

/* Newsletter */
.home-newsletter {
  background: var(--primary);
  border-radius: 20px;
  padding: 4rem 2rem;
  margin: 2rem 0 3rem;
  text-align: center;
  color: #fff;
}

.newsletter-title {
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1rem;
}

.newsletter-text {
  color: rgba(255,255,255,0.7);
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.newsletter-fine {
  color: rgba(255,255,255,0.4);
  font-size: 0.8rem;
  margin-top: 1rem;
  margin-bottom: 0;
}

/* ============================================================
   Article Cards (shared)
   ============================================================ */

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.article-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  transition: box-shadow 0.2s, transform 0.2s;
}

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

.card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.card-date {
  font-size: 0.8rem;
  color: var(--muted);
}

.card-tag {
  font-size: 0.75rem;
  color: var(--accent-dark);
  background: var(--accent-light);
  padding: 0.15rem 0.6rem;
  border-radius: 50px;
  font-weight: 500;
}

.card-title {
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
  line-height: 1.35;
  flex: 1;
}

.card-link { color: var(--primary); }
.card-link:hover { color: var(--accent-dark); }

.card-excerpt {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.card-read-more {
  font-size: 0.875rem;
  color: var(--accent-dark);
  font-weight: 600;
  margin-top: auto;
}

.card-read-more:hover { text-decoration: underline; }

/* ============================================================
   List page
   ============================================================ */

.list-hero {
  padding: 4rem 0 3rem;
  max-width: 700px;
}

.list-title {
  margin-bottom: 1rem;
}

.list-subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.6;
}

.article-grid-section { padding: 2rem 0 3rem; }

.empty-state {
  color: var(--muted);
  padding: 3rem 0;
  text-align: center;
}

/* ============================================================
   CTA Banner
   ============================================================ */

.cta-banner {
  background: var(--bg-alt);
  border-radius: 20px;
  padding: 3.5rem 2rem;
  margin: 3rem 0;
  text-align: center;
}

.cta-banner-inner h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.75rem;
  margin-top: 0;
}

.cta-banner-inner p {
  color: var(--muted);
  max-width: 500px;
  margin: 0 auto 2rem;
}

/* ============================================================
   Single Post (blog articles)
   ============================================================ */

.post-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  padding: 3rem 0 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.post-article {
  min-width: 0;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.breadcrumb-link { color: var(--muted); }
.breadcrumb-link:hover { color: var(--primary); text-decoration: underline; }
.breadcrumb-sep { color: var(--border); }
.breadcrumb-current { color: var(--text); }

/* Post header */
.post-header { margin-bottom: 2.5rem; }

.post-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.post-tag {
  font-size: 0.75rem;
  color: var(--accent-dark);
  background: var(--accent-light);
  padding: 0.2rem 0.7rem;
  border-radius: 50px;
  font-weight: 500;
}

.post-title { margin-bottom: 0.75rem; }

.post-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.post-reading-time { margin-left: 0.25rem; }

.post-lead {
  font-size: 1.15rem;
  color: var(--muted);
  line-height: 1.6;
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
  margin-top: 1.25rem;
}

/* Post body */
.post-body {
  font-size: 1rem;
  line-height: 1.8;
  max-width: var(--max-content);
}

.post-body h2 {
  margin-top: 2.75rem;
  padding-top: 0.5rem;
}

.post-body h3 { margin-top: 2rem; }

.post-body ul { margin-bottom: 1.5rem; }

.post-body li { margin-bottom: 0.5rem; }

.post-body a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-decoration-color: rgba(37, 211, 102, 0.4);
  text-underline-offset: 2px;
}

.post-body a:hover {
  text-decoration-color: var(--accent);
}

/* Post footer */
.post-footer { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.tags-label { font-size: 0.875rem; color: var(--muted); margin-right: 0.5rem; }
.post-tags-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; }

/* ============================================================
   Inline CTA
   ============================================================ */

.cta-inline {
  background: var(--accent-light);
  border: 1px solid rgba(37, 211, 102, 0.3);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 2.5rem 0;
  text-align: center;
}

.cta-inline-eyebrow {
  font-size: 0.8rem;
  color: var(--accent-dark);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.cta-inline-title {
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
}

.cta-inline-text {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   Large CTA Box
   ============================================================ */

.cta-box {
  background: var(--accent);
  border-radius: var(--radius);
  padding: 0.25rem;
  margin: 2.5rem 0;
}

.cta-box-inner {
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: calc(var(--radius) - 0.25rem);
  padding: 2.5rem 2rem;
  text-align: center;
  color: #fff;
}

.cta-box h3 {
  color: #fff;
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
}

.cta-box p {
  color: rgba(255,255,255,0.85);
  margin-bottom: 1.5rem;
}

/* ============================================================
   Sidebar
   ============================================================ */

.post-sidebar { position: relative; }

.sidebar-cta {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.sidebar-cta h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.sidebar-cta p {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

/* ============================================================
   Related articles
   ============================================================ */

.related-section {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  max-width: 1100px;
  margin: 0 auto;
}

.related-title {
  font-size: 1.375rem;
  margin-bottom: 1.75rem;
  margin-top: 0;
}

.related-grid { grid-template-columns: repeat(3, 1fr); }

/* ============================================================
   EC / Programmatic SEO pages
   ============================================================ */

.ec-article { max-width: 860px; margin: 0 auto; padding: 3rem 0 2rem; }

.ec-emoji {
  font-size: 3rem;
  margin-bottom: 1rem;
  line-height: 1;
}

/* Steps */
.steps-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.step {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.step-number {
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.step-content h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.step-content p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Feature list */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.5rem;
}

.feature-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.feature-list li:last-child { border-bottom: none; }

/* ============================================================
   FAQ
   ============================================================ */

.faq-list {
  margin: 1.25rem 0 2rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  list-style: none;
  user-select: none;
  background: var(--bg);
  transition: background 0.15s;
  outline: none;
}

.faq-question::-webkit-details-marker { display: none; }

.faq-question::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--muted);
  flex-shrink: 0;
  margin-left: 1rem;
  transition: transform 0.2s;
}

.faq-item[open] .faq-question { background: var(--bg-alt); }
.faq-item[open] .faq-question::after { transform: rotate(45deg); }

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

.faq-answer {
  padding: 1rem 1.25rem 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.faq-answer p { margin: 0; }

.faq-answer a {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* ============================================================
   Sticky bottom CTA
   ============================================================ */

.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--primary);
  color: #fff;
  padding: 0.875rem 1.25rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.sticky-cta.visible { transform: translateY(0); }

.sticky-cta-inner {
  max-width: var(--max-layout);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sticky-cta-text {
  font-size: 0.9rem;
  font-weight: 500;
  flex: 1;
}

/* ============================================================
   Responsive — 768px breakpoint
   ============================================================ */

@media (max-width: 768px) {

  /* Header */
  .site-nav { display: none; }
  .header-cta { display: none; }
  .mobile-menu-toggle { display: flex; }
  .site-header.nav-open .mobile-nav { display: flex; }

  /* Post layout: single column */
  .post-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 0 1.5rem;
  }

  .post-sidebar { display: none; }

  /* Related: stack */
  .related-grid { grid-template-columns: 1fr; }

  /* Article grid */
  .article-grid { grid-template-columns: 1fr; }

  /* About section */
  .about-inner { grid-template-columns: 1fr; gap: 2rem; }
  .about-visual { display: none; }

  /* Hero */
  .home-hero { padding: 3rem 0 2.5rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; max-width: 320px; }

  /* Newsletter */
  .home-newsletter { padding: 2.5rem 1.5rem; }

  /* CTA Banner */
  .cta-banner { padding: 2.5rem 1.5rem; border-radius: 16px; }

  /* Sticky CTA text */
  .sticky-cta-text { font-size: 0.8rem; }

  /* Steps */
  .step { flex-direction: row; }

  /* EC emoji */
  .ec-emoji { font-size: 2.5rem; }

  /* EC article */
  .ec-article { padding: 2rem 0; }

  /* list hero */
  .list-hero { padding: 2.5rem 0 2rem; }

  /* Breadcrumb */
  .breadcrumb { font-size: 0.75rem; }
}

@media (max-width: 480px) {
  .cta-box-inner { padding: 2rem 1.25rem; }
  .cta-inline { padding: 1.5rem; }
  .post-layout { padding: 1.5rem 0 1rem; }
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.3rem; }
}
