/* diolichat.store — base stylesheet */
:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #5c6470;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --border: #e5e7eb;
  --card: #f8fafc;
  --max: 880px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 17px;
}

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

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

/* Header / nav */
.site-header {
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.logo {
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text);
  letter-spacing: -0.5px;
}
.logo span { color: var(--brand); }
.nav-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.nav-links a { color: var(--muted); font-weight: 500; }
.nav-links a:hover { color: var(--brand); text-decoration: none; }

/* Sub-nav: categories + search */
.sub-nav {
  border-top: 1px solid var(--border);
  background: var(--card);
}
.sub-nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.cat-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}
.cat-bar .chip {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  color: var(--muted);
  font-weight: 600;
  font-size: .85rem;
}
.cat-bar .chip:hover { color: var(--brand); text-decoration: none; border-color: var(--brand); }

/* Search wrap with live dropdown */
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.search-wrap input {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 8px 0 0 8px;
  font-size: .88rem;
  width: 180px;
  border-right: 0;
}
.search-wrap button {
  background: var(--brand);
  color: #fff;
  border: 0;
  padding: 6px 12px;
  border-radius: 0 8px 8px 0;
  font-size: .88rem;
  cursor: pointer;
}
.search-wrap button:hover { background: var(--brand-dark); }
.live-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  z-index: 60;
  max-height: 320px;
  overflow-y: auto;
}
.live-item {
  display: flex;
  flex-direction: column;
  padding: 10px 14px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  gap: 3px;
}
.live-item:last-child { border-bottom: 0; }
.live-item:hover { background: var(--card); text-decoration: none; }
.live-item .tag { font-size: .68rem; margin-right: 4px; }
.live-item-title { font-weight: 600; font-size: .9rem; line-height: 1.3; }
.live-item-desc { color: var(--muted); font-size: .78rem; line-height: 1.4; }
.live-more { color: var(--brand); font-weight: 600; text-align: center; font-size: .88rem; }

/* Share buttons */
.share-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.share-label { font-weight: 600; font-size: .9rem; color: var(--muted); }
.share-btn {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}
.share-btn:hover { text-decoration: none; }
.share-btn.whatsapp { background: #25D366; color: #fff; border-color: #25D366; }
.share-btn.whatsapp:hover { background: #1da851; }
.share-btn.twitter { background: #1DA1F2; color: #fff; border-color: #1DA1F2; }
.share-btn.twitter:hover { background: #0c85d0; }
.share-btn.facebook { background: #1877F2; color: #fff; border-color: #1877F2; }
.share-btn.facebook:hover { background: #1565c0; }
.share-btn.linkedin { background: #0A66C2; color: #fff; border-color: #0A66C2; }
.share-btn.linkedin:hover { background: #084d94; }
.share-btn.copy { background: var(--card); color: var(--muted); }
.share-btn.copy:hover { background: var(--border); }

/* Search page */
.search-big {
  display: flex;
  gap: 0;
  margin: 20px 0 30px;
  max-width: 520px;
}
.search-big input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 10px 0 0 10px;
  font-size: 1rem;
  border-right: 0;
}
.search-big input:focus { border-color: var(--brand); outline: none; }
.search-big button {
  background: var(--brand);
  color: #fff;
  border: 0;
  padding: 12px 20px;
  border-radius: 0 10px 10px 0;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}
.search-big button:hover { background: var(--brand-dark); }

/* Layout */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.hero {
  text-align: center;
  padding: 48px 0 24px;
}
.hero h1 {
  font-size: 2.4rem;
  line-height: 1.2;
  margin: 0 0 12px;
  letter-spacing: -1px;
}
.hero p {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 620px;
  margin: 0 auto;
}

/* Article cards grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 36px;
}
.card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  background: var(--card);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
}
.card .tag {
  display: inline-block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--brand);
  font-weight: 700;
  margin-bottom: 8px;
}
.card h3 { margin: 0 0 8px; font-size: 1.18rem; line-height: 1.3; }
.card h3 a { color: var(--text); }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }

/* Article page */
.article h1 { font-size: 2.1rem; line-height: 1.25; margin: 0 0 8px; letter-spacing: -.5px; }
.article .meta { color: var(--muted); font-size: .9rem; margin-bottom: 28px; }
.article h2 { font-size: 1.5rem; margin-top: 38px; }
.article h3 { font-size: 1.2rem; margin-top: 28px; }
.article p, .article li { font-size: 1.05rem; }
.article ul, .article ol { padding-left: 22px; }
.article blockquote {
  border-left: 4px solid var(--brand);
  margin: 24px 0;
  padding: 4px 18px;
  color: var(--muted);
  background: var(--card);
  border-radius: 0 8px 8px 0;
}

/* Generic content page */
.page h1 { font-size: 2rem; margin-bottom: 6px; }
.page .updated { color: var(--muted); font-size: .9rem; margin-bottom: 28px; }

/* AdSense slot — visible placeholder before approval, invisible wrapper after */
.ad-slot {
  margin: 32px auto;
  text-align: center;
  min-height: 90px;
}
.ad-placeholder {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 28px 12px;
  color: #9aa3af;
  font-size: .85rem;
  background: repeating-linear-gradient(45deg,#fafafa,#fafafa 12px,#f4f4f5 12px,#f4f4f5 24px);
}

/* Contact form */
form { display: grid; gap: 14px; max-width: 520px; margin-top: 20px; }
label { font-weight: 600; font-size: .95rem; }
input, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font: inherit;
}
button {
  background: var(--brand);
  color: #fff;
  border: 0;
  padding: 12px 22px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  justify-self: start;
}
button:hover { background: var(--brand-dark); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--card);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-size: .92rem;
}
.footer-inner .footer-links a { color: var(--muted); margin-right: 16px; }
.footer-inner .footer-links a:hover { color: var(--brand); }

@media (max-width: 600px) {
  .hero h1 { font-size: 1.9rem; }
  body { font-size: 16px; }
}
.muted { color: var(--muted); }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.4rem; }
.nav .cta { background: var(--brand); color: #fff; padding: 8px 12px; border-radius: 8px; font-weight: 700; }
.nav .cta:hover { background: var(--brand-dark); color: #fff; text-decoration: none; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 16px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); text-decoration: none; }
.cat-head { margin-bottom: 10px; }
.cat-head p { color: var(--muted); margin-top: 6px; }
.article .tag { display: inline-block; font-size: .75rem; text-transform: uppercase; letter-spacing: .5px; color: var(--brand); font-weight: 700; margin-bottom: 8px; }
.cta-box { border: 1px solid var(--border); border-radius: 12px; padding: 18px; background: var(--card); margin: 24px 0; }
.btn { background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 9px; font-weight: 700; display: inline-block; }
.btn:hover { background: var(--brand-dark); color: #fff; text-decoration: none; }
.related h3 { margin-top: 24px; }
.related ul { margin: 0; padding-left: 18px; }
.ad-label { color: var(--muted); font-size: .8rem; margin: 0 0 6px; }
.footer-grid { max-width: var(--max); margin: 0 auto; padding: 32px 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; color: var(--muted); font-size: .92rem; }
.footer-cats a { color: var(--muted); margin-right: 12px; display: inline-block; margin-bottom: 6px; }
.footer-cats a:hover { color: var(--brand); }
.footer-bottom { border-top: 1px solid var(--border); padding: 12px 20px; color: var(--muted); text-align: center; }

/* Cookie consent banner */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: #1a1a1a; color: #e5e7eb; padding: 14px 20px;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  flex-wrap: wrap; font-size: .9rem;
}
.cookie-banner a { color: #93c5fd; }
.cookie-banner button {
  background: var(--brand); color: #fff; border: 0; padding: 8px 18px;
  border-radius: 8px; font-weight: 600; cursor: pointer; font-size: .9rem;
}
.cookie-banner button:hover { background: var(--brand-dark); }

/* Author bio box */
.author-box {
  display: flex; gap: 14px; align-items: flex-start;
  border-top: 1px solid var(--border); padding-top: 20px; margin-top: 32px;
}
.author-avatar {
  width: 48px; height: 48px; border-radius: 50%; background: var(--brand);
  color: #fff; font-weight: 800; font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.author-name { font-weight: 700; margin: 0; font-size: .95rem; }
.author-bio { margin: 4px 0 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }

/* Skip to content link */
.skip-link {
  position: absolute; top: -100%; left: 0; background: var(--brand); color: #fff;
  padding: 8px 16px; z-index: 200; font-weight: 600; border-radius: 0 0 8px 0;
}
.skip-link:focus { top: 0; }

/* Hero media image */
.hero-media { margin: 0 0 24px; border-radius: 12px; overflow: hidden; }
.hero-media img { display: block; width: 100%; height: auto; border-radius: 12px; }

@media (max-width: 700px) {
  .nav-toggle { display: block; }
  .nav-links { display: none; width: 100%; gap: 12px; }
  body.nav-open .nav-links { display: flex; flex-direction: column; }
  .sub-nav-inner { flex-direction: column; align-items: stretch; }
  .cat-bar { justify-content: flex-start; }
  .search-wrap { width: 100%; }
  .search-wrap input { flex: 1; width: auto; }
  .share-bar { gap: 6px; }
  .share-btn { padding: 5px 8px; font-size: .78rem; }
  .cookie-banner { font-size: .82rem; padding: 10px 14px; }
}
