/*
 Theme Name:   Capital Physical Medicine
 Theme URI:    https://www.capitalphysicalmedicine.com
 Description:  Kadence child theme for Capital Physical Medicine chiropractic practice
 Author:       Capital Physical Medicine
 Author URI:   https://www.capitalphysicalmedicine.com
 Template:     kadence
 Version:      1.0.0
 Requires at least: 6.0
 Requires PHP: 7.4
 License:      GNU General Public License v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  capitalmedicine-developer
*/

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

:root {
    --cpm-primary: #1B5E8A;
    --cpm-primary-dark: #144a6e;
    --cpm-primary-light: #2a7ab5;
    --cpm-accent: #2adba3;
    --cpm-white: #ffffff;
    --cpm-bg-light: #f8f9fa;
    --cpm-bg-alt: #eef4f8;
    --cpm-text: #333333;
    --cpm-text-light: #666666;
    --cpm-text-muted: #999999;
    --cpm-border: #e0e0e0;
    --cpm-cta: #e86a2e;
    --cpm-cta-hover: #d45a1e;
    --cpm-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --cpm-shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.12);
    --cpm-radius: 8px;
    --cpm-radius-lg: 12px;
    --cpm-transition: 0.3s ease;
    --cpm-font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --cpm-font-heading: 'Raleway', 'Open Sans', sans-serif;
    --cpm-max-width: 1200px;
}

/* ==========================================================================
   Global Reset & Base
   ========================================================================== */

body {
    font-family: var(--cpm-font-body);
    color: var(--cpm-text);
    background-color: var(--cpm-white);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--cpm-font-heading);
    font-weight: 700;
    color: var(--cpm-text);
    line-height: 1.3;
}

a {
    color: var(--cpm-primary);
    text-decoration: none;
    transition: color var(--cpm-transition);
}

a:hover {
    color: var(--cpm-primary-dark);
}

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

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.cpm-container {
    max-width: var(--cpm-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.cpm-section {
    padding: 80px 0;
}

.cpm-section--alt {
    background-color: var(--cpm-bg-light);
}

.cpm-section--blue {
    background-color: var(--cpm-primary);
    color: var(--cpm-white);
}

.cpm-section--blue h2,
.cpm-section--blue h3,
.cpm-section--blue p {
    color: var(--cpm-white);
}

.cpm-section-title {
    text-align: center;
    margin-bottom: 50px;
}

.cpm-section-title h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.cpm-section-title h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--cpm-accent);
    margin: 15px auto 0;
}

.cpm-section-title p {
    font-size: 1.1rem;
    color: var(--cpm-text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.cpm-btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: var(--cpm-radius);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all var(--cpm-transition);
    cursor: pointer;
    border: none;
    text-decoration: none;
    line-height: 1.4;
}

.cpm-btn--primary {
    background-color: var(--cpm-primary);
    color: var(--cpm-white);
}

.cpm-btn--primary:hover {
    background-color: var(--cpm-primary-dark);
    color: var(--cpm-white);
    transform: translateY(-2px);
    box-shadow: var(--cpm-shadow-lg);
}

.cpm-btn--cta {
    background-color: var(--cpm-cta);
    color: var(--cpm-white);
}

.cpm-btn--cta:hover {
    background-color: var(--cpm-cta-hover);
    color: var(--cpm-white);
    transform: translateY(-2px);
    box-shadow: var(--cpm-shadow-lg);
}

.cpm-btn--outline {
    background-color: transparent;
    color: var(--cpm-white);
    border: 2px solid var(--cpm-white);
}

.cpm-btn--outline:hover {
    background-color: var(--cpm-white);
    color: var(--cpm-primary);
}

.cpm-btn--sm {
    padding: 10px 22px;
    font-size: 0.85rem;
}

/* ==========================================================================
   Brand Bar (logo + contact + social + book)
   ========================================================================== */

.cpm-brand {
    background-color: var(--cpm-white);
    border-bottom: 1px solid #e8e8e8;
}

.cpm-brand__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px 15px 0;
    max-width: var(--cpm-max-width);
    margin: 0 auto;
}

.cpm-brand__logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: -40px;
}

.cpm-brand__logo img {
    max-height: 65px;
    width: auto;
}

.cpm-brand__logo span {
    font-family: var(--cpm-font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--cpm-primary);
}

.cpm-brand__center {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cpm-brand__info-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cpm-brand__info-item svg {
    width: 22px;
    height: 22px;
    fill: var(--cpm-cta);
    flex-shrink: 0;
}

.cpm-brand__label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    font-weight: 600;
    line-height: 1.2;
}

.cpm-brand__info-item a {
    font-size: 0.85rem;
    color: var(--cpm-text);
    font-weight: 500;
    line-height: 1.3;
}

.cpm-brand__info-item a:hover {
    color: var(--cpm-primary);
}

.cpm-brand__divider {
    width: 1px;
    height: 30px;
    background-color: #ddd;
}

.cpm-brand__social {
    display: flex;
    gap: 8px;
    align-items: center;
}

.cpm-brand__social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--cpm-primary);
    color: var(--cpm-white);
    transition: background-color var(--cpm-transition);
}

.cpm-brand__social a:hover {
    background-color: var(--cpm-primary-dark);
}

.cpm-brand__social svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.cpm-brand__book-btn {
    display: flex;
    align-items: center;
    padding: 14px 30px;
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ==========================================================================
   Header / Navigation Bar
   ========================================================================== */

.cpm-header {
    background-color: var(--cpm-primary-dark);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.cpm-header__logo img {
    max-height: 65px;
    width: auto;
}

.cpm-header__inner {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: var(--cpm-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.cpm-header__nav {
    display: flex;
    align-items: center;
}

.cpm-header__nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.cpm-header__nav li {
    position: relative;
}

.cpm-header__nav a {
    display: block;
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all var(--cpm-transition);
    white-space: nowrap;
}

.cpm-header__nav a:hover {
    color: var(--cpm-white);
    background-color: rgba(255, 255, 255, 0.1);
}

.cpm-header__nav .current-menu-item > a,
.cpm-header__nav .current_page_item > a {
    color: var(--cpm-white);
    background-color: rgba(0, 0, 0, 0.25);
}

/* Dropdown */
.cpm-header__nav .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--cpm-white);
    box-shadow: var(--cpm-shadow-lg);
    border-radius: 0 0 var(--cpm-radius) var(--cpm-radius);
    min-width: 220px;
    padding: 8px 0;
    z-index: 100;
}

.cpm-header__nav li:hover > .sub-menu {
    display: block;
}

.cpm-header__nav .sub-menu a {
    padding: 10px 20px;
    font-size: 0.8rem;
    color: var(--cpm-text);
}

.cpm-header__nav .sub-menu a:hover {
    color: var(--cpm-primary);
    background-color: var(--cpm-bg-alt);
}

/* Mobile toggle */
.cpm-mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.cpm-mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--cpm-white);
    margin: 5px 0;
    transition: var(--cpm-transition);
}

/* ==========================================================================
   Hero Carousel
   ========================================================================== */

.cpm-carousel {
    position: relative;
    width: 100%;
    height: 550px;
    overflow: hidden;
    background-color: var(--cpm-primary-dark);
}

.cpm-carousel__track {
    position: relative;
    width: 100%;
    height: 100%;
}

.cpm-carousel__slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cpm-carousel__slide.is-active {
    opacity: 1;
    z-index: 1;
}

.cpm-carousel__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(20, 74, 110, 0.75) 0%, rgba(27, 94, 138, 0.55) 100%);
}

.cpm-carousel__content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--cpm-white);
    max-width: 800px;
    padding: 0 30px;
}

.cpm-carousel__content h2 {
    font-family: var(--cpm-font-heading);
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
    color: var(--cpm-white);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.cpm-carousel__content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.cpm-carousel__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: var(--cpm-white);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--cpm-transition);
    backdrop-filter: blur(4px);
}

.cpm-carousel__nav:hover {
    background: var(--cpm-cta);
    border-color: var(--cpm-cta);
}

.cpm-carousel__nav svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.cpm-carousel__nav--prev {
    left: 30px;
}

.cpm-carousel__nav--next {
    right: 30px;
}

.cpm-carousel__dots {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    gap: 10px;
}

.cpm-carousel__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0;
    transition: all var(--cpm-transition);
}

.cpm-carousel__dot.is-active {
    background: var(--cpm-cta);
    border-color: var(--cpm-cta);
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .cpm-carousel {
        height: 400px;
    }
    .cpm-carousel__content h2 {
        font-size: 2rem;
    }
    .cpm-carousel__content p {
        font-size: 1rem;
    }
    .cpm-carousel__nav {
        width: 38px;
        height: 38px;
    }
    .cpm-carousel__nav--prev { left: 15px; }
    .cpm-carousel__nav--next { right: 15px; }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.cpm-hero {
    background: linear-gradient(135deg, var(--cpm-primary) 0%, var(--cpm-primary-dark) 100%);
    color: var(--cpm-white);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.cpm-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.03)" d="M0,160L48,176C96,192,192,224,288,213.3C384,203,480,149,576,144C672,139,768,181,864,197.3C960,213,1056,203,1152,181.3C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"/></svg>') no-repeat bottom center;
    background-size: cover;
}

.cpm-hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.cpm-hero__content h1 {
    font-size: 2.8rem;
    color: var(--cpm-white);
    margin-bottom: 20px;
    line-height: 1.2;
}

.cpm-hero__content p {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 30px;
    line-height: 1.8;
}

.cpm-hero__buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.cpm-hero__image {
    text-align: center;
}

.cpm-hero__image img {
    max-width: 100%;
    border-radius: var(--cpm-radius-lg);
    box-shadow: var(--cpm-shadow-lg);
}

/* ==========================================================================
   Services Grid
   ========================================================================== */

.cpm-section--services {
    padding-top: 140px;
}

.cpm-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 30px;
    row-gap: 120px;
}

.cpm-service-card {
    position: relative;
    background: var(--cpm-white);
    border-radius: var(--cpm-radius-lg);
    padding: 100px 30px 35px;
    text-align: center;
    box-shadow: var(--cpm-shadow);
    transition: all var(--cpm-transition);
    border: 2px solid var(--cpm-primary-light);
    margin-top: 90px;
}

.cpm-service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--cpm-shadow-lg);
    border-color: var(--cpm-primary);
}

.cpm-service-card__image {
    position: absolute;
    top: -90px;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--cpm-primary-light);
    background: var(--cpm-white);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: border-color var(--cpm-transition);
}

.cpm-service-card:hover .cpm-service-card__image {
    border-color: var(--cpm-primary);
}

.cpm-service-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cpm-service-card__body h3 {
    font-size: 1.35rem;
    margin-bottom: 14px;
    color: var(--cpm-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.cpm-service-card__body p {
    color: var(--cpm-text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 22px;
}

.cpm-service-card__link {
    display: inline-block;
    padding: 10px 28px;
    border: 2px solid var(--cpm-primary-light);
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--cpm-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all var(--cpm-transition);
}

.cpm-service-card__link:hover {
    background-color: var(--cpm-primary);
    border-color: var(--cpm-primary);
    color: var(--cpm-white);
}

/* ==========================================================================
   About Preview
   ========================================================================== */

.cpm-about-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.cpm-about-preview__image img {
    border-radius: var(--cpm-radius-lg);
    box-shadow: var(--cpm-shadow-lg);
    width: 100%;
}

.cpm-about-preview__content h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.cpm-about-preview__content p {
    color: var(--cpm-text-light);
    margin-bottom: 15px;
    line-height: 1.8;
}

.cpm-about-preview__credentials {
    display: flex;
    gap: 25px;
    margin: 25px 0 30px;
    padding: 20px 0;
    border-top: 1px solid var(--cpm-border);
    border-bottom: 1px solid var(--cpm-border);
}

.cpm-about-preview__credentials div {
    text-align: center;
}

.cpm-about-preview__credentials strong {
    display: block;
    font-size: 1.5rem;
    color: var(--cpm-primary);
}

.cpm-about-preview__credentials span {
    font-size: 0.85rem;
    color: var(--cpm-text-muted);
}

/* ==========================================================================
   Testimonials
   ========================================================================== */

.cpm-testimonials-slider {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.cpm-testimonial {
    background: var(--cpm-white);
    border-radius: var(--cpm-radius-lg);
    padding: 40px;
    box-shadow: var(--cpm-shadow);
    text-align: center;
    display: none;
}

.cpm-testimonial.active {
    display: block;
}

.cpm-testimonial__quote {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--cpm-text-light);
    font-style: italic;
    margin-bottom: 25px;
    position: relative;
    padding-top: 30px;
}

.cpm-testimonial__quote::before {
    content: '\201C';
    font-size: 4rem;
    color: var(--cpm-accent);
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    line-height: 1;
    font-family: Georgia, serif;
}

.cpm-testimonial__author {
    font-weight: 700;
    color: var(--cpm-text);
}

.cpm-testimonial__title {
    font-size: 0.85rem;
    color: var(--cpm-text-muted);
}

.cpm-testimonials-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.cpm-testimonials-nav button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--cpm-primary);
    background: transparent;
    cursor: pointer;
    transition: var(--cpm-transition);
    padding: 0;
}

.cpm-testimonials-nav button.active {
    background: var(--cpm-primary);
}

.cpm-testimonials-arrows {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.cpm-testimonials-arrows button {
    background: var(--cpm-primary);
    color: var(--cpm-white);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--cpm-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cpm-testimonials-arrows button:hover {
    background: var(--cpm-primary-dark);
}

/* ==========================================================================
   CTA Section
   ========================================================================== */

.cpm-cta {
    text-align: center;
}

.cpm-cta h2 {
    font-size: 2.2rem;
    color: var(--cpm-white);
    margin-bottom: 15px;
}

.cpm-cta p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cpm-cta__buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.cpm-footer {
    background: var(--cpm-text);
    color: rgba(255, 255, 255, 0.8);
    padding: 60px 0 0;
}

.cpm-footer a {
    color: rgba(255, 255, 255, 0.8);
}

.cpm-footer a:hover {
    color: var(--cpm-accent);
}

.cpm-footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 40px;
}

.cpm-footer__heading {
    color: var(--cpm-white);
    font-size: 1.1rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
}

.cpm-footer__heading::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--cpm-accent);
    position: absolute;
    bottom: 0;
    left: 0;
}

.cpm-footer__about p {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.cpm-footer__social {
    display: flex;
    gap: 12px;
}

.cpm-footer__social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--cpm-transition);
}

.cpm-footer__social a:hover {
    background: var(--cpm-primary);
    color: var(--cpm-white);
}

.cpm-footer__social svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.cpm-footer__links ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cpm-footer__links li {
    margin-bottom: 10px;
}

.cpm-footer__links a {
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cpm-footer__links a::before {
    content: '\203A';
    color: var(--cpm-accent);
}

.cpm-footer__hours ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cpm-footer__hours li {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cpm-footer__contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.cpm-footer__contact-item svg {
    width: 18px;
    height: 18px;
    fill: var(--cpm-accent);
    flex-shrink: 0;
    margin-top: 3px;
}

.cpm-footer__map {
    margin-top: 20px;
    border-radius: var(--cpm-radius);
    overflow: hidden;
    height: 150px;
}

.cpm-footer__map iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.cpm-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    margin-top: 40px;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Page Templates
   ========================================================================== */

/* Page Header Banner */
.cpm-page-header {
    background: linear-gradient(135deg, var(--cpm-primary) 0%, var(--cpm-primary-dark) 100%);
    padding: 60px 0;
    text-align: center;
    color: var(--cpm-white);
}

.cpm-page-header h1 {
    color: var(--cpm-white);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.cpm-page-header .cpm-breadcrumb {
    font-size: 0.9rem;
    opacity: 0.8;
}

.cpm-page-header .cpm-breadcrumb a {
    color: var(--cpm-white);
    opacity: 0.8;
}

.cpm-page-header .cpm-breadcrumb a:hover {
    opacity: 1;
}

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

.cpm-page-content__inner {
    max-width: 800px;
    margin: 0 auto;
}

.cpm-page-content h2 {
    font-size: 1.8rem;
    margin: 40px 0 15px;
    color: var(--cpm-primary);
}

.cpm-page-content h3 {
    font-size: 1.4rem;
    margin: 30px 0 12px;
}

.cpm-page-content p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.cpm-page-content ul,
.cpm-page-content ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.cpm-page-content li {
    margin-bottom: 8px;
    line-height: 1.7;
}

/* ==========================================================================
   About Page
   ========================================================================== */

.cpm-about-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 50px;
    align-items: start;
}

.cpm-about-photo {
    position: sticky;
    top: 100px;
}

.cpm-about-photo img {
    width: 100%;
    border-radius: var(--cpm-radius-lg);
    box-shadow: var(--cpm-shadow-lg);
}

.cpm-about-info-card {
    background: var(--cpm-bg-alt);
    border-radius: var(--cpm-radius);
    padding: 25px;
    margin-top: 20px;
}

.cpm-about-info-card h4 {
    color: var(--cpm-primary);
    margin-bottom: 10px;
    font-size: 1rem;
}

.cpm-about-info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cpm-about-info-card li {
    padding: 5px 0;
    font-size: 0.9rem;
    color: var(--cpm-text-light);
}

.cpm-about-text h2 {
    color: var(--cpm-primary);
    margin-bottom: 20px;
}

.cpm-about-text p {
    line-height: 1.9;
    margin-bottom: 18px;
    color: var(--cpm-text-light);
}

/* ==========================================================================
   Contact Page
   ========================================================================== */

.cpm-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.cpm-contact-form label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: var(--cpm-text);
}

.cpm-contact-form input[type="text"],
.cpm-contact-form input[type="email"],
.cpm-contact-form input[type="tel"],
.cpm-contact-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--cpm-border);
    border-radius: var(--cpm-radius);
    font-family: var(--cpm-font-body);
    font-size: 0.95rem;
    margin-bottom: 20px;
    transition: border-color var(--cpm-transition);
    box-sizing: border-box;
}

.cpm-contact-form input:focus,
.cpm-contact-form textarea:focus {
    outline: none;
    border-color: var(--cpm-primary);
    box-shadow: 0 0 0 3px rgba(27, 94, 138, 0.1);
}

.cpm-contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

/* Contact Form 7 paragraph spacing */
.cpm-contact-form .wpcf7-form p {
    margin: 0 0 18px 0;
}

/* Contact Form 7 submit button — match theme primary button */
.cpm-contact-form .wpcf7-submit {
    display: inline-block;
    background-color: var(--cpm-cta);
    color: var(--cpm-white);
    border: none;
    padding: 14px 32px;
    font-family: var(--cpm-font-body);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--cpm-radius);
    cursor: pointer;
    transition: all var(--cpm-transition);
    box-shadow: 0 4px 12px rgba(232, 106, 46, 0.25);
}

.cpm-contact-form .wpcf7-submit:hover {
    background-color: var(--cpm-cta-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(232, 106, 46, 0.35);
}

.cpm-contact-form .wpcf7-submit:active {
    transform: translateY(0);
}

.cpm-contact-form .wpcf7-spinner {
    vertical-align: middle;
    margin-left: 12px;
}

/* CF7 response / validation messages */
.cpm-contact-form .wpcf7-response-output {
    margin: 20px 0 0 0;
    padding: 12px 16px;
    border-radius: var(--cpm-radius);
    font-size: 0.9rem;
}

.cpm-contact-form .wpcf7 form.sent .wpcf7-response-output {
    border-color: var(--cpm-accent);
    background-color: rgba(42, 219, 163, 0.1);
    color: #0f7b5a;
}

.cpm-contact-form .wpcf7 form.invalid .wpcf7-response-output,
.cpm-contact-form .wpcf7 form.failed .wpcf7-response-output {
    border-color: #d9534f;
    background-color: rgba(217, 83, 79, 0.1);
    color: #a02622;
}

.cpm-contact-form .wpcf7-not-valid-tip {
    color: #d9534f;
    font-size: 0.82rem;
    margin-top: -14px;
    margin-bottom: 14px;
    display: block;
}

.cpm-contact-form .wpcf7-form-control.wpcf7-not-valid {
    border-color: #d9534f;
}

.cpm-contact-info-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cpm-contact-card {
    background: var(--cpm-bg-light);
    border-radius: var(--cpm-radius-lg);
    padding: 25px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.cpm-contact-card__icon {
    width: 48px;
    height: 48px;
    background: var(--cpm-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cpm-contact-card__icon svg {
    width: 20px;
    height: 20px;
    fill: var(--cpm-white);
}

.cpm-contact-card h4 {
    margin-bottom: 5px;
    font-size: 1rem;
}

.cpm-contact-card p,
.cpm-contact-card a {
    font-size: 0.9rem;
    color: var(--cpm-text-light);
    margin: 0;
}

.cpm-contact-map {
    margin-top: 20px;
    border-radius: var(--cpm-radius-lg);
    overflow: hidden;
    height: 250px;
    box-shadow: var(--cpm-shadow);
}

.cpm-contact-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* ==========================================================================
   Services Page
   ========================================================================== */

.cpm-services-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.cpm-service-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 25px;
    padding: 30px;
    background: var(--cpm-white);
    border-radius: var(--cpm-radius-lg);
    box-shadow: var(--cpm-shadow);
    border: 1px solid var(--cpm-border);
    transition: var(--cpm-transition);
}

.cpm-service-item:hover {
    border-color: var(--cpm-primary);
    box-shadow: var(--cpm-shadow-lg);
}

.cpm-service-item__icon {
    width: 80px;
    height: 80px;
    background: var(--cpm-bg-alt);
    border-radius: var(--cpm-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cpm-service-item__icon svg {
    width: 36px;
    height: 36px;
    fill: var(--cpm-primary);
}

.cpm-service-item h3 {
    font-size: 1.3rem;
    color: var(--cpm-primary);
    margin-bottom: 10px;
}

.cpm-service-item p {
    color: var(--cpm-text-light);
    line-height: 1.7;
    margin-bottom: 15px;
}

/* ==========================================================================
   WordPress Overrides (Kadence parent)
   ========================================================================== */

.site-header-row-container-inner,
.site-footer-row-container-inner {
    display: none;
}

.wp-site-blocks > header,
.site-header {
    display: none !important;
}

.wp-site-blocks > footer,
.site-footer {
    display: none !important;
}

.entry-content-wrap {
    padding: 0 !important;
    max-width: 100% !important;
}

.site-container .content-wrap {
    max-width: 100%;
    padding: 0;
}

.site {
    margin: 0;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
    .cpm-hero__inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .cpm-hero__buttons {
        justify-content: center;
    }

    .cpm-hero__image {
        display: none;
    }

    .cpm-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cpm-about-preview {
        grid-template-columns: 1fr;
    }

    .cpm-footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cpm-about-grid {
        grid-template-columns: 1fr;
    }

    .cpm-about-photo {
        position: static;
        max-width: 350px;
        margin: 0 auto;
    }

    .cpm-contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --cpm-max-width: 100%;
    }

    .cpm-section {
        padding: 50px 0;
    }

    /* Brand bar: stack logo + book button only */
    .cpm-brand__center {
        display: none;
    }

    .cpm-brand__inner {
        justify-content: space-between;
        gap: 10px;
        padding: 10px 15px;
    }

    .cpm-brand__logo {
        margin-left: 0;
    }

    .cpm-brand__logo img {
        max-height: 48px;
    }

    .cpm-brand__book-btn {
        padding: 10px 18px;
        font-size: 0.8rem;
    }

    /* Nav bar: show hamburger, hide nav until toggled */
    .cpm-header__inner {
        justify-content: flex-start;
        padding: 0 15px;
        min-height: 48px;
    }

    .cpm-header__nav {
        display: none;
    }

    .cpm-header__nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--cpm-primary);
        box-shadow: var(--cpm-shadow-lg);
        padding: 10px 0;
        z-index: 999;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }

    .cpm-header__nav.open ul {
        flex-direction: column;
        width: 100%;
    }

    .cpm-header__nav.open li {
        width: 100%;
    }

    .cpm-header__nav.open a {
        padding: 14px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .cpm-header__nav.open .sub-menu {
        display: block;
        position: static;
        box-shadow: none;
        background: rgba(0, 0, 0, 0.15);
        border-radius: 0;
        padding: 0;
        min-width: 0;
    }

    .cpm-header__nav.open .sub-menu a {
        color: rgba(255, 255, 255, 0.85);
        padding-left: 40px;
        font-size: 0.75rem;
    }

    .cpm-mobile-toggle {
        display: block;
    }

    /* Carousel */
    .cpm-carousel {
        height: 380px;
    }

    .cpm-carousel__content {
        padding: 0 20px;
    }

    .cpm-carousel__content h2 {
        font-size: 1.75rem;
    }

    .cpm-carousel__content p {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

    .cpm-carousel__nav {
        width: 38px;
        height: 38px;
    }

    .cpm-carousel__nav--prev { left: 10px; }
    .cpm-carousel__nav--next { right: 10px; }

    /* Services grid: single column, tighter gaps */
    .cpm-section--services {
        padding-top: 100px;
    }

    .cpm-services-grid {
        grid-template-columns: 1fr;
        gap: 90px 0;
        row-gap: 90px;
    }

    .cpm-service-card {
        padding: 80px 25px 30px;
        margin-top: 75px;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .cpm-service-card__image {
        top: -75px;
        width: 150px;
        height: 150px;
        border-width: 3px;
    }

    .cpm-service-card__body h3 {
        font-size: 1.2rem;
    }

    .cpm-service-card__body p {
        font-size: 0.9rem;
    }

    /* Hero section */
    .cpm-hero {
        padding: 60px 0;
    }

    .cpm-hero__content h1 {
        font-size: 2rem;
    }

    .cpm-hero__content p {
        font-size: 1rem;
    }

    .cpm-hero__image {
        display: none;
    }

    /* Section titles */
    .cpm-section-title h2 {
        font-size: 1.8rem;
    }

    .cpm-section-title p {
        font-size: 0.95rem;
    }

    /* Footer */
    .cpm-footer__grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .cpm-footer__column {
        text-align: center;
    }

    /* About preview (homepage) */
    .cpm-about-preview {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .cpm-about-preview__image img {
        max-width: 100%;
        height: auto;
    }

    /* About page */
    .cpm-about-grid {
        grid-template-columns: 1fr;
    }

    .cpm-about-photo {
        position: static;
        max-width: 300px;
        margin: 0 auto;
    }

    /* Service items on pages */
    .cpm-service-item {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .cpm-service-item__icon {
        margin: 0 auto;
    }

    .cpm-page-header h1 {
        font-size: 1.8rem;
    }

    .cpm-about-preview__credentials {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }

    /* Contact page */
    .cpm-contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Testimonials */
    .cpm-testimonial__quote {
        font-size: 1rem;
        padding: 0 20px;
    }

    /* CTA section */
    .cpm-cta h2 {
        font-size: 1.75rem;
    }

    .cpm-cta__buttons {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .cpm-cta__buttons .cpm-btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }

    /* Container padding */
    .cpm-container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 480px) {
    .cpm-brand__inner {
        padding: 8px 12px;
    }

    .cpm-brand__logo img {
        max-height: 40px;
    }

    .cpm-brand__book-btn {
        padding: 8px 14px;
        font-size: 0.72rem;
    }

    .cpm-carousel {
        height: 320px;
    }

    .cpm-carousel__content h2 {
        font-size: 1.4rem;
    }

    .cpm-carousel__content p {
        font-size: 0.85rem;
    }

    .cpm-hero__content h1 {
        font-size: 1.6rem;
    }

    .cpm-hero__buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .cpm-hero__buttons .cpm-btn {
        width: 100%;
        text-align: center;
    }

    .cpm-section-title h2 {
        font-size: 1.5rem;
    }

    .cpm-service-card__image {
        width: 130px;
        height: 130px;
        top: -65px;
    }

    .cpm-service-card {
        margin-top: 65px;
        padding: 70px 20px 25px;
    }

    .cpm-section--services {
        padding-top: 90px;
    }
}
