/*
Theme Name: Elevate Pest Control
Theme URI: https://example.com/elevate-pest-theme
Author: Elevate Pest Theme
Author URI: https://example.com
Description: A professional, Elementor-ready WordPress theme for pest control and service businesses. Works with any WordPress site and Elementor page builder out of the box. Easy to install and customize.
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: elevate-pest-theme
Tags: custom-logo, custom-menu, featured-images, footer-widgets, full-width-template, theme-options, threaded-comments, translation-ready, block-styles, wide-blocks, elementor, one-column, two-columns, right-sidebar, flexible-header, accessibility-ready, custom-colors, custom-background

Elevate Pest Control - Professional pest control theme. Elementor compatible.
*/

/* ==========================================================================
   Design tokens (match original template)
   ========================================================================== */
:root {
	--color-primary: #2D5F3F;
	--color-primary-rgb: 45, 95, 63;
	--color-secondary: #D4AF37;
	--color-secondary-rgb: 212, 175, 55;
	--color-accent: #3A7D5C;
	--color-accent-rgb: 58, 125, 92;
	--font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
	--container-max: 80rem;
	--transition-default: 0.3s ease;
}

/* ==========================================================================
   Base
   ========================================================================== */
*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	font-family: var(--font-primary);
	background: linear-gradient(to bottom right, #f9fafb, #f3f4f6);
	color: #374151;
	line-height: 1.6;
	margin: 0;
	padding: 0;
}

::-webkit-scrollbar {
	display: none;
}

body.hide-scrollbar {
	scrollbar-width: none;
}

/* ==========================================================================
   Layout - Elementor content area
   ========================================================================== */
.site-main {
	min-height: 40vh;
	opacity: 1;
	transition: opacity 0.2s ease-out;
}

#header.site-header {
	transition: opacity 0.2s ease-out;
}

/* Prevent flash of unstyled content: hide header and main until Tailwind has applied */
body.elevate-loading .site-main,
body.elevate-loading #header {
	opacity: 0;
	pointer-events: none;
}

/* Full-bleed front page and demo content: no padding so hero/sections aren't cut off */
.elevate-main.elevate-front-page .elevate-article-full-bleed,
.elevate-main .elevate-article-full-bleed,
.home .site-main .elevate-article-full-bleed {
	max-width: none;
	padding: 0;
	margin: 0;
}

.elevate-entry-content-full,
.home .site-main .entry-content.elevate-entry-content-full {
	max-width: none;
	width: 100%;
	padding: 0;
	margin: 0;
	overflow: visible;
}

.home .site-main {
	padding: 0;
	margin: -23px;
	overflow: visible;
}

/* No gap between header and hero: first section flush under nav (home + inside pages) */
.home .site-main .elevate-article-full-bleed .entry-content > section:first-child,
.page .site-main .elevate-article-full-bleed .entry-content > section:first-child,
.home .site-main .elevate-article-full-bleed .entry-content > *:first-child,
.page .site-main .elevate-article-full-bleed .entry-content > *:first-child {
	margin-top: 0;
	padding-top: 0;
}

/* No top padding on article so hero/content starts right under header */
.home .site-main .elevate-article-full-bleed,
.page .site-main .elevate-article-full-bleed {
	padding-top: 0 !important;
	margin-top: 0 !important;
}

/* Entry content: zero top space so first element (hero) touches header */
.home .site-main .entry-content,
.page .site-main .entry-content {
	padding-top: 0 !important;
	margin-top: 0 !important;
}

.site-header,
#header.site-header {
	margin-bottom: 0;
	padding-bottom: 0;
	box-shadow: none;
}

/* Eliminate any gap between header and main: pull main flush under header */
.site-main,
#main.site-main,
main.site-main {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

#header + main,
#header + .site-main,
.site-header + main,
.site-header + #main {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

/* Sticky header: stay on top when scrolling and never get cut off */
.site-header,
#header.site-header {
	position: sticky;
	top: 0;
	z-index: 9999;
	will-change: transform;
}

/* When WordPress admin bar is visible (logged in), stick header below it */
body.admin-bar .site-header,
body.admin-bar #header.site-header {
	top: 32px;
	margin-bottom: -20px;
}
@media screen and (max-width: 782px) {
	body.admin-bar .site-header,
	body.admin-bar #header.site-header {
		top: 46px;
		margin-bottom: -20px;
	}
}

/* Prevent any parent from clipping the sticky header */
body {
	overflow-x: visible;
}

/* Hero and full-width sections: size to content so bottom never overlaps next section */
#hero-section,
section[id*="hero"],
#products-hero,
#commercial-hero,
#logan-hero {
	min-height: 980px;
	position: relative;
	overflow: visible;
	width: 100%;
	box-sizing: border-box;
	display: block;
}

#hero-section .absolute.inset-0 {
	overflow: hidden;
}

/* Hero: no top gap under nav; bottom padding so section contains all content and doesn't overlap next */
#hero-section {
	padding-top: 0;
	margin-top: 0;
	padding-bottom: 5rem;
}

#products-hero { min-height: 480px; }
#logan-hero { min-height: 750px; }

.elevate-page-content {
	max-width: var(--container-max);
	margin-left: auto;
	margin-right: auto;
	padding-left: 2rem;
	padding-right: 2rem;
}

/* All inside pages (pages + posts): 100% width, full bleed */
.page .site-main,
.single .site-main,
.archive .site-main,
.search .site-main {
	max-width: none;
	width: 100%;
	padding: 0;
	margin: 0;
	overflow: visible;
}

.page .site-main .elevate-page-content,
.single .site-main .elevate-page-content,
.page .elevate-article-full-bleed,
.single .elevate-article-full-bleed {
	max-width: none;
	width: 100%;
	padding-left: 0;
	padding-right: 0;
	margin: 0;
}

.page .site-main .entry-content,
.single .site-main .entry-content,
.page .elevate-entry-content-full,
.single .elevate-entry-content-full {
	max-width: none;
	width: 100%;
}

/* Inside pages: always hide the entry title (page/post heading) */
.page .entry-title,
.page .entry-header,
.single .entry-title,
.single .entry-header {
	display: none !important;
}

/* Full-width template: no inner container constraint */
.elevate-full-width .site-main,
.site-main.elevate-full-width {
	max-width: none;
	width: 100%;
	padding: 0;
}

.elevate-full-width .entry-content,
.elevate-full-width .max-w-7xl {
	max-width: none;
	width: 100%;
	padding-left: 1rem;
	padding-right: 1rem;
}

/* ==========================================================================
   Utility classes for theme
   ========================================================================== */
.elevate-btn-primary {
	background: var(--color-primary);
	color: #fff !important;
	padding: 0.75rem 1.5rem;
	border-radius: 9999px;
	font-weight: 600;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	transition: background var(--transition-default), transform var(--transition-default);
	border: none;
	cursor: pointer;
}

.elevate-btn-primary:hover {
	background: var(--color-accent);
	color: #fff !important;
	transform: translateY(-1px);
}

.elevate-btn-secondary {
	background: linear-gradient(to right, var(--color-secondary), #eab308);
	color: #fff !important;
	padding: 0.75rem 1.5rem;
	border-radius: 9999px;
	font-weight: 700;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	transition: transform var(--transition-default), box-shadow var(--transition-default);
	border: none;
	cursor: pointer;
}

.elevate-btn-secondary:hover {
	color: #fff !important;
	transform: scale(1.05);
	box-shadow: 0 10px 40px rgba(var(--color-secondary-rgb), 0.5);
}

/* ==========================================================================
   Elementor compatibility - 100% full-width and no clipping
   ========================================================================== */
.elementor-page .site-header,
.elementor-page .site-footer {
	position: relative;
}

/* Elementor content area: full width, no padding, no overflow clip so stretched sections work */
.elementor-page .site-main,
.elevate-elementor-page .site-main,
.site-main.elevate-elementor-main {
	max-width: none;
	width: 100%;
	padding: 0;
	margin: 0;
	overflow: visible;
}

body.elementor-page,
body.elevate-elementor-page {
	overflow-x: visible;
}

/* Elementor boxed container: match theme width */
.elementor-section.elementor-section-boxed > .elementor-container {
	max-width: var(--container-max);
}

/* Elementor full-width sections: allow stretch (theme must not clip) */
.elementor-section.elementor-section-stretched {
	max-width: 100vw;
}

/* Ensure theme colors available to Elementor */
.elementor-widget-heading .elementor-heading-title { font-family: var(--font-primary); }
.elementor-button.elementor-size-md { border-radius: 9999px; }
