/*
Theme Name:   Blocksy Child – Mark Sisley
Theme URI:    https://www.marksisley.co.uk/
Description:  Child theme of Blocksy for Mark Sisley Photography. Recreates the look of the original bespoke theme: colours, fonts, header and footer are set in the Customizer; this file holds the page-content styles and the ported page templates.
Author:       Plexus Media
Template:     blocksy
Version:      1.0.0
Requires PHP: 7.4
Text Domain:  blocksy-child
*/

/* ==========================================================================
   Colour variables
   The old theme's variable names are kept (they are referenced in page
   content and Additional CSS) but now point at the Blocksy palette, so a
   change in Customizer > Colors flows through everything.
     color1 links          #26FF26
     color2 link hover     #ffffff
     color3 body text      #ffffff
     color4 headings       #ffffff
     color5 mid panel      #5b5b84
     color6 sub-heading    #9c9cb5
     color7 light panel    #dedee6
     color8 background     #01004f
   ========================================================================== */
:root {
	--background-colour: var(--theme-palette-color-8, #01004f);
	--med-panel-colour: var(--theme-palette-color-5, #5b5b84);
	--subheading-colour: var(--theme-palette-color-6, #9c9cb5);
	--light-panel-colour: var(--theme-palette-color-7, #dedee6);
	--menu-header-colour: var(--theme-palette-color-5, #5b5b84);
	--header-text-colour: #fff;
	--logo-text-colour: #fff;
	--main-text-colour: var(--theme-palette-color-4, #fff);
	--rollover-colour: var(--theme-palette-color-2, #fff);
	--links-colour: var(--theme-palette-color-1, #26FF26);
	--user-entry-box-background-colour: var(--theme-palette-color-5, #5b5b84);
	--user-entry-box-outline-colour: var(--theme-palette-color-5, #5b5b84);
	--default-colour: #fff;
	--ms-muted: #999999;
}

/* ==========================================================================
   General
   ========================================================================== */
ul, ol { color: var(--main-text-colour); }

.entry-content a,
.page-content a { text-decoration: none; }

a.black:link, a.black:visited { color: var(--background-colour); }
a.black:hover { color: var(--subheading-colour); }
a.white:link, a.white:visited { color: #fff; }
a.white:hover { color: var(--subheading-colour); }

/* Telephone links (header & footer) */
a.tele:link, a.tele:visited { color: var(--ms-muted); }
a.tele:hover, a.tele:active { color: var(--links-colour); }
a.telewhite:link, a.telewhite:visited { color: #fff; }
a.telewhite:hover, a.telewhite:active { color: var(--links-colour); }

/* Old theme rendered headings at regular weight, H1 & H2 at 36px */
h1, h2 { margin-bottom: 20px; }

/* ==========================================================================
   Header tweaks the Customizer can't express
   ========================================================================== */
/* Phone numbers sit above the menu, right aligned, no paragraph margin */
#header [data-id="text"] p { margin: 0; }

/* The thin rule under the header is hidden on the home page, as before */
.home #header [data-row*="middle"] > div { border-bottom: 0 !important; }

/* Mobile trigger label in caps like the old MENU button */
#header .ct-header-trigger .ct-label { text-transform: uppercase; letter-spacing: 0.02em; }

/* Live site's menu had no dropdown arrows */
#header .ct-toggle-dropdown-desktop,
#header .ct-toggle-dropdown-desktop-ghost { display: none !important; }
#header .menu > li.menu-item-has-children > .ct-menu-link { padding-right: 0; }

/* Keep every top-level item visible on smaller laptops (old theme behaviour) */
@media (min-width: 1000px) and (max-width: 1280px) {
	#header [data-id="menu"] > ul > li > .ct-menu-link { font-size: 14px; padding-left: 5px; padding-right: 5px; }
}
@media (min-width: 1000px) and (max-width: 1100px) {
	#header [data-id="menu"] > ul > li > .ct-menu-link { font-size: 13px; padding-left: 4px; padding-right: 4px; }
}

/* Old theme removed the gap between the header and the hero slider */
.home .site-main { padding-top: 0; }

/* ==========================================================================
   Ported template layout
   ========================================================================== */
.ms-container {
	max-width: 1920px;
	margin: 0 auto;
	padding: 0 60px;
}
.container-sm {
	max-width: 1280px;
	margin: 0 auto;
}
.ms-page { padding-top: 20px; }

/* Section sub-menu: Main Galleries / About / Prices ... */
.page-nav { margin-bottom: 10px; }
.page-nav ul { list-style: none; margin: 0; padding: 0; }
.page-nav ul li { display: inline-block; margin: 0 4px 5px 0; }
.page-nav ul li a {
	display: inline-block;
	background: var(--med-panel-colour);
	padding: 2px 7px;
	text-transform: uppercase;
	color: var(--main-text-colour);
	line-height: 1.5;
}
.page-nav ul li a:hover,
.page-nav ul li.current-menu-item > a,
.page-nav ul li.current_page_item > a {
	background: var(--main-text-colour);
	color: var(--med-panel-colour);
}

/* County dropdown on venue pages */
.county-dropdown {
	position: relative;
	background: var(--med-panel-colour);
	padding: 1px 1px 1px 10px;
	color: var(--main-text-colour);
	text-transform: uppercase;
}
.county-dropdown > a.js-drop {
	background: var(--main-text-colour) !important;
	color: #444 !important;
	margin-left: 10px;
	padding: 1px 30px 1px 15px !important;
}
.county-dropdown::after {
	content: "";
	position: absolute;
	right: 6px;
	top: 11px;
	border-left: 8px solid transparent;
	border-right: 8px solid transparent;
	border-top: 8px solid #aaa;
	pointer-events: none;
}
.county-dropdown ul.counties-ul {
	position: absolute;
	z-index: 999;
	background: #fff;
	left: 78px;
	top: 100%;
	display: none;
}
.county-dropdown ul.counties-ul li { display: block; min-width: 215px; margin: 0; }
.county-dropdown ul.counties-ul li a {
	display: block;
	background: #fff !important;
	color: #444 !important;
	text-align: left;
	margin: 0;
	padding: 5px 26px 5px 15px !important;
}
.county-dropdown ul.counties-ul li a:hover { background: #ccc !important; }

/* Panels (panels layout / 3 col / full width templates) */
.row { overflow: auto; padding: 20px 0; }
.row::after { content: ""; display: table; clear: both; }
.col, .col3 { float: left; padding: 0 20px; margin-bottom: 20px; }
.col { width: 50%; }
.col3 { width: 33.333%; }
.full-col { padding: 0 30px; }
.panels .row:nth-child(2n) { background: var(--med-panel-colour); }
.panels .row:nth-child(2n) p { color: #fff !important; }
.panels .row:nth-child(3n) { background: var(--light-panel-colour); }
.panels .row:nth-child(3n) p,
.panels .row:nth-child(3n) h3,
.panels .row:nth-child(3n) li { color: var(--background-colour) !important; }
.bg-grey { background: var(--med-panel-colour); }
.bg-lgrey { background: var(--light-panel-colour); }
.page-content h2:first-child { margin-top: 0; }

/* Gallery tile listings (listing page / venue directory) */
.g-listing { margin-top: 25px; }
.g-listing ul { list-style: none; margin: 0; padding: 0; text-align: center; }
.g-listing ul li {
	position: relative;
	max-width: 435px;
	height: 435px;
	display: inline-block;
	overflow: hidden;
	vertical-align: top;
}
.g-listing ul li img { display: block; width: 100%; height: auto; }
.g-listing ul li p.caption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	margin: 0;
	z-index: 99;
	background: var(--background-colour);
	color: #fff;
	font-size: 18px;
	padding: 10px 0;
}

/* Hover reveal used on gallery tiles, venue slider and gallery links */
.i-container { position: relative; display: block; cursor: pointer; }
.i-container img { display: block; }
.i-container::before {
	content: "";
	position: absolute;
	z-index: 1;
	inset: 0;
	background: var(--background-colour);
	transform: scaleY(0);
	transform-origin: 50% 0;
	transition: transform 0.5s ease-out;
}
.i-container:hover::before {
	transform: scaleY(1);
	transition-timing-function: cubic-bezier(0.52, 1.64, 0.37, 0.66);
}
.hover-caption {
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	z-index: 9;
	transform: translateY(-50%);
	display: none;
	padding: 0 10px;
	text-align: center;
}
.i-container:hover .hover-caption { display: block; }
.hover-caption, .hover-caption p { color: var(--main-text-colour); font-size: 14px; }
.hover-caption p { margin: 0; padding-bottom: 10px; }

/* ==========================================================================
   Front page
   ========================================================================== */
.home-content { text-align: center; }
.home-slider { margin-top: 0; }
.home-slider .flexslider { margin: 0; border: 0; background: transparent; box-shadow: none; }
.home-slider .slides img { width: 100%; height: auto; }
.slider { border-bottom: 1px solid #666; padding-bottom: 10px; }
.welcome-content h1 { margin-top: 30px; }

.image-panel-1 {
	min-height: 460px;
	background-attachment: fixed;
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
	margin-top: 40px;
	border: 2px solid #aaa;
}

.venu-slider { max-width: 1100px; margin: 0 auto; }
.bslid h3 {
	color: var(--main-text-colour);
	font-size: 18px;
	text-transform: uppercase;
	font-weight: 400;
	margin-top: 0;
}
.bx-viewport { height: auto !important; }
/* Venue thumbnails: same size whatever the source image dimensions */
.bslid .i-container { width: 100%; aspect-ratio: 8 / 5; overflow: hidden; }
.bslid .i-container img { width: 100%; height: 100%; object-fit: cover; }
.bx-wrapper .bx-viewport { background: transparent; border: 0; box-shadow: none; left: 0; }

.link { font-size: 22px; color: var(--menu-header-colour); }
a.link:link, a.link:visited { color: var(--med-panel-colour); }
a.link:hover { color: var(--main-text-colour); }

.add-links { margin-top: 30px; }
.add-links h3 { font-size: 24px; color: var(--main-text-colour); font-weight: 400; }
.one-row { display: table; width: 100%; }
.one-row .one3 { display: table-cell; padding: 0 5px; }
.one-row .one3 img { width: 100%; height: auto; }

/* Responsive video embeds in home content */
.fluid-width-video-wrapper { aspect-ratio: 4 / 3; }

/* ==========================================================================
   Blog search box (kept for any content that uses the old markup)
   ========================================================================== */
.seaarch-blog { margin: 0 auto 35px; max-width: 507px; position: relative; }
.seaarch-blog input[type=text] {
	width: 100%;
	border: 1px solid var(--med-panel-colour);
	border-radius: 0;
	color: #fff;
	padding: 7px 10px;
}

/* ==========================================================================
   Forms: Fluent Forms, Sunshine galleries and payment fields
   ========================================================================== */
.frm-fluent-form { margin: 0 auto; max-width: 800px; color: #fff; }
.frm-fluent-form label,
.frm-fluent-form .uh { color: #fff; }
.frm-fluent-form input:is([type=text], [type=email], [type=number], [type=tel]):not(:focus),
.frm-fluent-form textarea:not(:focus),
.ff_stripe_card_element { color: #fff !important; }
.frm-fluent-form .error { background-color: var(--med-panel-colour) !important; color: #fff !important; }
.frm-fluent-form .title { display: inline-flex; margin-left: 20px; }
.frm-fluent-form .title strong { position: absolute; margin-top: -30px; }
.ct-icon, .ct-icon-container svg { fill: var(--theme-icon-color, var(--theme-text-color)); }

input[name=sunshine_gallery_password] { background-color: var(--med-panel-colour) !important; color: #fff !important; }

.cpp_form { margin: 0 auto; max-width: 800px; }
.cpp_form label, .cpp_form .uh { color: #fff; }
.cpp_form input[type=text], .cpp_form textarea { background-color: var(--med-panel-colour) !important; color: #fff !important; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1280px) {
	.venu-slider { max-width: 832px; }
	.hover-caption, .hover-caption p { font-size: 12px; }
}

@media (max-width: 1024px) {
	.image-panel-1 { background-attachment: scroll; }
}

@media (max-width: 1023px) {
	.col, .col3 { width: 100%; float: none; }
}

@media (max-width: 768px) {
	.ms-container { padding: 0 50px; }
	.bx-wrapper { max-width: 400px; margin: 0 auto; }
}

@media (max-width: 767px) {
	.ms-container { padding: 0 20px; }
	.ms-page { padding-top: 10px; }
	h1, h2 { margin-top: 20px; margin-bottom: 10px; }
	h3 { font-size: 18px; }
	.entry-content p, .page-content p, .entry-content li, .page-content li { font-size: 14px; }
	.venu-slider h2 { font-size: 18px; }
	.bslid h3 { font-size: 14px; }
	.add-links h3 { font-size: 18px; }
	.one-row, .one-row .one3 { display: block; }
	.one-row .one3 { margin-bottom: 20px; }
	.link { font-size: 20px; }
	.g-listing ul li { height: auto; }
	.county-dropdown ul.counties-ul li { min-width: 194px; }
	.bx-wrapper .bx-prev { left: -45px; }
	.bx-wrapper .bx-next { right: -45px; }
}

/* bxSlider loading overlay must never block clicks on the venue slides */
.bx-wrapper .bx-loading { display: none !important; pointer-events: none; }
