/*
Theme Name: Dino Discover
Theme URI: http://localhost:10107/
Author: Rebuilt clean for discoverthedinosaurs.com
Description: Lightweight clean theme inspired by the original Discover the Dinosaurs exhibit website (2016). No external page builders, no ad injectors, escaped output.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: dinodiscover
*/

:root {
  --jungle: #1f3d2b;
  --jungle-2: #2d5a3d;
  --moss: #6b8f3a;
  --lava: #e8671c;
  --lava-dark: #c4510f;
  --amber: #f4b942;
  --sand: #f6efe0;
  --bone: #fffaf0;
  --ink: #23201b;
  --muted: #6b6457;
  --line: #e4dac3;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(31, 61, 43, .12);
  --font-display: "Luckiest Guy", "Arial Black", Impact, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--sand);
}
img { max-width: 100%; height: auto; }
a { color: var(--lava-dark); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--jungle); }
h1, h2, h3, h4 { line-height: 1.25; color: var(--jungle); margin: 1.4em 0 .5em; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 999; background: #fff; padding: 8px 12px; clip: auto; width: auto; height: auto; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.topbar { background: var(--jungle); color: #dfe8d6; font-size: 14px; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; min-height: 36px; gap: 12px; }
.topbar a { color: var(--amber); text-decoration: none; }

.site-header {
  background:
    radial-gradient(circle at 85% 120%, rgba(232,103,28,.35), transparent 45%),
    linear-gradient(180deg, var(--jungle-2), var(--jungle));
  color: #fff;
  border-bottom: 6px solid var(--lava);
  position: relative;
}
.site-header::after { /* jagged ridge like a stegosaurus back */
  content: ""; position: absolute; left: 0; right: 0; bottom: -18px; height: 12px;
  background: linear-gradient(135deg, var(--lava) 33%, transparent 33%) 0 0 / 24px 12px,
              linear-gradient(225deg, var(--lava) 33%, transparent 33%) 0 0 / 24px 12px;
  pointer-events: none;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 20px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: #fff; }
.brand svg { width: 64px; height: 64px; flex: none; }
.brand-name { font-family: var(--font-display); font-size: 30px; letter-spacing: .5px; line-height: 1; text-shadow: 3px 3px 0 rgba(0,0,0,.25); }
.brand-name span { color: var(--amber); }
.brand-tag { display: block; font-size: 13px; color: #cfe0c4; font-family: var(--font-body); letter-spacing: .3px; margin-top: 4px; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.main-nav a {
  display: block; padding: 9px 14px; border-radius: 999px;
  color: #fff; text-decoration: none; font-weight: 800; font-size: 15px;
}
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current_page_item > a { background: var(--lava); color: #fff; }
.main-nav ul ul { display: none; }
.nav-toggle { display: none; background: var(--lava); color: #fff; border: 0; border-radius: 10px; padding: 10px 14px; font-weight: 800; cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(90deg, rgba(31,61,43,.92) 0%, rgba(31,61,43,.65) 55%, rgba(31,61,43,.2) 100%),
    var(--hero-img, linear-gradient(135deg, var(--moss), var(--jungle)));
  background-size: cover; background-position: center;
  color: #fff; padding: 80px 0 90px;
}
.hero h1 { font-family: var(--font-display); color: #fff; font-size: clamp(36px, 6vw, 64px); margin: 0 0 12px; letter-spacing: 1px; text-shadow: 4px 4px 0 rgba(0,0,0,.25); font-weight: 400; }
.hero h1 em { color: var(--amber); font-style: normal; }
.hero p { font-size: 20px; max-width: 620px; color: #e9f0e3; margin: 0 0 26px; }
.btn {
  display: inline-block; background: var(--lava); color: #fff; text-decoration: none;
  font-weight: 900; padding: 14px 26px; border-radius: 999px; box-shadow: 0 5px 0 var(--lava-dark);
  transition: transform .12s ease;
}
.btn:hover { transform: translateY(-2px); color: #fff; }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 3px #fff; margin-left: 10px; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-title { font-family: var(--font-display); font-weight: 400; font-size: 34px; color: var(--jungle); margin: 0 0 8px; letter-spacing: .5px; }
.section-sub { color: var(--muted); margin: 0 0 28px; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.cat-tile {
  background: var(--bone); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 20px 16px; text-decoration: none; color: var(--ink); text-align: center;
  transition: border-color .15s, transform .15s;
}
.cat-tile:hover { border-color: var(--lava); transform: translateY(-3px); color: var(--ink); }
.cat-tile .icon { font-size: 34px; line-height: 1; display: block; margin-bottom: 8px; }
.cat-tile strong { display: block; font-size: 17px; color: var(--jungle); }
.cat-tile small { color: var(--muted); }

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; }
.card {
  background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column; border: 1px solid var(--line);
}
.card-thumb { display: block; aspect-ratio: 16/10; background: var(--jungle-2); overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .card-thumb img { transform: scale(1.04); }
.card-thumb.placeholder { display: grid; place-items: center; color: var(--amber); font-family: var(--font-display); font-size: 28px; }
.card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-cat a { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; font-weight: 900; color: var(--moss); text-decoration: none; }
.card-title { margin: 0; font-size: 20px; line-height: 1.3; }
.card-title a { color: var(--jungle); text-decoration: none; }
.card-title a:hover { color: var(--lava-dark); }
.card-excerpt { color: var(--muted); font-size: 15px; margin: 0; }
.card-meta { margin-top: auto; font-size: 13px; color: var(--muted); }

/* ---------- Layout with sidebar ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; padding: 44px 20px; }
.layout.full { grid-template-columns: minmax(0, 1fr); max-width: 880px; }
.entry { background: #fff; border-radius: var(--radius); padding: 36px 42px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.entry-header h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(30px, 4vw, 44px); margin: 0 0 12px; letter-spacing: .5px; }
.entry-meta { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.entry-meta a { color: var(--moss); font-weight: 800; text-decoration: none; }
.entry-thumb { margin: 0 -42px 28px; }
.entry-thumb img { width: 100%; display: block; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content blockquote { margin: 1.5em 0; padding: 14px 22px; border-left: 6px solid var(--lava); background: var(--sand); border-radius: 0 10px 10px 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 15px; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 8px 10px; }
.entry-content th { background: var(--jungle); color: #fff; }
.entry-content iframe { max-width: 100%; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 14px; color: var(--muted); text-align: center; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.tags { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags a { background: var(--sand); padding: 4px 12px; border-radius: 999px; font-size: 13px; text-decoration: none; color: var(--jungle); }

.sidebar .widget { background: #fff; border-radius: var(--radius); padding: 22px; margin-bottom: 24px; border: 1px solid var(--line); }
.sidebar .widget-title { font-family: var(--font-display); font-weight: 400; font-size: 22px; margin: 0 0 12px; letter-spacing: .5px; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 7px 0; border-bottom: 1px dashed var(--line); }
.sidebar li:last-child { border-bottom: 0; }
.sidebar li a { text-decoration: none; color: var(--ink); font-weight: 700; }
.sidebar li a:hover { color: var(--lava-dark); }
.sidebar .count { float: right; background: var(--sand); color: var(--muted); font-size: 12px; padding: 1px 8px; border-radius: 999px; }
.dino-fact { background: var(--jungle) !important; color: #e9f0e3; }
.dino-fact .widget-title { color: var(--amber); }

.search-form { display: flex; gap: 8px; }
.search-form input[type=search] { flex: 1; padding: 11px 14px; border: 2px solid var(--line); border-radius: 10px; font: inherit; }
.search-form button { background: var(--lava); color: #fff; border: 0; border-radius: 10px; padding: 0 16px; font-weight: 800; cursor: pointer; }

.archive-head { background: var(--jungle); color: #fff; padding: 40px 0; }
.archive-head h1 { color: #fff; font-family: var(--font-display); font-weight: 400; margin: 0; font-size: 40px; letter-spacing: .5px; }
.archive-head p { margin: 6px 0 0; color: #cfe0c4; }

.pagination { display: flex; justify-content: center; gap: 8px; margin: 40px 0 0; flex-wrap: wrap; }
.pagination .page-numbers { padding: 8px 14px; background: #fff; border-radius: 10px; text-decoration: none; font-weight: 800; color: var(--jungle); border: 1px solid var(--line); }
.pagination .current { background: var(--lava); color: #fff; border-color: var(--lava); }

/* ---------- Fun Stuff ---------- */
.fun-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.fun-card { background: #fff; border-radius: var(--radius); padding: 26px; border-top: 8px solid var(--lava); box-shadow: var(--shadow); }
.fun-card:nth-child(3n+2) { border-top-color: var(--moss); }
.fun-card:nth-child(3n+3) { border-top-color: var(--amber); }
.fun-card .icon { font-size: 44px; line-height: 1; }
.fun-card h3 { margin: 12px 0 6px; font-family: var(--font-display); font-weight: 400; font-size: 24px; letter-spacing: .5px; }
.fun-card p { margin: 0; color: var(--muted); }
.fun-note { margin-top: 30px; padding: 18px 22px; background: var(--bone); border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted); }

/* ---------- Comments ---------- */
.comments-area { margin-top: 36px; }
.comment-list { list-style: none; padding: 0; }
.comment-body { background: var(--sand); border-radius: 10px; padding: 14px 18px; margin-bottom: 14px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--jungle); color: #cfe0c4; margin-top: 40px; border-top: 6px solid var(--lava); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; padding: 44px 20px; }
.site-footer h4 { color: var(--amber); font-family: var(--font-display); font-weight: 400; font-size: 20px; margin: 0 0 12px; letter-spacing: .5px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--amber); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 4px 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 16px 20px; font-size: 14px; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; width: 100%; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; }
  .header-inner { flex-wrap: wrap; }
  .entry { padding: 24px 20px; }
  .entry-thumb { margin: 0 -20px 22px; }
  .brand-name { font-size: 24px; }
  .hero { padding: 56px 0 64px; }
  .btn.ghost { margin: 12px 0 0; }
}
