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

body {
  font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1a1a1a;
  background: #f7f7f7;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: #1a1a1a; text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ===== Header / Hero ===== */
.site-header {
  background-color: #F5C542;
  background-image: url('https://downloads.intercomcdn.com/i/o/275325/661985541e16fcc5459e5f5b/348a87abc5f0870ed4d0e6085fd032fb.png');
  background-size: cover;
  background-position: center;
  padding: 28px 40px 48px;
  color: #262522;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1060px;
  margin: 0 auto 32px;
}

.header-top .logo {
  height: 32px;
}

.site-header h1 {
  max-width: 1060px;
  margin: 0 auto 28px;
  font-size: 1.65rem;
  font-weight: 700;
  color: #262522;
  line-height: 1.3;
}

.search-box {
  max-width: 1060px;
  margin: 0 auto;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 16px 20px 16px 48px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  background: rgba(255,255,255,0.85);
  color: #1a1a1a;
  backdrop-filter: blur(4px);
}

.search-box input:focus {
  outline: none;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.search-box input::placeholder { color: #737373; }

.search-box svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  stroke: #737373;
  fill: none;
}

/* ===== Breadcrumbs ===== */
.breadcrumbs {
  max-width: 1060px;
  margin: 24px auto 0;
  padding: 0 24px;
  font-size: 0.85rem;
  color: #737373;
}
.breadcrumbs a { color: #737373; }
.breadcrumbs a:hover { color: #1a1a1a; }
.breadcrumbs .sep { margin: 0 6px; }

/* ===== Main Content ===== */
.content-wrapper {
  max-width: 1060px;
  margin: 0 auto;
  padding: 40px 24px 64px;
}

/* ===== Collection Cards (home page) ===== */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 8px;
}

.collection-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 28px 24px;
  transition: box-shadow 0.2s, transform 0.15s;
  display: flex;
  flex-direction: column;
  color: #1a1a1a;
}

.collection-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-2px);
  text-decoration: none;
  color: #1a1a1a;
}

.collection-card .card-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f7f7;
  border-radius: 8px;
}

.collection-card .card-icon svg {
  width: 22px;
  height: 22px;
  stroke: #262522;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.collection-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #262522;
  margin-bottom: 6px;
}

.collection-card p {
  font-size: 0.875rem;
  color: #737373;
  margin-bottom: 16px;
  flex-grow: 1;
  line-height: 1.5;
}

.collection-card .article-count {
  font-size: 0.8rem;
  color: #909aa5;
}

/* ===== Popular Articles (home page bottom) ===== */
.popular-articles {
  margin-top: 40px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 8px 0;
}

.popular-articles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.popular-article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  color: #1a1a1a;
  font-size: 0.925rem;
  border-bottom: 1px solid #f0f0f0;
}

.popular-article:hover {
  background: #fafafa;
  text-decoration: none;
}

.popular-articles-grid .popular-article:nth-last-child(-n+2) {
  border-bottom: none;
}

.popular-article .chevron {
  color: #c0c0c0;
  font-size: 0.8rem;
  margin-left: 12px;
  flex-shrink: 0;
}

/* ===== Article List ===== */
.article-list {
  list-style: none;
  padding: 0;
}

.article-list li {
  border-bottom: 1px solid #e6e6e6;
}

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

.article-list a {
  display: block;
  padding: 14px 0;
  color: #1a1a1a;
  font-size: 0.95rem;
}

.article-list a:hover { color: #334BFA; text-decoration: none; }

.article-list a::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 10px;
  vertical-align: middle;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* ===== Section headings inside collection pages ===== */
.content-wrapper h2 {
  font-size: 1.1rem;
  color: #262522;
  margin-top: 32px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e6e6e6;
}

/* ===== Article Body ===== */
.article-body {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  padding: 40px;
}

.article-body h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #262522;
  margin-bottom: 16px;
}

.article-body h2 {
  font-size: 1.2rem;
  margin-top: 36px;
  margin-bottom: 12px;
  border-bottom: none;
}

.article-body h3 { font-size: 1.05rem; margin-top: 28px; margin-bottom: 8px; }

.article-body p { margin-bottom: 16px; color: #1a1a1a; }

.article-body ul, .article-body ol {
  margin: 0 0 16px 24px;
}

.article-body li { margin-bottom: 6px; }

.article-body img {
  display: block;
  margin: 20px 0;
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.article-body blockquote {
  border-left: 3px solid #F5C542;
  padding: 8px 16px;
  margin: 16px 0;
  color: #737373;
  background: #fffdf5;
  border-radius: 0 6px 6px 0;
}

.article-body code {
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.article-body pre {
  background: #f5f5f5;
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 16px;
}

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

.article-body hr {
  border: none;
  border-top: 1px solid #e6e6e6;
  margin: 32px 0;
}

/* Video embeds */
.article-body a img[alt="Video"] {
  border: 2px solid #e6e6e6;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid #e6e6e6;
  padding: 32px 24px;
  text-align: center;
  color: #909aa5;
  font-size: 0.85rem;
  background: #fff;
}

.site-footer a { color: #909aa5; }
.site-footer a:hover { color: #1a1a1a; }
.footer-links { margin-bottom: 12px; }
.footer-links a { margin: 0 12px; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .collection-grid { grid-template-columns: repeat(2, 1fr); }
  .popular-articles-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .site-header { padding: 20px 16px 36px; }
  .site-header h1 { font-size: 1.3rem; }
  .content-wrapper { padding: 24px 16px 48px; }
  .collection-grid { grid-template-columns: 1fr; }
  .article-body { padding: 24px 16px; }
}
