/*
Theme Name:   Westerly Jewelry
Theme URI:    https://westerlyjewelry.com/
Description:  Lightweight custom theme for the Westerly Jewelry Company. Replaces the Kallyas theme while keeping the same look. Supports Slider Revolution, image and map page headers, and Fluent Forms. No page builder required.
Author:       Westerly Jewelry Company
Version:      1.0.0
Requires at least: 6.3
Tested up to: 6.8
Requires PHP: 8.0
License:      GPL-2.0-or-later
Text Domain:  westerly
*/

/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
	--wj-text: #595959;
	--wj-text-content: #535353;
	--wj-heading: #595959;
	--wj-link: #000;
	--wj-nav: #f5ed5d;
	--wj-black: #000;
	--wj-footer-bg: #2f2f2f;
	--wj-footer-text: #d5d5d5;
	--wj-footer-line: #484848;
	--wj-totop: #404040;
	--wj-box: #e9e9e9;
	--wj-header-h: 105px;
	--wj-container: 1170px;
	--wj-font-body: "Open Sans", Helvetica, Arial, sans-serif;
	--wj-font-display: "Julius Sans One", Helvetica, Arial, sans-serif;
	--wj-font-alt: "Lato", Helvetica, Arial, sans-serif;
	--wj-font-nav: Helvetica, Arial, sans-serif;
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background-color: #f5f5f5;
	color: var(--wj-text);
	font-family: var(--wj-font-body);
	font-size: 14px;
	line-height: 20px;
	-webkit-font-smoothing: antialiased;
}

/* custom-background (Customizer) is printed on body by WP; page wrapper inherits it */
.site { position: relative; min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1 0 auto; }

img { max-width: 100%; height: auto; border: 0; vertical-align: middle; }
iframe { max-width: 100%; }

a { color: var(--wj-link); text-decoration: none; transition: color .2s; }
a:hover, a:focus { color: #000; text-decoration: underline; }

p { margin: 0 0 20px; }

h1, h2, h3, h4, h5, h6 { color: var(--wj-heading); margin: 20px 0 10px; font-weight: 700; }
h1 { font: 700 36px/40px var(--wj-font-display); }
h2 { font: 700 30px/40px var(--wj-font-body); }
h3 { font: 700 24px/40px var(--wj-font-display); }
h4 { font: 700 14px/20px var(--wj-font-body); }
h5 { font: 700 12px/20px var(--wj-font-body); }
h6 { font: 700 12px/20px var(--wj-font-body); margin-top: 10px; }

.subtitle, .page-subtitle { font-family: var(--wj-font-alt); font-size: 30px; line-height: 40px; font-weight: 400; }

.lead { font-size: 18px; line-height: 1.5; margin-bottom: 20px; }

ul, ol { margin: 0 0 20px; padding-left: 40px; }

blockquote {
	margin: 0 0 20px;
	padding: 10px 20px;
	border-left: 5px solid #eee;
	font-size: 17.5px;
	line-height: 1.43;
}
blockquote p:last-child { margin-bottom: 0; }
blockquote small { display: block; font-size: 80%; color: #777; line-height: 1.43; }
blockquote small::before { content: "\2014 \00A0"; }

hr { border: 0; border-top: 1px solid #ddd; margin: 20px 0; }

table { border-collapse: collapse; max-width: 100%; }

.screen-reader-text {
	border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; word-wrap: normal !important;
}
.screen-reader-text:focus {
	background: #fff; clip: auto !important; clip-path: none; color: #000;
	display: block; height: auto; width: auto; left: 5px; top: 5px; padding: 12px 20px; z-index: 100000;
}

/* WordPress alignment & captions */
.alignleft { float: left; margin: 0 20px 15px 0; }
.alignright { float: right; margin: 0 0 15px 20px; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignnone { margin: 5px 0 15px; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 12px; color: #777; text-align: center; margin: 5px 0 0; }
.clearfix::after, .entry-content::after { content: ""; display: table; clear: both; }

/* Legacy Bootstrap‑2 classes that exist in older page content */
.entry-content .row, .entry-content [class^="span"] { display: block; }
.img-polaroid { padding: 4px; background: #fff; border: 1px solid rgba(0,0,0,.2); box-shadow: 0 1px 3px rgba(0,0,0,.1); }

/* ==========================================================================
   Layout
   ========================================================================== */
.container {
	width: 100%;
	max-width: var(--wj-container);
	margin: 0 auto;
	padding: 0 15px;
}
@media (max-width: 1199px) { :root { --wj-container: 970px; } }
@media (max-width: 991px)  { :root { --wj-container: 750px; } }

.wj-section { padding: 35px 0; }
.wj-section + .wj-section { padding-top: 0; }

.entry-content { color: var(--wj-text-content); }
.entry-content a { color: #000; }

/* No hero: keep the content clear of the overlaid header */
.wj-no-hero .site-main { padding-top: var(--wj-header-h); }

.page-title-wrap { padding-top: 10px; }
.page-title-wrap h1 { margin-top: 10px; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
	position: absolute;
	top: 0; left: 0; right: 0;
	z-index: 100;
	background: rgba(0,0,0,.5);
	transition: background-color .3s, padding .3s;
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: var(--wj-header-h);
	gap: 20px;
}

.site-logo { margin: 0; line-height: 0; flex: 0 0 auto; }
.site-logo a { display: inline-block; }
.site-logo img { max-height: 100px; width: auto; transition: max-height .3s; }
.site-logo .site-title-text { font: 400 32px/1 var(--wj-font-display); color: var(--wj-nav); }

.site-header__right {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: center;
	gap: 14px;
}

.header-social { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.header-social a {
	display: flex; align-items: center; justify-content: center;
	width: 24px; height: 24px; background: #111; color: #fff;
	transition: background-color .2s;
}
.header-social a:hover { background: #3b5998; text-decoration: none; }
.header-social svg { width: 13px; height: 13px; fill: currentColor; }

/* Main navigation */
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav > ul { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.main-nav li { position: relative; }
.main-nav > ul > li > a {
	position: relative;
	display: block;
	padding: 6px 12px;
	font: 600 14px/14px var(--wj-font-nav);
	color: var(--wj-nav);
	text-decoration: none;
	z-index: 0;
}
.main-nav > ul > li > a::before {
	content: "";
	position: absolute; inset: 0;
	background: var(--wj-black);
	opacity: 0;
	z-index: -1;
	transition: opacity .2s;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li:hover > a,
.main-nav > ul > li.current-menu-item > a,
.main-nav > ul > li.current-menu-ancestor > a,
.main-nav > ul > li.current_page_item > a { color: #fff; }
.main-nav > ul > li > a:hover::before,
.main-nav > ul > li:hover > a::before,
.main-nav > ul > li.current-menu-item > a::before,
.main-nav > ul > li.current-menu-ancestor > a::before,
.main-nav > ul > li.current_page_item > a::before { opacity: 1; }

/* Dropdowns (none today, supported for the future) */
.main-nav .sub-menu {
	position: absolute; top: 100%; left: 0; min-width: 220px;
	background: #000; padding: 8px 0;
	opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: all .2s; z-index: 10;
}
.main-nav .sub-menu .sub-menu { top: 0; left: 100%; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.main-nav .sub-menu a { display: block; padding: 9px 18px; color: #fff; font: 700 14px/14px var(--wj-font-alt); }
.main-nav .sub-menu a:hover, .main-nav .sub-menu .current-menu-item > a { color: var(--wj-nav); text-decoration: none; }

/* Burger */
.menu-toggle {
	display: none;
	background: none; border: 0; padding: 8px; cursor: pointer; color: #fff;
}
.menu-toggle span { display: block; width: 24px; height: 3px; margin: 4px 0; background: #fff; transition: transform .25s, opacity .25s; }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Sticky (scrolled) header */
.site-header.is-stuck { position: fixed; background: rgba(0,0,0,.88); }
.site-header.is-stuck .site-header__inner { min-height: 64px; }
.site-header.is-stuck .site-logo img { max-height: 54px; }
.site-header.is-stuck .header-social { display: none; }
@media (max-width: 600px) { .admin-bar .site-header.is-stuck { top: 0; } }

/* Mobile header */
@media (max-width: 991px) {
	:root { --wj-header-h: 84px; }
	.site-logo img { max-height: 72px; }
	.site-header__right { flex-direction: row; align-items: center; }
	.menu-toggle { display: block; }
	.main-nav {
		display: none;
		position: absolute; top: 100%; left: 0; right: 0;
		background: rgba(0,0,0,.95);
		max-height: calc(100vh - 100px); overflow-y: auto;
	}
	.menu-open .main-nav { display: block; }
	.main-nav > ul { flex-direction: column; gap: 0; padding: 8px 0; }
	.main-nav > ul > li > a { padding: 14px 20px; font-size: 15px; }
	.main-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; padding: 0 0 0 15px; background: transparent; }
	.main-nav .sub-menu a { color: #ddd; }
}

/* ==========================================================================
   Hero (page header)
   ========================================================================== */
.wj-hero { position: relative; background: #111; overflow: hidden; }
.wj-hero--slider { background: transparent; }
.wj-hero__img { display: block; width: 100%; height: auto; }
.wj-hero--fixed .wj-hero__img { height: var(--wj-hero-h, 684px); object-fit: cover; object-position: center; }
.wj-hero__caption {
	position: absolute; left: 0; right: 0; bottom: 8%;
	text-align: center; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6);
}
.wj-hero__title { color: #fff; font: 400 40px/1.2 var(--wj-font-display); margin: 0 0 10px; }
.wj-hero__subtitle { color: #fff; font: 400 18px/1.5 var(--wj-font-alt); margin: 0; }
.wj-hero--map iframe { display: block; width: 100%; height: var(--wj-hero-h, 560px); border: 0; }
@media (max-width: 767px) {
	.wj-hero--fixed .wj-hero__img { height: auto; max-height: 70vh; min-height: 260px; }
	.wj-hero--map iframe { height: 380px; }
	.wj-hero__title { font-size: 26px; }
	.wj-hero__subtitle { font-size: 14px; }
	/* On phones the header would cover most of a short banner: start the hero below it */
	.wj-hero { padding-top: var(--wj-header-h); background: #1a1a1a; }
}

/* ==========================================================================
   Content components (shortcodes)
   ========================================================================== */
.wj-row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
.wj-col { padding: 0 15px; width: 100%; }
@media (min-width: 768px) {
	.wj-col-1 { width: 8.3333%; }  .wj-col-2 { width: 16.6667%; } .wj-col-3 { width: 25%; }
	.wj-col-4 { width: 33.3333%; } .wj-col-5 { width: 41.6667%; } .wj-col-6 { width: 50%; }
	.wj-col-7 { width: 58.3333%; } .wj-col-8 { width: 66.6667%; } .wj-col-9 { width: 75%; }
	.wj-col-10 { width: 83.3333%; } .wj-col-11 { width: 91.6667%; } .wj-col-12 { width: 100%; }
}

@media (max-width: 767px) { .wj-col + .wj-col { margin-top: 30px; } }

.wj-spacer { display: block; clear: both; }

/* Info box */
.wj-infobox {
	clear: both;
	background: var(--wj-box);
	padding: 45px 25px 30px;
	margin: 0 0 60px;
	text-align: center;
	color: #343434;
}
.wj-infobox__title { margin: 0 0 15px; font: 700 24px/1.4 var(--wj-font-display); color: #323232; }
.wj-infobox p:last-child { margin-bottom: 0; }

/* Image boxes */
.wj-imageboxes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin: 0 0 60px; clear: both; }
@media (max-width: 991px) { .wj-imageboxes { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px) { .wj-imageboxes { gap: 20px; } .wj-imagebox__title { font-size: 16px; } }
@media (max-width: 339px) { .wj-imageboxes { grid-template-columns: 1fr; } }
.wj-imagebox__link { position: relative; display: block; text-decoration: none !important; }
.wj-imagebox__img { display: block; background: #fff; aspect-ratio: 1 / 1; overflow: hidden; }
.wj-imagebox__img img { display: block; width: 100%; height: 100%; object-fit: contain; }
.wj-imagebox__link::after {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	box-shadow: 0 0 0 0 #000 inset; transition: box-shadow .2s;
}
.wj-imagebox__link:hover::after { box-shadow: 0 0 0 5px #000 inset; }
.wj-imagebox__label {
	position: absolute; left: -8px; bottom: 20px;
	background: #000; color: #fff; font-size: 12px; line-height: 1; padding: 9px 13px;
}
.wj-imagebox__title { margin: 15px 0 0; font: 700 20px/1.3 var(--wj-font-display); color: #000; }

/* Headings used on Contact */
.wj-title-light { font: 400 22px/1.4 var(--wj-font-display); letter-spacing: 1px; color: #535353; margin-top: 0; }
.wj-callout { text-align: center; padding: 20px; color: #333; }

/* QR block on Contact */
.qrCode { margin: 0 0 10px 20px; text-align: left; }
.qrCode h6 { margin: 0 0 6px; font-weight: 400; }

/* Fluent Forms fine-tuning to match the site */
.fluentform .ff-el-form-control { border-radius: 4px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
	background: var(--wj-footer-bg);
	color: var(--wj-footer-text);
	padding: 60px 0 20px;
	font-size: 14px;
	line-height: 20px;
}
.site-footer a { color: #fff; }
.footer-widgets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-bottom: 30px; }
@media (max-width: 767px) { .footer-widgets { grid-template-columns: 1fr; } }
.footer-widgets h2, .footer-widgets h3, .footer-widgets .widget-title { color: #fff; font: 700 14px/20px var(--wj-font-alt); text-transform: uppercase; margin: 0 0 15px; }
.site-footer__bottom {
	border-top: 5px solid var(--wj-footer-line);
	padding-top: 50px;
	text-align: center;
	color: #a7a7a7;
}
.site-footer__bottom img { max-width: 200px; margin-top: 4px; }

/* Back to top */
.to-top {
	position: fixed; right: 23px; bottom: 105px; z-index: 90;
	width: 46px; height: 46px;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	background: var(--wj-totop); color: #fff; border: 0; cursor: pointer;
	font: 700 9px/1 var(--wj-font-body); text-transform: uppercase;
	opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.to-top svg { width: 12px; height: 12px; fill: currentColor; margin-bottom: 4px; }
.to-top.is-visible { opacity: 1; visibility: visible; }
.to-top:hover { background: #000; }

/* ==========================================================================
   Generic templates (404, search, posts)
   ========================================================================== */
.error-404 { text-align: center; padding: 40px 0 60px; }
.error-404 .error-code { font: 400 180px/1 var(--wj-font-display); color: #c4c4c4; margin: 0; }
.search-form { display: flex; max-width: 420px; margin: 20px auto 0; }
.search-form .search-field { flex: 1; padding: 10px 14px; border: 1px solid #ccc; font: inherit; }
.search-form .search-submit { padding: 10px 18px; border: 0; background: #000; color: #fff; font: inherit; cursor: pointer; }
.post-list article { margin-bottom: 40px; }
.post-meta { color: #888; font-size: 12px; }
.pagination .nav-links { display: flex; gap: 6px; justify-content: center; }
.pagination .page-numbers { padding: 6px 12px; background: #fff; }
.pagination .page-numbers.current { background: #000; color: #fff; }
