/*
Theme Name: Channel Success
Theme URI: http://channelsuccess.com.au
Author: Channel Success Team
Author URI: http://channelsuccess.com.au
Description: A custom theme for the Channel Success website migrated from Joomla to WordPress
Version: 1.5
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: channelsuccess
*/

/* ---------------------------------------------------------------------------
   Design tokens, read off the original JSN Epic Joomla template.
   Retarget the whole theme from here — nothing below hard-codes a colour.
   --------------------------------------------------------------------------- */

:root {
	/* Brand */
	--cs-navy:         #1a4b8a;  /* logo blue, headings */
	--cs-navy-dark:    #0f3260;
	--cs-link:         #1e73be;
	--cs-link-hover:   #0f4c81;
	--cs-red:          #d81f26;  /* the phone number */

	/* Chrome */
	--cs-nav-bg:        #2d2d2d;
	--cs-nav-bg-hover:  #454545;
	--cs-nav-bg-active: #4d4d4d;
	--cs-nav-text:      #d8d8d8;

	/* Surfaces */
	--cs-page-bg:      #ffffff;  /* the boxed container */
	--cs-column-bg:    #e9e9e9;  /* grey sidebar gutters */
	--cs-module-pale:        #eaf3fa;
	--cs-module-pale-border: #c8dff0;
	--cs-module-dark:        #333333;

	/* Type */
	--cs-text:        #333333;
	--cs-text-muted:  #666666;
	--cs-border:      #dcdcdc;
	--cs-font-body:    Arial, Helvetica, sans-serif;
	--cs-font-heading: Arial, Helvetica, sans-serif;

	/* Metrics. The original rendered at ~770px, which is tight on modern
	   screens; 1100px keeps the boxed identity at a readable measure. */
	--cs-page-width:    1100px;
	--cs-sidebar-width: 22%;
	--cs-gutter:        18px;
}

/* ---------------------------------------------------------------------------
   Reset and base
   --------------------------------------------------------------------------- */

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

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd {
	margin: 0;
}

body {
	font-family: var(--cs-font-body);
	font-size: 15px;
	line-height: 1.55;
	color: var(--cs-text);

	/* The dark navy gradient the boxed page sits on. */
	background-color: #0a1b2b;
	background-image: radial-gradient(
		ellipse 120% 85% at 25% 28%,
		#2f6491 0%,
		#1c4568 42%,
		#102b42 72%,
		#08161f 100%
	);
	background-attachment: fixed;
	background-repeat: no-repeat;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--cs-font-heading);
	font-weight: normal;
	line-height: 1.25;
	color: var(--cs-navy);
	margin-bottom: 0.5em;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem;  font-weight: bold; }
h4 { font-size: 1rem;    font-weight: bold; }

p, ul, ol, table, blockquote, figure {
	margin-bottom: 1.1em;
}

a {
	color: var(--cs-link);
	text-decoration: none;
}

a:hover,
a:focus {
	color: var(--cs-link-hover);
	text-decoration: underline;
}

img {
	max-width: 100%;
	height: auto;
}

/* ---------------------------------------------------------------------------
   Accessibility helpers
   --------------------------------------------------------------------------- */

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: var(--cs-page-bg);
	clip-path: none;
	color: var(--cs-navy);
	display: block;
	font-size: 0.875rem;
	font-weight: bold;
	height: auto;
	left: 8px;
	line-height: normal;
	padding: 16px 24px;
	top: 8px;
	width: auto;
	z-index: 100000;
}

/* ---------------------------------------------------------------------------
   Boxed page container
   --------------------------------------------------------------------------- */

.site {
	max-width: var(--cs-page-width);
	margin: 0 auto;
	background: var(--cs-page-bg);
	box-shadow: 0 0 24px rgba(0, 0, 0, 0.45);
}

/* ---------------------------------------------------------------------------
   Logo band
   --------------------------------------------------------------------------- */

.site-header {
	background: var(--cs-page-bg);
}

.site-branding {
	padding: 14px var(--cs-gutter);
}

.site-branding .custom-logo-link img {
	display: block;
	max-height: 54px;
	width: auto;
}

/* Text fallback until a logo image is uploaded, styled to echo the wordmark. */
.site-title {
	font-size: 2rem;
	font-style: italic;
	font-weight: bold;
	margin: 0;
	color: var(--cs-navy);
	letter-spacing: -0.01em;
}

.site-title a {
	color: var(--cs-navy);
	text-decoration: none;
}

.site-description {
	margin: 2px 0 0;
	font-size: 0.8125rem;
	color: var(--cs-text-muted);
}

/* ---------------------------------------------------------------------------
   Dark navigation bar, with the phone number sitting to its right
   --------------------------------------------------------------------------- */

.main-navigation {
	background: var(--cs-nav-bg);
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
	padding-right: var(--cs-gutter);
}

.main-navigation .menu,
.main-navigation > div > ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
}

.main-navigation li {
	position: relative;
}

/* Scoped to list items so it can't reach the phone call-out beside the menu. */
.main-navigation ul a {
	display: block;
	padding: 10px 15px;
	color: var(--cs-nav-text);
	text-decoration: none;
	font-size: 0.875rem;
	border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.main-navigation ul a:hover,
.main-navigation ul a:focus {
	background: var(--cs-nav-bg-hover);
	color: #fff;
	text-decoration: none;
}

.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a,
.main-navigation .current-menu-ancestor > a {
	background: var(--cs-nav-bg-active);
	color: #fff;
}

/* Sub-menus */
.main-navigation ul ul {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 99;
	min-width: 210px;
	flex-direction: column;
	background: var(--cs-nav-bg);
	padding: 0;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.main-navigation li:hover > ul,
.main-navigation li:focus-within > ul {
	display: flex;
}

.main-navigation ul ul a {
	border-right: 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Phone call-out */
.site-phone {
	margin-left: auto;
	padding-left: 12px;
	color: var(--cs-red);
	font-size: 1.6rem;
	font-weight: bold;
	line-height: 1;
	white-space: nowrap;
}

.site-phone a {
	color: var(--cs-red);
	text-decoration: none;
}

.site-phone a:hover {
	text-decoration: underline;
}

.menu-toggle {
	display: none;
	background: transparent;
	color: var(--cs-nav-text);
	border: 0;
	padding: 11px 15px;
	font-size: 0.875rem;
	font-weight: bold;
	cursor: pointer;
}

/* ---------------------------------------------------------------------------
   Hero band — driven by the page's featured image
   --------------------------------------------------------------------------- */

.site-hero {
	position: relative;
	line-height: 0;
}

.site-hero img {
	width: 100%;
	height: auto;
	display: block;
}

.site-hero__caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 0.875rem;
	font-weight: bold;
	line-height: 1.5;
	padding: 7px var(--cs-gutter);
}

/* ---------------------------------------------------------------------------
   MetaSlider inside the hero band.
   Written against MetaSlider's FlexSlider output so its captions, dots and
   arrows read like the original JSN ImageShow module.
   --------------------------------------------------------------------------- */

.site-hero--slider .metaslider,
.site-hero--slider .flexslider {
	margin: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	background: transparent;
}

.site-hero--slider .metaslider img {
	width: 100%;
	height: auto;
	display: block;
}

/* Caption strip — MetaSlider's own styling is overridden here. */
.site-hero--slider .metaslider .caption-wrap {
	background: rgba(0, 0, 0, 0.55);
	opacity: 1;
	bottom: 0;
	left: 0;
	right: 0;
	width: auto;
	margin: 0;
	padding: 0;
}

.site-hero--slider .metaslider .caption {
	color: #fff;
	font-size: 0.875rem;
	font-weight: bold;
	line-height: 1.5;
	padding: 7px var(--cs-gutter);
	margin: 0;
}

.site-hero--slider .metaslider .caption a {
	color: #fff;
	text-decoration: underline;
}

/* Paging dots */
.site-hero--slider .flex-control-nav {
	position: absolute;
	right: var(--cs-gutter);
	bottom: 42px;
	z-index: 5;
	width: auto;
	margin: 0;
	line-height: 1;
}

.site-hero--slider .flex-control-nav li {
	display: inline-block;
	margin: 0 3px;
}

.site-hero--slider .flex-control-paging li a {
	width: 11px;
	height: 11px;
	background: rgba(255, 255, 255, 0.45);
	box-shadow: none;
	border: 1px solid rgba(0, 0, 0, 0.25);
	border-radius: 50%;
	text-indent: -9999px;
	display: block;
	cursor: pointer;
}

.site-hero--slider .flex-control-paging li a.flex-active,
.site-hero--slider .flex-control-paging li a:hover {
	background: var(--cs-red);
}

/* Prev / next arrows — revealed on hover, as the original did. */
.site-hero--slider .flex-direction-nav a {
	background-color: rgba(0, 0, 0, 0.4);
	opacity: 0;
	transition: opacity 0.2s ease;
}

.site-hero--slider:hover .flex-direction-nav a,
.site-hero--slider .flex-direction-nav a:focus {
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	.site-hero--slider .flex-direction-nav a {
		transition: none;
	}
}

/* ---------------------------------------------------------------------------
   Three-column content area
   --------------------------------------------------------------------------- */

.site-content {
	display: flex;
	align-items: stretch;
	background: var(--cs-column-bg);
}

.content-area {
	flex: 1 1 auto;
	min-width: 0;
	background: var(--cs-page-bg);
	padding: 18px var(--cs-gutter) 28px;
}

.widget-area {
	flex: 0 0 var(--cs-sidebar-width);
	width: var(--cs-sidebar-width);
	background: var(--cs-column-bg);
	padding: 18px 12px;
}

.widget-area--left  { order: -1; }
.widget-area--right { order: 1; }

/* ---------------------------------------------------------------------------
   Sidebar modules.
   Two looks from the original: a pale blue card and a dark charcoal card.
   Add the class to a widget in Appearance > Widgets to pick one.
   --------------------------------------------------------------------------- */

.widget {
	margin-bottom: 16px;
	font-size: 0.8125rem;
	line-height: 1.5;
}

.widget:last-child {
	margin-bottom: 0;
}

.widget-title {
	font-size: 0.9375rem;
	font-weight: bold;
	color: var(--cs-navy);
	margin-bottom: 8px;
}

.widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.widget li {
	padding: 4px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.widget li:last-child {
	border-bottom: 0;
}

/* Card treatments for sidebar modules.
   These work whether the class sits on the widget wrapper itself or on a
   block inside it, so both the classic and block widget editors are covered. */

/* Pale blue card — the "Partner Application" module */
.cs-card-pale {
	background: var(--cs-module-pale);
	border: 1px solid var(--cs-module-pale-border);
	padding: 12px 14px;
}

/* Dark card — the "Services" module */
.cs-card-dark {
	background: var(--cs-module-dark);
	color: #d5d5d5;
	padding: 12px 14px;
}

.cs-card-dark .widget-title,
.cs-card-dark h1,
.cs-card-dark h2,
.cs-card-dark h3,
.cs-card-dark h4 {
	color: #fff;
}

.cs-card-dark a {
	color: #8fc4ea;
}

.cs-card-dark li {
	border-bottom-color: rgba(255, 255, 255, 0.12);
}

/* Keep the card's bottom padding even */
.cs-card-pale > :last-child,
.cs-card-dark > :last-child {
	margin-bottom: 0;
}

/* ---------------------------------------------------------------------------
   Entries
   --------------------------------------------------------------------------- */

.entry-header {
	margin-bottom: 12px;
}

.page-header {
	padding-bottom: 10px;
	border-bottom: 1px solid var(--cs-border);
	margin-bottom: 22px;
}

.entry-title {
	font-size: 1.5rem;
	color: var(--cs-navy);
	margin-bottom: 6px;
}

.entry-title a {
	color: var(--cs-navy);
	text-decoration: none;
}

.entry-title a:hover,
.entry-title a:focus {
	text-decoration: underline;
}

.entry-meta,
.entry-footer {
	font-size: 0.75rem;
	color: var(--cs-text-muted);
}

.entry-meta a,
.entry-footer a {
	color: var(--cs-text-muted);
}

.entry-footer {
	margin-top: 12px;
	padding-top: 10px;
	border-top: 1px solid var(--cs-border);
}

.entry-footer > span + span::before {
	content: " \00b7 ";
	margin: 0 4px;
}

.site-main > article {
	padding-bottom: 24px;
	margin-bottom: 24px;
	border-bottom: 1px solid var(--cs-border);
}

.site-main > article:last-of-type {
	border-bottom: 0;
	margin-bottom: 0;
}

.single .site-main > article,
.page .site-main > article {
	border-bottom: 0;
	padding-bottom: 0;
	margin-bottom: 0;
}

/* The italic standfirst paragraph the original used under article titles */
.entry-content > p:first-of-type.lead,
.entry-content .lead {
	font-style: italic;
	color: var(--cs-navy);
}

/* ---------------------------------------------------------------------------
   Post navigation
   --------------------------------------------------------------------------- */

.posts-navigation,
.post-navigation {
	margin: 24px 0 0;
	padding-top: 16px;
	border-top: 1px solid var(--cs-border);
	display: flex;
	justify-content: space-between;
	gap: 16px;
	font-size: 0.875rem;
}

/* ---------------------------------------------------------------------------
   Forms
   --------------------------------------------------------------------------- */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"],
textarea,
select {
	width: 100%;
	max-width: 100%;
	padding: 7px 9px;
	border: 1px solid #c4c4c4;
	font-family: inherit;
	font-size: 0.875rem;
	color: var(--cs-text);
	background: #fff;
}

input:focus,
textarea:focus,
select:focus {
	outline: 2px solid var(--cs-link);
	outline-offset: 1px;
	border-color: var(--cs-link);
}

input[type="submit"],
button[type="submit"],
.button {
	display: inline-block;
	width: auto;
	background: var(--cs-navy);
	color: #fff;
	border: 0;
	padding: 8px 18px;
	font-size: 0.875rem;
	font-weight: bold;
	cursor: pointer;
	text-decoration: none;
}

input[type="submit"]:hover,
button[type="submit"]:hover,
.button:hover {
	background: var(--cs-navy-dark);
}

.search-form {
	display: flex;
	gap: 6px;
}

.search-form label {
	flex: 1 1 auto;
	margin: 0;
}

.search-form .search-submit {
	flex: 0 0 auto;
}

/* ---------------------------------------------------------------------------
   Comments
   --------------------------------------------------------------------------- */

.comments-area {
	margin-top: 32px;
	padding-top: 20px;
	border-top: 1px solid var(--cs-border);
}

.comment-list {
	list-style: none;
	margin: 0 0 28px;
	padding: 0;
}

.comment-list li {
	margin-bottom: 16px;
}

.comment-list .children {
	list-style: none;
	margin-left: 28px;
	padding-left: 14px;
	border-left: 2px solid var(--cs-border);
}

.comment-body {
	background: #f6f6f6;
	padding: 14px 16px;
}

.comment-meta {
	font-size: 0.8125rem;
	color: var(--cs-text-muted);
	margin-bottom: 6px;
}

.comment-form label {
	display: block;
	font-weight: bold;
	margin-bottom: 3px;
}

.comment-form p {
	margin-bottom: 14px;
}

/* ---------------------------------------------------------------------------
   WordPress core content classes
   --------------------------------------------------------------------------- */

.alignleft  { float: left;  margin: 0 1.4em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.4em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide, .alignfull { max-width: 100%; }

.wp-caption {
	max-width: 100%;
	margin-bottom: 1.1em;
}

.wp-caption-text,
.wp-block-image figcaption {
	font-size: 0.8125rem;
	color: var(--cs-text-muted);
	text-align: center;
	margin-top: 5px;
}

.sticky {
	background: var(--cs-module-pale);
	padding: 16px;
	border-left: 4px solid var(--cs-navy);
}

.page-links {
	clear: both;
	margin: 14px 0;
	font-weight: bold;
}

blockquote {
	border-left: 4px solid var(--cs-navy);
	padding-left: 16px;
	margin-left: 0;
	color: var(--cs-text-muted);
	font-style: italic;
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.875rem;
}

th, td {
	padding: 8px 10px;
	border: 1px solid var(--cs-border);
	text-align: left;
}

th {
	background: #f2f2f2;
}

.entry-content::after,
.site-content::after {
	content: "";
	display: table;
	clear: both;
}

/* ---------------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------------- */

.site-footer {
	background: var(--cs-page-bg);
	border-top: 1px solid var(--cs-border);
	padding: 16px var(--cs-gutter);
	text-align: center;
	font-size: 0.8125rem;
	color: var(--cs-text-muted);
}

.site-footer p {
	margin: 0 0 3px;
}

.site-footer p:last-child {
	margin-bottom: 0;
}

/* ---------------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------------- */

@media (max-width: 900px) {
	.site-content {
		flex-direction: column;
	}

	.widget-area {
		flex: 1 1 auto;
		width: 100%;
	}

	.widget-area--left  { order: 1; }
	.widget-area--right { order: 2; }

	.site-phone {
		font-size: 1.3rem;
	}
}

@media (max-width: 768px) {
	.site {
		max-width: 100%;
	}

	.menu-toggle {
		display: block;
	}

	.main-navigation {
		align-items: flex-start;
		flex-direction: column;
		gap: 0;
		padding-right: 0;
	}

	.main-navigation .menu,
	.main-navigation > div > ul {
		display: none;
		flex-direction: column;
		width: 100%;
	}

	.main-navigation.toggled .menu,
	.main-navigation.toggled > div > ul {
		display: flex;
	}

	.main-navigation ul a {
		border-right: 0;
		border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	}

	.main-navigation ul ul {
		display: flex;
		position: static;
		box-shadow: none;
		min-width: 0;
		padding-left: 16px;
	}

	.site-phone {
		margin: 0;
		padding: 10px 15px;
		font-size: 1.25rem;
	}
}
