/* ==========================================================================
   ExpoWalls theme — gallery-style design system
   ========================================================================== */

:root {
	--ew-ink: #111111;
	--ew-text: #262626;
	--ew-body: #3F3F3F;
	--ew-mute: #57534E;
	--ew-mute-2: #78716C;
	--ew-line: #E7E5E0;
	--ew-line-2: #D6D3CE;
	--ew-soft: #F4F3F0;
	--ew-stone: #DEDBD4;
	--ew-dark: #111111;
	--ew-dark-2: #1F1E1C;
	--ew-dark-3: #2E2D2A;
	--ew-on-dark: #D6D3CE;
	--ew-on-dark-mute: #A8A29E;
	--ew-accent: #C2410C;
	--ew-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--ew-display: "Archivo", "Inter", system-ui, sans-serif;
	--ew-container: 1280px;
	--ew-gutter: 32px;
	--ew-section: 104px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--ew-font); font-size: 16px; line-height: 1.6; color: var(--ew-ink); background: #fff; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--ew-ink); text-underline-offset: 3px; }
a:hover { color: var(--ew-accent); }
:focus-visible { outline: 3px solid var(--ew-accent); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--ew-display); letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 16px; color: var(--ew-ink); }
p { margin: 0 0 16px; }
button { font: inherit; }

.screen-reader-text { border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }
.ew-skip { position: absolute; left: 12px; top: -60px; z-index: 1000; background: var(--ew-ink); color: #fff; padding: 12px 18px; font-weight: 600; }
.ew-skip:focus { top: 12px; color: #fff; }

/* ---------- Layout ---------- */
.ew-container { max-width: var(--ew-container); margin: 0 auto; padding-left: var(--ew-gutter); padding-right: var(--ew-gutter); }
.ew-section { padding: var(--ew-section) 0; }
.ew-section--soft { background: var(--ew-soft); }
.ew-section--dark { background: var(--ew-dark); color: #fff; }
.ew-section--dark h1, .ew-section--dark h2, .ew-section--dark h3 { color: #fff; }
.ew-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 32px 64px; align-items: center; }
.ew-split--end { align-items: end; }
.ew-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 40px; }

/* ---------- Type ---------- */
.ew-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ew-mute); margin: 0 0 14px; }
.ew-eyebrow--accent { color: var(--ew-accent); }
.ew-section--dark .ew-eyebrow { color: var(--ew-on-dark-mute); }
.ew-h1 { font-weight: 800; font-size: clamp(44px, 6.5vw, 92px); line-height: 0.98; letter-spacing: -0.03em; margin: 0; }
.ew-h2 { font-weight: 800; font-size: clamp(34px, 4.5vw, 54px); line-height: 1.03; margin: 0 0 16px; }
.ew-h2--sm { font-size: clamp(28px, 3.4vw, 38px); margin-bottom: 32px; }
.ew-h3 { font-weight: 700; font-size: 22px; line-height: 1.25; }
.ew-lede { font-size: 18px; line-height: 1.6; color: var(--ew-body); max-width: 560px; margin: 0; }
.ew-lede--on-dark, .ew-section--dark .ew-lede { color: var(--ew-on-dark); }
.ew-meta { font-size: 14px; color: var(--ew-mute); margin: 0; }

/* ---------- Buttons ---------- */
.ew-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 14px 24px; font-family: var(--ew-font); font-weight: 600; font-size: 16px; line-height: 1.2; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.ew-btn--sm { min-height: 44px; padding: 10px 18px; font-size: 15px; }
.ew-btn--block { display: flex; width: 100%; }
.ew-btn--accent { background: var(--ew-accent); color: #fff; }
.ew-btn--accent:hover { background: #9A3412; color: #fff; }
.ew-btn--dark { background: var(--ew-ink); color: #fff; }
.ew-btn--dark:hover { background: #333; color: #fff; }
.ew-btn--outline { border-color: var(--ew-ink); color: var(--ew-ink); background: transparent; }
.ew-btn--outline:hover { background: var(--ew-ink); color: #fff; }
.ew-btn--outline-light { border-color: #fff; color: #fff; background: transparent; }
.ew-btn--outline-light:hover { background: #fff; color: var(--ew-ink); }
.ew-btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.ew-textlink { font-weight: 600; display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- Media ---------- */
.ew-media { background: var(--ew-soft); overflow: hidden; }
.ew-media__img { width: 100%; height: 100%; object-fit: cover; }
.ew-media--card { aspect-ratio: 400 / 260; }
.ew-media--featured { aspect-ratio: 1200 / 640; }
.ew-media--hero { aspect-ratio: 1400 / 620; }
.ew-media__img--illustration { object-fit: contain; background: var(--ew-soft); }
.ew-placeholder { background: var(--ew-stone); display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; font-size: 13px; color: var(--ew-mute); }

/* ---------- Utility bar & header ---------- */
.ew-utility { background: var(--ew-ink); color: #fff; font-size: 13px; }
.ew-utility__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 24px; padding-top: 10px; padding-bottom: 10px; }
.ew-utility__right { display: flex; flex-wrap: wrap; gap: 20px; }
.ew-utility__rating { font-weight: 600; }

.ew-header { background: #fff; border-bottom: 1px solid var(--ew-line); position: relative; z-index: 50; }
.ew-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; padding-top: 16px; padding-bottom: 16px; }
.ew-logo, .custom-logo-link { display: inline-flex; align-items: center; min-height: 44px; flex: none; }
.ew-logo img, .custom-logo { height: 40px; width: auto; }
.ew-header__menu { display: flex; align-items: center; gap: 16px 32px; flex: 1; justify-content: flex-end; }
.ew-nav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 28px; }
.ew-nav__list a { text-decoration: none; font-size: 15px; font-weight: 500; display: inline-flex; min-height: 44px; align-items: center; }
.ew-nav__list .current-menu-item > a, .ew-nav__list .current_page_item > a { text-decoration: underline; text-underline-offset: 6px; }
.ew-nav__list .sub-menu { list-style: none; margin: 0; padding: 8px 0; position: absolute; background: #fff; border: 1px solid var(--ew-line); min-width: 220px; display: none; }
.ew-nav__list li { position: relative; }
.ew-nav__list li:hover > .sub-menu, .ew-nav__list li:focus-within > .sub-menu { display: block; }
.ew-nav__list .sub-menu a { padding: 4px 16px; display: flex; }
.ew-header__actions { display: flex; align-items: center; gap: 12px; }
.ew-header__phone { font-weight: 600; text-decoration: none; font-size: 15px; min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; }

.ew-nav-toggle { display: none; width: 48px; height: 48px; border: 1.5px solid var(--ew-ink); background: #fff; cursor: pointer; position: relative; }
.ew-nav-toggle__bars, .ew-nav-toggle__bars::before, .ew-nav-toggle__bars::after { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--ew-ink); content: ""; }
.ew-nav-toggle__bars { top: 22px; }
.ew-nav-toggle__bars::before { top: -7px; left: 0; right: 0; }
.ew-nav-toggle__bars::after { top: 7px; left: 0; right: 0; }

@media (max-width: 1100px) {
	.ew-nav-toggle { display: inline-block; }
	.ew-header__menu { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--ew-line); flex-direction: column; align-items: stretch; padding: 8px var(--ew-gutter) 24px; }
	.ew-header__menu.is-open { display: flex; }
	.ew-nav__list { flex-direction: column; gap: 0; }
	.ew-nav__list a { min-height: 48px; border-bottom: 1px solid var(--ew-line); width: 100%; }
	.ew-nav__list .sub-menu { position: static; display: block; border: 0; padding: 0 0 0 16px; }
	.ew-header__actions { flex-wrap: wrap; padding-top: 16px; }
}

/* ---------- Breadcrumbs ---------- */
.ew-crumb-bar { padding-top: 20px; }
.ew-breadcrumbs ol { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 14px; color: var(--ew-mute); }
.ew-breadcrumbs li + li::before { content: "/"; margin-right: 8px; color: var(--ew-line-2); }
.ew-breadcrumbs a { color: var(--ew-mute); }

/* ---------- Footer ---------- */
.ew-footer { background: var(--ew-dark); color: var(--ew-on-dark); padding: 72px 0 40px; font-size: 14px; }
.ew-footer a { color: var(--ew-on-dark); }
.ew-footer a:hover { color: #fff; }
.ew-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; }
.ew-footer__brand .ew-logo img { height: 40px; margin-bottom: 16px; }
.ew-footer__title { color: #fff; font-weight: 600; margin: 0 0 12px; }
.ew-footer__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ew-footer__base { margin-top: 56px; padding-top: 24px; border-top: 1px solid #3A3936; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--ew-on-dark-mute); font-size: 13px; }
.ew-footer__legal { list-style: none; display: flex; gap: 16px; margin: 0; padding: 0; }

/* ---------- Plain pages ---------- */
.ew-page__head { padding-top: 40px; padding-bottom: 24px; }
.ew-page__title { font-weight: 800; font-size: clamp(38px, 5vw, 64px); line-height: 1.02; letter-spacing: -0.03em; margin: 0; }
.ew-page .ew-prose { padding-bottom: 96px; }

/* ---------- Prose (blog posts and plain pages) ---------- */
.ew-prose { max-width: 720px; font-size: 18px; line-height: 1.75; color: var(--ew-text); }
.ew-prose > * + * { margin-top: 0; }
.ew-prose p, .ew-prose ul, .ew-prose ol, .ew-prose figure, .ew-prose table { margin: 0 0 24px; }
.ew-prose h2 { font-weight: 800; font-size: 30px; line-height: 1.15; margin: 48px 0 16px; scroll-margin-top: 24px; }
.ew-prose h3 { font-weight: 700; font-size: 22px; margin: 32px 0 12px; }
.ew-prose blockquote { margin: 0 0 24px; padding: 0 0 0 24px; border-left: 3px solid var(--ew-accent); font-family: var(--ew-display); font-weight: 600; font-size: 24px; line-height: 1.4; color: var(--ew-ink); }
.ew-prose img { height: auto; }
.ew-prose figcaption, .wp-caption-text { font-size: 14px; color: var(--ew-mute); margin-top: 10px; }
.ew-prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.ew-prose th, .ew-prose td { border-bottom: 1px solid var(--ew-line); padding: 10px 8px 10px 0; text-align: left; }
.ew-prose a { color: var(--ew-ink); text-decoration-color: var(--ew-accent); text-decoration-thickness: 2px; }
.alignwide { max-width: 1000px; }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }

/* ---------- Blog index ---------- */
.ew-blog-head { padding-top: 40px; padding-bottom: 24px; }
.ew-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--ew-ink); }
.ew-chip { font-size: 14px; font-weight: 600; padding: 10px 18px; min-height: 44px; display: inline-flex; align-items: center; border: 1.5px solid var(--ew-line-2); text-decoration: none; background: #fff; }
.ew-chip:hover { border-color: var(--ew-ink); color: var(--ew-ink); }
.ew-chip.is-active { background: var(--ew-ink); color: #fff; border-color: var(--ew-ink); }
.ew-featured-post { padding-top: 24px; padding-bottom: 72px; }
.ew-featured-post__link { text-decoration: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 40px; align-items: center; color: var(--ew-ink); }
.ew-featured-post__title { font-weight: 800; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.05; margin: 0 0 16px; }
.ew-featured-post .ew-lede { margin-bottom: 20px; }
.ew-post-grid-wrap { padding-bottom: 88px; }
.ew-post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 56px 40px; }
.ew-post-card__link { text-decoration: none; color: var(--ew-ink); display: block; }
.ew-post-card__link:hover .ew-post-card__title { text-decoration: underline; text-decoration-color: var(--ew-accent); }
.ew-post-card__cat { margin: 18px 0 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ew-mute); }
.ew-post-card__title { font-weight: 700; font-size: 21px; line-height: 1.25; margin: 0 0 8px; }
.ew-post-card__meta { font-size: 14px; color: var(--ew-mute); margin: 0; }
.navigation.pagination { margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--ew-line); }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.page-numbers { min-width: 44px; min-height: 44px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--ew-line-2); text-decoration: none; font-weight: 600; }
.page-numbers.current { background: var(--ew-ink); color: #fff; border-color: var(--ew-ink); }
.page-numbers.dots { border: 0; }

/* ---------- Single article ---------- */
.ew-article__head { padding-top: 40px; max-width: calc(920px + var(--ew-gutter) * 2); margin-left: max(0px, calc((100% - var(--ew-container)) / 2)); }
.ew-article__title { font-weight: 800; font-size: clamp(38px, 5vw, 64px); line-height: 1.02; letter-spacing: -0.03em; margin: 0 0 24px; }
.ew-article__lede { font-size: 20px; line-height: 1.55; color: var(--ew-body); margin: 0 0 28px; }
.ew-article__meta { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; font-size: 14px; color: var(--ew-mute); margin: 0; }
.ew-article__author { display: inline-flex; align-items: center; gap: 10px; }
.ew-article__author strong { color: var(--ew-ink); }
.ew-avatar { border-radius: 50%; }
.ew-article__hero { padding-top: 48px; max-width: calc(1376px + var(--ew-gutter) * 2); }
.ew-article__body { display: flex; flex-wrap: wrap; gap: 64px; align-items: flex-start; padding-top: 64px; padding-bottom: 88px; }
.ew-article__main { flex: 999 1 560px; min-width: 0; max-width: 720px; }
.ew-article__side { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.ew-toc { background: var(--ew-soft); padding: 24px; }
.ew-toc__title { margin: 0 0 14px; font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ew-mute); }
.ew-toc ol { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.4; }
.ew-toc a { text-decoration: none; }
.ew-side-cta { background: var(--ew-dark); color: #fff; padding: 24px; }
.ew-side-cta__title { font-family: var(--ew-display); font-weight: 700; font-size: 19px; margin: 0 0 6px; }
.ew-side-cta p { color: var(--ew-on-dark); font-size: 14px; }
.ew-callout { border: 1.5px solid var(--ew-ink); padding: 28px 32px; margin: 40px 0 0; }
.ew-callout__title { font-family: var(--ew-display); font-weight: 700; font-size: 22px; margin: 0 0 6px; }
.ew-author { display: flex; gap: 20px; align-items: flex-start; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--ew-line); }
.ew-author__name { font-weight: 600; margin: 0 0 4px; }
.ew-author__bio { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ew-mute); }

/* ---------- 404 ---------- */
.ew-404 .ew-lede { margin: 20px 0 32px; }
.ew-404__search { margin-top: 40px; max-width: 480px; }

/* ---------- Search form ---------- */
.search-form { display: flex; gap: 8px; margin-top: 16px; }
.search-form label { flex: 1; }
.search-field, .ew-input { width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; min-height: 48px; border: 1.5px solid #C9C5BE; background: #fff; color: var(--ew-ink); border-radius: 0; }
.search-submit { font: inherit; font-weight: 600; min-height: 48px; padding: 0 20px; background: var(--ew-ink); color: #fff; border: 0; cursor: pointer; }

/* ---------- Comments ---------- */
.comment-list { list-style: none; padding: 0; }
.comment-respond textarea, .comment-respond input[type="text"], .comment-respond input[type="email"], .comment-respond input[type="url"] { width: 100%; font: inherit; padding: 12px; border: 1.5px solid #C9C5BE; }

/* ---------- Elementor integration ---------- */
.ew-builder .elementor-section.elementor-section-boxed > .elementor-container { max-width: var(--ew-container); }
.ew-builder .e-con.ew-el-section { --padding-top: 0px; --padding-bottom: 0px; --padding-left: 0px; --padding-right: 0px; --gap: 0px; --row-gap: 0px; --column-gap: 0px; padding: 0; }
.ew-builder .e-con.ew-el-section > .e-con-inner { padding: 0; max-width: none; }
.ew-builder .elementor-widget:not(:last-child) { margin-block-end: 0; }
.ew-builder .elementor-widget-text-editor.ew-el-prose { max-width: var(--ew-container); margin: 0 auto; padding: 48px var(--ew-gutter); }
.elementor-widget-text-editor.ew-el-prose .elementor-widget-container { max-width: 720px; font-size: 18px; line-height: 1.75; color: var(--ew-text); }

@media (max-width: 720px) {
	:root { --ew-gutter: 20px; --ew-section: 72px; }
	.ew-prose { font-size: 17px; }
	.ew-callout { padding: 24px; }
}
