/*
Theme Name: Chiro Theme
Theme URI:
Description: A warm, welcoming custom WordPress theme for chiropractor websites. Provides header and footer — Elementor controls all page body content.
Version: 1.0.0
Author: KOS Media
Author URI: https://kosmc.com.au
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: chiro-theme
Requires at least: 5.9
Tested up to: 6.7
Requires PHP: 7.4
*/

/* === Reset & Base === */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-primary: #4D3F36;
    --color-primary-hover: #6b5a4e;
    --color-secondary: #F4EFEA;
    --color-body: #2d2d2d;
    --color-muted: #7a6e69;
    --color-border: #e8e0db;
    --color-white: #ffffff;
    --font-heading: 'Inter Tight', system-ui, sans-serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --max-width: 1200px;
}

html {
    scroll-behavior: smooth;
    overflow-x: clip;
}

body {
    overflow-x: clip;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-body);
    background: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    letter-spacing: -0.03em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* === Premium Button Interactions === */
.elementor-button,
.site-header__cta,
.site-header__phone,
.site-header__mobile-cta,
.footer-cta,
.footer-social__link {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.elementor-button:active,
.site-header__cta:active,
.site-header__phone:active,
.site-header__mobile-cta:active,
.footer-cta:active {
    transform: scale(0.97);
}

/* === Smooth Scroll Offset for Sticky Header === */
html {
    scroll-padding-top: 80px;
}

/* === Focus Visible for Accessibility === */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* === Elementor Button Polish === */
.elementor-button {
    letter-spacing: 0.01em;
}

/* === Selection Color === */
::selection {
    background: var(--color-primary);
    color: var(--color-white);
}

/* === Sticky Mobile Booking Bar === */
.mobile-booking-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: var(--color-white);
    border-top: 1px solid var(--color-border);
    padding: 12px 16px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.mobile-booking-bar__inner {
    display: flex;
    gap: 10px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.mobile-booking-bar__book {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    color: var(--color-white);
    background: var(--color-primary);
    padding: 12px 20px;
    border-radius: 50px;
    white-space: nowrap;
    transition: background 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-booking-bar__book:hover {
    background: var(--color-primary-hover);
    color: var(--color-white);
}

.mobile-booking-bar__book:active {
    transform: scale(0.97);
}

.mobile-booking-bar__call {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1.5px solid var(--color-primary);
    border-radius: 50%;
    color: var(--color-primary);
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-booking-bar__call:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

@media (max-width: 900px) {
    .mobile-booking-bar {
        display: block;
    }

    /* Add bottom padding to body so sticky bar doesn't cover content */
    body {
        padding-bottom: 76px;
    }

}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* === WordPress Core === */
.alignwide {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    width: 100%;
    max-width: 100%;
}

/* === Page Structure === */
#page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#content {
    flex: 1;
}

/* === Elementor Header Sticky === */
.elementor-location-header,
.elementor-location-header > .elementor-section-wrap,
.elementor-location-header > .e-con {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    background: #ffffff;
}

/* === Elementor Footer Override === */
footer h1, footer h2, footer h3, footer h4,
.elementor-location-footer h1,
.elementor-location-footer h2,
.elementor-location-footer h3,
.elementor-location-footer h4,
.site-footer h1,
.site-footer h2,
.site-footer h3,
.site-footer h4 {
    color: #ffffff !important;
}

/* === Elementor Hamburger Override === */
.elementor-menu-toggle,
.elementor-menu-toggle[aria-expanded="true"],
.elementor-menu-toggle[aria-expanded="false"],
.e-n-menu-toggle,
button.elementor-menu-toggle {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 8px !important;
    border-radius: 0 !important;
}

.elementor-menu-toggle .elementor-menu-toggle__icon--open,
.elementor-menu-toggle .elementor-menu-toggle__icon--close,
.elementor-menu-toggle svg,
.elementor-menu-toggle i,
.e-n-menu-toggle svg,
.e-n-menu-toggle i {
    color: #4D3F36 !important;
    fill: #4D3F36 !important;
}

.elementor-menu-toggle .eicon-menu-bar::before,
.elementor-menu-toggle i::before,
.e-n-menu-toggle i::before {
    color: #4D3F36 !important;
}

.elementor-menu-toggle__icon--open svg,
.elementor-menu-toggle__icon--close svg {
    width: 22px !important;
    height: 22px !important;
}

/* === Rank Math Breadcrumbs === */
.rank-math-breadcrumb {
    font-family: var(--font-body);
    font-size: 13px;
    margin-bottom: 12px;
}

.rank-math-breadcrumb .separator {
    margin: 0 6px;
    opacity: 0.5;
}

/* White breadcrumbs — use on dark backgrounds */
.breadcrumb-light .rank-math-breadcrumb,
.breadcrumb-light .rank-math-breadcrumb a {
    color: #ffffff;
}

.breadcrumb-light .rank-math-breadcrumb a {
    opacity: 0.85;
}

.breadcrumb-light .rank-math-breadcrumb a:hover {
    opacity: 1;
}

/* Dark breadcrumbs — use on light backgrounds */
.breadcrumb-dark .rank-math-breadcrumb,
.breadcrumb-dark .rank-math-breadcrumb a {
    color: var(--color-primary);
}

.breadcrumb-dark .rank-math-breadcrumb a {
    opacity: 0.7;
}

.breadcrumb-dark .rank-math-breadcrumb a:hover {
    opacity: 1;
}
