/*
Theme Name: Dino Facts Hub
Theme URI: https://dinofactshub.site
Author: Dino Facts Hub
Description: A fast, responsive blog theme for dinosaur and prehistoric-life websites. Includes a featured-article hero, rotating "Did you know?" fact bar, and fully configurable 300x250 ad placements (Appearance > Customize > Ad Placements) plus a 300x250 ad widget.
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dino-facts-hub
Tags: blog, news, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, custom-colors
*/

:root{
  --jungle:#12372a;
  --jungle-deep:#0b241b;
  --fern:#2f7d4f;
  --amber:#f2a51a;
  --magma:#d9482b;
  --stone:#edf1ea;
  --stone-dark:#dbe3d6;
  --ink:#14211b;
  --muted:#5b6b62;
  --white:#fff;
  --radius:14px;
  --head:"Bricolage Grotesque","Segoe UI",system-ui,sans-serif;
  --body:"Source Sans 3","Segoe UI",system-ui,-apple-system,sans-serif;
  --wrap:1200px;
}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{margin:0;background:var(--stone);color:var(--ink);font-family:var(--body);font-size:17px;line-height:1.65}
img,video,iframe{max-width:100%;height:auto}
a{color:var(--fern);text-decoration-thickness:1px;text-underline-offset:3px}
a:hover{color:var(--jungle)}
:focus-visible{outline:3px solid var(--amber);outline-offset:2px}
h1,h2,h3,h4,h5,h6{font-family:var(--head);line-height:1.15;color:var(--jungle);margin:0 0 .5em;font-weight:800;letter-spacing:-.01em}
p{margin:0 0 1.2em}
.screen-reader-text{position:absolute!important;clip:rect(1px,1px,1px,1px);width:1px;height:1px;overflow:hidden;white-space:nowrap}
.skip-link:focus{clip:auto;width:auto;height:auto;background:var(--amber);color:var(--ink);padding:.6rem 1rem;z-index:1000;top:8px;left:8px}
.wrap{max-width:var(--wrap);margin:0 auto;padding:0 20px}

/* Fact bar */
.fact-bar{background:var(--jungle-deep);color:#cfe3d6;font-size:.92rem}
.fact-bar .wrap{display:flex;gap:12px;align-items:center;min-height:38px}
.fact-bar__tag{background:var(--amber);color:var(--ink);font-weight:700;padding:2px 10px;border-radius:99px;font-size:.8rem;white-space:nowrap}
.fact-bar__text{margin:0;transition:opacity .4s}
.fact-bar__text.is-fading{opacity:0}

/* Header */
.site-header{background:var(--jungle);position:sticky;top:0;z-index:50;border-bottom:4px solid var(--amber)}
.admin-bar .site-header{top:32px}
.site-header .wrap{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:72px}
.brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:#fff}
.brand:hover{color:#fff}
.brand__mark{width:42px;height:42px;background:var(--amber);border-radius:12px;display:grid;place-items:center;flex:none}
.brand__mark svg{width:26px;height:26px;fill:var(--jungle)}
.brand__name{font-family:var(--head);font-weight:800;font-size:1.55rem;letter-spacing:-.02em;line-height:1}
.brand__tag{display:block;font-family:var(--body);font-weight:400;font-size:.78rem;color:#a9c7b6;margin-top:3px;letter-spacing:0}
.custom-logo{max-height:52px;width:auto}
.main-nav ul{list-style:none;margin:0;padding:0;display:flex;gap:4px}
.main-nav a{display:block;color:#e4f1e9;text-decoration:none;padding:8px 14px;border-radius:99px;font-weight:600;font-size:.98rem}
.main-nav a:hover,.main-nav .current-menu-item>a,.main-nav .current-cat>a{background:rgba(255,255,255,.12);color:#fff}
.main-nav li{position:relative}
.main-nav .sub-menu{display:none;position:absolute;left:0;top:100%;background:var(--jungle-deep);padding:8px;border-radius:12px;min-width:200px;flex-direction:column;gap:0}
.main-nav li:hover>.sub-menu,.main-nav li:focus-within>.sub-menu{display:flex}
.header-tools{display:flex;gap:8px;align-items:center}
.icon-btn{background:rgba(255,255,255,.1);border:0;color:#fff;width:42px;height:42px;border-radius:50%;cursor:pointer;display:grid;place-items:center}
.icon-btn:hover{background:var(--amber);color:var(--ink)}
.icon-btn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.menu-toggle{display:none}
.search-panel{display:none;background:var(--jungle-deep);padding:16px 0}
.search-panel.is-open{display:block}

/* Search form */
.search-form{display:flex;gap:8px;max-width:600px}
.search-form input[type=search]{flex:1;padding:12px 16px;border-radius:99px;border:2px solid transparent;font:inherit;background:#fff;color:var(--ink)}
.search-form button{background:var(--amber);color:var(--ink);border:0;border-radius:99px;padding:0 22px;font-weight:700;cursor:pointer;font:inherit;font-weight:700}
.search-form button:hover{background:#ffbb3d}

/* Layout */
.site-main{padding:34px 0 60px}
.layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:36px;align-items:stretch}
.section-title{font-size:1.5rem;margin:34px 0 18px;display:flex;align-items:center;gap:12px}
.section-title::after{content:"";flex:1;height:3px;background:repeating-linear-gradient(90deg,var(--stone-dark) 0 10px,transparent 10px 16px)}
.section-title:first-child{margin-top:0}

/* Chips & meta */
.chip{display:inline-block;background:var(--amber);color:var(--ink);font-weight:700;font-size:.8rem;padding:3px 11px;border-radius:99px;text-decoration:none}
.chip:hover{background:var(--jungle);color:#fff}
.meta{color:var(--muted);font-size:.88rem;display:flex;flex-wrap:wrap;gap:4px 14px}
.hero-card .meta,.hero-card .chip+*{color:#d8e8de}

/* Hero grid */
.hero-grid{display:grid;grid-template-columns:1.7fr 1fr;grid-template-rows:1fr 1fr;gap:18px;margin-bottom:10px}
.hero-card{position:relative;border-radius:20px;overflow:hidden;background:var(--jungle);min-height:250px;display:flex;align-items:flex-end;isolation:isolate}
.hero-card--0{grid-row:span 2;min-height:520px}
.hero-card__img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-2}
.hero-card__fallback{position:absolute;inset:0;z-index:-2;display:grid;place-items:center;font-size:6rem;background:radial-gradient(circle at 30% 20%,var(--fern),var(--jungle) 70%)}
.hero-card::after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(to top,rgba(7,22,16,.92) 0%,rgba(7,22,16,.45) 50%,rgba(7,22,16,0) 80%)}
.hero-card__body{padding:24px;color:#fff;width:100%}
.hero-card__title{color:#fff;font-size:1.25rem;margin:10px 0 8px}
.hero-card--0 .hero-card__title{font-size:2.3rem;max-width:640px}
.hero-card__title a{color:#fff;text-decoration:none}
.hero-card__title a:hover{text-decoration:underline;text-decoration-color:var(--amber)}
.hero-card__excerpt{color:#d8e8de;max-width:560px;margin:0 0 10px}

/* Post cards */
.post-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}
.card{background:#fff;border-radius:var(--radius);overflow:hidden;border:2px solid var(--stone-dark);display:flex;flex-direction:column}
.card:hover{border-color:var(--fern)}
.card__media{display:block;aspect-ratio:16/10;background:var(--jungle);position:relative;overflow:hidden}
.card__media img{width:100%;height:100%;object-fit:cover;display:block}
.card__fallback{width:100%;height:100%;display:grid;place-items:center;font-size:3.4rem;background:radial-gradient(circle at 30% 20%,var(--fern),var(--jungle) 75%)}
.card__body{padding:18px 20px 22px;display:flex;flex-direction:column;gap:8px;flex:1}
.card__title{font-size:1.28rem;margin:4px 0 0}
.card__title a{color:var(--jungle);text-decoration:none}
.card__title a:hover{color:var(--fern);text-decoration:underline}
.card__excerpt{color:#35453c;margin:0;font-size:.98rem}
.post-grid__ad{grid-column:1/-1}

/* Ads */
.dfh-ad{margin:26px auto;text-align:center;max-width:100%}
.dfh-ad__label{display:block;font-size:.72rem;color:var(--muted);margin-bottom:6px}
.dfh-ad__box{display:flex;justify-content:center;align-items:center;min-width:300px;max-width:100%;min-height:250px;margin:0 auto;overflow:hidden}
.dfh-ad__box>*{max-width:100%}
.dfh-ad__box a{display:block;max-width:100%}
.dfh-ad__box img{display:block;max-width:100%;height:auto;margin:0 auto;border-radius:0}
.dfh-ad__box iframe{max-width:100%;border:0}
.dfh-ad--placeholder .dfh-ad__box{width:300px;height:250px;background:repeating-linear-gradient(45deg,#fff,#fff 10px,var(--stone) 10px,var(--stone) 20px);border:2px dashed var(--fern);color:var(--jungle);font-weight:700;flex-direction:column;font-size:.95rem;padding:10px}
.dfh-ad--placeholder small{font-weight:400;color:var(--muted)}
.sidebar .dfh-ad{margin-top:0}
.sidebar__sticky{position:sticky;top:96px}
.sticky-sidebar-ad .dfh-ad--sidebar_bottom{position:sticky;top:96px}

/* Sidebar */
.sidebar .widget{background:#fff;border-radius:var(--radius);border:2px solid var(--stone-dark);padding:20px;margin-bottom:24px}
.widget-title{font-size:1.1rem;padding-bottom:10px;margin-bottom:14px;border-bottom:3px solid var(--amber);display:inline-block}
.widget ul{list-style:none;margin:0;padding:0}
.widget li{padding:7px 0;border-bottom:1px dashed var(--stone-dark)}
.widget li:last-child{border:0}
.widget a{text-decoration:none;font-weight:600}
.widget a:hover{text-decoration:underline}
.sidebar .widget.dfh-ad-widget{background:transparent;border:0;padding:0}

/* Single */
.entry{background:#fff;border-radius:20px;border:2px solid var(--stone-dark);overflow:hidden}
.entry__head{padding:34px 40px 10px}
.entry__title{font-size:2.6rem;margin:14px 0 14px}
.entry__thumb{margin:16px 40px 0;border-radius:14px;overflow:hidden}
.entry__thumb img{display:block;width:100%}
.entry__content{padding:26px 40px 10px;font-size:1.14rem;line-height:1.75}
.entry__content h2{font-size:1.8rem;margin-top:1.6em}
.entry__content h3{font-size:1.35rem;margin-top:1.4em}
.entry__content blockquote{margin:1.6em 0;padding:16px 24px;border-left:6px solid var(--amber);background:var(--stone);border-radius:0 12px 12px 0;font-size:1.1rem}
.entry__content blockquote p:last-child{margin:0}
.entry__content img{border-radius:10px}
.entry__content figcaption,.wp-caption-text{font-size:.88rem;color:var(--muted);margin-top:6px}
.entry__content table{width:100%;border-collapse:collapse;margin:1.4em 0;font-size:1rem}
.entry__content th{background:var(--jungle);color:#fff;text-align:left}
.entry__content th,.entry__content td{padding:10px 12px;border:1px solid var(--stone-dark)}
.entry__content tr:nth-child(even) td{background:var(--stone)}
.entry__content code{background:var(--stone);padding:2px 6px;border-radius:6px}
.entry__foot{padding:10px 40px 34px}
.tags a{display:inline-block;background:var(--stone);color:var(--jungle);padding:4px 12px;border-radius:99px;margin:0 6px 6px 0;font-size:.88rem;text-decoration:none;font-weight:600}
.tags a:hover{background:var(--jungle);color:#fff}
.share{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:16px 0}
.share span{font-weight:700;color:var(--jungle)}
.share a,.share button{background:var(--jungle);color:#fff;border:0;border-radius:99px;padding:7px 16px;font:inherit;font-size:.9rem;font-weight:600;text-decoration:none;cursor:pointer}
.share a:hover,.share button:hover{background:var(--amber);color:var(--ink)}
.author-box{display:flex;gap:16px;background:var(--stone);border-radius:14px;padding:18px;margin-top:18px;align-items:center}
.author-box img{border-radius:50%}
.author-box p{margin:0;font-size:.95rem}
.related{margin-top:34px}
.related .post-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.related .card__title{font-size:1.05rem}
.breadcrumbs{font-size:.88rem;color:var(--muted);margin-bottom:14px}
.breadcrumbs a{color:var(--muted)}

/* Archive header */
.archive-head{background:var(--jungle);color:#fff;border-radius:20px;padding:30px 34px;margin-bottom:26px;position:relative;overflow:hidden}
.archive-head h1{color:#fff;margin:0 0 6px;font-size:2.2rem}
.archive-head p{margin:0;color:#c3dacc}
.archive-head::after{content:"🦖";position:absolute;right:24px;top:50%;transform:translateY(-50%);font-size:5rem;opacity:.25}

/* Pagination */
.pagination{margin-top:32px}
.nav-links{display:flex;gap:8px;flex-wrap:wrap}
.page-numbers{background:#fff;border:2px solid var(--stone-dark);border-radius:99px;padding:6px 16px;text-decoration:none;font-weight:700;color:var(--jungle)}
.page-numbers.current,.page-numbers:hover{background:var(--jungle);border-color:var(--jungle);color:#fff}

/* Comments */
.comments-area{background:#fff;border-radius:20px;border:2px solid var(--stone-dark);padding:28px 40px;margin-top:26px}
.comment-list{list-style:none;padding:0;margin:0}
.comment-list .children{list-style:none;padding-left:28px}
.comment-body{border-bottom:1px dashed var(--stone-dark);padding:16px 0}
.comment-author img{border-radius:50%;float:left;margin-right:12px}
.comment-metadata{font-size:.82rem;color:var(--muted)}
.comment-form input[type=text],.comment-form input[type=email],.comment-form input[type=url],.comment-form textarea{width:100%;padding:11px 14px;border:2px solid var(--stone-dark);border-radius:10px;font:inherit}
.comment-form .submit,.button{background:var(--jungle);color:#fff;border:0;padding:11px 26px;border-radius:99px;font:inherit;font-weight:700;cursor:pointer;text-decoration:none;display:inline-block}
.comment-form .submit:hover,.button:hover{background:var(--amber);color:var(--ink)}

/* 404 / empty */
.empty{background:#fff;border-radius:20px;border:2px solid var(--stone-dark);padding:50px 30px;text-align:center}
.empty__icon{font-size:4rem}

/* Footer */
.site-footer{background:var(--jungle-deep);color:#b5cdbf;border-top:4px solid var(--amber)}
.footer-widgets{display:grid;grid-template-columns:repeat(3,1fr);gap:30px;padding:44px 0 20px}
.site-footer .widget-title{color:#fff}
.site-footer a{color:#e4f1e9}
.site-footer .widget li{border-color:rgba(255,255,255,.12)}
.footer-bar{border-top:1px solid rgba(255,255,255,.12);padding:20px 0;display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:.9rem}
.footer-bar ul{list-style:none;display:flex;gap:16px;margin:0;padding:0}

/* WP core alignment */
.alignleft{float:left;margin:0 1.2em 1em 0}.alignright{float:right;margin:0 0 1em 1.2em}.aligncenter{display:block;margin:1em auto}
.wp-block-image img{height:auto}
.sticky .card{border-color:var(--amber)}
.bypostauthor{display:block}
.gallery{display:grid;gap:10px;grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}

/* Responsive */
@media(max-width:1020px){
  .layout{grid-template-columns:1fr}
  .sidebar{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:24px}
  .sidebar .widget{margin-bottom:0}
  .related .post-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:820px){
  .menu-toggle{display:grid}
  .main-nav{display:none;position:absolute;left:0;right:0;top:100%;background:var(--jungle-deep);padding:12px 20px 20px}
  .main-nav.is-open{display:block}
  .main-nav ul{flex-direction:column}
  .main-nav .sub-menu{display:flex;position:static;background:transparent;padding:0 0 0 14px}
  .hero-grid{grid-template-columns:1fr;grid-template-rows:auto}
  .hero-card--0{grid-row:auto;min-height:420px}
  .hero-card--0 .hero-card__title{font-size:1.7rem}
  .entry__head,.entry__content,.entry__foot{padding-left:22px;padding-right:22px}
  .entry__thumb{margin-left:22px;margin-right:22px}
  .entry__title{font-size:2rem}
  .comments-area{padding:22px}
  .footer-widgets{grid-template-columns:1fr}
  .admin-bar .site-header{top:46px}
}
@media(max-width:600px){
  .post-grid,.related .post-grid{grid-template-columns:1fr}
  .brand__tag{display:none}
  .fact-bar__tag{display:none}
}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
