/* =============================================
   WaZap Lite — How To / Cara Install Pages CSS
   ============================================= */

/* ---- Howto Hero ---- */
.howto-hero {
  position: relative;
  padding: 160px 24px 80px;
  text-align: center;
  overflow: hidden;
}

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

@media (max-width: 768px) {
  .howto-hero {
    padding: 130px 20px 60px;
  }
}

/* ---- Howto Section ---- */
.howto-section {
  padding: 0 24px 80px;
}

.howto-container {
  max-width: 1000px;
  margin: 0 auto;
}

/* ---- Howto Grid ---- */
.howto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

/* ---- Howto Card ---- */
.howto-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card, rgba(14, 23, 32, 0.75));
  border: 1px solid var(--border-default, rgba(134, 150, 160, 0.1));
  border-radius: var(--radius-lg, 20px);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(32px);
}

.howto-card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.howto-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 168, 132, 0.3);
  box-shadow: 0 12px 48px rgba(0, 168, 132, 0.12), 0 4px 16px rgba(0, 0, 0, 0.3);
}

.howto-card-cover {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--bg-secondary, #0a1118);
}

.howto-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.howto-card:hover .howto-card-cover img {
  transform: scale(1.05);
}

.howto-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.howto-card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary, #f0f2f5);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.howto-card-excerpt {
  font-size: 14px;
  color: var(--text-secondary, #8696a0);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.howto-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted, #5a6b75);
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
}

.howto-card-read {
  color: var(--green-400, #00d4a4);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease;
}

.howto-card:hover .howto-card-read {
  gap: 10px;
}

/* ---- Howto Empty State ---- */
.howto-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-secondary, #8696a0);
}

/* ---- Howto Detail Page ---- */
.howto-detail-section {
  padding: 120px 24px 80px;
}

.howto-detail-container {
  max-width: 800px;
  margin: 0 auto;
}

.howto-detail-nav {
  margin-bottom: 32px;
}

.howto-detail-nav a {
  color: var(--green-400, #00d4a4);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.2s ease;
}

.howto-detail-nav a:hover {
  gap: 12px;
}

.howto-detail-article {
  background: var(--bg-card, rgba(14, 23, 32, 0.75));
  border: 1px solid var(--border-default, rgba(134, 150, 160, 0.1));
  border-radius: var(--radius-lg, 20px);
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.howto-detail-cover {
  width: 100%;
  max-height: 400px;
  overflow: hidden;
  background: var(--bg-secondary, #0a1118);
}

.howto-detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.howto-detail-header {
  padding: 32px 32px 0;
}

.howto-detail-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  color: var(--text-primary, #f0f2f5);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 12px;
}

.howto-detail-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted, #5a6b75);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
}

.howto-detail-body {
  padding: 32px;
  color: var(--text-primary, #f0f2f5);
  font-size: 15px;
  line-height: 1.8;
}

.howto-detail-body h1,
.howto-detail-body h2,
.howto-detail-body h3,
.howto-detail-body h4,
.howto-detail-body h5,
.howto-detail-body h6 {
  color: var(--text-primary, #f0f2f5);
  margin-top: 24px;
  margin-bottom: 12px;
  font-weight: 700;
}

.howto-detail-body h1 { font-size: 28px; }
.howto-detail-body h2 { font-size: 24px; }
.howto-detail-body h3 { font-size: 20px; }
.howto-detail-body h4 { font-size: 18px; }

.howto-detail-body p {
  margin-bottom: 16px;
  color: var(--text-secondary, #8696a0);
}

.howto-detail-body a {
  color: var(--green-400, #00d4a4);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.howto-detail-body img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 16px 0;
  border: 1px solid var(--border-default, rgba(134, 150, 160, 0.1));
}

.howto-detail-body ul,
.howto-detail-body ol {
  margin: 12px 0 16px 24px;
  color: var(--text-secondary, #8696a0);
}

.howto-detail-body li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.howto-detail-body blockquote {
  border-left: 4px solid var(--green-500, #00a884);
  background: rgba(0, 168, 132, 0.05);
  padding: 12px 20px;
  margin: 16px 0;
  border-radius: 0 8px 8px 0;
  color: var(--text-secondary, #8696a0);
}

.howto-detail-body pre {
  background: var(--bg-input, #0d1318);
  border: 1px solid var(--border-default, rgba(134, 150, 160, 0.1));
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
  overflow-x: auto;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
  color: var(--green-400, #00d4a4);
}

.howto-detail-body code {
  background: var(--bg-input, #0d1318);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
  color: var(--green-400, #00d4a4);
}

.howto-detail-body pre code {
  background: none;
  padding: 0;
}

.howto-detail-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.howto-detail-body th,
.howto-detail-body td {
  padding: 10px 14px;
  border: 1px solid var(--border-default, rgba(134, 150, 160, 0.1));
  text-align: left;
  font-size: 14px;
}

.howto-detail-body th {
  background: rgba(0, 168, 132, 0.08);
  font-weight: 600;
  color: var(--text-primary, #f0f2f5);
}

.howto-detail-body td {
  color: var(--text-secondary, #8696a0);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .howto-grid {
    grid-template-columns: 1fr;
  }

  .howto-detail-section {
    padding: 100px 16px 60px;
  }

  .howto-detail-header {
    padding: 24px 20px 0;
  }

  .howto-detail-body {
    padding: 24px 20px;
  }

  .howto-card-body {
    padding: 20px;
  }
}
