/*
Theme Name: Thistle Gallery
Theme URI: https://popandthistle.com/
Author: Pop & Thistle
Author URI: https://popandthistle.com/
Description: A cornflower blue and lavender recipe gallery with a compact header, kitchen wordmark, centered welcome, and guest gallery integration.
Version: 1.1.1
Requires at least: 6.4
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: thistle-gallery
Tags: grid-layout, custom-logo, custom-menu, featured-images, blog, food-and-drink, photography, translation-ready, wide-blocks
*/
:root {
 --tg-ink:#30364f; --tg-muted:#626c86; --tg-paper:#eaf0fb; --tg-card:#fff;
 --tg-cream:#e5e0f3; --tg-accent:#4964a3; --tg-clay:#7061a0; --tg-line:#ccd5ed;
 --tg-radius:5px; --tg-width:1320px;
}
* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body { margin:0; background:var(--tg-paper); color:var(--tg-ink); font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; line-height:1.65; }
a { color:var(--tg-accent); text-underline-offset:3px; }
a:hover { text-decoration-thickness:2px; }
img { max-width:100%; height:auto; vertical-align:middle; }
button,input,select,textarea { font:inherit; }
button,.tg-button { cursor:pointer; }
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible { outline:3px solid var(--tg-accent); outline-offset:4px; }
h1,h2,h3 { font-family:Georgia,"Times New Roman",serif; font-weight:400; line-height:1.15; }
h1 { font-size:clamp(2.2rem,4vw,4.25rem); }
.screen-reader-text { clip:rect(1px,1px,1px,1px); clip-path:inset(50%); height:1px; width:1px; overflow:hidden; position:absolute!important; white-space:nowrap; }
.screen-reader-text:focus { clip:auto; clip-path:none; width:auto; height:auto; padding:1rem; top:0; left:0; background:#fff; z-index:99999; }
.tg-wrap { width:min(var(--tg-width),calc(100% - 64px)); margin-inline:auto; }
.tg-header { background:#f1effa; border-bottom:1px solid var(--tg-line); color:var(--tg-ink); }
.tg-header-inner { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; gap:28px; min-height:80px; padding-block:9px; }
.tg-brand { grid-column:2; grid-row:1; min-width:0; text-align:center; }
.tg-brand>a { color:var(--tg-ink); text-decoration:none; }
.tg-wordmark { display:inline-flex; align-items:center; gap:11px; }
.tg-kitchen-mark { color:var(--tg-clay); width:39px; height:39px; flex-shrink:0; }
.tg-wordmark-letters { display:flex; flex-direction:column; align-items:center; gap:4px; }
.tg-wordmark-main { font:italic 1.85rem/1.03 Georgia,"Times New Roman",serif; letter-spacing:-1.1px; }
.tg-wordmark-sub { font-size:.53rem; line-height:1.2; letter-spacing:3.6px; text-transform:uppercase; padding-left:4px; font-weight:700; }
.tg-wordmark-site-name { max-width:300px; font-size:1.7rem; line-height:1.12; overflow-wrap:anywhere; }
.custom-logo-link { display:inline-block; }
.custom-logo-link img { max-width:230px; max-height:52px; width:auto; }
.tg-nav { grid-column:1; grid-row:1; min-width:0; }
.tg-menu { display:flex; align-items:center; gap:25px; list-style:none; padding:0; margin:0; flex-wrap:wrap; }
.tg-menu a { color:var(--tg-ink); text-decoration:none; font-size:.82rem; }
.tg-menu a:hover { color:var(--tg-clay); }
.tg-menu .sub-menu { list-style:none; padding-left:15px; }
.tg-menu li { position:relative; }
.tg-menu>li>.sub-menu { display:none; position:absolute; top:100%; left:0; z-index:10; background:var(--tg-paper); border:1px solid var(--tg-line); padding:17px; width:210px; box-shadow:0 9px 20px #30364f0d; }
.tg-menu li:hover>.sub-menu,.tg-menu li:focus-within>.sub-menu { display:block; }
.tg-nav-toggle { display:none; background:transparent; border:1px solid #b9c3df; border-radius:4px; color:var(--tg-ink); padding:7px 12px; }
.tg-header-actions { grid-column:3; grid-row:1; display:flex; align-items:center; justify-content:flex-end; gap:23px; min-width:0; }
.tg-header-search { display:flex; max-width:156px; min-width:0; align-items:center; gap:7px; }
.tg-header-search input { width:100%; min-width:0; padding:8px 0; border:0; border-bottom:1px solid #c2cbe3; background:transparent; color:var(--tg-ink); font-size:.78rem; }
.tg-header-search input::placeholder { color:#6c728e; opacity:1; }
.tg-header-search button { display:flex; align-items:center; background:none; border:0; color:var(--tg-ink); padding:5px 0 5px 4px; }
.tg-button { display:inline-flex; justify-content:center; align-items:center; gap:8px; padding:11px 21px; border:1px solid var(--tg-accent); background:var(--tg-accent); color:#fff; text-decoration:none; font-size:.8rem; font-weight:600; line-height:1.5; border-radius:var(--tg-radius); }
.tg-header .tg-share-button { background:var(--tg-clay); color:#fff; border-color:var(--tg-clay); white-space:nowrap; font-size:.76rem; padding:10px 17px; }
.tg-button:hover { filter:brightness(.95); text-decoration:none; }
.tg-hero { background:linear-gradient(120deg,#dce8fb 0%,#e4e8f9 48%,#eae0f5 100%); margin-bottom:35px; border-bottom:1px solid var(--tg-line); }
.tg-hero-copy { display:flex; align-items:center; flex-direction:column; text-align:center; padding-block:32px 29px; }
.tg-eyebrow { display:inline-block; text-transform:uppercase; font-size:.62rem; letter-spacing:2.3px; font-weight:700; color:var(--tg-accent); }
.tg-hero .tg-eyebrow { display:flex; align-items:center; gap:15px; color:var(--tg-clay); }
.tg-hero .tg-eyebrow:before,.tg-hero .tg-eyebrow:after { content:""; width:30px; height:1px; background:#8a99c780; }
.tg-hero h1 { margin:13px 0 14px; max-width:720px; font-size:clamp(2.5rem,4.4vw,3.8rem); letter-spacing:-2px; line-height:1.06; text-wrap:balance; }
.tg-hero p { margin:0; max-width:590px; color:#596680; font-size:.95rem; line-height:1.8; }
.tg-hero-cats { display:flex; justify-content:center; flex-wrap:wrap; gap:10px; margin-top:23px; max-width:1050px; }
.tg-hero-cats a { display:inline-flex; align-items:center; justify-content:center; border:1px solid #c6d0e8; padding:8px 18px; border-radius:30px; background:#fff9; color:var(--tg-accent); font-size:.74rem; font-weight:500; text-decoration:none; transition:background .2s,color .2s; }
.tg-hero-cats a:hover,.tg-hero-cats .tg-category-all { background:var(--tg-accent); color:#fff; border-color:var(--tg-accent); }
#tg-gallery { scroll-margin-top:20px; }
.tg-toolbar { display:flex; align-items:center; gap:16px; justify-content:space-between; margin:0 0 25px; padding-bottom:20px; }
.tg-toolbar .tg-eyebrow { font-size:.55rem; letter-spacing:1.9px; margin-bottom:5px; }
.tg-toolbar h2 { font-size:1.9rem; margin:0; letter-spacing:-.5px; }
.tg-filter { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.tg-filter select,.tg-filter input { border:1px solid var(--tg-line); padding:9px 11px; background:#fff; color:var(--tg-ink); font-size:.76rem; max-width:210px; border-radius:var(--tg-radius); }
.tg-filter button { font-size:.74rem; padding:9px 14px; }
.tg-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:28px 24px; padding-bottom:43px; }
.tg-card { background:var(--tg-card); min-width:0; border:1px solid #d0daf0; border-radius:var(--tg-radius); overflow:hidden; display:flex; flex-direction:column; }
.tg-card-image { aspect-ratio:1; display:block; overflow:hidden; background:#dfe6f5; position:relative; }
.tg-card-image img { width:100%; height:100%; object-fit:cover; transition:transform .35s; }
.tg-card-image:hover img { transform:scale(1.035); }
.tg-card-placeholder { height:100%; display:grid; place-items:center; color:#6479a8; font:2.8rem Georgia,serif; background:radial-gradient(circle at 25% 20%,#eff2fc,transparent 70%),#dce3f4; }
.tg-card-body { padding:17px 18px 12px; flex:1; }
.tg-card-meta { display:flex; align-items:center; justify-content:space-between; gap:8px; color:var(--tg-muted); font-size:.64rem; margin-bottom:9px; }
.tg-card-meta a { text-decoration:none; color:var(--tg-accent); font-weight:600; }
.tg-card-meta span { overflow-wrap:anywhere; }
.tg-card h2 { font-size:1.3rem; line-height:1.25; margin:0 0 10px; }
.tg-card h2 a { color:var(--tg-ink); text-decoration:none; }
.tg-card h2 a:hover { color:var(--tg-accent); }
.tg-card p { font-size:.79rem; line-height:1.65; color:var(--tg-muted); margin:0 0 4px; }
.tg-card-footer { padding:0 18px 17px; display:flex; align-items:center; justify-content:space-between; font-size:.65rem; gap:12px; color:var(--tg-muted); }
.tg-card-footer a { color:var(--tg-accent); font-weight:600; text-decoration:none; }
.tg-pagination .nav-links { display:flex; justify-content:center; gap:7px; padding:0 0 45px; }
.tg-pagination .page-numbers { display:inline-grid; place-items:center; min-width:38px; height:38px; padding:0 10px; text-decoration:none; border:1px solid var(--tg-line); background:#fff; }
.tg-pagination .current { background:var(--tg-accent); color:#fff; }
.tg-footer { border-top:1px solid var(--tg-line); padding:27px 0; background:var(--tg-cream); margin-top:20px; }
.tg-footer-inner { display:flex; justify-content:space-between; gap:20px; font-size:.73rem; color:#596582; }
.tg-footer-menu { display:flex; gap:20px; list-style:none; margin:0; padding:0; }
.tg-footer-menu a { color:inherit; }
.tg-page,.tg-single { width:min(840px,calc(100% - 48px)); margin:50px auto 70px; background:#fff; padding:46px; border:1px solid var(--tg-line); border-radius:var(--tg-radius); }
.tg-page h1,.tg-single h1 { font-size:clamp(2rem,4vw,3.25rem); margin:10px 0 25px; }
.tg-single-meta { color:var(--tg-muted); font-size:.8rem; margin-bottom:25px; }
.tg-content { overflow-wrap:anywhere; }
.tg-content h2 { font-size:1.7rem; margin-top:1.4em; }
.tg-content h3 { font-size:1.4rem; }
.tg-content .alignwide { margin-inline:-24px; max-width:calc(100% + 48px); }
.tg-content figure { margin-inline:0; }
.tg-content iframe { max-width:100%; }
.tg-content table { width:100%; border-collapse:collapse; }
.tg-content td,.tg-content th { padding:9px; border:1px solid var(--tg-line); }
.tg-content blockquote { border-left:3px solid var(--tg-accent); padding-left:22px; margin-inline:0; color:var(--tg-muted); }
.tg-post-thumbnail { margin:0 0 30px; }
.tg-post-thumbnail img { width:100%; }
.tg-empty { padding:42px 0 70px; max-width:680px; }
.tg-empty h2 { font-size:2rem; }
.tg-archive-heading { padding:40px 0 25px; }
.tg-archive-heading h1 { margin:0 0 12px; font-size:2.7rem; }
.tg-archive-heading p { color:var(--tg-muted); max-width:700px; }
.tg-comments { border-top:1px solid var(--tg-line); margin-top:35px; padding-top:20px; }
.tg-comments input:not([type=checkbox]),.tg-comments textarea { max-width:100%; border:1px solid var(--tg-line); padding:10px; }
.tg-comments label { display:block; }
.tg-comments .comment-list { padding-left:22px; }
.tg-comments .submit { background:var(--tg-accent); color:white; border:0; padding:12px 22px; }
.wp-caption-text,.gallery-caption { font-size:.8rem; color:var(--tg-muted); }
.sticky { border-color:#9caed5; }
.bypostauthor { border-left:2px solid var(--tg-accent); padding-left:12px; }
.alignleft { float:left; margin-right:20px; }
.alignright { float:right; margin-left:20px; }
.aligncenter { display:block; margin-inline:auto; }
@media(max-width:1100px) {
 .tg-header-inner { gap:18px; }
 .tg-header-search { max-width:120px; }
 .tg-header-actions { gap:15px; }
 .tg-menu { gap:15px; }
 .tg-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .tg-wordmark-main { font-size:1.8rem; }
 .tg-kitchen-mark { width:37px; height:37px; }
}
@media(max-width:900px) and (min-width:761px) {
 .tg-header-search { display:none; }
 .tg-menu { gap:12px; }
 .tg-menu a { font-size:.75rem; }
}
@media(max-width:760px) {
 .tg-wrap { width:calc(100% - 32px); }
 .tg-header-inner { grid-template-columns:minmax(0,1fr) auto; gap:10px 16px; padding-block:11px; min-height:0; }
 .tg-brand { grid-column:1; grid-row:1; text-align:left; justify-self:start; }
 .tg-wordmark-main { font-size:1.7rem; }
 .tg-wordmark-sub { font-size:.55rem; letter-spacing:3.5px; }
 .tg-kitchen-mark { width:35px; height:35px; }
 .tg-wordmark-site-name { font-size:1.55rem; max-width:240px; }
 .tg-nav-toggle { display:inline-block; grid-column:2; grid-row:1; justify-self:end; }
 .tg-nav { display:none; grid-column:1/-1; grid-row:auto; width:100%; border-top:1px solid var(--tg-line); }
 .tg-nav.is-open { display:block; }
 .tg-menu { align-items:flex-start; flex-direction:column; gap:12px; padding:14px 0 0; }
 .tg-menu>li>.sub-menu { display:block; position:static; width:auto; padding:8px 0 0 15px; border:0; box-shadow:none; }
 .tg-header-actions { grid-column:1/-1; grid-row:auto; justify-content:space-between; gap:18px; }
 .tg-header-search { display:flex; max-width:230px; flex:1; }
 .tg-header .tg-share-button { padding:9px 15px; font-size:.74rem; }
 .tg-hero { margin-bottom:27px; }
 .tg-hero-copy { padding-block:27px 25px; }
 .tg-hero .tg-eyebrow { font-size:.55rem; letter-spacing:1.5px; gap:10px; }
 .tg-hero .tg-eyebrow:before,.tg-hero .tg-eyebrow:after { width:17px; }
 .tg-hero h1 { font-size:clamp(2.3rem,8.3vw,3.25rem); letter-spacing:-1.3px; max-width:600px; margin:16px 0; }
 .tg-hero p { font-size:.86rem; max-width:490px; }
 .tg-hero-cats { gap:8px; margin-top:22px; }
 .tg-hero-cats a { font-size:.68rem; padding:7px 13px; }
 .tg-toolbar { align-items:flex-start; flex-direction:column; gap:16px; padding-bottom:7px; margin-bottom:23px; }
 .tg-toolbar h2 { font-size:1.7rem; }
 .tg-filter { width:100%; }
 .tg-filter select { max-width:180px; flex:1; min-width:0; }
 .tg-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 14px; }
 .tg-card-body { padding:13px 13px 8px; }
 .tg-card h2 { font-size:1.12rem; }
 .tg-card-footer { padding:0 13px 13px; }
 .tg-card-meta { font-size:.58rem; align-items:flex-start; }
 .tg-card-meta span { max-width:63%; }
 .tg-footer-inner { flex-direction:column; gap:9px; }
 .tg-page,.tg-single { width:calc(100% - 28px); padding:25px 20px; margin:30px auto 45px; }
 .tg-content .alignwide { margin-inline:0; max-width:100%; }
}
@media(max-width:380px) {
 .tg-grid { grid-template-columns:1fr; }
 .tg-wordmark-main { font-size:1.65rem; }
 .tg-kitchen-mark { width:35px; height:35px; }
 .tg-wordmark-site-name { font-size:1.3rem; }
 .tg-nav-toggle { font-size:.75rem; }
 .tg-hero h1 { font-size:2.35rem; }
}
@media(prefers-reduced-motion:reduce) {
 html { scroll-behavior:auto; }
 *,*:before,*:after { transition:none!important; }
}

/* Guest Gallery uses the active theme's blue and lavender palette. */
body .tgs-form-wrap,body .tgs-gallery {
 --tgs-ink:var(--tg-ink); --tgs-muted:var(--tg-muted);
 --tgs-accent:var(--tg-accent); --tgs-line:var(--tg-line);
}
body .tgs-upload { background:#f0f2fc; border-color:#aabbdc; }
body .tgs-upload-icon { color:var(--tg-accent); }
body .tgs-upload input::file-selector-button { border-color:#b8c5e3; }
body .tgs-notice:not(.tgs-error) { background:#e9edfa; border-color:#7c8fc4; }
@media(max-width:760px) { .custom-logo-link img { max-height:46px; } }
body .tgs-form :focus-visible,body .tgs-gallery :focus-visible { outline-color:var(--tg-accent); }
