/*
Theme Name: Escape to Phoenix
Theme URI: https://escapetophoenix.com/
Author: Raffle Nexus Canada Inc.
Description: A lightweight theme for the Escape to Phoenix vacation homes, styled after the original site. No plugins required. Photo galleries, a map, and a contact form are built in.
Version: 1.1.1
Requires at least: 6.3
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: escape-to-phoenix
*/

:root {
	--red: #ba220c;
	--blue: #04639e;
	--text: #595959;
	--dark: #333;
	--line: #ddd;
	--page: 978px;
	--serif: Georgia, "Times New Roman", Times, serif;
	--sans: "Open Sans", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	overflow-x: hidden;
	background: #ededed url(images/pattern.png) repeat left top;
	color: var(--text);
	font: 16px/1.6 var(--serif);
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration: none; transition: color .2s ease-in-out; }
a:hover, a:focus { color: var(--text); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: normal; margin: 0; padding: 12px 0; }
h1 { font-size: 36px; line-height: 48px; }
h2 { font-size: 26px; line-height: 36px; }
h3 { font-size: 20px; line-height: 28px; }
p { margin: 0 0 1.1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 30px 0; }
.wrap { width: min(100% - 20px, var(--page)); margin-inline: auto; }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
	position: fixed; top: .5rem; left: .5rem; z-index: 1000; width: auto; height: auto;
	clip: auto; padding: .6rem 1rem; background: #fff; color: var(--dark);
}

/* Header and logo */
.site-header { padding: 24px 0; }
.site-logo { text-align: center; }
.site-logo a, .site-logo .custom-logo-link { display: inline-block; }
.site-logo img, .custom-logo { display: block; margin-inline: auto; max-width: 100%; height: auto; }

/* Menu bar */
.nav-bar {
	background-color: #484848;
	background-image: linear-gradient(to top, #222 0%, #3b3b3b 50%, #333 50%, #484848 100%);
	border: 1px solid #222;
	border-radius: 3px 3px 0 0;
	box-shadow: 0 1px 0 #777 inset;
}
.main-nav .menu { list-style: none; display: flex; flex-wrap: wrap; margin: 0; padding: 0; }
.main-nav a {
	display: block; padding: 14px 20px; color: #fff; font-size: 15px;
	text-shadow: 1px 1px 0 #000; text-transform: capitalize;
}
.main-nav a:hover, .main-nav a:focus,
.main-nav .current-menu-item > a, .main-nav .current_page_item > a { background: var(--blue); color: #fff; }
.menu-toggle {
	display: none; width: 100%; text-align: left; background: none; border: 0; color: #fff;
	font: 15px var(--serif); padding: 14px 20px; text-shadow: 1px 1px 0 #000; cursor: pointer;
}

/* Content panel */
.panel {
	background: #fff; border: 2px solid rgba(0, 0, 0, .12); border-top: 0;
	padding: 10px 28px 30px; margin-bottom: 30px; min-height: 300px;
}
.breadcrumb { padding: 15px 0; font-size: 11px; text-transform: uppercase; color: #969696; }
.breadcrumb a { font-size: 11px; }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb .sep { padding: 0 4px; }
.breadcrumb .trail-before { margin-right: 5px; }
.entry-title { font-size: 30px; line-height: normal; color: var(--red); padding: 0; margin-bottom: 20px; }
.entry-title a { color: var(--red); }
.entry-title a:hover { color: var(--blue); }
.entry-content h2 { padding-bottom: 0; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.entry-content blockquote { margin: 1.5rem 0; padding: .25rem 0 .25rem 1.25rem; border-left: 4px solid var(--red); font-style: italic; }
.entry-content > :last-child { margin-bottom: 0; }
.intro { margin-bottom: 1.5rem; }

/* Buttons */
.button, .etp-form button[type="submit"] {
	display: inline-block; height: auto; background: var(--red); color: #fff;
	border: 1px solid rgba(0, 0, 0, .3); border-radius: 50px; box-shadow: 1px 1px 1px #666;
	font: 15px/normal var(--serif); white-space: nowrap; cursor: pointer; padding: 8px 20px;
}
.button:hover, .button:focus, .etp-form button[type="submit"]:hover { background: var(--blue); color: #fff; }
.button:active, .etp-form button[type="submit"]:active { box-shadow: none; }

/* Property facts, using the original icon sprite */
.facts { list-style: none; display: flex; margin: 20px 0; padding: 0; }
.fact { flex: 1 1 0; min-width: 0; text-align: center; }
.fact-icon { display: block; width: 46px; height: 34px; margin: 0 auto; background: url(images/escape-icons.png) no-repeat 0 0; }
.fact-icon.house { background-position: 0 0; }
.fact-icon.sleeps { background-position: -46px 0; }
.fact-icon.bedrooms { background-position: -92px 0; }
.fact-icon.bathrooms { background-position: -138px 0; }
.fact-icon.stay { background-position: -184px 0; }
.fact-label { display: block; margin: 15px 0 5px; font: 500 .9em var(--sans); color: #7b7f83; }
.fact-value { display: block; font: 300 1.4em var(--sans); color: #7b7f83; }
.home-note { background: #f8f8f8; border: 1px solid var(--line); padding: 10px 15px; }
.tagline { margin-bottom: 1.2em; }

/* Photo viewer: image with Prev, count, Next below */
.etp-viewer { margin: 0 0 6px; }
.etp-slides { list-style: none; margin: 0; padding: 0; }
.etp-slide[hidden] { display: none; }
.etp-slide img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #eee; cursor: zoom-in; }
.etp-controls { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 10px 0 0; font-size: 14px; }
.etp-nav {
	background: none; border: 1px solid #ccc; border-radius: 50px; padding: 3px 16px;
	font: inherit; color: var(--blue); cursor: pointer;
}
.etp-nav:hover, .etp-nav:focus { background: var(--blue); border-color: var(--blue); color: #fff; }
.etp-count { margin: 0; color: #969696; }
.etp-thumbs { list-style: none; display: flex; gap: .5rem; overflow-x: auto; margin: .6rem 0 0; padding: 0 0 .4rem; }
.etp-thumb { border: 3px solid transparent; padding: 0; background: none; cursor: pointer; opacity: .75; }
.etp-thumb[aria-current="true"] { border-color: var(--red); opacity: 1; }
.etp-thumb img { display: block; width: 84px; height: 62px; object-fit: cover; }

/* Lightbox */
.etp-lightbox { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.92); }
.etp-lightbox.is-open { display: flex; }
.etp-lightbox img { max-width: 94vw; max-height: 90vh; object-fit: contain; }
.etp-lightbox button { position: absolute; background: rgba(255,255,255,.15); color: #fff; border: 0; border-radius: 50%; width: 48px; height: 48px; font-size: 1.8rem; cursor: pointer; }
.etp-lightbox button:hover, .etp-lightbox button:focus { background: rgba(255,255,255,.35); }
.etp-lb-close { top: 1rem; right: 1rem; }
.etp-lb-prev { left: 1rem; }
.etp-lb-next { right: 1rem; }

/* Map */
.etp-map { height: min(70vh, 540px); min-height: 360px; border: 1px solid var(--line); z-index: 1; }
.map-key { margin-top: 8px; }

/* Contact form */
.etp-form { display: grid; gap: 14px; max-width: 40rem; }
.etp-form .row { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.etp-form label { display: block; margin-bottom: 3px; }
.etp-form input, .etp-form select, .etp-form textarea {
	width: 100%; padding: 8px 10px; border: 1px solid #ccc; border-radius: 3px; font: inherit; color: var(--text); background: #fff;
}
.etp-form input:focus, .etp-form select:focus, .etp-form textarea:focus { outline: 2px solid rgba(4, 99, 158, .35); border-color: var(--blue); }
.etp-hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.etp-notice { padding: 12px 16px; border-radius: 3px; margin-bottom: 20px; max-width: 40rem; }
.etp-notice-ok { background: #e6f4ea; border: 1px solid #a8d5b5; }
.etp-notice-error { background: #fdeaea; border: 1px solid #e3a7a7; }

/* Footer widgets and copyright */
.site-footer { font-size: 14px; }
.footer-widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 30px; padding: 0 0 10px; }
.footer-widgets h3 { color: var(--dark); border-bottom: 1px solid #ccc; padding: 0 0 8px; margin-bottom: 12px; }
.footer-widgets address { font-style: normal; margin-bottom: 14px; }
.copyright { text-align: center; padding: 10px 0 30px; margin: 0; color: var(--text); }

@media (max-width: 820px) {
	.menu-toggle { display: block; }
	.main-nav { display: none; }
	.main-nav.is-open { display: block; }
	.main-nav .menu { flex-direction: column; }
	.panel { padding-inline: 16px; }
	.etp-form .row { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
	.facts { flex-wrap: wrap; }
	.fact { flex: 0 0 33.333%; margin-bottom: 14px; }
	h1 { font-size: 28px; line-height: 38px; }
	.entry-title { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
