/**
 * CDental child theme – global polish (all pages)
 * Single source of truth: design tokens, then base typography, header/footer, single/archive, forms, comments.
 * Breakpoints: 576px (sm), 768px (md), 992px (lg).
 */

/* ==========================================================================
   Design tokens – single source of truth for all pages
   ========================================================================== */
:root {
	/* Spacing scale */
	--cdental-space-1: 0.25rem;
	--cdental-space-2: 0.5rem;
	--cdental-space-3: 1rem;
	--cdental-space-4: 1.5rem;
	--cdental-space-5: 2rem;
	--cdental-space-6: 2.5rem;
	--cdental-space-7: 3rem;
	--cdental-space-8: 4rem;
	/* Layout widths – 넉넉한 캔버스, 본문은 가독 줄길이로 */
	--cdental-content-narrow: 48rem;   /* 768px – 404, search, CTA 영역 */
	--cdental-content: 56rem;         /* 896px – single, archive, comments 컨테이너 */
	--cdental-prose: 65ch;            /* 본문만 읽기 좋은 줄 길이 */
	--cdental-container: 75rem;       /* 1200px – header, footer */
	/* Radius & shadow */
	--cdental-radius: 6px;
	--cdental-radius-sm: 4px;
	--cdental-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	--cdental-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
	/* Colors */
	--cdental-text: #1a1a1a;
	--cdental-text-muted: #55595c;
	--cdental-border: rgba(0, 0, 0, 0.1);
	--cdental-bg: #ffffff;
	--cdental-menu-bg: rgb(235, 236, 228); /* off-white menu panel */
	--cdental-accent-pink: rgb(254, 174, 181);
	/* Typography */
	--cdental-font-size-body: 1rem;
	--cdental-font-size-lead: 1.0625rem;
	--cdental-font-size-label: 0.8125rem;
	--cdental-font-size-ui: 0.9375rem;
	--cdental-line-height-tight: 1.25;
	--cdental-line-height-body: 1.65;
	--cdental-line-height-relaxed: 1.7;
	--cdental-transition: 0.2s ease;
}

/* ==========================================================================
   Base: body, typography, links, selection
   ========================================================================== */
body {
	font-size: var(--cdental-font-size-body);
	line-height: 1.6;
	color: var(--cdental-text);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

html {
	scroll-behavior: smooth;
}

/* Headings when not overridden by Elementor */
body:not([class*="elementor-page-"]) .site-main h1,
body:not([class*="elementor-page-"]) .site-main h2,
body:not([class*="elementor-page-"]) .site-main h3,
body:not([class*="elementor-page-"]) .site-main h4,
body:not([class*="elementor-page-"]) .site-main h5,
body:not([class*="elementor-page-"]) .site-main h6 {
	line-height: 1.3;
	letter-spacing: -0.01em;
	color: var(--cdental-text);
}

body:not([class*="elementor-page-"]) .site-main h1 { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 600; }
body:not([class*="elementor-page-"]) .site-main h2 { font-size: 1.5rem; font-weight: 600; }
body:not([class*="elementor-page-"]) .site-main h3 { font-size: 1.25rem; font-weight: 600; }
body:not([class*="elementor-page-"]) .site-main h4 { font-size: 1.125rem; font-weight: 600; }
body:not([class*="elementor-page-"]) .site-main h5 { font-size: 1rem; font-weight: 600; }
body:not([class*="elementor-page-"]) .site-main h6 { font-size: 0.9375rem; font-weight: 600; }

a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
	opacity: 0.85;
}

::selection {
	background-color: rgba(0, 0, 0, 0.12);
	color: var(--cdental-text);
}

/* ==========================================================================
   Site header & footer
   ========================================================================== */
.site-header .header-inner {
	padding-inline: var(--cdental-space-4);
	max-width: var(--cdental-container);
	margin-inline: auto;
}

.site-header {
	padding-block: var(--cdental-space-4);
	border-block-end: 1px solid var(--cdental-border);
}

.site-header .site-title a,
.site-header .site-description {
	color: var(--cdental-text);
}

.site-header .site-title {
	font-size: clamp(1.25rem, 2.5vw, 1.5rem);
	font-weight: 600;
	letter-spacing: -0.02em;
}

.site-navigation .menu li a {
	padding: var(--cdental-space-2) var(--cdental-space-3);
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	font-size: var(--cdental-font-size-ui);
	transition: color var(--cdental-transition), background-color var(--cdental-transition);
}

.site-navigation .menu li ul {
	border-radius: var(--cdental-radius-sm);
	box-shadow: var(--cdental-shadow-md);
	border: 1px solid var(--cdental-border);
	padding-block: var(--cdental-space-1);
}

.site-navigation .menu li ul li a {
	padding: var(--cdental-space-2) var(--cdental-space-3);
}

/* Services dropdown: section headers (Preventive Care, Comprehensive Care, Cosmetic Dentistry) */
.site-navigation .menu li ul li.cdental-menu-section > a {
	font-weight: 600;
	color: var(--cdental-text);
	padding-block: var(--cdental-space-2);
	border-block-end: 1px solid var(--cdental-border);
	margin-block-end: var(--cdental-space-1);
}
.site-navigation .menu li ul li.cdental-menu-section:last-child > a {
	border-block-end: none;
	margin-block-end: 0;
}

/* Elementor header: show Services submenu (injected by theme) */
.elementor-nav-menu--main .elementor-nav-menu li.menu-item-has-children > .sub-menu,
.elementor-nav-menu--main .elementor-nav-menu li.menu-item-has-children > .elementor-nav-menu--dropdown,
.elementor-nav-menu--main .elementor-nav-menu li.menu-item-has-children > ul {
	display: none;
	list-style: none;
	margin: 0;
	padding: var(--cdental-space-1);
	border-radius: var(--cdental-radius-sm);
	box-shadow: var(--cdental-shadow-md);
	border: 1px solid var(--cdental-border);
	min-width: 12rem;
	position: absolute;
	z-index: 100;
	background: var(--cdental-bg, #fff);
}
/* Show on hover and when smartmenus adds .sm-open */
.elementor-nav-menu--main .elementor-nav-menu li.menu-item-has-children:hover > .sub-menu,
.elementor-nav-menu--main .elementor-nav-menu li.menu-item-has-children:hover > .elementor-nav-menu--dropdown,
.elementor-nav-menu--main .elementor-nav-menu li.menu-item-has-children:hover > ul,
.elementor-nav-menu--main .elementor-nav-menu li.menu-item-has-children.sm-open > .sub-menu,
.elementor-nav-menu--main .elementor-nav-menu li.menu-item-has-children.sm-open > .elementor-nav-menu--dropdown,
.elementor-nav-menu--main .elementor-nav-menu li.menu-item-has-children.sm-open > ul {
	display: block !important;
}
.elementor-nav-menu--main .elementor-nav-menu > li {
	position: relative;
}
.elementor-nav-menu--main .elementor-nav-menu .sub-menu a,
.elementor-nav-menu--main .elementor-nav-menu .elementor-nav-menu--dropdown a {
	display: block;
	padding: var(--cdental-space-2) var(--cdental-space-3);
}
.elementor-nav-menu--main .elementor-nav-menu .sub-menu li.cdental-menu-section > a,
.elementor-nav-menu--main .elementor-nav-menu .elementor-nav-menu--dropdown li.cdental-menu-section > a {
	font-weight: 600;
	border-block-end: 1px solid var(--cdental-border);
	margin-block-end: var(--cdental-space-1);
}

.site-navigation-toggle-holder .site-navigation-toggle {
	min-height: 44px;
	min-width: 44px;
	padding: var(--cdental-space-2);
	border-radius: var(--cdental-radius-sm);
}

.site-footer {
	padding-block: var(--cdental-space-6);
	border-block-start: 1px solid var(--cdental-border);
	margin-block-start: var(--cdental-space-8);
}

.site-footer .footer-inner {
	padding-inline: var(--cdental-space-4);
	max-width: var(--cdental-container);
	margin-inline: auto;
}

.site-footer .site-title,
.site-footer .site-description,
.site-footer .menu a {
	color: var(--cdental-text-muted);
	font-size: var(--cdental-font-size-ui);
}

.site-footer .menu a:hover {
	color: var(--cdental-text);
}

.site-footer .menu li a {
	padding: var(--cdental-space-1) var(--cdental-space-2);
	min-height: 44px;
	display: inline-flex;
	align-items: center;
}

/* ==========================================================================
   Default .site-main (single, archive, etc.) – padding & page header
   ========================================================================== */
body:not([class*="elementor-page-"]) .site-main {
	padding-block: var(--cdental-space-6);
	padding-inline: var(--cdental-space-4);
}

/* Service detail page (/services/category/slug/): hero + overlay like tooth-color-filling */
.cdental-service-detail-wrap {
	display: block;
	width: 100%;
	clear: both;
}

/* Full-width hero area (set background in theme or use default) */
.cdental-service-hero {
	display: block;
	width: 100%;
	min-height: 60vh;
	background-color: var(--cdental-bg, #f5f5f5);
	background-image: var(--cdental-service-hero-image, none);
	background-size: cover;
	background-position: center;
}

/* Main overlaps bottom of hero; overlay box sits on top */
.cdental-service-detail-page .cdental-service-with-hero {
	display: block !important;
	width: 100% !important;
	max-width: 100%;
	margin-block: 0;
	margin-top: -12rem;
	padding-block: 0;
	padding-inline: 0;
	overflow-x: hidden;
	box-sizing: border-box;
}

/* Semi-transparent white overlay box (like Fillings page) */
.cdental-service-hero-overlay {
	display: block;
	width: 100%;
	max-width: var(--cdental-container);
	margin-inline: auto;
	padding: var(--cdental-space-6) var(--cdental-space-4);
	background: rgba(255, 255, 255, 0.96);
	box-shadow: var(--cdental-shadow-md);
	box-sizing: border-box;
}

.cdental-service-detail-page .cdental-service-with-hero .cdental-single-inner {
	display: block;
	max-width: var(--cdental-content);
	margin-inline: auto;
	padding-inline: 0;
	width: 100%;
	box-sizing: border-box;
}

.cdental-service-detail-page .cdental-service-with-hero .page-header {
	margin-block-end: var(--cdental-space-4);
}

.cdental-service-detail-page .cdental-service-with-hero .entry-title {
	font-size: clamp(1.5rem, 4vw, 2rem);
	font-weight: 600;
	color: var(--cdental-text);
	margin-block-end: 0;
}

.cdental-service-detail-page .cdental-service-with-hero .page-content {
	font-size: var(--cdental-font-size-lead);
	line-height: var(--cdental-line-height-relaxed);
	color: var(--cdental-text);
}

/* Real page (Elementor): full width, no side padding so layout isn’t inset */
.cdental-service-detail-page .site-main.cdental-service-detail:not(.cdental-service-with-hero) {
	display: block !important;
	width: 100% !important;
	max-width: 100%;
	padding-block: var(--cdental-space-6);
	padding-inline: 0;
	box-sizing: border-box;
}

.cdental-service-detail-page .cdental-service-detail .cdental-single-inner {
	max-width: 100%;
	overflow-wrap: break-word;
}

/* No side padding on .site-main for service detail (avoid 24px inset) */
.cdental-service-detail-page .site-main.cdental-service-detail {
	padding-inline: 0 !important;
}

/* 404 and search use .cdental-page-inner for padding; avoid double padding */
body:not([class*="elementor-page-"]) .site-main.cdental-404,
body:not([class*="elementor-page-"]) .site-main.cdental-search {
	padding-block: 0;
	padding-inline: 0;
}

body:not([class*="elementor-page-"]) .page-header {
	margin-block-end: var(--cdental-space-5);
}

body:not([class*="elementor-page-"]) .page-header .entry-title {
	font-size: clamp(1.5rem, 4vw, 2rem);
	font-weight: 600;
	line-height: var(--cdental-line-height-tight);
	letter-spacing: -0.02em;
	margin-block-end: 0;
}

body:not([class*="elementor-page-"]) .archive-description {
	font-size: var(--cdental-font-size-lead);
	line-height: var(--cdental-line-height-body);
	color: var(--cdental-text-muted);
	margin-block-start: var(--cdental-space-2);
}

/* ==========================================================================
   Single post / page content (readable width, prose)
   ========================================================================== */
.cdental-single-inner {
	max-width: var(--cdental-content);
	margin-inline: auto;
}

.cdental-single-inner .page-content,
.cdental-single-inner .entry-content {
	font-size: var(--cdental-font-size-lead);
	line-height: var(--cdental-line-height-relaxed);
	color: var(--cdental-text);
}

/* 본문 문단·리스트·인용만 읽기 좋은 줄길이(65ch), 나머지는 컨테이너 폭 활용 */
.cdental-single-inner .page-content p,
.cdental-single-inner .entry-content p,
.cdental-single-inner .page-content ul,
.cdental-single-inner .page-content ol,
.cdental-single-inner .entry-content ul,
.cdental-single-inner .entry-content ol,
.cdental-single-inner .page-content blockquote,
.cdental-single-inner .entry-content blockquote {
	max-width: var(--cdental-prose);
	margin-inline: auto;
}

.cdental-single-inner .page-content p,
.cdental-single-inner .entry-content p {
	margin-block-end: var(--cdental-space-4);
}

.cdental-single-inner .page-content p:last-child,
.cdental-single-inner .entry-content p:last-child {
	margin-block-end: 0;
}

.cdental-single-inner .page-content a,
.cdental-single-inner .entry-content a {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.cdental-single-inner .page-content a:hover,
.cdental-single-inner .entry-content a:hover {
	opacity: 1;
}

.cdental-single-inner .page-content h2,
.cdental-single-inner .entry-content h2 {
	margin-block: var(--cdental-space-6) 0 var(--cdental-space-3);
}

.cdental-single-inner .page-content h3,
.cdental-single-inner .entry-content h3 {
	margin-block: var(--cdental-space-5) 0 var(--cdental-space-2);
}

.cdental-single-inner .page-content ul,
.cdental-single-inner .page-content ol,
.cdental-single-inner .entry-content ul,
.cdental-single-inner .entry-content ol {
	margin-block-end: var(--cdental-space-4);
	padding-inline-start: 1.5em;
}

.cdental-single-inner .page-content li,
.cdental-single-inner .entry-content li {
	margin-block-end: var(--cdental-space-1);
}

.cdental-single-inner .page-content blockquote,
.cdental-single-inner .entry-content blockquote {
	margin-block: var(--cdental-space-5);
	padding-inline-start: var(--cdental-space-4);
	border-inline-start: 3px solid var(--cdental-border);
	color: var(--cdental-text-muted);
	font-style: italic;
}

.cdental-single-inner .page-content img,
.cdental-single-inner .entry-content img {
	max-width: 100%;
	height: auto;
	vertical-align: middle;
}

.cdental-single-inner .page-content hr,
.cdental-single-inner .entry-content hr {
	border: none;
	border-block-start: 1px solid var(--cdental-border);
	margin-block: var(--cdental-space-6);
}

.cdental-single-inner .post-tags {
	margin-block-start: var(--cdental-space-5);
	padding-block-start: var(--cdental-space-4);
	border-block-start: 1px solid var(--cdental-border);
	font-size: var(--cdental-font-size-label);
	color: var(--cdental-text-muted);
}

.cdental-single-inner .post-tags .tag-links a {
	text-decoration: none;
	display: inline-block;
	padding: var(--cdental-space-1) var(--cdental-space-2);
	background: rgba(0, 0, 0, 0.06);
	border-radius: var(--cdental-radius-sm);
	margin-inline-end: var(--cdental-space-1);
	margin-block-end: var(--cdental-space-1);
	transition: background 0.2s ease;
}

.cdental-single-inner .post-tags .tag-links a:hover {
	background: rgba(0, 0, 0, 0.1);
	opacity: 1;
}

/* ==========================================================================
   Archive list (blog, etc.)
   ========================================================================== */
.cdental-archive-inner {
	max-width: var(--cdental-content);
	margin-inline: auto;
}

.cdental-archive-inner .page-content .post {
	margin-block-end: var(--cdental-space-6);
	padding-block-end: var(--cdental-space-6);
	border-block-end: 1px solid var(--cdental-border);
}

.cdental-archive-inner .page-content .post:last-child {
	margin-block-end: 0;
	padding-block-end: 0;
	border-block-end: none;
}

.cdental-archive-inner .page-content .post .entry-title {
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.35;
	margin-block-end: var(--cdental-space-2);
}

.cdental-archive-inner .page-content .post .entry-title a {
	text-decoration: none;
	color: inherit;
}

.cdental-archive-inner .page-content .post .entry-title a:hover {
	text-decoration: underline;
}

.cdental-archive-inner .page-content .post .wp-post-image {
	margin-block-end: var(--cdental-space-3);
	border-radius: var(--cdental-radius);
	overflow: hidden;
}

.cdental-archive-inner .page-content .post p {
	margin-block-end: 0;
	color: var(--cdental-text-muted);
	font-size: var(--cdental-font-size-body);
	line-height: var(--cdental-line-height-body);
}

/* ==========================================================================
   Pagination (global)
   ========================================================================== */
body:not([class*="elementor-page-"]) .site-main .pagination {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: var(--cdental-space-3);
	margin-block: var(--cdental-space-6) 0;
	padding-block-start: var(--cdental-space-5);
	border-block-start: 1px solid var(--cdental-border);
	font-size: var(--cdental-font-size-ui);
}

body:not([class*="elementor-page-"]) .site-main .pagination a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: var(--cdental-space-2) var(--cdental-space-3);
	text-decoration: none;
	border-radius: var(--cdental-radius-sm);
	transition: background 0.2s ease, color 0.2s ease;
}

body:not([class*="elementor-page-"]) .site-main .pagination a:hover {
	background: var(--cdental-border);
	opacity: 1;
}

/* ==========================================================================
   Comments
   ========================================================================== */
.comments-area {
	margin-block-start: var(--cdental-space-7);
	padding-block-start: var(--cdental-space-6);
	border-block-start: 1px solid var(--cdental-border);
	max-width: var(--cdental-content);
	margin-inline: auto;
}

.comments-area .title-comments,
.comments-area .comment-reply-title {
	font-size: 1.25rem;
	font-weight: 600;
	margin-block-end: var(--cdental-space-4);
}

.comments-area .comment-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.comments-area .comment-body,
.comments-area .pingback .comment-body {
	padding: var(--cdental-space-4) 0 var(--cdental-space-4) 3.5rem;
	border-block-end: 1px solid var(--cdental-border);
}

.comments-area .comment-body:last-child {
	border-block-end: none;
}

.comments-area .avatar {
	border-radius: 50%;
}

.comments-area .comment-meta {
	margin-block-end: var(--cdental-space-2);
	font-size: var(--cdental-font-size-label);
	color: var(--cdental-text-muted);
}

.comments-area .comment-meta a {
	text-decoration: none;
}

.comments-area .comment-content {
	font-size: var(--cdental-font-size-body);
	line-height: var(--cdental-line-height-body);
}

.comments-area .reply a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: var(--cdental-space-2) var(--cdental-space-3);
	font-size: var(--cdental-font-size-label);
	font-weight: 500;
	text-decoration: none;
	border-radius: var(--cdental-radius-sm);
	background: var(--cdental-border);
	transition: background var(--cdental-transition);
	margin-block-start: var(--cdental-space-2);
}

.comments-area .reply a:hover {
	background: rgba(0, 0, 0, 0.15);
	opacity: 1;
}

.comments-area .comment-form label {
	display: block;
	margin-block-end: var(--cdental-space-1);
	font-size: var(--cdental-font-size-ui);
	font-weight: 500;
}

.comments-area .comment-form textarea,
.comments-area .comment-form input[type="text"],
.comments-area .comment-form input[type="email"],
.comments-area .comment-form input[type="url"] {
	width: 100%;
	max-width: 100%;
	margin-block-end: var(--cdental-space-3);
	padding: var(--cdental-space-2) var(--cdental-space-3);
	border: 1px solid var(--cdental-border);
	border-radius: var(--cdental-radius-sm);
	font-size: 1rem;
	line-height: 1.5;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.comments-area .comment-form textarea {
	min-height: 120px;
	resize: vertical;
}

.comments-area .comment-form input[type="submit"] {
	min-height: 48px;
	padding: var(--cdental-space-2) var(--cdental-space-4);
	font-size: var(--cdental-font-size-ui);
	font-weight: 500;
	border: none;
	border-radius: var(--cdental-radius);
	background: var(--cdental-text);
	color: var(--cdental-bg);
	cursor: pointer;
	transition: opacity var(--cdental-transition);
}

.comments-area .comment-form input[type="submit"]:hover {
	opacity: 0.9;
}

/* ==========================================================================
   Forms (post password, generic)
   ========================================================================== */
.post-password-form {
	max-width: 24rem;
	margin-inline: auto;
	padding: var(--cdental-space-5);
}

.post-password-form label {
	display: block;
	margin-block-end: var(--cdental-space-2);
	font-weight: 500;
}

.post-password-form input[type="password"] {
	width: 100%;
	padding: var(--cdental-space-2) var(--cdental-space-3);
	border: 1px solid var(--cdental-border);
	border-radius: var(--cdental-radius-sm);
	font-size: var(--cdental-font-size-body);
	margin-block-end: var(--cdental-space-3);
}

.post-password-form input[type="submit"] {
	min-height: 48px;
	padding: var(--cdental-space-2) var(--cdental-space-4);
	font-size: var(--cdental-font-size-ui);
	font-weight: 500;
	border: none;
	border-radius: var(--cdental-radius);
	background: var(--cdental-text);
	color: var(--cdental-bg);
	cursor: pointer;
	transition: opacity var(--cdental-transition);
}

/* Generic form inputs (e.g. search, WPForms when not in Elementor) */
body:not([class*="elementor-page-"]) .site-main input[type="text"],
body:not([class*="elementor-page-"]) .site-main input[type="email"],
body:not([class*="elementor-page-"]) .site-main input[type="url"],
body:not([class*="elementor-page-"]) .site-main input[type="tel"],
body:not([class*="elementor-page-"]) .site-main input[type="number"],
body:not([class*="elementor-page-"]) .site-main textarea,
body:not([class*="elementor-page-"]) .site-main select {
	padding: var(--cdental-space-2) var(--cdental-space-3);
	border: 1px solid var(--cdental-border);
	border-radius: var(--cdental-radius-sm);
	font-size: var(--cdental-font-size-body);
	line-height: 1.5;
	transition: border-color var(--cdental-transition), box-shadow var(--cdental-transition);
}

body:not([class*="elementor-page-"]) .site-main input:focus,
body:not([class*="elementor-page-"]) .site-main textarea:focus,
body:not([class*="elementor-page-"]) .site-main select:focus {
	outline: none;
	border-color: var(--cdental-text);
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   Responsive: 1024px, 992px (lg), 768px (md), 576px (sm)
   ========================================================================== */

/* ---- 768px–1024px – 태블릿 가로 / 작은 데스크톱 전용 ---- */
@media (min-width: 769px) and (max-width: 1024px) {
	.site-header .header-inner,
	.site-footer .footer-inner {
		padding-inline: var(--cdental-space-4);
	}

	body:not([class*="elementor-page-"]) .site-main {
		padding-inline: var(--cdental-space-4);
	}

	/* Elementor: 이 구간에서만 컨테이너 너비 90% (좌우 여백) */
	.elementor .e-con.e-parent.e-con-boxed:not(:first-child) > .e-con-inner,
	.elementor .elementor-section:not(:first-child) .e-con .e-con-inner {
		width: 90%;
		max-width: 100%;
		margin-inline: auto;
	}

	.cdental-service-hero-overlay {
		padding: var(--cdental-space-5) var(--cdental-space-4);
	}
}

/* ---- lg: ≤992px – 태블릿 가로 / 작은 데스크톱 ---- */
@media (max-width: 992px) {
	:root {
		--cdental-container: 100%;
	}

	/* 서비스 히어로 오버랩 줄이기 */
	.cdental-service-detail-page .cdental-service-with-hero {
		margin-top: -8rem;
	}

	.cdental-service-hero {
		min-height: 45vh;
	}

	/* Elementor 컨테이너: 992px 이하에서는 전체 너비 + 좌우 패딩 */
	.elementor .e-con.e-parent.e-con-boxed > .e-con-inner,
	.elementor .elementor-section .e-con .e-con-inner {
		max-width: 100%;
		width: 100%;
		padding-inline: var(--cdental-space-4);
		box-sizing: border-box;
	}
}

/* Services dropdown: category headings (h2/h4) – leave as is, same weight/size */
.e-n-menu-content .elementor-widget-heading h2.elementor-heading-title,
.e-n-menu-content .elementor-widget-heading h4.elementor-heading-title,
body .e-n-menu-content .elementor-widget-heading h2.elementor-heading-title,
body .e-n-menu-content .elementor-widget-heading h4.elementor-heading-title {
	font-weight: 400 !important;
	font-size: inherit !important;
}

/* Services dropdown: Exam, Cleaning … Invisalign – same size as THE TEAM/SERVICES, UPPERCASE, hover pink */
.e-n-menu-wrapper a.cdental-service-link,
.e-n-menu-wrapper a.elementor-heading-title.cdental-service-link,
.e-n-menu-content a.cdental-service-link,
.e-n-menu-content a.elementor-heading-title.cdental-service-link,
body .e-n-menu-content .elementor-widget-heading a.cdental-service-link,
body .e-n-menu-content .elementor-widget-heading a.elementor-heading-title.cdental-service-link {
	text-decoration: none !important;
	color: inherit;
	font-family: inherit;
	font-size: 12px !important;
	font-weight: 600 !important;
	line-height: inherit;
	letter-spacing: inherit;
	text-transform: uppercase;
	transition: color var(--cdental-transition);
}
.e-n-menu-wrapper a.cdental-service-link:hover,
.e-n-menu-wrapper a.elementor-heading-title.cdental-service-link:hover,
.e-n-menu-content a.cdental-service-link:hover,
.e-n-menu-content a.elementor-heading-title.cdental-service-link:hover,
body .e-n-menu-content .elementor-widget-heading a.cdental-service-link:hover,
body .e-n-menu-content .elementor-widget-heading a.elementor-heading-title.cdental-service-link:hover {
	color: var(--cdental-accent-pink);
}

/* Services dropdown: column-gap 0 (override Elementor 20px) */
.e-n-menu-content .e-flex,
.e-n-menu-content .e-grid,
.e-n-menu-content .e-con.e-flex,
.e-n-menu-content .e-con.e-grid {
	row-gap: 0 !important;
}

/* Services dropdown: 12px between service links, 20px between category and first link */
.e-n-menu-content .elementor-widget-heading:has(a.cdental-service-link) {
	margin-top: 0px;
}
.e-n-menu-content .elementor-widget-heading:has(h4.elementor-heading-title) + .elementor-widget-heading:has(a.cdental-service-link),
.e-n-menu-content .elementor-widget-heading:has(h2.elementor-heading-title) + .elementor-widget-heading:has(a.cdental-service-link) {
	margin-top: 8px;
}

/* ---- md: ≤768px – 태블릿 세로 ---- */
@media (max-width: 768px) {
	.site-header .header-inner,
	.site-footer .footer-inner {
		padding-inline: var(--cdental-space-3);
	}

	body:not([class*="elementor-page-"]) .site-main {
		padding-inline: var(--cdental-space-3);
		padding-block: var(--cdental-space-5);
	}

	/* Elementor 페이지(THE TEAM 등): 마지막 섹션이 푸터에 가려지지 않도록 하단 여백 */
	body[class*="elementor-page"] .site-main {
		padding-bottom: 6rem;
	}
	body[class*="elementor-page"] .elementor-section:last-of-type {
		margin-bottom: var(--cdental-space-4);
	}
	/* THE TEAM: Elementor에서 모바일 margin-bottom -15em 지정된 요소 오버라이드(푸터 겹침 방지) */
	body[class*="elementor-page"] .elementor-element-011e463 {
		margin-bottom: 0 !important;
	}

	.cdental-single-inner .page-content h2,
	.cdental-single-inner .entry-content h2 {
		margin-block: var(--cdental-space-5) 0 var(--cdental-space-2);
	}

	.cdental-archive-inner .page-content .post {
		margin-block-end: var(--cdental-space-5);
		padding-block-end: var(--cdental-space-5);
	}

	.comments-area .comment-body,
	.comments-area .pingback .comment-body {
		padding-left: 0;
		padding-top: var(--cdental-space-3);
	}

	.comments-area .avatar {
		position: relative;
		margin-block-end: var(--cdental-space-2);
	}

	/* 서비스 히어로 */
	.cdental-service-hero {
		min-height: 35vh;
	}

	.cdental-service-detail-page .cdental-service-with-hero {
		margin-top: -6rem;
	}

	.cdental-service-hero-overlay {
		padding: var(--cdental-space-4) var(--cdental-space-3);
	}

	/* Elementor 컨테이너 패딩 축소 */
	.elementor .e-con.e-parent.e-con-boxed > .e-con-inner,
	.elementor .elementor-section .e-con .e-con-inner {
		padding-inline: var(--cdental-space-3);
	}

	/* Hide Services dropdown icon on tablet/mobile (Elementor Nested Nav) */
	body .elementor button.e-n-menu-dropdown-icon,
	body button.e-n-menu-dropdown-icon {
		display: none !important;
		visibility: hidden !important;
		width: 0 !important;
		height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		overflow: hidden !important;
		position: absolute !important;
		clip: rect(0, 0, 0, 0) !important;
	}

	/* Mobile menu panel: full screen below header, background matches page */
	.e-n-menu-wrapper {
		margin-top: 0 !important;
		border-top: none !important;
		width: 100vw !important;
		height: calc(100vh - 48px) !important;
		min-height: calc(100vh - 48px) !important;
		z-index: 999 !important;
		position: fixed !important;
		top: 48px !important;
		left: 0 !important;
		right: 0 !important;
		background-color: var(--cdental-menu-bg) !important;
		box-sizing: border-box !important;
	}
}

/* ---- sm: ≤576px – 모바일 ---- */
@media (max-width: 576px) {
	.site-header .header-inner,
	.site-footer .footer-inner {
		padding-inline: var(--cdental-space-2);
	}

	body:not([class*="elementor-page-"]) .site-main {
		padding-inline: var(--cdental-space-2);
		padding-block: var(--cdental-space-4);
	}

	body[class*="elementor-page"] .site-main {
		padding-bottom: 6rem;
	}
	body[class*="elementor-page"] .elementor-section:last-of-type {
		margin-bottom: var(--cdental-space-4);
	}

	.site-navigation .menu li a {
		padding: var(--cdental-space-2);
	}

	/* Hide dropdown icon button next to Services (Elementor Nested Nav) – high specificity */
	body .elementor button.e-n-menu-dropdown-icon,
	body button.e-n-menu-dropdown-icon {
		display: none !important;
		visibility: hidden !important;
		width: 0 !important;
		height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		overflow: hidden !important;
		position: absolute !important;
		clip: rect(0, 0, 0, 0) !important;
	}

	/* Legacy: Smartmenus .sub-arrow, other nav menu indicators */
	.elementor-widget-nav-menu .sub-arrow,
	.elementor-nav-menu .sub-arrow,
	.elementor-nav-menu--main .elementor-nav-menu li.menu-item-has-children > a .elementor-nav-menu-icon,
	.elementor-nav-menu--main .elementor-nav-menu li.menu-item-has-children > a::after {
		display: none !important;
	}

	.cdental-single-inner .page-content h2,
	.cdental-single-inner .entry-content h2 {
		margin-block: var(--cdental-space-4) 0 var(--cdental-space-2);
	}

	.cdental-archive-inner .page-content .post {
		margin-block-end: var(--cdental-space-4);
		padding-block-end: var(--cdental-space-4);
	}

	/* 서비스 히어로 */
	.cdental-service-hero {
		min-height: 30vh;
	}

	.cdental-service-detail-page .cdental-service-with-hero {
		margin-top: -4rem;
	}

	.cdental-service-hero-overlay {
		padding: var(--cdental-space-3) var(--cdental-space-2);
	}

	/* Elementor 컨테이너 패딩 더 축소 */
	.elementor .e-con.e-parent.e-con-boxed > .e-con-inner,
	.elementor .elementor-section .e-con .e-con-inner {
		padding-inline: var(--cdental-space-2);
	}
}

/* ==========================================================================
   Elementor: e-con 폭 – 데스크톱(≥1025px): 첫 섹션 edge-to-edge, 나머지 80% / 1200px
   ========================================================================== */
@media (min-width: 1025px) {
	/* Section-based layout (legacy) */
	.elementor .elementor-section:not(:first-child) .e-con.e-con-boxed,
	.elementor .elementor-section:not(:first-child) .e-con.e-con-boxed .e-con-inner,
	.elementor .elementor-section:not(:first-child) .e-con .e-con-inner {
		width: 100%;
		max-width: var(--cdental-container);
		margin-inline: auto;
	}

	.elementor .elementor-section:first-child .e-con,
	.elementor .elementor-section:first-child .e-con .e-con-inner,
	.elementor .elementor-section:first-child .elementor-container {
		max-width: none;
		width: 100%;
	}

	/* Container-based layout (modern Elementor) */
	.elementor .e-con.e-parent.e-con-boxed:not(:first-child) > .e-con-inner {
		width: 100%;
		max-width: var(--cdental-container);
		margin-inline: auto;
	}

	.elementor .e-con.e-parent:first-child,
	.elementor .e-con.e-parent:first-child > .e-con-inner {
		max-width: none;
		width: 100%;
	}
}

/* 전체 페이지: 가로 스크롤 방지 */
html {
	overflow-x: hidden;
}
