/*
Theme Name: Beyond the Sentence Base
Theme URI: https://beyondthesentence.com
Author: Your Agency
Description: Lean structural base theme for Beyond the Sentence. Built for SiteOrigin Page Builder. SiteOrigin rows and widgets handle all visual design — this theme provides reset, typography, header, footer, and CSS variables only. Extend via the BTS Child Theme.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bts-base
Tags: siteorigin, page-builder, nonprofit, minimal, professional
*/

/* ============================================================
   CSS CUSTOM PROPERTIES
   All brand colors, fonts, and spacing live here.
   Override any of these in the child theme's :root block.
   ============================================================ */
:root {
  /* ── Core Palette ── */
  --color-navy:          #1A2B4A;   /* Primary — deep navy */
  --color-navy-dark:     #111D33;   /* Darker navy for hover/depth */
  --color-navy-mid:      #243560;   /* Mid navy — row backgrounds */
  --color-navy-light:    #2E4270;   /* Lighter navy — cards on dark bg */
  --color-gold:          #C9A84C;   /* Accent — warm institutional gold */
  --color-gold-light:    #E2C475;   /* Light gold — hover states */
  --color-gold-dark:     #A8873A;   /* Dark gold — pressed/active */
  --color-white:         #FFFFFF;
  --color-off-white:     #F7F8FA;   /* Page background */
  --color-cream:         #FDF9F0;   /* Warm off-white — alternating rows */
  --color-text:          #1A2B4A;   /* Body text — same as navy */
  --color-text-mid:      #3D4F6B;   /* Secondary text */
  --color-text-light:    #6B7D99;   /* Muted / captions */
  --color-border:        #DDE2EC;   /* Subtle borders */
  --color-border-light:  #EEF1F6;

  /* ── Typography ── */
  --font-display:   'Playfair Display', 'Georgia', serif;
  --font-heading:   'Source Sans 3', 'Helvetica Neue', sans-serif;
  --font-body:      'Source Sans 3', 'Helvetica Neue', sans-serif;
  --font-mono:      'Courier New', monospace;

  /* ── Spacing scale ── */
  --space-xs:    0.5rem;
  --space-sm:    1rem;
  --space-md:    2rem;
  --space-lg:    4rem;
  --space-xl:    6rem;
  --space-xxl:   9rem;

  /* ── Layout ── */
  --max-width:         1200px;
  --max-width-narrow:  760px;
  --radius-sm:         3px;
  --radius-md:         6px;
  --radius-lg:         12px;

  /* ── Transitions ── */
  --transition-fast:   0.15s ease;
  --transition-base:   0.28s ease;
  --transition-slow:   0.5s ease;

  /* ── Shadows ── */
  --shadow-sm:   0 1px 4px rgba(26,43,74,0.08);
  --shadow-md:   0 4px 18px rgba(26,43,74,0.12);
  --shadow-lg:   0 8px 36px rgba(26,43,74,0.18);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.72;
  color: var(--color-text);
  background-color: var(--color-off-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-navy);
  text-decoration: underline;
  text-decoration-color: var(--color-gold);
  text-underline-offset: 3px;
  transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}

a:hover {
  color: var(--color-gold-dark);
  text-decoration-color: var(--color-gold-dark);
}

ul, ol {
  padding-left: 1.5em;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

/* Display / editorial headings — Playfair Display */
h1, h2 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-navy);
  letter-spacing: -0.01em;
}

/* Functional headings — Source Sans */
h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-navy);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.2rem; }
h5 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.08em; }
h6 { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.1em; }

p { margin-bottom: 1.2em; }
p:last-child { margin-bottom: 0; }

blockquote {
  border-left: 4px solid var(--color-gold);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--color-text-mid);
}

strong { font-weight: 700; }
em { font-style: italic; }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.container-narrow {
  max-width: var(--max-width-narrow);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-content {
  flex: 1 0 auto;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--color-navy);
  border-bottom: 3px solid var(--color-gold);
  transition: box-shadow var(--transition-base);
}

.site-header.scrolled {
  box-shadow: 0 2px 24px rgba(26,43,74,0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  height: 72px;
}

/* Logo */
.site-logo a {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-logo img {
  height: 44px;
  width: auto;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-text .logo-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: -0.01em;
}

.logo-text .logo-tagline {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--color-gold-light);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.main-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.main-navigation ul li a {
  display: block;
  padding: 0.5rem 0.85rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  letter-spacing: 0.02em;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item > a,
.main-navigation ul li.current-page-ancestor > a {
  color: var(--color-white);
  background: rgba(255,255,255,0.1);
}

/* Donate / CTA nav item */
.main-navigation ul li.menu-donate a,
.main-navigation ul li.menu-cta a {
  background-color: var(--color-gold);
  color: var(--color-navy-dark);
  font-weight: 700;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.main-navigation ul li.menu-donate a:hover,
.main-navigation ul li.menu-cta a:hover {
  background-color: var(--color-gold-light);
  color: var(--color-navy-dark);
}

/* Dropdown menus */
.main-navigation ul li {
  position: relative;
}

.main-navigation ul li ul {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-gold);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-md);
  flex-direction: column;
  gap: 0;
  padding: 0.5rem 0;
  z-index: 100;
}

.main-navigation ul li:hover > ul,
.main-navigation ul li:focus-within > ul {
  display: flex;
}

.main-navigation ul li ul li a {
  color: var(--color-navy);
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: 0;
  background: none;
}

.main-navigation ul li ul li a:hover {
  background: var(--color-off-white);
  color: var(--color-navy);
}

/* Mobile toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   BUTTONS
   These are base styles. SiteOrigin Button widgets
   will use these classes OR their own inline styles.
   ============================================================ */
.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition-fast), color var(--transition-fast),
              border-color var(--transition-fast), box-shadow var(--transition-fast);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Primary — navy fill */
.btn-primary {
  background-color: var(--color-navy);
  color: var(--color-white);
  border-color: var(--color-navy);
}
.btn-primary:hover {
  background-color: var(--color-navy-dark);
  border-color: var(--color-navy-dark);
  color: var(--color-white);
  box-shadow: var(--shadow-md);
}

/* Gold — accent CTA */
.btn-gold {
  background-color: var(--color-gold);
  color: var(--color-navy-dark);
  border-color: var(--color-gold);
}
.btn-gold:hover {
  background-color: var(--color-gold-light);
  border-color: var(--color-gold-light);
  color: var(--color-navy-dark);
  box-shadow: var(--shadow-md);
}

/* Outline — ghost button on dark backgrounds */
.btn-outline {
  background-color: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}
.btn-outline:hover {
  background-color: var(--color-white);
  color: var(--color-navy);
}

/* Outline Gold — ghost on light backgrounds */
.btn-outline-gold {
  background-color: transparent;
  color: var(--color-gold-dark);
  border-color: var(--color-gold);
}
.btn-outline-gold:hover {
  background-color: var(--color-gold);
  color: var(--color-navy-dark);
}

/* ============================================================
   SITEORIGIN ROW / PANEL RESETS
   These ensure SiteOrigin rows render cleanly with our styles.
   Row padding, backgrounds, and colors are set PER ROW
   in the SiteOrigin row style panel — not here.
   ============================================================ */

/* Remove default SiteOrigin margins that fight our layout */
.panel-grid {
  margin-bottom: 0 !important;
}

.panel-grid-cell {
  /* Let SiteOrigin control column widths */
}

/* Ensure full-width rows bleed edge to edge */
.panel-layout .panel-grid.panel-has-style {
  /* SiteOrigin handles this — we just ensure no overflow clipping */
}

/* SiteOrigin widget base reset */
.so-widget-siteorigin-widget {
  /* Widgets manage their own spacing */
}

/* ============================================================
   SITEORIGIN WIDGET BASE STYLES
   Very light touch — just enough so widgets inherit brand
   typography. Visual styling is done per-widget in SO panels.
   ============================================================ */

/* Hero widget */
.siteorigin-widget-hero h1,
.siteorigin-widget-hero h2 {
  font-family: var(--font-display);
}

/* Headline / text widgets */
.siteorigin-widget-headline .siteorigin-headline,
.siteorigin-widget-headline h1,
.siteorigin-widget-headline h2,
.siteorigin-widget-headline h3 {
  font-family: var(--font-display);
}

/* Editor / text area widget */
.siteorigin-widget-tinymce p,
.widget_text p {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.72;
}

/* Icon widget label */
.siteorigin-widget-icon-widget .icon-label {
  font-family: var(--font-heading);
  font-weight: 600;
}

/* ============================================================
   UTILITY CLASSES
   Handy helpers usable in SiteOrigin HTML widgets or
   custom HTML blocks within page builder rows.
   ============================================================ */

/* Text color utilities */
.text-white  { color: var(--color-white) !important; }
.text-navy   { color: var(--color-navy) !important; }
.text-gold   { color: var(--color-gold) !important; }
.text-muted  { color: var(--color-text-light) !important; }

/* Background utilities (for row fallback or widget bg) */
.bg-navy     { background-color: var(--color-navy) !important; }
.bg-navy-mid { background-color: var(--color-navy-mid) !important; }
.bg-gold     { background-color: var(--color-gold) !important; }
.bg-white    { background-color: var(--color-white) !important; }
.bg-cream    { background-color: var(--color-cream) !important; }
.bg-off-white { background-color: var(--color-off-white) !important; }

/* Alignment */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

/* Section eyebrow label — used above headings */
.eyebrow {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-gold);
  margin-bottom: 0.6rem;
}

/* On dark backgrounds */
.eyebrow-light {
  color: rgba(201,168,76,0.85);
}

/* Gold accent rule — decorative underline for section headings */
.gold-rule {
  display: block;
  width: 52px;
  height: 3px;
  background-color: var(--color-gold);
  margin: 1rem 0 1.5rem;
  border-radius: 2px;
}

.gold-rule-center {
  margin-left: auto;
  margin-right: auto;
}

/* Stat callout — big number + label */
.stat-block {
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 700;
  color: var(--color-gold);
  line-height: 1;
  display: block;
}

.stat-label {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.75);
  display: block;
  margin-top: 0.5rem;
}

/* Quote / pullquote */
.pullquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  line-height: 1.5;
  color: var(--color-text-mid);
  position: relative;
  padding-left: 1.5rem;
  border-left: 4px solid var(--color-gold);
}

.pullquote-white {
  color: rgba(255,255,255,0.9);
  border-left-color: var(--color-gold);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background-color: var(--color-navy-dark);
  color: rgba(255,255,255,0.75);
  padding: var(--space-xl) 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--space-lg);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.footer-brand .footer-logo-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-white);
  display: block;
  margin-bottom: 0.25rem;
}

.footer-brand .footer-logo-tagline {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-gold-light);
  display: block;
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.6);
  margin-bottom: 1.25rem;
}

.footer-col h5 {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-gold-light);
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul li a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.footer-col ul li a:hover {
  color: var(--color-gold-light);
  text-decoration: none;
}

.footer-contact-item {
  margin-bottom: 0.75rem;
}

.footer-contact-item .contact-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-gold);
  margin-bottom: 0.15rem;
}

.footer-contact-item a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-contact-item a:hover {
  color: var(--color-gold-light);
}

.footer-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin: var(--space-lg) 0 0;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  margin: 0;
}

.footer-bottom a {
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  font-size: 0.8rem;
}

.footer-bottom a:hover {
  color: var(--color-gold-light);
}

/* ============================================================
   PAGE — DEFAULT CONTENT AREA
   For non-SiteOrigin pages (standard WP editor content)
   ============================================================ */
.entry-content {
  max-width: var(--max-width-narrow);
  margin: var(--space-lg) auto;
  padding: 0 var(--space-md);
}

.entry-content h2,
.entry-content h3 {
  margin-top: 2em;
  margin-bottom: 0.5em;
}

.entry-content ul,
.entry-content ol {
  margin-bottom: 1.2em;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5em;
  font-size: 0.95rem;
}

.entry-content table th {
  background: var(--color-navy);
  color: var(--color-white);
  padding: 0.6rem 1rem;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.entry-content table td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--color-border);
}

.entry-content table tr:nth-child(even) td {
  background: var(--color-off-white);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }
}

@media (max-width: 768px) {
  :root {
    --space-lg: 3rem;
    --space-xl: 4rem;
  }

  .header-inner {
    height: 60px;
  }

  /* Hide nav, show toggle */
  .main-navigation {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-navy-dark);
    border-top: 2px solid var(--color-gold);
    padding: 1rem 0;
    box-shadow: 0 8px 24px rgba(26,43,74,0.3);
  }

  .main-navigation.open {
    display: block;
  }

  .main-navigation ul {
    flex-direction: column;
    gap: 0;
    align-items: stretch;
  }

  .main-navigation ul li a {
    padding: 0.75rem var(--space-md);
    border-radius: 0;
    font-size: 1rem;
  }

  .main-navigation ul li.menu-donate a,
  .main-navigation ul li.menu-cta a {
    margin: 0.5rem var(--space-md);
    border-radius: var(--radius-sm);
    text-align: center;
  }

  /* Dropdown becomes inline on mobile */
  .main-navigation ul li ul {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-radius: 0;
    background: rgba(0,0,0,0.2);
    padding: 0;
  }

  .main-navigation ul li.open > ul {
    display: flex;
  }

  .main-navigation ul li ul li a {
    color: rgba(255,255,255,0.75);
    padding-left: calc(var(--space-md) + 1rem);
  }

  .menu-toggle {
    display: flex;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .header-inner {
    padding: 0 1rem;
  }

  .container,
  .container-narrow {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
