/*
 Theme Name:   TMSC Blog Child
 Theme URI:    https://themarketingsystemscollective.com
 Description:  Astra child theme matching the TMSC static site design.
 Author:       The Marketing Systems Collective
 Author URI:   https://themarketingsystemscollective.com
 Template:     astra
 Version:      1.0.0
 Text Domain:  tmsc-blog-child
*/

/* ===================================================
   DESIGN SYSTEM (matches static site)
   =================================================== */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&family=Varela+Round&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  --navy:        #0C1B33;
  --navy-light:  #1A2F4F;
  --navy-mid:    #1D2736;
  --orange:      #F9841A;
  --orange-hover:#e0740f;
  --white:       #FFFFFF;
  --off-white:   #F5F7FA;
  --light-bg:    #EEF2F7;
  --text-dark:   #333333;
  --text-muted:  #666666;
  --text-light:  rgba(255,255,255,0.92);
  --border-light:#E0E6ED;
  --card-shadow: 0 4px 24px rgba(0,0,0,0.08);
  --card-shadow-hover: 0 8px 32px rgba(0,0,0,0.14);

  --font-heading: 'Varela Round', sans-serif;
  --font-body:    'Manrope', sans-serif;

  --container-max: 1200px;
  --container-wide: 1400px;
  --header-height: 80px;
  --radius:  12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --radius-pill: 100px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset / Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body) !important;
  color: var(--text-dark);
  line-height: 1.7;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: color .2s var(--ease); }
ul, ol { list-style: none; }
button { border: none; cursor: pointer; font-family: inherit; }

/* ---------- Container ---------- */
.tmsc-container { max-width: var(--container-max); margin: 0 auto; padding: 0 24px; }
.tmsc-container-wide { max-width: var(--container-wide); margin: 0 auto; padding: 0 24px; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-heading) !important; line-height: 1.25; }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }
h4 { font-size: 1.1rem; }
.subtitle { color: var(--orange); text-transform: uppercase; letter-spacing: 2px; font-weight: 700; font-size: .85rem; margin-bottom: 12px; }
.text-orange { color: var(--orange); }
.text-white  { color: var(--white); }
.text-center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: .95rem;
  transition: all .3s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--orange);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(249,132,26,.35);
  color: var(--white);
}
.btn-secondary {
  background: transparent;
  color: var(--orange);
  border: 2px solid var(--orange);
}
.btn-secondary:hover {
  background: var(--orange);
  color: var(--white);
  transform: translateY(-2px);
}
.btn-sm { padding: 10px 22px; font-size: .85rem; }
.btn-link {
  color: var(--orange);
  font-weight: 700;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap .2s var(--ease);
}
.btn-link:hover { gap: 10px; }
.btn-link::after { content: '→'; }

/* ===================================================
   HEADER / NAV
   =================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--navy);
  transition: background .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.scrolled {
  background: rgba(12,27,51,.97);
  box-shadow: 0 2px 20px rgba(0,0,0,.3);
}
.header-inner {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}
.logo img { height: 50px; }
.nav-main { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0; }
.nav-main > li { position: relative; list-style: none; }
.nav-main > li > a {
  color: var(--text-light);
  font-weight: 600;
  font-size: .9rem;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: var(--radius-sm);
  transition: background .2s var(--ease);
}
.nav-main > li > a:hover { background: rgba(255,255,255,.08); color: var(--text-light); }
.nav-main > li > a .chevron {
  width: 10px; height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .2s var(--ease);
  margin-top: -2px;
}

/* Dropdown */
.dropdown {
  position: absolute;
  top: 100%; left: 0;
  min-width: 280px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow-hover);
  padding: 8px;
  opacity: 0; visibility: hidden;
  transform: translateY(8px);
  transition: all .25s var(--ease);
  z-index: 1001;
  margin: 0;
}
.nav-main > li:hover > .dropdown,
.nav-main > li.dropdown-open > .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown li { list-style: none; }
.dropdown a {
  display: block;
  padding: 10px 14px;
  color: var(--text-dark);
  font-size: .88rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background .15s var(--ease);
}
.dropdown a:hover { background: var(--off-white); color: var(--orange); }

/* Header right */
.header-right { display: flex; align-items: center; gap: 12px; }
.header-right .btn { padding: 10px 24px; font-size: .85rem; }
.social-icons { display: flex; gap: 8px; }
.social-icons a {
  width: 36px; height: 36px;
  background: #1877F2;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 18px;
  transition: transform .2s var(--ease);
}
.social-icons a.linkedin { background: #0A66C2; }
.social-icons a:hover { transform: scale(1.1); }

/* Mobile hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  padding: 8px;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all .3s var(--ease);
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Tagline bar */
.header-tagline {
  text-align: center;
  font-size: .72rem;
  color: rgba(255,255,255,.5);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  padding-bottom: 4px;
  margin-top: -4px;
  max-width: var(--container-wide);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ===================================================
   HERO SECTIONS
   =================================================== */
.blog-hero {
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  color: var(--text-light);
  padding: 140px 0 60px;
  text-align: center;
}
.blog-hero h1 { margin-bottom: 12px; color: var(--white); }
.blog-hero p { max-width: 680px; margin: 0 auto; font-size: 1.05rem; opacity: .85; }

/* ===================================================
   BLOG ARCHIVE – POST GRID
   =================================================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: left;
  padding: 60px 0 80px;
}
.blog-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--card-shadow);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}
.blog-card-thumb {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.blog-card-body { padding: 24px; }
.blog-card-body h3 { font-size: 1rem; margin-bottom: 8px; }
.blog-card-body h3 a { color: var(--text-dark); }
.blog-card-body h3 a:hover { color: var(--orange); }
.blog-card-body .meta { font-size: .78rem; color: var(--text-muted); margin-bottom: 12px; }
.blog-card-body p { font-size: .85rem; color: var(--text-muted); margin-bottom: 16px; }

/* Pagination */
.tmsc-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-bottom: 60px;
}
.tmsc-pagination a,
.tmsc-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .9rem;
  transition: all .2s var(--ease);
}
.tmsc-pagination a {
  background: var(--off-white);
  color: var(--text-dark);
}
.tmsc-pagination a:hover {
  background: var(--orange);
  color: var(--white);
}
.tmsc-pagination .current {
  background: var(--orange);
  color: var(--white);
}

/* ===================================================
   SINGLE POST
   =================================================== */
.single-post-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  padding: 60px 0 80px;
  align-items: start;
}
.single-post-content {
  max-width: 100%;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-dark);
}
.single-post-content h2 {
  margin-top: 40px;
  margin-bottom: 16px;
}
.single-post-content h3 {
  margin-top: 32px;
  margin-bottom: 12px;
}
.single-post-content p {
  margin-bottom: 20px;
}
.single-post-content img {
  border-radius: var(--radius);
  margin: 24px 0;
}
.single-post-content ul,
.single-post-content ol {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 20px;
}
.single-post-content ol { list-style: decimal; }
.single-post-content li { margin-bottom: 8px; }
.single-post-content blockquote {
  border-left: 4px solid var(--orange);
  padding: 16px 24px;
  margin: 24px 0;
  background: var(--off-white);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-muted);
}
.single-post-content a { color: var(--orange); font-weight: 600; }
.single-post-content a:hover { text-decoration: underline; }

/* Post meta bar */
.post-meta-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}
.post-meta-bar .cat-badge {
  background: var(--orange);
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===================================================
   SIDEBAR
   =================================================== */
.blog-sidebar {
  position: sticky;
  top: 100px;
}
.sidebar-cta {
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  color: var(--text-light);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  margin-bottom: 32px;
}
.sidebar-cta h3 {
  color: var(--white);
  font-size: 1.15rem;
  margin-bottom: 12px;
}
.sidebar-cta p {
  font-size: .88rem;
  opacity: .85;
  margin-bottom: 20px;
}
.sidebar-cta .btn {
  width: 100%;
  justify-content: center;
}

/* Recent posts sidebar */
.sidebar-recent h4 {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--orange);
  margin-bottom: 16px;
}
.sidebar-recent-post {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
.sidebar-recent-post:last-child { border-bottom: none; }
.sidebar-recent-post img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.sidebar-recent-post .sidebar-post-info h5 {
  font-size: .85rem;
  font-family: var(--font-heading);
  line-height: 1.3;
  margin: 0 0 4px;
}
.sidebar-recent-post .sidebar-post-info h5 a {
  color: var(--text-dark);
}
.sidebar-recent-post .sidebar-post-info h5 a:hover {
  color: var(--orange);
}
.sidebar-recent-post .sidebar-post-info .meta {
  font-size: .72rem;
  color: var(--text-muted);
}

/* ===================================================
   PAGE TEMPLATE
   =================================================== */
.page-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 24px 80px;
  font-size: 1.05rem;
  line-height: 1.8;
}
.page-content h2 { margin-top: 40px; margin-bottom: 16px; }
.page-content p { margin-bottom: 20px; }
.page-content ul,
.page-content ol { list-style: disc; padding-left: 24px; margin-bottom: 20px; }
.page-content ol { list-style: decimal; }
.page-content a { color: var(--orange); font-weight: 600; }
.page-content a:hover { text-decoration: underline; }

/* ===================================================
   404 PAGE
   =================================================== */
.four-oh-four {
  text-align: center;
  padding: 60px 24px 80px;
}
.four-oh-four h2 { margin-bottom: 16px; }
.four-oh-four p { color: var(--text-muted); margin-bottom: 24px; }

/* ===================================================
   FOOTER
   =================================================== */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,.7);
  padding: 60px 0 24px;
  text-align: center;
}
.footer-logo { margin: 0 auto 24px; height: 80px; }
.footer-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,.12);
  margin: 24px 0;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: .82rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.footer-links a { color: rgba(255,255,255,.6); transition: color .2s var(--ease); }
.footer-links a:hover { color: var(--white); }
.footer-links .sep { color: rgba(255,255,255,.3); }
.footer-copy { font-size: .78rem; margin-top: 8px; color: rgba(255,255,255,.4); }

/* ===================================================
   FLOATING CTA
   =================================================== */
.floating-cta {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--orange);
  color: var(--white);
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: .88rem;
  box-shadow: 0 4px 20px rgba(249,132,26,.4);
  transition: all .3s var(--ease);
  text-decoration: none;
}
.floating-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(249,132,26,.5);
  color: var(--white);
}
.floating-cta .emoji { font-size: 1.1rem; }

/* ===================================================
   OVERRIDE ASTRA DEFAULTS
   =================================================== */
/* Hide Astra's built-in header/footer — we use custom */
.ast-above-header-wrap,
.ast-below-header-wrap,
#ast-desktop-header,
#ast-mobile-header,
.ast-primary-header-bar,
.ast-header-sticker,
.site-header-primary-section-left,
.site-header-primary-section-center,
.site-header-primary-section-right,
.ast-builder-header-row,
.ast-header-break-point .ast-mobile-header-wrap,
#masthead,
.ast-footer-overlay,
.site-footer-primary-section,
.ast-small-footer,
.site-below-footer-wrap,
.ast-above-footer-wrap,
.ast-footer-copyright,
.ast-builder-footer-row { display: none !important; }

/* Remove Astra's default body padding/margins */
.ast-separate-container .ast-article-post,
.ast-separate-container .ast-article-single,
.ast-separate-container .comment-respond,
.ast-separate-container .ast-comment-list li {
  background: transparent;
  padding: 0;
}
.ast-separate-container #primary {
  padding: 0;
  margin: 0;
}
#page, #content, .site-content {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}
.entry-header { display: none; }

/* margin-top for body to account for fixed header */
body { padding-top: var(--header-height) !important; }

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .single-post-layout { grid-template-columns: 1fr 280px; gap: 32px; }
}

@media (max-width: 768px) {
  :root { --header-height: 70px; }
  .hamburger { display: flex; }
  .nav-main {
    position: fixed;
    top: var(--header-height);
    left: 0; right: 0; bottom: 0;
    background: var(--navy);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 16px;
    transform: translateX(100%);
    transition: transform .35s var(--ease);
    overflow-y: auto;
  }
  .nav-main.open { transform: translateX(0); }
  .nav-main > li > a { padding: 14px 16px; font-size: 1rem; }
  .dropdown {
    position: static;
    opacity: 1; visibility: visible;
    transform: none;
    box-shadow: none;
    background: rgba(255,255,255,.05);
    margin: 4px 0;
    border-radius: var(--radius-sm);
    display: none;
  }
  .nav-main > li.dropdown-open > .dropdown { display: block; }
  .dropdown a { color: var(--text-light); }
  .dropdown a:hover { background: rgba(255,255,255,.08); color: var(--orange); }
  .header-right .social-icons { display: none; }

  .blog-hero { padding: 120px 0 48px; }
  .blog-grid { grid-template-columns: 1fr; }
  .single-post-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .blog-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

@media (max-width: 480px) {
  .btn { padding: 12px 24px; font-size: .88rem; }
  .floating-cta { padding: 12px 18px; font-size: .82rem; bottom: 16px; right: 16px; }
  .blog-sidebar {
    grid-template-columns: 1fr;
  }
}
