/*
Theme Name: TruLife Publishing
Theme URI: https://trulifebooks.com/
Author: TruLife Books LLC
Author URI: https://trulifebooks.com/
Description: A responsive publishing-company WordPress theme for TruLife Books, inspired by classic publisher website information architecture and rebuilt with modern TruLife Books branding.
Version: 1.0.0
Requires at least: 6.0
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: trulife-publishing
Tags: publishing, books, authors, custom-logo, custom-menu, featured-images, responsive-layout, blog, e-commerce
*/

:root {
  --tl-navy: #003861;
  --tl-blue: #005b78;
  --tl-green: #008861;
  --tl-dark-green: #006f50;
  --tl-mint: #eef8f4;
  --tl-soft: #f5f9fa;
  --tl-border: #c9ddd8;
  --tl-text: #263f4b;
  --tl-muted: #637780;
  --tl-white: #ffffff;
  --tl-shadow: 0 14px 36px rgba(0,56,97,.12);
  --tl-radius: 14px;
  --tl-max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--tl-text);
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
}
a { color: var(--tl-blue); text-decoration: none; }
a:hover, a:focus { color: var(--tl-green); }
img { max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }
.screen-reader-text { position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }
.container { width: min(calc(100% - 40px), var(--tl-max)); margin-inline: auto; }

/* Utility bar */
.tl-utility { background: var(--tl-navy); color: rgba(255,255,255,.86); font-size: 13px; }
.tl-utility .container { display:flex; align-items:center; justify-content:space-between; min-height:38px; gap:18px; }
.tl-utility a { color:#fff; font-weight:700; }
.tl-utility-links { display:flex; gap:18px; flex-wrap:wrap; }
.tl-utility-tagline { letter-spacing:.03em; }

/* Header */
.site-header { position:relative; z-index:20; background:#fff; border-bottom:1px solid var(--tl-border); box-shadow:0 3px 14px rgba(0,56,97,.05); }
.tl-brand-row { display:flex; align-items:center; justify-content:space-between; gap:30px; padding:21px 0 17px; }
.site-branding { display:flex; align-items:center; gap:14px; min-width:270px; }
.custom-logo-link img { display:block; max-height:72px; width:auto; }
.tl-default-mark { width:58px; height:58px; flex:0 0 58px; }
.site-title { margin:0; color:var(--tl-navy); font-weight:900; font-size:31px; line-height:1; letter-spacing:-.035em; }
.site-title span { color:var(--tl-green); }
.site-description { margin:7px 0 0; color:var(--tl-green); font-size:12px; line-height:1.2; font-weight:800; letter-spacing:.065em; text-transform:uppercase; }
.tl-header-cta { display:flex; gap:11px; align-items:center; }

.tl-nav-wrap { border-top:1px solid #e7efef; }
.main-navigation { display:flex; align-items:center; justify-content:space-between; min-height:55px; }
.main-navigation ul { display:flex; flex-wrap:wrap; align-items:center; list-style:none; margin:0; padding:0; gap:3px; }
.main-navigation a { display:block; padding:16px 14px 14px; color:var(--tl-navy); font-weight:760; font-size:15px; border-bottom:3px solid transparent; }
.main-navigation a:hover, .main-navigation .current-menu-item > a, .main-navigation .current_page_item > a { color:var(--tl-green); border-bottom-color:var(--tl-green); }
.menu-toggle { display:none; border:0; background:var(--tl-navy); color:#fff; padding:10px 14px; border-radius:8px; font-weight:800; cursor:pointer; }

/* Buttons */
.tl-button, .wp-block-button__link, input[type="submit"] {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  min-height:46px; padding:11px 20px; border:2px solid var(--tl-green); border-radius:9px;
  background:var(--tl-green); color:#fff!important; font-weight:850; line-height:1.2; text-align:center;
  transition:transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.tl-button:hover, .tl-button:focus, .wp-block-button__link:hover, input[type="submit"]:hover { background:var(--tl-dark-green); border-color:var(--tl-dark-green); transform:translateY(-1px); box-shadow:0 8px 22px rgba(0,136,97,.18); }
.tl-button--outline { background:transparent; color:var(--tl-green)!important; }
.tl-button--outline:hover { color:#fff!important; }
.tl-button--white { background:#fff; color:var(--tl-navy)!important; border-color:#fff; }
.tl-button--white:hover { background:var(--tl-mint); border-color:var(--tl-mint); color:var(--tl-navy)!important; }
.tl-text-link { color:var(--tl-green); font-weight:850; }

/* Hero */
.tl-hero { position:relative; overflow:hidden; background:linear-gradient(120deg,#fff 0%,#fff 60%,var(--tl-mint) 60%,#e2f4ed 100%); }
.tl-hero::after { content:""; position:absolute; right:-100px; bottom:-180px; width:500px; height:500px; border-radius:50%; border:70px solid rgba(0,136,97,.06); pointer-events:none; }
.tl-hero-grid { position:relative; z-index:2; display:grid; grid-template-columns:1.15fr .85fr; gap:54px; align-items:center; min-height:520px; padding:64px 0; }
.tl-eyebrow { display:inline-flex; margin-bottom:15px; padding:6px 11px; border-radius:999px; background:var(--tl-mint); color:var(--tl-green); font-size:12px; font-weight:900; text-transform:uppercase; letter-spacing:.1em; }
.tl-hero h1 { max-width:760px; margin:0 0 18px; color:var(--tl-navy); font-size:clamp(42px,5.2vw,68px); line-height:1.02; letter-spacing:-.045em; }
.tl-hero h1 em { color:var(--tl-green); font-style:normal; }
.tl-hero p { max-width:690px; margin:0 0 28px; color:#415b66; font-size:19px; line-height:1.65; }
.tl-hero-actions { display:flex; flex-wrap:wrap; gap:12px; }
.tl-hero-panel { position:relative; padding:27px; background:#fff; border:1px solid var(--tl-border); border-radius:18px; box-shadow:var(--tl-shadow); }
.tl-hero-panel h2 { margin:0 0 10px; color:var(--tl-navy); font-size:25px; }
.tl-hero-panel p { margin:0 0 20px; font-size:15px; }
.tl-process-list { list-style:none; margin:0; padding:0; counter-reset:tl-process; }
.tl-process-list li { position:relative; margin:0; padding:14px 0 14px 52px; border-top:1px solid #e9f0ef; color:var(--tl-text); font-weight:700; }
.tl-process-list li:first-child { border-top:0; }
.tl-process-list li::before { counter-increment:tl-process; content:counter(tl-process); position:absolute; left:0; top:10px; display:grid; place-items:center; width:34px; height:34px; border-radius:50%; background:var(--tl-green); color:#fff; font-weight:900; }

/* Classic publisher path bar */
.tl-pathways { margin-top:-1px; background:var(--tl-navy); color:#fff; }
.tl-pathway-grid { display:grid; grid-template-columns:repeat(4,1fr); }
.tl-pathway { position:relative; min-height:150px; padding:26px 24px; border-left:1px solid rgba(255,255,255,.16); }
.tl-pathway:first-child { border-left:0; }
.tl-pathway-icon { width:42px; height:42px; margin-bottom:10px; color:#7ee0bd; }
.tl-pathway h3 { margin:0 0 4px; color:#fff; font-size:19px; }
.tl-pathway p { margin:0; color:rgba(255,255,255,.72); font-size:13px; line-height:1.45; }
.tl-pathway a { position:absolute; inset:0; font-size:0; }
.tl-pathway:hover { background:rgba(255,255,255,.055); }

/* Main home layout */
.tl-home-main { padding:66px 0 72px; background:#fff; }
.tl-home-grid { display:grid; grid-template-columns:minmax(0,2fr) minmax(280px,.72fr); gap:46px; align-items:start; }
.tl-section-kicker { margin:0 0 5px; color:var(--tl-green); font-weight:900; font-size:12px; letter-spacing:.12em; text-transform:uppercase; }
.tl-section-title { margin:0 0 18px; color:var(--tl-navy); font-size:clamp(30px,3vw,42px); line-height:1.12; letter-spacing:-.03em; }
.tl-lead { font-size:19px; color:#415b66; }
.tl-divider { width:64px; height:4px; margin:17px 0 24px; border-radius:10px; background:var(--tl-green); }

.tl-classic-sidebar { overflow:hidden; border:1px solid var(--tl-border); border-radius:var(--tl-radius); box-shadow:0 10px 28px rgba(0,56,97,.08); }
.tl-side-heading { margin:0; padding:17px 20px; color:#fff; background:var(--tl-navy); font-size:18px; }
.tl-side-link { display:block; position:relative; padding:17px 42px 17px 20px; color:var(--tl-navy); border-bottom:1px solid var(--tl-border); background:#fff; font-weight:800; }
.tl-side-link:last-child { border-bottom:0; }
.tl-side-link::after { content:"→"; position:absolute; right:18px; color:var(--tl-green); }
.tl-side-link:hover { background:var(--tl-mint); color:var(--tl-green); }

/* Cards/sections */
.tl-feature-section { padding:74px 0; background:var(--tl-soft); border-top:1px solid #e7efef; border-bottom:1px solid #e7efef; }
.tl-section-head { display:flex; justify-content:space-between; gap:25px; align-items:end; margin-bottom:30px; }
.tl-section-head .tl-section-title { margin-bottom:0; }
.tl-card-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
.tl-card { overflow:hidden; background:#fff; border:1px solid var(--tl-border); border-radius:var(--tl-radius); box-shadow:0 8px 26px rgba(0,56,97,.08); }
.tl-card-media { aspect-ratio:4/3; overflow:hidden; background:linear-gradient(135deg,var(--tl-navy),var(--tl-green)); }
.tl-card-media img { width:100%; height:100%; object-fit:cover; display:block; transition:transform .25s ease; }
.tl-card:hover .tl-card-media img { transform:scale(1.025); }
.tl-card-body { padding:22px; }
.tl-card-body h3 { margin:0 0 8px; color:var(--tl-navy); font-size:22px; line-height:1.25; }
.tl-card-body p { margin:0 0 18px; color:#58707a; font-size:15px; line-height:1.6; }
.tl-card-meta { margin-bottom:8px; color:var(--tl-green); font-size:12px; font-weight:900; letter-spacing:.07em; text-transform:uppercase; }
.tl-book-placeholder { display:grid; place-items:center; height:100%; color:#fff; text-align:center; padding:20px; }
.tl-book-placeholder svg { width:70px; height:70px; opacity:.9; }

.tl-process-section { padding:76px 0; }
.tl-process-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:18px; counter-reset:steps; }
.tl-process-card { position:relative; padding:28px 22px 23px; background:#fff; border:1px solid var(--tl-border); border-radius:var(--tl-radius); }
.tl-process-card::before { counter-increment:steps; content:counter(steps); display:grid; place-items:center; width:42px; height:42px; margin-bottom:15px; border-radius:50%; color:#fff; background:var(--tl-green); font-weight:900; }
.tl-process-card h3 { margin:0 0 7px; color:var(--tl-navy); font-size:19px; }
.tl-process-card p { margin:0; color:#5b717a; font-size:14px; }

.tl-testimonial-section { padding:72px 0; background:linear-gradient(135deg,var(--tl-navy),#004e65); color:#fff; }
.tl-testimonial-grid { display:grid; grid-template-columns:1fr 1fr; gap:28px; }
.tl-quote { margin:0; padding:30px; border:1px solid rgba(255,255,255,.18); border-radius:var(--tl-radius); background:rgba(255,255,255,.07); }
.tl-quote p { margin:0 0 15px; font-size:18px; line-height:1.7; }
.tl-quote cite { color:#85e2c3; font-style:normal; font-weight:850; }

.tl-submit-cta { padding:58px 0; background:var(--tl-mint); border-top:1px solid var(--tl-border); }
.tl-submit-box { display:flex; justify-content:space-between; gap:32px; align-items:center; }
.tl-submit-box h2 { margin:0 0 5px; color:var(--tl-navy); font-size:33px; }
.tl-submit-box p { margin:0; color:#526b74; }

/* Standard content */
.site-content { min-height:50vh; }
.content-area { padding:58px 0 72px; }
.content-grid { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:44px; }
.entry-header { margin-bottom:24px; }
.entry-title { margin:0 0 12px; color:var(--tl-navy); font-size:clamp(34px,4vw,50px); line-height:1.12; letter-spacing:-.035em; }
.entry-meta { color:var(--tl-muted); font-size:14px; }
.entry-content h2, .entry-content h3, .entry-content h4 { color:var(--tl-navy); line-height:1.25; }
.entry-content h2 { font-size:32px; margin-top:1.7em; }
.entry-content h3 { font-size:25px; }
.entry-content blockquote { margin:28px 0; padding:20px 24px; background:var(--tl-mint); border-left:5px solid var(--tl-green); }
.entry-content table { width:100%; border-collapse:collapse; }
.entry-content th, .entry-content td { padding:10px 12px; border:1px solid var(--tl-border); }
.entry-content th { background:var(--tl-navy); color:#fff; }

.widget-area .widget { margin-bottom:22px; padding:22px; border:1px solid var(--tl-border); border-radius:12px; background:#fff; }
.widget-title { margin:0 0 14px; color:var(--tl-navy); font-size:20px; }
.widget ul { list-style:none; margin:0; padding:0; }
.widget li { padding:8px 0; border-bottom:1px solid #e7efef; }
.widget li:last-child { border-bottom:0; }

/* Book and author templates */
.tl-book-hero { padding:58px 0 65px; background:var(--tl-soft); border-bottom:1px solid var(--tl-border); }
.tl-book-layout { display:grid; grid-template-columns:minmax(220px,330px) 1fr; gap:50px; align-items:start; }
.tl-book-cover { overflow:hidden; border-radius:12px; box-shadow:0 16px 35px rgba(0,56,97,.16); background:#fff; }
.tl-book-cover img { width:100%; display:block; }
.tl-book-details h1 { margin:0 0 7px; color:var(--tl-navy); font-size:clamp(38px,5vw,58px); line-height:1.05; }
.tl-book-subtitle { margin:0 0 12px; color:#536b74; font-size:21px; }
.tl-book-author { margin:0 0 20px; color:var(--tl-green); font-weight:850; }
.tl-book-isbn { color:var(--tl-muted); font-size:13px; }
.tl-book-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:25px; }
.tl-author-hero { display:grid; grid-template-columns:220px 1fr; gap:38px; align-items:center; }
.tl-author-photo img { width:220px; height:220px; object-fit:cover; border-radius:50%; box-shadow:var(--tl-shadow); }

/* Archives */
.tl-archive-header { padding:52px 0 38px; background:var(--tl-soft); border-bottom:1px solid var(--tl-border); }
.tl-post-list { display:grid; gap:24px; }
.tl-post-card { display:grid; grid-template-columns:220px 1fr; gap:26px; padding:22px; border:1px solid var(--tl-border); border-radius:var(--tl-radius); background:#fff; }
.tl-post-card .post-thumbnail img { width:100%; height:170px; object-fit:cover; border-radius:9px; }
.pagination { margin-top:35px; }
.nav-links { display:flex; gap:8px; flex-wrap:wrap; }
.page-numbers { padding:8px 13px; border:1px solid var(--tl-border); border-radius:7px; }
.page-numbers.current { background:var(--tl-green); color:#fff; border-color:var(--tl-green); }

/* Forms */
input[type="text"], input[type="email"], input[type="url"], input[type="search"], textarea, select { width:100%; max-width:100%; padding:11px 12px; border:1px solid #b8cbca; border-radius:7px; background:#fff; color:var(--tl-text); }
input:focus, textarea:focus, select:focus { outline:3px solid rgba(0,136,97,.12); border-color:var(--tl-green); }

/* Footer */
.site-footer { color:rgba(255,255,255,.77); background:#002b48; }
.tl-footer-grid { display:grid; grid-template-columns:1.35fr repeat(3,1fr); gap:38px; padding:54px 0 42px; }
.tl-footer-brand { color:#fff; font-size:24px; font-weight:900; }
.tl-footer-brand span { color:#85e2c3; }
.site-footer h3 { margin:0 0 13px; color:#fff; font-size:16px; }
.site-footer ul { list-style:none; margin:0; padding:0; }
.site-footer li { margin:6px 0; }
.site-footer a { color:rgba(255,255,255,.8); }
.site-footer a:hover { color:#85e2c3; }
.tl-footer-bottom { border-top:1px solid rgba(255,255,255,.13); }
.tl-footer-bottom .container { display:flex; justify-content:space-between; gap:20px; padding:18px 0; font-size:12px; }

/* 404 */
.tl-404 { max-width:760px; margin:0 auto; padding:90px 20px; text-align:center; }
.tl-404 strong { display:block; color:var(--tl-green); font-size:82px; line-height:1; }

/* WordPress alignments */
.alignwide { width:min(1120px,100%); margin-left:auto; margin-right:auto; }
.alignfull { width:100vw; margin-left:calc(50% - 50vw); }

/* Responsive */
@media (max-width: 980px) {
  .tl-header-cta { display:none; }
  .tl-hero-grid { grid-template-columns:1fr; min-height:auto; gap:30px; padding:48px 0; }
  .tl-pathway-grid { grid-template-columns:1fr 1fr; }
  .tl-pathway:nth-child(3) { border-left:0; border-top:1px solid rgba(255,255,255,.16); }
  .tl-pathway:nth-child(4) { border-top:1px solid rgba(255,255,255,.16); }
  .tl-home-grid, .content-grid { grid-template-columns:1fr; }
  .tl-classic-sidebar { display:grid; grid-template-columns:1fr 1fr; }
  .tl-side-heading { grid-column:1/-1; }
  .tl-side-link:nth-child(even) { border-left:1px solid var(--tl-border); }
  .tl-card-grid { grid-template-columns:repeat(2,1fr); }
  .tl-process-grid { grid-template-columns:1fr 1fr; }
  .tl-footer-grid { grid-template-columns:1.3fr 1fr 1fr; }
  .tl-footer-grid > :last-child { grid-column:1/-1; }
}

@media (max-width: 760px) {
  .container { width:min(calc(100% - 28px), var(--tl-max)); }
  .tl-utility-tagline { display:none; }
  .tl-utility .container { justify-content:center; }
  .tl-brand-row { padding:16px 0; }
  .site-title { font-size:25px; }
  .tl-default-mark { width:49px; height:49px; flex-basis:49px; }
  .menu-toggle { display:block; margin:9px 0; }
  .main-navigation { min-height:auto; align-items:flex-start; flex-direction:column; }
  .main-navigation .menu-primary-container, .main-navigation > ul { width:100%; }
  .main-navigation ul { display:none; flex-direction:column; align-items:stretch; width:100%; padding-bottom:10px; }
  .main-navigation.toggled ul { display:flex; }
  .main-navigation a { padding:11px 4px; border-bottom:1px solid #e7efef; }
  .tl-hero { background:linear-gradient(180deg,#fff 0%,#fff 70%,var(--tl-mint) 100%); }
  .tl-hero h1 { font-size:42px; }
  .tl-pathway-grid { grid-template-columns:1fr; }
  .tl-pathway { min-height:125px; border-left:0; border-top:1px solid rgba(255,255,255,.16); }
  .tl-pathway:first-child { border-top:0; }
  .tl-home-main, .tl-feature-section, .tl-process-section { padding:52px 0; }
  .tl-classic-sidebar { grid-template-columns:1fr; }
  .tl-side-link:nth-child(even) { border-left:0; }
  .tl-section-head { align-items:flex-start; flex-direction:column; }
  .tl-card-grid, .tl-process-grid, .tl-testimonial-grid { grid-template-columns:1fr; }
  .tl-submit-box { align-items:flex-start; flex-direction:column; }
  .tl-book-layout { grid-template-columns:1fr; }
  .tl-book-cover { max-width:320px; }
  .tl-author-hero { grid-template-columns:1fr; }
  .tl-post-card { grid-template-columns:1fr; }
  .tl-footer-grid { grid-template-columns:1fr 1fr; }
  .tl-footer-grid > :first-child, .tl-footer-grid > :last-child { grid-column:1/-1; }
  .tl-footer-bottom .container { flex-direction:column; }
}

@media (max-width: 480px) {
  body { font-size:16px; }
  .tl-utility-links { gap:11px; justify-content:center; }
  .site-description { font-size:10px; letter-spacing:.035em; }
  .tl-hero h1 { font-size:36px; }
  .tl-hero-actions .tl-button { width:100%; }
  .tl-hero-panel { padding:21px; }
  .tl-footer-grid { grid-template-columns:1fr; }
  .tl-footer-grid > * { grid-column:1!important; }
}
