/* ===== CSS Variables & Theme ===== */
:root {
  --bg-primary: #f8f5ff;
  --bg-secondary: #f0eafc;
  --bg-card: #ffffff;
  --bg-card-hover: #faf7ff;
  --text-primary: #2a1f4c;
  --text-secondary: #6e5e8e;
  --text-muted: #a694c4;
  --accent-1: #ff6b8a;
  --accent-2: #f59e0b;
  --accent-3: #06b6d4;
  --accent-4: #8b5cf6;
  --gradient-1: linear-gradient(135deg, #ff6b8a, #f59e0b);
  --gradient-2: linear-gradient(135deg, #06b6d4, #8b5cf6);
  --gradient-3: linear-gradient(135deg, #f59e0b, #06b6d4);
  --glow-pink: rgba(255, 107, 138, 0.2);
  --glow-gold: rgba(245, 158, 11, 0.2);
  --border-color: rgba(139, 92, 246, 0.12);
  --border-color-hover: rgba(139, 92, 246, 0.25);
  --header-height: 72px;
  --max-width: 1200px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== Animated Background ===== */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255, 107, 138, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(245, 158, 11, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(6, 182, 212, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(248, 245, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-inner {
  width: 100%;
  max-width: var(--max-width);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
  padding: 4px 0;
}

.header-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-1);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.header-nav a:hover {
  color: var(--text-primary);
}

.header-nav a:hover::after {
  width: 100%;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.header-logo svg {
  width: 36px;
  height: 36px;
}

.header-logo span {
  font-size: 22px;
  font-weight: 700;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hamburger menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ===== Main Content ===== */
.main-content {
  padding-top: var(--header-height);
  min-height: calc(100vh - var(--header-height) - 200px);
  position: relative;
  z-index: 1;
}

/* ===== Hero Section ===== */
.hero {
  text-align: center;
  padding: 120px 24px 70px;
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,107,138,0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  padding: 10px 24px;
  background: linear-gradient(135deg, rgba(255,107,138,0.12), rgba(245,158,11,0.12));
  border: 1px solid rgba(255,107,138,0.2);
  border-radius: 100px;
  font-size: 14px;
  color: var(--accent-2);
  margin-bottom: 32px;
  letter-spacing: 0.5px;
  backdrop-filter: blur(4px);
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 4.2rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 28px;
}

.hero h1 .highlight {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

/* ===== Tools Grid ===== */
.tools-section {
  padding: 60px 24px 100px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.tools-section h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.tools-section > .subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 60px;
  font-size: 1rem;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 28px;
  padding: 48px 32px 40px;
  text-align: center;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-1);
  border-radius: 28px 28px 0 0;
}

.tool-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 24px 60px rgba(107, 78, 138, 0.12);
}

.tool-card:nth-child(2)::before {
  background: var(--gradient-2);
}

.tool-card:nth-child(3)::before {
  background: var(--gradient-3);
}

.tool-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  transition: transform 0.4s ease;
}

.tool-card:hover .tool-icon {
  transform: scale(1.1);
}

.tool-card:nth-child(1) .tool-icon {
  background: linear-gradient(135deg, rgba(255,107,138,0.2), rgba(245,158,11,0.1));
  color: var(--accent-1);
}

.tool-card:nth-child(2) .tool-icon {
  background: linear-gradient(135deg, rgba(6,182,212,0.2), rgba(167,139,250,0.1));
  color: var(--accent-3);
}

.tool-card:nth-child(3) .tool-icon {
  background: linear-gradient(135deg, rgba(245,158,11,0.2), rgba(6,182,212,0.1));
  color: var(--accent-2);
}

.tool-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.tool-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--gradient-1);
  color: #fff;
  box-shadow: 0 4px 20px rgba(255, 107, 138, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(255, 107, 138, 0.5);
}

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

.btn-outline:hover {
  border-color: var(--accent-1);
  background: rgba(255, 107, 138, 0.1);
}

.btn-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 50px 24px 24px;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 36px;
}

.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-1);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 18px;
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 0;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 13px;
}

/* ===== Page Header ===== */
.page-header {
  text-align: center;
  padding: 80px 24px 40px;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto;
}

/* ===== Tool Page Layout ===== */
.tool-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px 100px;
}

.tool-form {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 40px;
  margin-bottom: 40px;
  box-shadow: 0 4px 24px rgba(107, 78, 138, 0.06);
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-group textarea,
.form-group input[type="text"] {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.3s ease;
  resize: vertical;
}

.form-group textarea:focus,
.form-group input[type="text"]:focus {
  outline: none;
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px var(--glow-pink);
}

.form-group textarea {
  min-height: 100px;
}

/* File upload */
.file-upload {
  position: relative;
  border: 2px dashed var(--border-color);
  border-radius: 16px;
  padding: 60px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.file-upload:hover {
  border-color: var(--accent-1);
  background: rgba(255, 107, 138, 0.05);
}

.file-upload.has-file {
  border-color: var(--accent-2);
  border-style: solid;
  padding: 20px;
}

.file-upload input[type="file"] {
  display: none;
}

.file-upload .upload-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.6;
}

.file-upload p {
  color: var(--text-secondary);
  font-size: 14px;
}

.file-upload .file-name {
  color: var(--accent-2);
  font-weight: 500;
  margin-top: 8px;
}

.file-preview {
  max-width: 300px;
  max-height: 300px;
  border-radius: 12px;
  margin: 16px auto 0;
  display: none;
}

.file-preview.show {
  display: block;
}

/* Outpainting controls */
.outpaint-controls {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.control-group label {
  font-size: 13px;
  color: var(--text-secondary);
}

.control-group input[type="number"] {
  padding: 10px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.control-group input[type="number"]:focus {
  outline: none;
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px var(--glow-pink);
}

/* ===== Result Area ===== */
.result-area {
  display: none;
}

.result-area.show {
  display: block;
}

.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 32px;
  text-align: center;
}

.result-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.result-card img {
  max-width: 100%;
  max-height: 512px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  margin-bottom: 20px;
}

.result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Loading Spinner ===== */
.loading {
  display: none;
  text-align: center;
  padding: 60px 24px;
}

.loading.show {
  display: block;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-1);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ===== Legal Pages ===== */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px 100px;
}

.legal-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 40px 0 16px;
  color: var(--text-primary);
}

.legal-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 28px 0 12px;
  color: var(--text-primary);
}

.legal-content p,
.legal-content li {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 12px;
}

.legal-content ul,
.legal-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.legal-content strong {
  color: var(--text-primary);
}

.legal-content .last-updated {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 40px;
}

/* Data collection table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 32px;
  border-radius: 12px;
  overflow: hidden;
}

.data-table th,
.data-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.data-table th {
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table td {
  color: var(--text-secondary);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: rgba(255, 107, 138, 0.03);
}

/* ===== Contact Page ===== */
.contact-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 60px 24px 100px;
  text-align: center;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 60px 40px;
}

.contact-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.contact-card h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.contact-card p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.contact-email {
  display: inline-block;
  padding: 14px 32px;
  background: rgba(255, 107, 138, 0.1);
  border: 1px solid var(--accent-1);
  border-radius: 12px;
  color: var(--accent-1);
  font-size: 1.1rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

.contact-email:hover {
  background: rgba(255, 107, 138, 0.2);
  transform: translateY(-2px);
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(248, 245, 255, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
  }

  .header-nav.active {
    display: flex;
  }

  .hamburger {
    display: flex;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .tool-form {
    padding: 24px;
  }

  .outpaint-controls {
    grid-template-columns: 1fr;
  }

  .contact-card {
    padding: 40px 24px;
  }

  /* Mobile grid fixes */
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .usecases-grid {
    grid-template-columns: 1fr;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .result-grid {
    grid-template-columns: 1fr;
  }

  /* Mobile spacing */
  .page-header {
    padding: 60px 20px 30px;
  }
  .page-header h1 {
    font-size: 1.8rem;
  }
  .tool-page {
    padding: 24px 16px 60px;
  }
  .guide-card {
    padding: 20px;
  }
  .result-card {
    padding: 24px;
  }
  .file-upload {
    padding: 40px 20px;
  }
  .tools-section {
    padding: 40px 16px 60px;
  }
  .hero {
    padding: 60px 16px 40px;
  }

  /* Article mobile */
  .article-page {
    padding: 24px 16px 60px;
  }
  .article-page h1 {
    font-size: 1.5rem;
  }
  .article-page h2 {
    font-size: 1.2rem;
  }

  /* Contact mobile */
  .contact-page {
    padding: 40px 16px 60px;
  }

  /* Content page: role selector buttons */
  .role-selector {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
  }
  .role-btn {
    padding: 12px 14px;
    font-size: 13px;
  }

  /* Text optimizer: mode selector buttons */
  .mode-selector {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
  }
  .mode-btn {
    padding: 12px 10px;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 70px 16px 40px;
  }
  .hero h1 {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }
  .hero p {
    font-size: 0.95rem;
  }
  .hero::before {
    width: 300px;
    height: 300px;
    top: 20px;
  }

  .tool-page {
    padding: 16px 12px 40px;
  }
  .tool-form {
    padding: 16px;
  }
  .guide-card {
    padding: 16px;
  }
  .result-card {
    padding: 16px;
  }
  .result-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .page-header {
    padding: 50px 16px 24px;
  }
  .page-header h1 {
    font-size: 1.5rem;
  }

  .legal-content {
    padding: 24px 16px 60px;
  }

  .contact-card {
    padding: 30px 16px;
  }

  .file-upload {
    padding: 30px 16px;
  }

  .role-selector {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  .mode-selector {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  /* Blog page */
  .blog-grid {
    padding: 0 16px;
    gap: 12px;
  }
  .blog-card {
    padding: 16px;
  }

  /* Article */
  .article-page {
    padding: 16px 12px 40px;
  }
}

/* ===== Grid Layout Utilities (for index.html inline styles) ===== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  position: relative;
}
.steps-grid::before {
  content: '';
  position: absolute;
  top: 28px;
  left: calc(16.66% + 28px);
  right: calc(16.66% + 28px);
  height: 2px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2), var(--accent-3));
  opacity: 0.3;
}
@media (max-width: 768px) {
  .steps-grid::before { display: none; }
  .steps-grid {
    grid-template-columns: 1fr;
  }
}
.usecases-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 900px) {
  .usecases-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .usecases-grid {
    grid-template-columns: 1fr;
  }
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}
.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

/* ===== Utilities ===== */
.gradient-text {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* CTA buttons area on hero */
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Blog Styles ===== */
.blog-search {
  max-width: 600px;
  margin: 0 auto 40px;
  position: relative;
}
.blog-search input {
  width: 100%;
  padding: 16px 20px 16px 48px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.3s;
}
.blog-search input:focus {
  outline: none;
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px var(--glow-pink);
}
.blog-search .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  opacity: 0.5;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 28px;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  display: block;
}
.blog-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color-hover);
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(255,107,138,0.10);
}
.blog-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card .excerpt {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.blog-card .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-top: 14px;
  border-top: 1px solid rgba(255,107,138,0.08);
}
.blog-card .meta span:last-child {
  color: var(--accent-3);
  font-weight: 500;
}
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 40px 24px 60px;
  max-width: var(--max-width);
  margin: 0 auto;
  flex-wrap: wrap;
}
.pagination button {
  padding: 10px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.3s;
}
.pagination button:hover {
  border-color: var(--accent-1);
  color: var(--text-primary);
}
.pagination button.active {
  background: var(--gradient-1);
  border-color: transparent;
  color: #fff;
  font-weight: 700;
}
.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.no-results {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
  font-size: 1rem;
  grid-column: 1 / -1;
}

/* ===== Article Page ===== */
.article-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.article-page h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
}
.article-page .article-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
}
.article-page h2 {
  font-size: 1.45rem;
  font-weight: 600;
  margin: 40px 0 16px;
  color: var(--text-primary);
}
.article-page h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 28px 0 12px;
  color: var(--text-primary);
}
.article-page p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.85;
  margin-bottom: 16px;
}
.article-page ul, .article-page ol {
  padding-left: 24px;
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.85;
}
.article-page li {
  margin-bottom: 8px;
}
.article-page .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-1);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 24px;
  font-weight: 500;
}.article-page .back-link:hover {
  color: var(--accent-2);
  text-decoration: underline;
}
.article-page .back-link:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .blog-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 600px) {
  .blog-grid { grid-template-columns: 1fr; }
}

/* ===== Shared Guide Card & FAQ Styles ===== */
.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 36px;
  margin-bottom: 24px;
  transition: border-color 0.3s;
}
.guide-card:hover {
  border-color: rgba(255,107,138,0.25);
}
.guide-card h3 {
  font-size: 1.15rem;
  margin-bottom: 14px;
  color: var(--accent-1);
}
.guide-card p,
.guide-card li {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}
.guide-card ul {
  padding-left: 20px;
}
.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
}
.faq-item:last-child {
  border-bottom: none;
}
.faq-q {
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-primary);
}
.faq-q::after {
  content: '+';
  font-size: 18px;
  color: var(--text-muted);
}
.faq-q.open::after {
  content: '−';
}
.faq-a {
  max-height: 0 !important;
  overflow: hidden;
  transition: max-height 0.3s ease;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
  padding-top: 0;
}
.faq-a.open {
  max-height: 500px !important;
  padding-top: 12px;
}