/* SearchKaro — responsive editorial layout */
:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #0f4c5c;
  --brand-2: #1a6b7a;
  --accent: #16a34a;
  --accent-hover: #15803d;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
}
img, video { max-width: 100%; height: auto; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(1140px, 94%); margin: 0 auto; }

.site-header {
  background: var(--brand);
  color: #fff;
  border-bottom: 3px solid #e8b923;
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 12px;
  position: relative;
}
.logo {
  font-weight: 800;
  color: #fff !important;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.logo img {
  height: 32px;
  width: 32px;
  display: block;
  border-radius: 8px;
  flex-shrink: 0;
}
.logo span { color: #fbbf24; }
.nav nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.nav a {
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none !important;
}
.nav a:hover, .nav a.active { color: #fff; }
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 1.1rem;
  cursor: pointer;
}
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--brand);
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 4%;
    border-bottom: 3px solid #e8b923;
    box-shadow: var(--shadow);
  }
  body.nav-open .nav nav { display: flex; }
}

.hero {
  background: linear-gradient(180deg, #e8f1f3 0%, var(--bg) 100%);
  padding: 40px 0 24px;
  border-bottom: 1px solid var(--line);
}
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 4vw, 2.25rem);
  letter-spacing: -0.02em;
  color: var(--brand);
}
.eyebrow {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.lead { color: var(--muted); max-width: 70ch; margin: 0 0 16px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  border: 1px solid transparent;
  text-decoration: none !important;
  cursor: pointer;
  font-size: 0.92rem;
}
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.btn.secondary { background: #fff; color: var(--brand); border-color: var(--line); }
.btn.green { background: var(--accent); color: #fff; }
.btn.green:hover { background: var(--accent-hover); }
.btn.block { width: 100%; }

.section { padding: 24px 0 10px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.section-head h2 { margin: 0; color: var(--brand); font-size: 1.28rem; }
.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 14px;
}
.dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 800px) { .dual { grid-template-columns: 1fr; } }
.link-list { margin: 0; padding-left: 1.15rem; }
.link-list li { margin: 0.45rem 0; }
.list-card h2, .list-card h3 { margin: 8px 0; font-size: 1.05rem; }
.list-card .excerpt { color: var(--muted); margin: 0 0 8px; }
.list-card .meta, .list-card .date { color: var(--muted); font-size: 0.85rem; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.card.mini { text-decoration: none !important; color: inherit; }
.card.mini h3 { margin: 0 0 6px; color: var(--brand); }

.faq-home details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 10px;
}
.faq-home summary { font-weight: 700; cursor: pointer; color: var(--brand); }
.faq-home p { color: var(--muted); margin: 8px 0 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand);
  background: #e8f1f3;
  padding: 3px 8px;
  border-radius: 999px;
}
.tag.green { color: #166534; background: #dcfce7; }
.note { color: var(--muted); font-size: 0.92rem; }

.site-footer {
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 18px;
  margin-bottom: 16px;
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }
.muted { opacity: 0.9; }

.page-head { padding: 28px 0 8px; text-align: center; }
.page-head h1 {
  margin: 0 0 8px;
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  color: var(--brand);
}
.page-head .sub {
  color: var(--muted);
  margin: 0 auto 10px;
  max-width: 60ch;
}

.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 12px auto 8px;
  width: min(1140px, 94%);
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 16px;
  padding: 8px 0 40px;
}
.course-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.course-thumb { position: relative; aspect-ratio: 16 / 9; background: #dbe4ea; overflow: hidden; }
.course-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge-free {
  position: absolute; top: 10px; left: 10px;
  background: var(--accent); color: #fff;
  font-size: 0.72rem; font-weight: 800;
  padding: 4px 8px; border-radius: 999px;
}
.course-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.course-body h3 {
  margin: 0; font-size: 1rem; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.course-meta { color: var(--muted); font-size: 0.86rem; }
.course-meta .dot { margin: 0 6px; opacity: 0.5; }
.course-body .btn { margin-top: auto; }

.post-list { display: grid; gap: 14px; padding: 8px 0 48px; }
.article { padding: 24px 0 56px; max-width: 760px; }
.article h1 { font-size: clamp(1.4rem, 3vw, 1.85rem); line-height: 1.25; color: var(--brand); }
.article .content { color: #374151; }
.article .content pre {
  background: #0f172a; color: #e2e8f0;
  border-radius: 10px; padding: 14px; overflow-x: auto;
}
.detail-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 12px 0;
  box-shadow: var(--shadow);
}
.detail-box h2 { margin: 0 0 8px; font-size: 1.05rem; color: var(--brand); }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.empty { color: var(--muted); padding: 24px 0; text-align: center; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.data-table { width: 100%; border-collapse: collapse; min-width: 520px; }
.data-table th, .data-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.data-table th { background: #e8f1f3; color: var(--brand); font-weight: 700; }
.data-table tr:last-child td { border-bottom: none; }
