/**
 * Cedar Park Chiropractic Relief — Custom Styles
 * Companion to theme.json for component-level styling
 */

/* ============================================
   GLOBAL
   ============================================ */
html {
	scroll-behavior: smooth;
}

/* Global heading colors — force navy on all section headings */
h2, h2.wp-block-heading {
	color: #1a158a !important;
	font-family: Georgia, 'Times New Roman', serif !important;
}

/* h3 defaults to navy and sans-serif */
h3, h3.wp-block-heading {
	color: #1a158a !important;
	font-family: 'Segoe UI', system-ui, -apple-system, sans-serif !important;
	font-weight: 600 !important;
}

/* h3s with body font class or inside cards/intake — sans-serif */
h3.has-body-font-family,
.cpcr-service-card h3,
.cpcr-intake-card h3,
.step-card h3 {
	font-family: 'Segoe UI', system-ui, -apple-system, sans-serif !important;
}

/* Global body text defaults */
body, p {
	font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ============================================
   HEADER
   ============================================ */
.cpcr-header {
	z-index: 100;
	height: 72px;
}

.cpcr-nav-phone a {
	text-decoration: none;
	color: inherit;
}

/* Navigation dropdown styling */
.wp-block-navigation-submenu .wp-block-navigation__submenu-container,
.wp-block-navigation .wp-block-navigation__submenu-container {
	background: #ffffff !important;
	border: 1px solid #f2efe9 !important;
	border-radius: 12px !important;
	padding: 0.5rem 0 !important;
	min-width: 260px !important;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1) !important;
	gap: 0 !important;
	overflow: hidden !important;
}

.wp-block-navigation__submenu-container .wp-block-navigation-item {
	margin: 0 !important;
	padding: 0 !important;
}

.wp-block-navigation__submenu-container .wp-block-navigation-item__content,
.wp-block-navigation__submenu-container .wp-block-navigation-item a {
	display: block !important;
	padding: 0.55rem 1.25rem !important;
	font-size: 14px !important;
	color: #444444 !important;
	line-height: 1.4 !important;
	transition: background 0.15s, color 0.15s !important;
}

.wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover,
.wp-block-navigation__submenu-container .wp-block-navigation-item a:hover {
	background: #edf7ee !important;
	color: #1a158a !important;
}

/* "View All Services" green link at bottom of dropdown */
.wp-block-navigation__submenu-container .wp-block-navigation-item:last-child {
	border-top: 1px solid #f2efe9 !important;
	margin-top: 0.35rem !important;
	padding-top: 0.35rem !important;
}

.wp-block-navigation__submenu-container .wp-block-navigation-item:last-child a {
	font-weight: 600 !important;
	color: #36b346 !important;
	font-size: 13px !important;
}

/* Hide phone + book btn overflow on smaller nav */
@media (max-width: 768px) {
	.cpcr-nav-right .cpcr-nav-phone,
	.cpcr-nav-right .cpcr-btn-book {
		display: none;
	}
}

/* ============================================
   BACKGROUND IMAGE OVERLAY SYSTEM
   ============================================
   Usage: Add .cpcr-bg-overlay to any section, then
   use a modifier class to set the specific image.

   TO SWAP IMAGES: Replace the url() paths below with
   your own photos. Recommended sizes:
     - Hero: 1920x900px
     - Testimonials: 1920x800px
     - CTA: 1920x700px
   Use JPEG at 80% quality for best size/quality balance.
   ============================================ */
.cpcr-bg-overlay {
	position: relative;
	overflow: hidden;
	background-color: var(--wp--preset--color--navy);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.cpcr-bg-overlay::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
}

.cpcr-bg-overlay > * {
	position: relative;
	z-index: 2;
}

/* --- Hero: Navy overlay at 75% opacity --- */
.cpcr-bg-overlay--hero {
	background-image: url('../images/hero-bg.jpg');
}

.cpcr-bg-overlay--hero::before {
	background: linear-gradient(
		180deg,
		rgba(19, 15, 107, 0.82) 0%,
		rgba(26, 21, 138, 0.75) 50%,
		rgba(19, 15, 107, 0.88) 100%
	);
}

/* --- Testimonials: Deeper navy overlay --- */
.cpcr-bg-overlay--testimonials {
	background-image: url('../images/testimonials-bg.jpg');
}

.cpcr-bg-overlay--testimonials::before {
	background: linear-gradient(
		180deg,
		rgba(19, 15, 107, 0.88) 0%,
		rgba(26, 21, 138, 0.82) 50%,
		rgba(19, 15, 107, 0.90) 100%
	);
}

/* --- Services Hero: Navy overlay over cta-bg photo --- */
.cpcr-bg-overlay--services-hero {
	background-image: url('../images/cta-bg.jpg');
	background-position: center 50%;
}

.cpcr-bg-overlay--services-hero::before {
	background: linear-gradient(
		180deg,
		rgba(19, 15, 107, 0.85) 0%,
		rgba(26, 21, 138, 0.78) 50%,
		rgba(19, 15, 107, 0.88) 100%
	);
}

/* --- CTA Band: Warm overlay with slight green tint --- */
.cpcr-bg-overlay--cta {
	background-image: url('../images/services-hero-bg.jpg');
	background-color: var(--wp--preset--color--warm-mid);
	background-position: center 75%;
}

.cpcr-bg-overlay--cta::before {
	background: linear-gradient(
		180deg,
		rgba(242, 239, 233, 0.88) 0%,
		rgba(250, 249, 247, 0.85) 50%,
		rgba(242, 239, 233, 0.90) 100%
	);
}

/* ============================================
   HERO
   ============================================ */
.cpcr-hero {
	position: relative;
	overflow: hidden;
}

.cpcr-hero-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: rgba(255, 255, 255, 0.8) !important;
	padding: 6px 16px;
	border-radius: 30px;
}

/* Center the eyebrow pill — override WordPress alignment */
.cpcr-hero p.cpcr-hero-eyebrow,
.cpcr-hero .cpcr-hero-eyebrow,
.cpcr-hero-eyebrow.has-text-align-center,
p.cpcr-hero-eyebrow {
	width: fit-content !important;
	max-width: fit-content !important;
	margin-left: auto !important;
	margin-right: auto !important;
	display: inline-flex !important;
}

/* Make the parent group center its children */
.cpcr-hero .wp-block-group {
	text-align: center !important;
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
}

.cpcr-hero-eyebrow strong {
	color: #36b346 !important;
}

/* Force hero text colors */
.cpcr-hero h1,
.cpcr-hero .wp-block-heading {
	color: #ffffff !important;
}

.cpcr-hero h1 em {
	color: #36b346 !important;
}

.cpcr-hero p:not(.cpcr-hero-eyebrow) {
	color: rgba(255, 255, 255, 0.65) !important;
}

/* Force page hero text colors (about, services, contact, etc.) */
.cpcr-page-hero h1,
.cpcr-page-hero .wp-block-heading,
.cpcr-page-hero .wp-block-post-title,
.cpcr-page-hero .wp-block-query-title {
	color: #ffffff !important;
}

.cpcr-page-hero p {
	color: rgba(255, 255, 255, 0.65) !important;
}

/* Testimonials section text */
.cpcr-testimonials-section h2,
.cpcr-testimonials-section .wp-block-heading {
	color: #ffffff !important;
}

/* Outline button on hero */
.cpcr-btn-outline .wp-block-button__link,
.cpcr-hero .is-style-outline .wp-block-button__link,
.is-style-outline.cpcr-btn-outline .wp-block-button__link {
	background: transparent !important;
	border: 1.5px solid rgba(255, 255, 255, 0.3) !important;
	color: #ffffff !important;
}

.cpcr-btn-outline .wp-block-button__link:hover,
.cpcr-hero .is-style-outline .wp-block-button__link:hover {
	border-color: rgba(255, 255, 255, 0.7) !important;
}

/* ============================================
   TRUST BAR
   ============================================ */
.cpcr-trust-bar {
	gap: 0;
}

.cpcr-trust-divider {
	width: 1px !important;
	background: var(--wp--preset--color--warm-mid);
	border: none;
	opacity: 1;
}

@media (max-width: 768px) {
	.cpcr-trust-bar {
		gap: 2rem;
	}

	.cpcr-trust-divider {
		display: none;
	}
}

/* ============================================
   SERVICE CARDS
   ============================================ */
a.cpcr-service-card,
.cpcr-service-card {
	background: var(--wp--preset--color--warm);
	border: 1px solid var(--wp--preset--color--warm-mid);
	border-radius: 14px;
	padding: 1.75rem;
	transition: border-color 0.2s, background 0.2s;
	text-decoration: none;
	color: inherit;
	display: block;
	cursor: pointer;
}

.cpcr-service-card:hover {
	border-color: rgba(54, 179, 70, 0.4);
	background: var(--wp--preset--color--green-light);
}

/* Service card inner elements — explicit colors for wp:html blocks */
.cpcr-service-num {
	color: rgba(26, 21, 138, 0.15) !important;
	font-family: Georgia, 'Times New Roman', serif;
	font-size: 2rem;
	font-weight: 400;
	line-height: 1;
	margin-bottom: 0.75rem;
}

.cpcr-service-card h3,
.cpcr-service-card .wp-block-heading,
.wp-block-column.cpcr-service-card h3,
.wp-block-column.cpcr-service-card .wp-block-heading {
	color: #1a158a !important;
	font-size: 1.05rem !important;
	font-weight: 600 !important;
	font-family: 'Segoe UI', system-ui, -apple-system, sans-serif !important;
	margin-bottom: 0.5rem;
	line-height: 1.3 !important;
}

.cpcr-service-card p:not(.cpcr-service-num):not(.cpcr-card-link) {
	color: #5f6368 !important;
	font-size: 14px;
	line-height: 1.6;
	font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.cpcr-card-link,
.cpcr-card-link a,
.cpcr-service-card .card-link {
	color: #36b346 !important;
	font-size: 13px;
	font-weight: 600;
}

/* Force preset color classes */
.has-navy-color { color: #1a158a !important; }
.has-green-color { color: #36b346 !important; }
.has-text-muted-color { color: #5f6368 !important; }
.has-navy-background-color { background-color: #1a158a !important; }
.has-green-background-color { background-color: #36b346 !important; }
.has-white-background-color { background-color: #ffffff !important; }
.has-warm-background-color { background-color: #faf9f7 !important; }
.has-warm-mid-background-color { background-color: #f2efe9 !important; }
.has-green-light-background-color { background-color: #edf7ee !important; }

/* ============================================
   CONDITIONS PILLS
   ============================================ */
.cpcr-condition-pill {
	background: #ffffff;
	border: 1px solid #e8eaed;
	border-radius: 30px;
	padding: 8px 20px;
	font-size: 14px;
	color: #1a158a;
	font-weight: 500;
	font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	transition: border-color 0.2s, background 0.2s;
	margin: 0;
}

.cpcr-condition-pill::before {
	content: '';
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--wp--preset--color--green);
	flex-shrink: 0;
}

.cpcr-condition-pill:hover {
	border-color: var(--wp--preset--color--green);
	background: var(--wp--preset--color--green-light);
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.cpcr-about-img-wrap {
	position: relative;
}

.cpcr-about-img img {
	border-radius: 16px;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	width: 100%;
	height: auto;
}

.cpcr-about-badge {
	position: absolute;
	bottom: -1rem;
	right: -1rem;
	box-shadow: 0 4px 20px rgba(54, 179, 70, 0.3);
}

/* Credentials list */
.cpcr-creds {
	list-style: none;
	padding-left: 0;
}

.cpcr-creds li {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	color: var(--wp--preset--color--gray-700);
	padding: 0.3rem 0;
}

.cpcr-creds li::before {
	content: '';
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--wp--preset--color--green);
	flex-shrink: 0;
}

@media (max-width: 768px) {
	.cpcr-about-img-col {
		flex-basis: 100% !important;
	}

	.cpcr-about-badge {
		right: 0;
	}
}

/* ============================================
   TESTIMONIALS
   ============================================ */
.cpcr-testimonial-card {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 14px;
	padding: 1.75rem;
}

.cpcr-testimonial-card .wp-block-quote,
.cpcr-testimonial-card blockquote {
	border-left: none;
	padding-left: 0;
	margin: 0 0 1.25rem 0;
	background: transparent;
}

.cpcr-testimonial-card .wp-block-quote p,
.cpcr-testimonial-card blockquote p,
.cpcr-testimonial-card blockquote {
	color: rgba(255, 255, 255, 0.8) !important;
	background: transparent !important;
}

/* Stars */
.cpcr-stars {
	color: #f4b400 !important;
	font-size: 14px;
	letter-spacing: 3px;
	margin-bottom: 1rem;
	text-transform: none !important;
	font-style: normal !important;
}

/* Section labels */
.cpcr-section-label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #36b346 !important;
	font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
	margin-bottom: 0.6rem;
}

/* Testimonials section label override */
.cpcr-testimonials-section .cpcr-section-label,
.cpcr-testimonials-section > .section-label,
.cpcr-testimonials-section p:first-child {
	color: #6ed67c !important;
}

/* Testimonial blockquote text — NOT uppercase, white, italic */
.cpcr-testimonial-card blockquote,
.cpcr-testimonial-card blockquote p,
.cpcr-testimonial-card .wp-block-quote,
.cpcr-testimonial-card .wp-block-quote p {
	color: rgba(255, 255, 255, 0.8) !important;
	font-style: italic !important;
	font-size: 15px !important;
	line-height: 1.7 !important;
	text-transform: none !important;
	font-weight: normal !important;
	letter-spacing: normal !important;
	background: transparent !important;
}

/* Testimonial author names — green, uppercase, bold */
.cpcr-testimonial-card .has-green-color,
.cpcr-testimonial-card p.has-green-color {
	color: #36b346 !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	letter-spacing: 0.04em !important;
	text-transform: uppercase !important;
	font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
	font-style: normal !important;
}

/* ============================================
   FOOTER
   ============================================ */
.cpcr-footer {
	font-size: 13px;
}

.cpcr-footer-review a:hover {
	border-color: rgba(255, 255, 255, 0.3) !important;
	color: #fff !important;
}

/* ============================================
   BLOG / SINGLE POST
   ============================================ */
.cpcr-post-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--warm-mid);
	border-radius: 14px;
	overflow: hidden;
	transition: border-color 0.2s;
}

.cpcr-post-card:hover {
	border-color: rgba(54, 179, 70, 0.4);
}

.cpcr-post-meta {
	font-size: 13px;
	color: var(--wp--preset--color--text-muted);
}

/* ============================================
   PAGE TEMPLATES
   ============================================ */
.cpcr-page-hero {
	position: relative;
	overflow: hidden;
}

/* Green circle removed — conflicts with cpcr-bg-overlay::before
   which needs the full ::before pseudo-element for the overlay gradient. */

/* Blog single post — hero meta (date, author) */
.cpcr-page-hero .wp-block-post-date,
.cpcr-page-hero .wp-block-post-author-name {
	color: rgba(255, 255, 255, 0.65) !important;
}

/* Blog single post — body content spacing & typography */
.wp-block-post-content h2 {
	margin-top: 2.5rem;
	margin-bottom: 0.75rem;
}

.wp-block-post-content h3 {
	margin-top: 2rem;
	margin-bottom: 0.5rem;
}

.wp-block-post-content p {
	margin-bottom: 1.25rem;
	line-height: 1.8;
	color: var(--wp--preset--color--gray-700);
}

.wp-block-post-content ul,
.wp-block-post-content ol {
	margin-bottom: 1.25rem;
	padding-left: 1.5rem;
}

.wp-block-post-content li {
	margin-bottom: 0.4rem;
	line-height: 1.7;
	color: var(--wp--preset--color--gray-700);
}

/* Step number circles (new patient page) */
.cpcr-step-num {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--wp--preset--color--navy);
	color: #ffffff;
	font-size: 1.1rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 1.25rem;
	font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.step-card {
	background: var(--wp--preset--color--warm);
	border: 1px solid var(--wp--preset--color--warm-mid);
	border-radius: 14px;
	padding: 2rem;
	text-align: center;
}

/* Checklist (green checkmarks) */
.cpcr-checklist {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.cpcr-checklist li {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-size: 14px;
	color: var(--wp--preset--color--gray-700);
	font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.cpcr-checklist li::before {
	content: '';
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background-color: var(--wp--preset--color--green-light);
	background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%2336b346%22%20stroke-width%3D%223%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M20%206L9%2017l-5-5%22%2F%3E%3C%2Fsvg%3E");
	background-repeat: no-repeat;
	background-position: center;
	flex-shrink: 0;
}

/* Benefit cards (service sub-pages) */
.cpcr-benefit-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--warm-mid);
	border-radius: 14px;
	padding: 1.75rem;
	text-align: center;
}

.cpcr-benefit-icon {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: var(--wp--preset--color--green-light);
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 1rem;
	font-size: 1.3rem;
}

.cpcr-benefit-card h3,
.cpcr-benefit-card .wp-block-heading {
	font-size: 1rem !important;
	font-weight: 600 !important;
	color: var(--wp--preset--color--navy) !important;
	margin-bottom: 0.4rem;
	font-family: 'Segoe UI', system-ui, -apple-system, sans-serif !important;
}

.cpcr-benefit-card p {
	font-size: 13px !important;
	color: var(--wp--preset--color--text-muted) !important;
	line-height: 1.6;
}

/* FAQ Accordion */
.cpcr-faq-item summary {
	font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
	transition: color 0.2s;
}

.cpcr-faq-item summary:hover {
	color: var(--wp--preset--color--green);
}

.cpcr-faq-item summary::-webkit-details-marker {
	display: none;
}

.cpcr-faq-item summary::after {
	content: '+' !important;
	font-size: 1.4rem !important;
	font-weight: 300 !important;
	color: #36b346 !important;
	flex-shrink: 0 !important;
	margin-left: 1rem !important;
}

.cpcr-faq-item[open] summary::after {
	content: '\2212' !important;
}

/* Contact form styling (WPForms) */
.wpforms-container input[type="text"],
.wpforms-container input[type="email"],
.wpforms-container input[type="tel"],
.wpforms-container textarea,
.wpforms-container select {
	border: 1px solid var(--wp--preset--color--gray-200) !important;
	border-radius: 8px !important;
	padding: 12px 14px !important;
	font-size: 14px !important;
	font-family: 'Segoe UI', system-ui, -apple-system, sans-serif !important;
	background: var(--wp--preset--color--white) !important;
	transition: border-color 0.2s !important;
}

.wpforms-container input:focus,
.wpforms-container textarea:focus,
.wpforms-container select:focus {
	border-color: var(--wp--preset--color--green) !important;
	outline: none !important;
}

.wpforms-container .wpforms-field-label {
	font-size: 14px !important;
	font-weight: 600 !important;
	color: var(--wp--preset--color--navy) !important;
	font-family: 'Segoe UI', system-ui, -apple-system, sans-serif !important;
}

.wpforms-container .wpforms-field-sublabel {
	font-size: 12px !important;
	color: var(--wp--preset--color--text-muted) !important;
}

.wpforms-container button[type="submit"],
.wpforms-container .wpforms-submit {
	background: var(--wp--preset--color--green) !important;
	color: #ffffff !important;
	border: none !important;
	border-radius: 30px !important;
	padding: 13px 30px !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	font-family: 'Segoe UI', system-ui, -apple-system, sans-serif !important;
	cursor: pointer !important;
	transition: background 0.2s !important;
}

.wpforms-container button[type="submit"]:hover,
.wpforms-container .wpforms-submit:hover {
	background: var(--wp--preset--color--green-dark) !important;
}

/* Google Map embed */
.cpcr-map-embed iframe {
	width: 100%;
	height: 400px;
	border: none;
	border-radius: 14px;
}

/* Intake forms section */
.cpcr-intake-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--warm-mid);
	border-radius: 14px;
	padding: 2rem;
	transition: border-color 0.2s;
}

.cpcr-intake-card:hover {
	border-color: rgba(54, 179, 70, 0.4);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
	.cpcr-hero {
		padding-top: 60px !important;
		padding-bottom: 60px !important;
	}

	.cpcr-services-section,
	.cpcr-about-section,
	.cpcr-testimonials-section {
		padding-top: 60px !important;
		padding-bottom: 60px !important;
	}

	.cpcr-contact-strip {
		flex-direction: column;
		align-items: center;
		gap: 1.5rem;
	}
}
