/*
Theme Name: Cleverivo
Description: Gold-accent story theme for cleverivo.com — logo strip + gold nav bar, featured story card, 2-column recent stories, single post with Most Viewed / Categories / Archives sidebar.
Version: 1.0
Text Domain: cleverivo
*/

:root {
  --gold: #d8b36a;
  --gold-dark: #c79a45;
  --gold-text: #d1a24a;
  --gold-soft: #e5c88f;
  --text: #333;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --badge-grey: #a8a8a8;
  --max-width: 1290px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 16px; }

/* ---------- Header ---------- */
.header-top { background: #fff; }
.header-top-inner { display: flex; align-items: center; min-height: 94px; }
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 6px;
}
.menu-toggle-spacer { display: none; width: 38px; }
.site-logo { display: inline-flex; align-items: center; gap: 12px; padding: 6px 12px 6px 4px; }
.logo-words { display: flex; flex-direction: column; line-height: 1; }
.logo-line1 {
  font-family: 'Roboto Slab', Georgia, serif;
  font-size: 30px;
  font-weight: 800;
  color: #1f2433;
  letter-spacing: 0.2px;
}
.logo-line2 {
  margin-top: 4px;
  font-family: 'Roboto Slab', Georgia, serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--gold-dark);
  letter-spacing: 4px;
  text-transform: uppercase;
}
.custom-logo { max-height: 76px; width: auto; }

.header-nav { background: var(--gold); }
.header-nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 52px; }
.main-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0; padding: 0; }
.main-nav a {
  display: block;
  padding: 14px 0;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}
.main-nav a:hover, .main-nav .current-menu-item > a { color: #fff7e6; text-shadow: 0 0 1px rgba(255,255,255,0.6); }
.header-search {
  display: flex;
  align-items: center;
  width: 348px;
  height: 40px;
  padding: 0 10px 0 14px;
  border-radius: 999px;
  background: var(--gold-soft);
  border: 1px solid rgba(255,255,255,0.35);
}
.header-search input {
  flex: 1; min-width: 0;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: #fff;
}
.header-search input::placeholder { color: rgba(255,255,255,0.9); }
.header-search input:focus { outline: none; }
.header-search button { background: none; border: none; color: #fff; cursor: pointer; padding: 4px; display: inline-flex; }

/* ---------- Drawer (mobile) ---------- */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); opacity: 0; transition: opacity .3s ease; z-index: 998; }
.drawer-overlay[hidden] { display: none; }
.drawer-close { position: absolute; top: 8px; right: 10px; background: none; border: none; color: rgba(255,255,255,0.9); cursor: pointer; padding: 6px; display: inline-flex; }
.drawer {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 80%; max-width: 330px;
  background: #fff;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform .3s ease;
  visibility: hidden;
  z-index: 999;
  padding-top: 28px;
}
body.drawer-open { overflow: hidden; }
body.drawer-open .drawer { transform: translateX(0); visibility: visible; }
body.drawer-open .drawer-overlay { opacity: 1; }
.drawer-search { display: flex; margin: 0 14px 18px; height: 44px; border-radius: 999px; background: var(--gold-soft); padding: 0 8px 0 16px; align-items: center; }
.drawer-search input { flex: 1; min-width: 0; border: none; background: transparent; font: inherit; font-size: 16px; color: #fff; }
.drawer-search input::placeholder { color: rgba(255,255,255,0.95); }
.drawer-search input:focus { outline: none; }
.drawer-search button { background: none; border: none; color: #fff; padding: 6px; display: inline-flex; cursor: pointer; }
.drawer-menu { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.drawer-menu li { border-bottom: 1px solid var(--line); }
.drawer-menu a { display: block; padding: 0 16px; line-height: 54px; font-size: 15px; font-weight: 700; text-transform: uppercase; color: #555; }
.drawer-menu .current-menu-item > a, .drawer-menu a:hover { color: var(--gold-dark); }

/* ---------- Sections ---------- */
.content-wrap { padding: 26px 0 56px; }
.home-section { margin-bottom: 70px; }
.home-section:last-child { margin-bottom: 0; }
.section-head { border-bottom: 2px solid #ececec; margin-bottom: 30px; }
.section-title {
  display: inline-block;
  margin: 0 0 -2px;
  padding-bottom: 10px;
  border-bottom: 2px solid #8c8c8c;
  font-size: 26px;
  font-weight: 700;
  text-transform: uppercase;
  color: #333;
  letter-spacing: 0.2px;
}

.thumb { display: block; overflow: hidden; background: #f2f2f2; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.thumb:hover img { transform: scale(1.03); }

.badge {
  display: inline-block;
  padding: 3px 6px;
  border-radius: 2px;
  background: var(--badge-grey);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1.3;
}
.badge-gold { background: var(--gold); }
.post-date { margin-top: 6px; font-size: 13.5px; color: #555; }
.mini-rule { display: block; width: 36px; height: 2px; background: #e1e1e1; margin: 12px 0 0; }

/* Featured story */
.featured-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.14);
}
.featured-card .thumb { aspect-ratio: 757/529; }
.featured-body { display: flex; flex-direction: column; justify-content: center; padding: 26px 28px; }
.featured-body .badge { align-self: flex-start; }
.featured-title { margin: 10px 0 0; font-size: 25px; font-weight: 700; line-height: 1.4; color: var(--gold-text); }
.featured-title a:hover { color: var(--gold-dark); }
.featured-excerpt {
  margin: 22px 0 0;
  font-size: 16.5px;
  line-height: 1.75;
  color: #333;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden;
}

/* Recent stories */
.story-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 66px 56px; padding-top: 34px; }
.story { display: grid; grid-template-columns: 222px minmax(0, 1fr); gap: 26px; align-items: center; }
.story .thumb { aspect-ratio: 1/1; }
.story-body .badge { margin-bottom: 6px; }
.story-title {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.38;
  color: #333;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.story-title a:hover { color: var(--gold-dark); }
.story-excerpt {
  margin: 20px 0 0;
  font-size: 16px;
  line-height: 1.75;
  color: #333;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}

.more-wrap { text-align: center; margin-top: 64px; }
.btn-more {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--gold);
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.btn-more:hover { background: var(--gold-dark); }
.nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 50px; }
.page-numbers {
  min-width: 42px; height: 42px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--gold); border-radius: 999px; font-weight: 700; color: var(--gold-dark);
}
.page-numbers.current { background: var(--gold); color: #fff; }
.empty-note { font-size: 17px; }
.empty-note a { color: var(--gold-dark); }

/* ---------- Single + sidebar ---------- */
.single-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
.article { padding: 16px 34px 0 0; }
.article-cat { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--gold-dark); }
.article-cat:hover { text-decoration: underline; }
.article-title { margin: 8px 0 0; font-size: 32px; line-height: 1.3; font-weight: 700; color: #333; }
.article-rule { display: block; width: 36px; height: 3px; background: #e1e1e1; margin: 20px 0 16px; }
.article-meta { font-size: 12.5px; letter-spacing: 0.6px; text-transform: uppercase; color: #333; }
.article-meta a { color: var(--gold-dark); }
.article-meta a:hover { text-decoration: underline; }
.article-thumb { margin: 34px 0 6px; }
.article-thumb img { width: 100%; height: auto; }
.post-content { margin-top: 20px; font-size: 18px; line-height: 1.8; color: #2b2b2b; overflow-wrap: anywhere; }
.post-content img { height: auto; margin: 14px 0; }
.post-content a { color: var(--gold-dark); text-decoration: underline; }
.post-content h2, .post-content h3 { line-height: 1.3; margin: 1.5em 0 .5em; }
.page-links { margin: 26px 0; display: flex; gap: 8px; flex-wrap: wrap; font-weight: 700; }
.share-row { display: flex; gap: 10px; margin: 34px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.share-row a { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; }
.share-facebook { background: #1877f2; }
.share-x { background: #111; }
.share-pinterest { background: #d0021b; }
.share-email { background: #8a8a8a; }

.sidebar { border-left: 1px solid var(--line); padding: 20px 0 0 34px; align-self: stretch; }
.widget { margin-bottom: 40px; }
.widget-title { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #222; }
.widget-rule { display: block; width: 36px; height: 3px; background: #e1e1e1; margin: 14px 0 16px; }
.widget-links { list-style: none; margin: 0; padding: 0; }
.widget-links li { border-bottom: 1px solid var(--line); }
.widget-links li:last-child { border-bottom: none; }
.widget-links a { display: block; padding: 9px 0; font-size: 15.5px; line-height: 1.6; color: var(--gold-dark); }
.widget-links a:hover { color: #a87d2c; text-decoration: underline; }
.widget-links .children { list-style: none; padding-left: 14px; }
.related { margin-top: 60px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--gold); padding: 22px 0 20px; text-align: center; margin-top: 20px; }
.footer-nav {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 0 0 12px;
  padding: 0;
  font-size: 14px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.footer-nav a { color: rgba(255,255,255,0.88); }
.footer-nav a:hover { color: #fff; }
.footer-copyright { font-size: 16px; color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .story-grid { gap: 48px 34px; }
  .story { grid-template-columns: 160px minmax(0, 1fr); gap: 18px; }
  .story-title { font-size: 19px; }
  .story-excerpt { margin-top: 14px; font-size: 15px; }
}
@media (max-width: 960px) {
  .header-top-inner { min-height: 72px; justify-content: space-between; }
  .menu-toggle, .menu-toggle-spacer { display: inline-flex; }
  .header-nav { display: none; }
  .logo-line1 { font-size: 24px; }
  .logo-line2 { font-size: 12px; letter-spacing: 3px; }
  .logo-mark { width: 34px; height: 23px; }
  .featured-card { grid-template-columns: minmax(0, 1fr); }
  .story-grid { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .single-layout { grid-template-columns: minmax(0, 1fr); }
  .article { padding-right: 0; }
  .sidebar { border-left: none; border-top: 1px solid var(--line); padding: 30px 0 0; margin-top: 30px; }
}
@media (max-width: 640px) {
  .content-wrap { padding: 18px 0 40px; }
  .home-section { margin-bottom: 46px; }
  .section-title { font-size: 21px; }
  .featured-body { padding: 18px 16px 22px; }
  .featured-title { font-size: 21px; }
  .featured-excerpt { font-size: 15.5px; -webkit-line-clamp: 3; }
  .story { grid-template-columns: 110px minmax(0, 1fr); gap: 14px; align-items: start; }
  .story-title { font-size: 16.5px; }
  .story-excerpt { display: none; }
  .story .mini-rule { display: none; }
  .article-title { font-size: 25px; }
  .post-content { font-size: 17px; }
}
