/* ============================================================
   Truth Foundation Movement — Design System
   Source: Unified from extracted design-system.json files
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Karla:wght@400;700&family=Open+Sans:wght@300;400;600;700&display=swap');

/* --- Design Tokens (CSS Custom Properties) --- */
:root {
    /* Colors */
    --color-primary-bg: rgb(205, 233, 199);
    --color-accent-green: rgb(129, 156, 123);
    --color-accent-green-dark: rgb(107, 122, 104);
    --color-accent-green-darker: rgb(102, 117, 99);
    --color-text-primary: rgb(27, 27, 27);
    --color-text-dark: rgb(22, 22, 22);
    --color-text-muted: rgb(87, 87, 87);
    --color-text-subtle: rgb(63, 66, 62);
    --color-surface-white: rgb(255, 255, 255);
    --color-surface-light: rgb(246, 246, 246);
    --color-border: rgb(219, 219, 219);
    --color-dark-bg: rgb(26, 27, 26);

    /* Typography */
    --font-heading: 'Karla', sans-serif;
    --font-body: 'Open Sans', arial, sans-serif;
    --font-serif: 'Times New Roman', serif;

    /* Radii */
    --radius-card: 7px;
    --radius-pill: 48px;
    --radius-tab: 2px 2px 0 0;

    /* Shadows */
    --shadow-soft: rgba(0, 0, 0, 0.2) 0 0 5px 0;
    --shadow-elevated: rgba(0, 0, 0, 0.3) 0 2px 6px 0;

    /* Spacing */
    --spacing-section-y: 100px;
    --spacing-content-y: 64px;
    --spacing-element-y: 24px;
}

/* --- Base Styles --- */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-text-dark);
    line-height: 1.2;
    margin-bottom: 0.5em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }

a {
    color: var(--color-accent-green);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-accent-green-dark);
    text-decoration: underline;
}

p {
    margin-bottom: 1rem;
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Page Background --- */
.page-inner {
    background-color: var(--color-primary-bg);
    min-height: 100vh;
}

/* --- Section Spacing --- */
.section-padding {
    padding: var(--spacing-section-y) 0;
}

.section-padding-sm {
    padding: var(--spacing-content-y) 0;
}

/* --- Hero Section --- */
.hero-section {
    text-align: center;
    padding: var(--spacing-section-y) 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
}

/* --- Dark Section --- */
.dark-section {
    background-color: var(--color-dark-bg);
    color: var(--color-surface-white);
}

.dark-section h1,
.dark-section h2,
.dark-section h3,
.dark-section h4,
.dark-section h5,
.dark-section h6 {
    color: var(--color-surface-white);
}

.dark-section a {
    color: var(--color-primary-bg);
}

.dark-section a:hover {
    color: var(--color-surface-white);
}

/* --- Light Section --- */
.light-section {
    background-color: var(--color-surface-light);
}

/* --- White Section --- */
.white-section {
    background-color: var(--color-surface-white);
}

/* --- Buttons --- */
.btn-primary-custom {
    display: inline-block;
    background-color: var(--color-accent-green);
    color: var(--color-surface-white);
    border: 2px solid var(--color-accent-green);
    border-radius: var(--radius-pill);
    padding: 12px 32px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-primary-custom:hover,
.btn-primary-custom:focus {
    background-color: var(--color-accent-green-dark);
    border-color: var(--color-accent-green-dark);
    color: var(--color-surface-white);
    text-decoration: none;
}

.btn-primary-custom:active {
    background-color: var(--color-accent-green-darker);
    border-color: var(--color-accent-green-darker);
}

.btn-outline-custom {
    display: inline-block;
    background-color: transparent;
    color: var(--color-accent-green);
    border: 2px solid var(--color-accent-green);
    border-radius: var(--radius-pill);
    padding: 12px 32px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-outline-custom:hover,
.btn-outline-custom:focus {
    background-color: var(--color-accent-green);
    color: var(--color-surface-white);
    text-decoration: none;
}

/* --- Card --- */
.card-custom {
    background-color: var(--color-surface-white);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    padding: 24px;
    transition: box-shadow 0.2s ease;
}

.card-custom:hover {
    box-shadow: var(--shadow-elevated);
}

/* --- Text Utilities --- */
.text-accent {
    color: var(--color-accent-green);
}

.text-muted-custom {
    color: var(--color-text-muted);
}

.text-subtle {
    color: var(--color-text-subtle);
}

/* --- Navbar Overrides --- */
.navbar {
    font-family: var(--font-heading);
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow-elevated);
    background-color: var(--color-surface-white) !important;
}

.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-text-dark) !important;
}

.navbar .nav-link {
    color: var(--color-text-primary) !important;
    font-weight: 400;
    padding: 8px 16px !important;
    transition: color 0.2s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--color-accent-green) !important;
}

.navbar .btn-primary-custom {
    padding: 8px 24px;
    font-size: 0.875rem;
}

/* --- Animation Keyframes --- */
@keyframes opacity-bounce {
    0% {
        opacity: 0;
        transform: translateY(100%);
    }
    60% {
        transform: translateY(-20%);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.gd-ad-flex-parent {
    opacity: 0;
}

.gd-ad-flex-parent.animate {
    animation-name: opacity-bounce;
    animation-duration: 800ms;
    animation-delay: 200ms;
    animation-fill-mode: forwards;
    animation-timing-function: ease;
}

/* --- Responsive Breakpoints --- */
@media (min-width: 768px) {
    h1 { font-size: 2.25rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }

    .hero-section h1 {
        font-size: 3.5rem;
    }
}

@media (min-width: 1024px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2.25rem; }

    .hero-section h1 {
        font-size: 4.5rem;
    }

    .hero-section {
        padding: 120px 0;
    }
}

@media (min-width: 1280px) {
    .hero-section h1 {
        font-size: 5rem;
    }
}

@media (min-width: 1536px) {
    .hero-section h1 {
        font-size: 5.375rem;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* --- Chat Bubble Widget --- */
.tfm-chat-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background-color: var(--color-accent-green);
    color: var(--color-surface-white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
    z-index: 1040;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.tfm-chat-bubble:hover {
    background-color: var(--color-accent-green-dark);
    transform: scale(1.08);
}

.tfm-chat-panel {
    position: fixed;
    bottom: 92px;
    right: 24px;
    width: 340px;
    max-width: calc(100vw - 48px);
    background-color: var(--color-surface-white);
    border-radius: var(--radius-card);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    z-index: 1039;
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
}

.tfm-chat-panel.open {
    display: flex;
    animation: tfm-chat-open 0.2s ease;
}

@keyframes tfm-chat-open {
    from { opacity: 0; transform: scale(0.95) translateY(8px); }
    to   { opacity: 1; transform: scale(1)    translateY(0);   }
}

.tfm-chat-header {
    background-color: var(--color-accent-green);
    color: var(--color-surface-white);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
}

.tfm-chat-close {
    background: none;
    border: none;
    color: var(--color-surface-white);
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0;
    opacity: 0.8;
    transition: opacity 0.15s ease;
}

.tfm-chat-close:hover {
    opacity: 1;
}

.tfm-chat-body {
    padding: 20px;
    overflow-y: auto;
    max-height: 460px;
}

.tfm-chat-field-error {
    color: #dc3545;
    font-size: 0.8125rem;
    margin-top: 4px;
    min-height: 1.2em;
}
