/*
Theme Name:  Tattamangalam News
Theme URI:   https://www.tattamangalam.com/newsite/
Author:      dotcompals
Author URI:  https://dotcompals.org
Description: Mobile-first WordPress theme for Tattamangalam.com — Palakkad Sky Blue. Matches the main site design.
Version:     3.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tattamangalam
Tags: blog, news, custom-logo, custom-menu, featured-images, footer-widgets, threaded-comments
*/

/* =============================================
   DESIGN TOKENS
============================================= */
:root {
  --nav:        #0c3658;
  --teal:       #48c0e0;
  --blue:       #1060a0;
  --blue-lt:    #e4f1fb;
  --bg:         #ffffff;
  --bg2:        #eef5fc;
  --text:       #081828;
  --mid:        #2a5070;
  --dim:        #607888;
  --border:     #bcd8f0;
  --divide:     #d0e8f8;
  --foot:       #082038;
  --foot-t:     #88c0e0;
  --r:          12px;
  --sh:         0 2px 12px rgba(16,96,160,.08);
  --sh2:        0 6px 24px rgba(16,96,160,.18);
  --font:       'Outfit', system-ui, sans-serif;
  --t:          .2s ease;
  --max:        1100px;
}

/* =============================================
   RESET
============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: #ffffff;
  color: var(--text);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}
/* WordPress sometimes sets a grey body bg — kill it */
body.custom-background { background-color: #fff !important; }

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--teal); }
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.25; color: var(--text); }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
ul, ol { padding-left: 1.5rem; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }

/* Gutenberg layout killers — must be early */
.wp-site-blocks { padding: 0 !important; }
.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  max-width: none !important;
}

/* =============================================
   ACCESSIBILITY
============================================= */
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 9999;
  background: var(--blue); color: #fff; padding: .5rem 1rem;
  border-radius: 0 0 8px 8px; font-weight: 600;
  transition: top .2s;
}
.skip-link:focus { top: 0; }
.screen-reader-text {
  clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; overflow: hidden; position: absolute; width: 1px;
}

/* =============================================
   INNER WRAPPER
============================================= */
.inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* =============================================
   HEADER + NAV
============================================= */
#site-header {
  position: sticky;
  top: 0;
  z-index: 400;
  background: var(--nav);
  box-shadow: 0 2px 20px rgba(0,0,0,.28);
  width: 100%;
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .7rem 1.25rem;
  max-width: var(--max);
  margin: 0 auto;
}

/* Logo + site name */
.site-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}
.site-brand img {
  width: 38px; height: 38px;
  border-radius: 6px;
  flex-shrink: 0;
}
.brand-name {
  font-size: .98rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
}
.brand-name em { font-style: normal; color: var(--teal); }
.brand-sub {
  display: block;
  font-size: .62rem;
  color: rgba(255,255,255,.45);
  font-weight: 400;
  line-height: 1;
  margin-top: 1px;
}

/* Desktop nav links */
.nav-links {
  display: none; /* hidden on mobile, shown ≥900px */
  list-style: none;
  padding: 0; margin: 0;
  gap: .05rem;
  align-items: center;
}
.nav-links li { position: relative; }
.nav-links > li > a {
  display: block;
  color: rgba(255,255,255,.78);
  font-size: .79rem;
  font-weight: 500;
  padding: .32rem .62rem;
  border-radius: 5px;
  white-space: nowrap;
  transition: background var(--t), color var(--t);
}
.nav-links > li > a:hover,
.nav-links .current-menu-item > a,
.nav-links .current-menu-ancestor > a {
  background: var(--teal);
  color: #081828;
}
/* Dropdowns */
.nav-links .sub-menu {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  min-width: 190px;
  background: var(--nav);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
  list-style: none;
  padding: .35rem 0;
  z-index: 200;
}
.nav-links li:hover > .sub-menu,
.nav-links li:focus-within > .sub-menu { display: block; }
.nav-links .sub-menu a {
  display: block;
  color: rgba(255,255,255,.75);
  font-size: .8rem;
  padding: .5rem 1rem;
  transition: background var(--t);
}
.nav-links .sub-menu a:hover { background: rgba(72,192,224,.15); color: var(--teal); }

.nav-badge {
  background: var(--teal);
  color: #081828;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: .2rem .65rem;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Hamburger — hidden ≥900px */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,.12);
  border: none;
  border-radius: 7px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--t);
}
.nav-hamburger:hover { background: rgba(255,255,255,.2); }
.nav-hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: rgba(255,255,255,.9);
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =============================================
   MOBILE DRAWER (slide from left)
   Hidden by default, shown when .is-open
============================================= */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 390;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.mobile-drawer-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.mobile-drawer {
  position: fixed;
  top: 0; left: 0;
  width: 280px;
  max-width: 85vw;
  height: 100%;
  background: var(--nav);
  z-index: 395;
  transform: translateX(-100%);
  transition: transform .3s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-drawer.is-open { transform: translateX(0); }

.drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  flex-shrink: 0;
}
.drawer-title {
  font-size: .95rem;
  font-weight: 700;
  color: #fff;
}
.drawer-title em { font-style: normal; color: var(--teal); }
.drawer-close-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.1);
  border: none; border-radius: 6px;
  color: #fff; font-size: 1.1rem;
  cursor: pointer;
  transition: background var(--t);
}
.drawer-close-btn:hover { background: rgba(255,255,255,.22); }

/* Drawer nav items */
.drawer-nav { flex: 1; }
.drawer-nav ul {
  list-style: none;
  padding: .4rem 0; margin: 0;
}
.drawer-nav li {
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.drawer-nav a {
  display: block;
  color: rgba(255,255,255,.85);
  font-size: .95rem;
  font-weight: 500;
  padding: .82rem 1.3rem;
  transition: background var(--t), color var(--t);
  text-decoration: none;
}
.drawer-nav a:hover,
.drawer-nav .current-menu-item > a { background: rgba(72,192,224,.14); color: var(--teal); }
/* Sub-items in drawer */
.drawer-nav .sub-menu { display: block; }
.drawer-nav .sub-menu li { border-top: 1px solid rgba(255,255,255,.04); }
.drawer-nav .sub-menu a {
  padding-left: 2.4rem;
  font-size: .88rem;
  color: rgba(255,255,255,.65);
}

/* Extra links at drawer bottom */
.drawer-footer {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: .8rem 1.2rem 1.4rem;
  flex-shrink: 0;
}
.drawer-footer a {
  display: block;
  color: rgba(255,255,255,.5);
  font-size: .82rem;
  padding: .38rem 0;
  transition: color var(--t);
}
.drawer-footer a:hover { color: var(--teal); }

/* =============================================
   TOP BARS (back link + breadcrumb)
============================================= */
.bar-back {
  background: var(--blue-lt);
  border-bottom: 1px solid var(--border);
}
.bar-back a {
  display: block;
  max-width: var(--max);
  margin: 0 auto;
  padding: .48rem 1.25rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--blue);
}
.bar-back a:hover { color: var(--teal); }

.bar-crumb {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}
.bar-crumb .inner {
  padding-top: .45rem;
  padding-bottom: .45rem;
  font-size: .74rem;
  color: var(--dim);
}
.bar-crumb a { color: var(--blue); font-weight: 500; }
.bar-crumb a:hover { color: var(--teal); }
.bar-crumb .sep { margin: 0 .3rem; }

/* =============================================
   PAGE FRAME
============================================= */
#page { display: flex; flex-direction: column; min-height: 100vh; }
#content { flex: 1; width: 100%; background: var(--bg); }

/* =============================================
   CONTENT LAYOUTS
============================================= */
/* Default: single column, with sidebar stacking below */
.site-layout {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 2.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

/* =============================================
   ARCHIVE / HOME PAGE HEADER
============================================= */
.archive-header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}
.archive-header .inner {}
.archive-label {
  display: inline-block;
  background: var(--blue-lt);
  color: var(--blue);
  border: 1px solid var(--border);
  font-size: .63rem; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: .18rem .65rem; border-radius: 20px;
  margin-bottom: .55rem;
}
.archive-header h1 {
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  color: var(--blue);
}
.archive-header p { color: var(--dim); font-size: .88rem; margin-top: .3rem; }

/* =============================================
   POST GRID
============================================= */
.posts-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: 1fr; /* mobile: single column */
}

/* =============================================
   POST CARD
============================================= */
.post-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--sh);
  display: flex;
  flex-direction: column;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh2);
  border-color: var(--blue);
}

/* Thumbnail */
.card-img {
  display: block;
  overflow: hidden;
  background: var(--bg2);
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
  width: 100%;
}
.card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.post-card:hover .card-img img { transform: scale(1.04); }
.card-img-none {
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem;
  background: var(--blue-lt);
  min-height: 160px;
}

/* Featured card — landscape on tablet+ */
.post-card--hero { grid-column: 1 / -1; }

/* Card body */
.card-body {
  padding: 1.1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Category pills */
.card-cats {
  display: flex; flex-wrap: wrap; gap: .3rem;
  margin-bottom: .5rem;
}
.card-cats a {
  background: var(--blue-lt); color: var(--blue);
  border: 1px solid var(--border);
  font-size: .62rem; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase;
  padding: .14rem .55rem; border-radius: 20px;
}
.card-cats a:hover { background: var(--blue); color: #fff; }

/* Title */
.card-title {
  font-size: 1rem; font-weight: 700;
  line-height: 1.35; margin-bottom: .5rem;
}
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--blue); }
.post-card--hero .card-title { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }

/* Excerpt */
.card-exc {
  font-size: .85rem; color: var(--mid);
  line-height: 1.65; flex: 1; margin-bottom: .85rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card--hero .card-exc { -webkit-line-clamp: 4; }

/* Meta bar */
.card-meta {
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap;
  gap: .3rem; font-size: .73rem; color: var(--dim);
  padding-top: .7rem;
  border-top: 1px solid var(--divide);
  margin-top: auto;
}
.card-meta a { color: var(--dim); }
.card-meta a:hover { color: var(--blue); }
.card-more { font-size: .75rem; font-weight: 600; color: var(--blue); }
.card-more:hover { color: var(--teal); }

/* Sticky */
.post-card.is-sticky .card-body::before {
  content: '📌 Pinned';
  display: inline-block;
  background: #fff3cd; color: #7d5a00;
  border: 1px solid #ffe69c;
  font-size: .62rem; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  padding: .14rem .55rem; border-radius: 20px;
  margin-bottom: .5rem;
}

/* =============================================
   PAGINATION
============================================= */
.ttm-pages {
  display: flex; justify-content: center;
  flex-wrap: wrap; gap: .35rem;
  margin-top: 2rem;
}
.ttm-pages .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 .6rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-weight: 600; font-size: .85rem;
  color: var(--mid); background: var(--bg);
  transition: all var(--t);
}
.ttm-pages .page-numbers:hover { border-color: var(--blue); color: var(--blue); }
.ttm-pages .page-numbers.current { background: var(--blue); color: #fff; border-color: var(--blue); }
.ttm-pages .page-numbers.dots { border: none; background: none; }

/* =============================================
   SINGLE POST
============================================= */
.entry-wrap { max-width: 760px; }

.post-hero {
  border-radius: var(--r); overflow: hidden;
  margin-bottom: 1.75rem; box-shadow: var(--sh2);
}
.post-hero img { width: 100%; height: auto; max-height: 460px; object-fit: cover; }

.entry-head { margin-bottom: 1.5rem; }

.entry-cats {
  display: flex; flex-wrap: wrap; gap: .3rem;
  margin-bottom: .6rem;
}
.entry-cats a {
  background: var(--blue-lt); color: var(--blue);
  border: 1px solid var(--border);
  font-size: .63rem; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: .18rem .68rem; border-radius: 20px;
}
.entry-cats a:hover { background: var(--blue); color: #fff; }

h1.entry-title {
  font-size: clamp(1.45rem, 4vw, 2.1rem);
  line-height: 1.2; color: var(--text); margin-bottom: .8rem;
}

.entry-meta {
  display: flex; flex-wrap: wrap;
  align-items: center; gap: .4rem .85rem;
  font-size: .79rem; color: var(--dim);
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--divide);
}
.entry-meta a { color: var(--dim); }
.entry-meta a:hover { color: var(--blue); }
.entry-meta .avatar { border-radius: 50%; vertical-align: middle; margin-right: .3rem; }

/* Article body */
.entry-content { font-size: 1rem; line-height: 1.82; }
.entry-content > * + * { margin-top: 1.1rem; }
.entry-content h2 { font-size: 1.4rem; color: var(--blue); margin-top: 2rem; }
.entry-content h3 { font-size: 1.2rem; color: var(--mid); margin-top: 1.75rem; }
.entry-content h4 { font-size: 1rem; margin-top: 1.5rem; }
.entry-content a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.entry-content a:hover { color: var(--teal); }
.entry-content blockquote {
  border-left: 4px solid var(--blue);
  background: var(--blue-lt);
  padding: .85rem 1.1rem;
  border-radius: 0 8px 8px 0;
  font-style: italic; color: var(--mid);
  margin: 1.5rem 0;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content pre {
  background: #f0f6fc; border: 1px solid var(--border);
  border-radius: 8px; padding: .9rem 1rem;
  overflow-x: auto; font-size: .86rem;
}
.entry-content code {
  background: var(--blue-lt); color: var(--blue);
  padding: .1rem .35rem; border-radius: 4px; font-size: .88em;
}
.entry-content pre code { background: none; color: inherit; padding: 0; }
.entry-content img { border-radius: 8px; box-shadow: var(--sh); }
.entry-content hr { border: none; border-top: 2px solid var(--divide); margin: 2rem 0; }
.entry-content table {
  width: 100%; border-collapse: collapse;
  display: block; overflow-x: auto;
}
.entry-content table th { background: var(--nav); color: #fff; padding: .55rem .85rem; text-align: left; font-size: .8rem; }
.entry-content table td { padding: .5rem .85rem; border-bottom: 1px solid var(--divide); }
.entry-content table tr:nth-child(even) td { background: var(--bg2); }
.entry-content figure { margin: 1.5rem 0; }
.entry-content figcaption { font-size: .75rem; color: var(--dim); text-align: center; margin-top: .4rem; }

/* Entry footer */
.entry-foot {
  margin-top: 1.75rem; padding-top: 1rem;
  border-top: 2px solid var(--divide);
  font-size: .79rem; color: var(--dim);
}
.tags-row { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.tags-row .lbl { font-weight: 600; }
.tag-pill {
  background: var(--bg2); color: var(--mid);
  border: 1px solid var(--border);
  padding: .17rem .62rem; border-radius: 20px;
  font-size: .73rem; font-weight: 500;
  transition: all var(--t);
}
.tag-pill:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

/* Share bar */
.share-bar {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: .45rem; padding: .95rem 1.1rem;
  background: var(--blue-lt); border: 1.5px solid var(--border);
  border-radius: var(--r); margin-top: 1.75rem;
}
.share-bar .lbl { font-size: .78rem; font-weight: 700; color: var(--mid); }
.s-btn {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .33rem .82rem; border-radius: 6px;
  font-size: .74rem; font-weight: 600; color: #fff;
  border: none; cursor: pointer; font-family: inherit;
  transition: opacity .2s;
}
.s-btn:hover { opacity: .85; color: #fff; }
.s-btn-fb { background: #1877f2; }
.s-btn-tw { background: #111; }
.s-btn-wa { background: #25d366; }
.s-btn-cp { background: var(--blue); }

/* Author box */
.author-box {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: var(--r); padding: 1.2rem;
  margin-top: 2rem; box-shadow: var(--sh);
}
.author-box img { border-radius: 50%; flex-shrink: 0; }
.author-box h4 { font-size: .92rem; color: var(--blue); margin-bottom: .22rem; }
.author-box p { font-size: .83rem; color: var(--mid); margin: 0; }

/* Post nav */
.post-nav {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: .9rem; margin-top: 2rem;
}
.pnav-item {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--r); padding: .95rem 1.05rem;
  box-shadow: var(--sh); transition: all var(--t);
}
.pnav-item:hover { border-color: var(--blue); box-shadow: var(--sh2); }
.pnav-item--next { text-align: right; }
.pnav-label { display: block; font-size: .67rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--dim); margin-bottom: .28rem; }
.pnav-title { font-size: .86rem; font-weight: 600; color: var(--blue); line-height: 1.35; }

/* =============================================
   COMMENTS
============================================= */
#comments { margin-top: 2.5rem; }
.comments-title {
  font-size: 1.1rem; color: var(--blue);
  padding-bottom: .55rem; border-bottom: 2px solid var(--divide);
  margin-bottom: 1.2rem;
}
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-list li.comment { margin-bottom: .85rem; }
.comment-list li.comment .children { list-style: none; padding: 0; margin: .7rem 0 0 1.5rem; }
.comment-body-inner {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--r); padding: 1rem 1.1rem;
  box-shadow: var(--sh);
}
.bypostauthor > .comment-body-inner { border-color: var(--blue); background: var(--blue-lt); }
.comment-meta-bar { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.comment-meta-bar .avatar { border-radius: 50%; }
.comment-author-name { font-weight: 700; font-size: .87rem; display: block; color: var(--text); }
.comment-date { font-size: .71rem; color: var(--dim); }
.comment-date a { color: var(--dim); }
.comment-text { font-size: .87rem; color: var(--mid); }
.comment-text p { margin-bottom: .45rem; }
.comment-reply-link { font-size: .74rem; font-weight: 600; color: var(--blue); }
.comment-reply-link:hover { color: var(--teal); }
.comment-respond { margin-top: 2rem; }
.comment-reply-title { font-size: 1.02rem; color: var(--blue); margin-bottom: .9rem; }
.comment-form label { display: block; font-size: .79rem; font-weight: 600; color: var(--mid); margin-bottom: .28rem; }
.comment-form input[type=text],
.comment-form input[type=email],
.comment-form input[type=url],
.comment-form textarea {
  width: 100%; padding: .58rem .88rem;
  border: 1.5px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text);
  margin-bottom: .85rem; transition: border-color var(--t);
}
.comment-form input:focus,
.comment-form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(16,96,160,.1); }
.comment-form textarea { min-height: 120px; resize: vertical; }
.comment-form .form-submit .submit {
  background: var(--blue); color: #fff;
  border: none; padding: .62rem 1.4rem;
  border-radius: 8px; font-weight: 600;
  font-size: .9rem; cursor: pointer;
  transition: background var(--t);
}
.comment-form .form-submit .submit:hover { background: var(--nav); }

/* =============================================
   SIDEBAR
============================================= */
#sidebar .widget {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 1.15rem;
  margin-bottom: 1.15rem;
  box-shadow: var(--sh);
}
#sidebar .widget-title {
  font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--blue); padding-bottom: .55rem;
  border-bottom: 2px solid var(--blue-lt);
  margin-bottom: .85rem;
}
#sidebar .widget ul { list-style: none; padding: 0; margin: 0; }
#sidebar .widget ul li {
  padding: .4rem 0;
  border-bottom: 1px solid var(--divide);
  font-size: .85rem; color: var(--mid);
}
#sidebar .widget ul li:last-child { border: none; }
#sidebar .widget ul li a { color: var(--mid); font-weight: 500; }
#sidebar .widget ul li a:hover { color: var(--blue); }

/* Search */
#sidebar .widget_search .search-form { display: flex; gap: .4rem; }
#sidebar .widget_search .search-field {
  flex: 1; padding: .55rem .85rem;
  border: 1.5px solid var(--border); border-radius: 8px;
}
#sidebar .widget_search .search-field:focus { outline: none; border-color: var(--blue); }
#sidebar .widget_search .search-submit {
  background: var(--blue); color: #fff; border: none;
  padding: .55rem .95rem; border-radius: 8px;
  font-weight: 600; font-size: .84rem; cursor: pointer;
  white-space: nowrap; transition: background var(--t);
}
#sidebar .widget_search .search-submit:hover { background: var(--nav); }

/* Recent posts with thumbnails */
.rec-post { display: flex; gap: .6rem; align-items: flex-start; padding: .45rem 0; border-bottom: 1px solid var(--divide); }
.rec-post:last-child { border: none; }
.rec-thumb { width: 52px; height: 52px; border-radius: 6px; overflow: hidden; flex-shrink: 0; background: var(--bg2); }
.rec-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rec-info a { font-size: .82rem; font-weight: 600; color: var(--text); line-height: 1.3; display: block; }
.rec-info a:hover { color: var(--blue); }
.rec-date { font-size: .69rem; color: var(--dim); margin-top: .12rem; }

/* Category count badge */
#sidebar .widget_categories li { display: flex; justify-content: space-between; align-items: center; }
.cat-ct { background: var(--blue-lt); color: var(--blue); font-size: .64rem; font-weight: 700; padding: .08rem .45rem; border-radius: 20px; }

/* Tag cloud */
#sidebar .widget_tag_cloud .tagcloud { display: flex; flex-wrap: wrap; gap: .32rem; }
#sidebar .widget_tag_cloud .tag-cloud-link {
  background: var(--bg2); color: var(--mid);
  border: 1px solid var(--border);
  padding: .18rem .62rem; border-radius: 20px;
  font-size: .74rem !important; font-weight: 500;
  transition: all var(--t);
}
#sidebar .widget_tag_cloud .tag-cloud-link:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

/* =============================================
   404 / NO RESULTS
============================================= */
.not-found {
  text-align: center;
  padding: 4rem 1.5rem;
}
.not-found .icon { font-size: 3.5rem; margin-bottom: 1rem; }
.not-found h1 { font-size: 1.75rem; color: var(--blue); margin-bottom: .55rem; }
.not-found p { color: var(--mid); max-width: 400px; margin: 0 auto 1.25rem; }
.not-found .btn {
  display: inline-flex; align-items: center; gap: .35rem;
  background: var(--blue); color: #fff;
  padding: .62rem 1.35rem; border-radius: 8px;
  font-weight: 600; font-size: .9rem;
  transition: background var(--t); margin-top: .75rem;
}
.not-found .btn:hover { background: var(--nav); color: #fff; }

/* =============================================
   TRUST STRIP
============================================= */
.trust-strip {
  background: var(--nav); color: #fff;
  text-align: center; padding: 1.5rem 1.25rem;
}
.trust-strip strong { color: var(--teal); }
.trust-strip p { font-size: .84rem; opacity: .6; margin-top: .25rem; margin-bottom: 0; }

/* =============================================
   FOOTER
============================================= */
#site-footer { background: var(--foot); }

.foot-cols {
  display: grid;
  grid-template-columns: 1fr; /* mobile: stack */
  gap: 1.5rem;
  padding: 2rem 1.25rem;
  max-width: var(--max);
  margin: 0 auto;
}
.foot-col h4 {
  color: var(--foot-t); font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.2px;
  margin-bottom: .7rem; padding-bottom: .45rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.foot-col p, .foot-col li { font-size: .81rem; color: rgba(255,255,255,.42); line-height: 1.75; }
.foot-col ul { list-style: none; padding: 0; margin: 0; }
.foot-col a { color: rgba(255,255,255,.42); }
.foot-col a:hover { color: var(--foot-t); }
.foot-logo { height: 44px; width: auto; opacity: .72; margin-bottom: .7rem; display: block; }

.foot-bottom {
  border-top: 1px solid rgba(255,255,255,.07);
  max-width: var(--max); margin: 0 auto;
  padding: .9rem 1.25rem;
  display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: .35rem;
  font-size: .72rem; color: rgba(255,255,255,.28);
}
.foot-bottom a { color: rgba(255,255,255,.35); }
.foot-bottom a:hover { color: var(--foot-t); }

/* =============================================
   FLOATING BUTTONS
============================================= */
#fab-help {
  position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 9990;
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.45rem; text-decoration: none; color: #fff;
  background: #25d366;
  box-shadow: 0 4px 18px rgba(0,0,0,.28);
  transition: transform .2s, box-shadow .2s;
}
#fab-help:hover { transform: scale(1.1); box-shadow: 0 6px 24px rgba(0,0,0,.35); color: #fff; }
#fab-help[data-mode=email] { background: var(--blue); }

#fab-top {
  position: fixed; bottom: 4.8rem; right: 1.25rem; z-index: 9989;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--blue); color: #fff; border: none;
  font-size: .95rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,.22);
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
#fab-top.show { opacity: 1; pointer-events: all; }
#fab-top:hover { background: var(--nav); }

/* =============================================
   GUTENBERG / BLOCK EDITOR OVERRIDES
============================================= */
.entry-content .alignleft  { float: left; margin: 0 1.5rem 1rem 0; }
.entry-content .alignright { float: right; margin: 0 0 1rem 1.5rem; }
.entry-content .aligncenter { margin: 1rem auto; text-align: center; }
.entry-content .wp-block-image img { border-radius: 8px; }
.entry-content .wp-block-group { padding: 1.5rem; }
.entry-content > p:empty { display: none; }

/* =============================================
   RESPONSIVE BREAKPOINTS
   Mobile-first: base styles = mobile
   ≥ 600px  = tablet
   ≥ 900px  = desktop (sidebar + desktop nav)
============================================= */

/* ─── ≥ 600px (tablet) ─── */
@media (min-width: 600px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .post-card--hero {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .post-card--hero .card-img {
    aspect-ratio: auto;
    height: 100%;
    min-height: 220px;
  }
  .post-card--hero .card-title {
    font-size: 1.2rem;
  }
  .foot-cols {
    grid-template-columns: repeat(2, 1fr);
  }
  .post-nav { grid-template-columns: 1fr 1fr; }
}

/* ─── ≥ 900px (desktop) ─── */
@media (min-width: 900px) {
  /* Show desktop nav, hide hamburger */
  .nav-links { display: flex; }
  .nav-hamburger { display: none; }

  /* Two-column layout: content + sidebar */
  .site-layout {
    grid-template-columns: 1fr 280px;
    padding: 2rem 1.25rem 3rem;
  }
  #sidebar { margin-top: 0; }

  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .foot-cols {
    grid-template-columns: repeat(3, 1fr);
    padding: 2.5rem 1.25rem;
  }
}

/* ─── ≥ 1100px ─── */
@media (min-width: 1100px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ─── PRINT ─── */
@media print {
  #site-header, .mobile-drawer, .mobile-drawer-overlay,
  #sidebar, .share-bar, .post-nav, #fab-help,
  #fab-top, .bar-back, #comments { display: none !important; }
  body { font-size: 12pt; color: #000; }
}
