/*
Theme Name: Citrin Chiropractic
Theme URI: https://citrinchiropractic.com
Author: Custom
Description: Custom theme for Citrin Chiropractic Center, St. Louis MO
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: citrin
*/

/* ─── CSS Variables ─────────────────────────────── */
:root {
  --color-header:   #0F1F2B;
  --color-primary:  #1E3A4A;
  --color-accent:   #5BBEA7;
  --color-orange:   #E07B39;
  --color-footer:   #111B22;
  --color-text:     #2C3E50;
  --color-muted:    #6B7F8C;
  --color-light:    #F7F9F8;
  --color-white:    #FFFFFF;
  --font-heading:   'DM Serif Display', Georgia, serif;
  --font-body:      'DM Sans', system-ui, sans-serif;
  --radius:         8px;
  --transition:     0.22s ease;
  --shadow:         0 4px 24px rgba(15,31,43,0.10);
}

/* ─── Reset & Base ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--color-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-orange); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--color-primary);
  font-weight: 400;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

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

/* ─── Layout ────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.site-main {
  flex: 1;
}

/* ─── Skip Link ─────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--color-accent);
  color: #fff;
  padding: 8px 16px;
  z-index: 9999;
  font-family: var(--font-body);
}
.skip-link:focus { top: 0; }

/* ─── Buttons (global) ──────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 30px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
}
.btn-primary {
  background: var(--color-orange);
  color: #fff;
  border-color: var(--color-orange);
  box-shadow: 0 4px 16px rgba(224,123,57,0.3);
}
.btn-primary:hover {
  background: #c9682a;
  border-color: #c9682a;
  color: #fff;
}
.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* ─── WordPress Alignment Classes ───────────────── */
.alignleft  { float: left; margin-right: 1.5rem; margin-bottom: 1rem; }
.alignright { float: right; margin-left: 1.5rem; margin-bottom: 1rem; }
.aligncenter { display: block; margin: 0 auto 1rem; }
.alignwide  { max-width: 1400px; }
.alignfull  { max-width: 100%; }

/* ─── Page Content ──────────────────────────────── */
.page-content,
.entry-content {
  padding: 60px 0;
}

/* Elementor full-width pages — remove default padding */
.elementor-page .page-content,
.elementor-page .entry-content {
  padding: 0;
}

/* ─── 404 / Search ──────────────────────────────── */
.error-404,
.search-results {
  padding: 80px 0;
  text-align: center;
}

/* ─── Responsive ────────────────────────────────── */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
}

/* ─── Elementor Compatibility ────────────────────────────────────────────── */
body.elementor-page { overflow-x: hidden; }

.elementor-section-wrap,
.elementor-section.elementor-section-full_width {
    width: 100% !important;
}

.elementor-section-wrap > .elementor-section:first-child,
.elementor-top-section:first-child {
    margin-top: 0 !important;
}

/* Elementor sometimes adds page padding — remove it */
.page-id-any .entry-content,
.elementor-page .entry-content,
.elementor-page .page-content {
    padding: 0 !important;
    margin: 0 !important;
}

/* ─── Sticky Bottom CTA Bar ──────────────────────────────────────────────── */
.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: flex;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.18);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.sticky-cta.visible {
    transform: translateY(0);
}

.sticky-cta-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    text-decoration: none;
    transition: filter 0.2s;
}

.sticky-cta-btn:hover {
    filter: brightness(1.1);
}

.sticky-cta-btn svg {
    flex-shrink: 0;
}

.sticky-cta-btn span {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}

.sticky-cta-btn small {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 400;
    opacity: 0.8;
    display: block;
    line-height: 1;
    margin-top: 3px;
}

.sticky-cta-btn > div,
.sticky-cta-btn > span + small {
    display: flex;
    flex-direction: column;
}

/* Text wrapper */
.sticky-cta-btn span,
.sticky-cta-btn small {
    display: block;
}

/* Call button — teal */
.sticky-cta-call {
    background: var(--color-accent, #5BBEA7);
    color: #1E3A4A;
    border-right: 1px solid rgba(0,0,0,0.1);
}

.sticky-cta-call svg {
    color: #1E3A4A;
}

/* Enquire button — orange */
.sticky-cta-enquire {
    background: var(--color-orange, #E07B39);
    color: #fff;
}

.sticky-cta-enquire svg {
    color: #fff;
}

/* Only show on mobile/tablet — desktop has header phone + hero CTAs */
@media (min-width: 1025px) {
    .sticky-cta { display: none; }
}

@media (max-width: 1024px) {
    .sticky-cta-btn small { display: none; }
    .sticky-cta-btn span { font-size: 14px; }
    .sticky-cta-btn { padding: 16px 20px; }
}
