/* ============================================================
   WikiHow Clone — wikihow.css
   ============================================================ */

:root {
  --wh-green: #80C342;
  --wh-green-dark: #5a9c28;
  --wh-green-light: #f0f8e8;
  --wh-blue: #3d84c8;
  --wh-text: #333333;
  --wh-text-light: #666666;
  --wh-border: #e0e0e0;
  --wh-bg: #f9f9f9;
  --wh-white: #ffffff;
  --wh-step-circle: 34px;
  --wh-font: 'Lato', 'Helvetica Neue', Arial, sans-serif;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--wh-font);
  color: var(--wh-text);
  background: var(--wh-white);
  line-height: 1.6;
}

a { color: var(--wh-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   HEADER
   ============================================================ */

.wh-header { border-bottom: 1px solid var(--wh-border); background: var(--wh-white); }

.wh-header-top { padding: 10px 0; }

.wh-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Logo */
.wh-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.wh-logo-pixels { display: block; border-radius: 3px; }

.wh-logo-text {
  font-size: 26px;
  font-weight: 900;
  color: var(--wh-text);
  letter-spacing: -0.5px;
  font-style: italic;
}

/* Search */
.wh-search-wrap { flex: 1; max-width: 520px; margin: 0 auto; }

.wh-search-form {
  display: flex;
  border: 2px solid var(--wh-border);
  border-radius: 24px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.wh-search-form:focus-within { border-color: var(--wh-green); }

.wh-search-input {
  flex: 1;
  padding: 8px 16px;
  border: none;
  outline: none;
  font-family: var(--wh-font);
  font-size: 14px;
  color: var(--wh-text);
  background: transparent;
}

.wh-search-btn {
  padding: 8px 16px;
  background: var(--wh-green);
  border: none;
  cursor: pointer;
  color: white;
  display: flex;
  align-items: center;
  transition: background 0.2s;
}

.wh-search-btn:hover { background: var(--wh-green-dark); }

/* Header Actions */
.wh-header-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  align-items: center;
}

.wh-btn-login {
  padding: 7px 14px;
  border: 1px solid var(--wh-border);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--wh-text);
  white-space: nowrap;
}

.wh-btn-login:hover { background: var(--wh-bg); text-decoration: none; }

.wh-btn-join {
  padding: 7px 14px;
  background: var(--wh-green);
  border: 1px solid var(--wh-green);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  color: white;
  white-space: nowrap;
}

.wh-btn-join:hover { background: var(--wh-green-dark); text-decoration: none; }

/* Nav */
.wh-nav {
  border-top: 1px solid var(--wh-border);
  background: var(--wh-white);
}

.wh-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.wh-nav-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.wh-nav-list li a {
  display: block;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--wh-text);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: border-color 0.15s, color 0.15s;
}

.wh-nav-list li a:hover,
.wh-nav-list li a.active {
  color: var(--wh-green-dark);
  border-bottom-color: var(--wh-green);
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */

.wh-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

/* Homepage */
.wh-home { padding: 32px 0; }

.wh-home-hero {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #f0f8e8 0%, #e8f5ff 100%);
  border-radius: 8px;
  margin-bottom: 40px;
}

.wh-home-hero h1 {
  font-size: 32px;
  font-weight: 900;
  color: var(--wh-text);
  margin-bottom: 8px;
}

.wh-home-hero p {
  font-size: 16px;
  color: var(--wh-text-light);
}

.wh-home-section-title {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--wh-border);
}

.wh-article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.wh-article-card {
  border: 1px solid var(--wh-border);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: var(--wh-text);
  transition: box-shadow 0.2s;
}

.wh-article-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); text-decoration: none; }

.wh-article-card-img {
  width: 100%;
  height: 130px;
  background: #ddd;
}

.wh-article-card-title {
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

/* ============================================================
   ARTICLE LAYOUT
   ============================================================ */

.wh-article-wrap {
  display: flex;
  gap: 32px;
  padding-top: 20px;
  align-items: flex-start;
}

.wh-article-main {
  flex: 1;
  min-width: 0;
}

/* Breadcrumbs */
.wh-breadcrumb {
  font-size: 12px;
  color: var(--wh-text-light);
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
}

.wh-breadcrumb a { color: var(--wh-text-light); font-size: 12px; }
.wh-breadcrumb a:hover { color: var(--wh-blue); }
.wh-breadcrumb-sep { margin: 0 4px; color: #bbb; }
.wh-breadcrumb-current { color: var(--wh-text); }

/* Article Title */
.wh-article-title {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.25;
  color: var(--wh-text);
  margin-bottom: 12px;
}

/* Meta */
.wh-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--wh-text-light);
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--wh-border);
}

.wh-coauthor {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wh-coauthor-icon { flex-shrink: 0; }
.wh-coauthor a { color: var(--wh-blue); font-weight: 700; }

/* Parts overview */
.wh-parts-overview {
  background: var(--wh-bg);
  border: 1px solid var(--wh-border);
  border-radius: 6px;
  padding: 14px 18px;
  margin-bottom: 18px;
  font-size: 14px;
}

.wh-parts-overview strong { color: var(--wh-text); }

.wh-parts-list {
  margin: 8px 0 0 20px;
  padding: 0;
}

.wh-parts-list li { margin-bottom: 4px; }
.wh-parts-list a { color: var(--wh-blue); font-size: 13px; }

/* Intro */
.wh-intro {
  font-size: 15px;
  line-height: 1.7;
  color: var(--wh-text);
  margin-bottom: 24px;
}

/* ============================================================
   PARTS & STEPS
   ============================================================ */

.wh-part { margin-bottom: 8px; }

.wh-part-title {
  font-size: 18px;
  font-weight: 900;
  margin: 24px 0 4px;
  padding: 10px 0 10px;
  border-top: 2px solid var(--wh-border);
  color: var(--wh-text);
}

.wh-part-label {
  display: inline-block;
  background: var(--wh-green);
  color: white;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 3px;
  margin-right: 8px;
  vertical-align: middle;
}

.wh-steps {
  list-style: none;
  padding: 0;
  margin: 0;
}

.wh-step {
  border-bottom: 1px solid var(--wh-border);
  padding: 20px 0;
}

.wh-step:last-child { border-bottom: none; }

.wh-step-inner {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.wh-step-content {
  flex: 1;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  min-width: 0;
}

.wh-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--wh-step-circle);
  height: var(--wh-step-circle);
  background: var(--wh-green);
  color: white;
  font-size: 15px;
  font-weight: 900;
  border-radius: 50%;
  flex-shrink: 0;
  line-height: 1;
}

.wh-step-text { flex: 1; min-width: 0; }

.wh-step-title {
  font-size: 16px;
  line-height: 1.4;
  margin-bottom: 6px;
  color: var(--wh-text);
}

.wh-step-body {
  font-size: 14px;
  line-height: 1.7;
  color: #444;
}

.wh-step-image { flex-shrink: 0; }

.wh-step-img {
  width: 280px;
  height: 185px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.wh-img-placeholder {
  width: 280px;
  height: 185px;
  background: #d8d8d8;
  border-radius: 4px;
  position: relative;
}

.wh-img-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 10px,
    rgba(255,255,255,0.15) 10px,
    rgba(255,255,255,0.15) 20px
  );
  border-radius: 4px;
}

/* ============================================================
   TIPS & WARNINGS
   ============================================================ */

.wh-tips,
.wh-warnings {
  border-radius: 6px;
  padding: 18px 20px;
  margin: 24px 0;
}

.wh-tips { background: #FFFBE6; border-left: 4px solid #f5a623; }
.wh-warnings { background: #FFF2F2; border-left: 4px solid #d0021b; }

.wh-tips-title,
.wh-warnings-title {
  font-size: 15px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wh-tips-title { color: #8a6800; }
.wh-warnings-title { color: #a80015; }

.wh-tips-list,
.wh-warnings-list {
  padding-left: 20px;
  margin: 0;
}

.wh-tips-list li,
.wh-warnings-list li {
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 8px;
  color: var(--wh-text);
}

/* ============================================================
   REFERENCES
   ============================================================ */

.wh-references {
  margin: 24px 0;
  padding-top: 20px;
  border-top: 1px solid var(--wh-border);
}

.wh-references-title {
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--wh-text-light);
  margin-bottom: 12px;
}

.wh-references-list {
  padding-left: 20px;
  margin: 0;
}

.wh-references-list li {
  font-size: 13px;
  color: var(--wh-text-light);
  margin-bottom: 6px;
  line-height: 1.5;
}

/* ============================================================
   HELPFUL VOTE
   ============================================================ */

.wh-helpful {
  text-align: center;
  padding: 28px 20px;
  background: var(--wh-bg);
  border-radius: 8px;
  margin: 28px 0;
}

.wh-helpful-q {
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 16px;
}

.wh-helpful-btns {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.wh-helpful-yes,
.wh-helpful-no {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid;
  font-family: var(--wh-font);
  transition: background 0.15s, color 0.15s;
}

.wh-helpful-yes {
  background: white;
  border-color: var(--wh-green);
  color: var(--wh-green-dark);
}

.wh-helpful-yes:hover,
.wh-helpful-yes.active {
  background: var(--wh-green);
  color: white;
}

.wh-helpful-no {
  background: white;
  border-color: var(--wh-border);
  color: var(--wh-text-light);
}

.wh-helpful-no:hover,
.wh-helpful-no.active {
  background: #eee;
  border-color: #999;
  color: var(--wh-text);
}

.wh-helpful-result {
  margin-top: 14px;
  font-size: 14px;
  color: var(--wh-text-light);
  min-height: 20px;
}

/* ============================================================
   ABOUT THIS ARTICLE
   ============================================================ */

.wh-about {
  border: 1px solid var(--wh-border);
  border-radius: 6px;
  padding: 20px;
  margin: 24px 0;
}

.wh-about-title {
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--wh-text-light);
  margin-bottom: 16px;
}

.wh-about-inner { display: flex; gap: 16px; align-items: flex-start; }

.wh-about-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #d0d0d0;
  flex-shrink: 0;
}

.wh-about-info { flex: 1; }

.wh-about-author {
  font-size: 15px;
  margin-bottom: 4px;
}

.wh-about-bio {
  font-size: 13px;
  color: var(--wh-text-light);
  line-height: 1.5;
  margin-bottom: 6px;
}

.wh-about-stats { font-size: 13px; color: var(--wh-text-light); }

/* ============================================================
   SIDEBAR
   ============================================================ */

.wh-sidebar {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.wh-sidebar-card {
  border: 1px solid var(--wh-border);
  border-radius: 6px;
  padding: 16px;
}

.wh-sidebar-card-title {
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--wh-text-light);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wh-did-you-know p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--wh-text);
}

.wh-related-list { list-style: none; padding: 0; margin: 0; }

.wh-related-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--wh-border);
  color: var(--wh-text);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.4;
}

.wh-related-item:last-child { border-bottom: none; }
.wh-related-item:hover { color: var(--wh-blue); text-decoration: none; }

.wh-related-thumb {
  width: 52px;
  height: 40px;
  background: #d8d8d8;
  border-radius: 3px;
  flex-shrink: 0;
}

.wh-ad-box {
  width: 100%;
  height: 250px;
  background: #f0f0f0;
  border: 1px dashed #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #aaa;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ============================================================
   FOOTER
   ============================================================ */

.wh-footer {
  background: #2d2d2d;
  color: #ccc;
  margin-top: 40px;
  padding: 36px 0 20px;
}

.wh-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.wh-footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}

.wh-footer-col h4 {
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  margin-bottom: 14px;
}

.wh-footer-col ul { list-style: none; padding: 0; margin: 0; }

.wh-footer-col li { margin-bottom: 8px; }

.wh-footer-col a {
  font-size: 13px;
  color: #aaa;
  text-decoration: none;
}

.wh-footer-col a:hover { color: white; text-decoration: none; }

.wh-footer-bottom {
  border-top: 1px solid #444;
  padding-top: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.wh-footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: white;
  font-size: 18px;
  font-weight: 900;
  font-style: italic;
  flex-shrink: 0;
}

.wh-footer-copy {
  font-size: 12px;
  color: #888;
  line-height: 1.5;
  flex: 1;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 960px) {
  .wh-article-wrap { flex-direction: column; }
  .wh-sidebar { width: 100%; }
  .wh-footer-cols { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .wh-header-inner { flex-wrap: wrap; }
  .wh-search-wrap { order: 3; width: 100%; max-width: none; }
  .wh-header-actions { margin-left: auto; }

  .wh-article-title { font-size: 22px; }

  .wh-step-inner { flex-direction: column; }
  .wh-img-placeholder { width: 100%; height: 200px; }
  .wh-step-image { width: 100%; }

  .wh-footer-cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .wh-logo-text { font-size: 20px; }
  .wh-nav-list li a { padding: 8px 8px; font-size: 11px; }
  .wh-footer-cols { grid-template-columns: 1fr; }
  .wh-helpful-btns { flex-direction: column; align-items: center; }
}
