/*
Template:       onelisting
Theme Name:     OneListing Child — iFishCanada
Theme URI:      https://ifishcanada.com/
Author:         iFishCanada
Description:    A light, update-safe visual layer for the OneListing directory theme, with reader-first typography, one-click block patterns, and a customizer-driven page banner.
Version:        1.5.0
Text Domain:    onelisting-child-ifishcanada
*/

/*
 * iFishCanada foundation
 * This deliberately changes presentation only. Directorist listing fields,
 * templates, search, and category behaviour remain controlled by the parent
 * theme and plugin.
 */
:root {
	--color-primary: #176a8e;
	--color-primary-rgb: 23, 106, 142;
	--color-menu-hover: #176a8e;
	--color-menu-active: #176a8e;
	--bgcolor-add-listing-button: #176a8e;
	--bgcolor-add-listing-button-hover: #0f536f;
	--color-footer-link-hover: #9fd4e7;
	--ifish-navy: #123044;
	--ifish-lake: #176a8e;
	--ifish-forest: #2f5b45;
	--ifish-cedar: #bf7b32;
	--ifish-sand: #f6f4ee;
	--ifish-ink: #21313b;

	/* Reading + component tokens (v1.2) */
	--ifish-line: #dbe5e7;
	--ifish-measure: 68ch;
	--ifish-shadow-soft: 0 8px 24px rgba(18, 48, 68, .10);
	--ifish-shadow-lift: 0 16px 35px rgba(18, 48, 68, .16);
	--ifish-radius: 8px;
}

body {
	color: var(--ifish-ink);
}

a,
.main-navigation .menu-item a:hover,
.main-navigation .current-menu-item > a {
	color: var(--ifish-lake);
}

.btn-primary,
.theme-btn.btn-primary,
.directorist-btn-primary,
.directorist-btn.directorist-btn-primary,
.directorist-btn-add-listing,
.btn-add-listing {
	background-color: var(--ifish-lake) !important;
	border-color: var(--ifish-lake) !important;
	color: #fff !important;
	border-radius: 4px;
}

.btn-primary:hover,
.theme-btn.btn-primary:hover,
.directorist-btn-primary:hover,
.directorist-btn.directorist-btn-primary:hover,
.directorist-btn-add-listing:hover,
.btn-add-listing:hover {
	background-color: #0f536f !important;
	border-color: #0f536f !important;
}

.site-footer {
	background-color: var(--ifish-navy) !important;
	--bgcolor-footer: var(--ifish-navy);
	--color-footer-title: #ffffff;
	--color-footer-text: #d7e4e9;
	--color-footer-link: #e9f3f6;
	--color-footer-link-hover: #9fd4e7;
	--color-footer-divider: rgba(255, 255, 255, .14);
}

.site-footer,
.site-footer p,
.site-footer li {
	color: #d7e4e9;
}

.site-footer a,
.site-footer .widget_nav_menu a,
.site-footer .widget a {
	color: #e9f3f6;
}

.site-footer a:hover,
.site-footer .widget_nav_menu a:hover,
.site-footer .widget a:hover {
	color: #9fd4e7;
}

.site-footer .widget-title,
.site-footer .widget-title a {
	color: #ffffff;
}

/* ==========================================================================
   READING LAYER  —  tuned for a 50–70-year-old audience
   Larger type, a comfortable line length, real spacing, underlined links.
   Targets the standard WordPress content wrappers so it works on posts and
   pages regardless of whether OneListing renders classic or block content.
   ========================================================================== */
.entry-content,
.wp-block-post-content,
.post-content,
.page-content {
	font-size: clamp(1.075rem, 0.35vw + 1rem, 1.2rem);
	line-height: 1.75;
	color: var(--ifish-ink);
}

/* Hold running text to a comfortable measure and centre the reading column,
   while images, covers, and full-width groups are free to breathe wider. */
.entry-content > :where(p, ul, ol, h2, h3, h4, blockquote, .wp-block-details, .wp-block-table),
.wp-block-post-content > :where(p, ul, ol, h2, h3, h4, blockquote, .wp-block-details, .wp-block-table) {
	max-width: var(--ifish-measure);
	margin-inline: auto;
}

.entry-content p,
.wp-block-post-content p,
.post-content p {
	margin-bottom: 1.4em;
}

.entry-content li,
.wp-block-post-content li {
	margin-bottom: .55em;
}

/* Underlined in-content links read as links to older eyes without relying on
   colour alone. Navigation and buttons are excluded. */
.entry-content a:not(.wp-block-button__link),
.wp-block-post-content a:not(.wp-block-button__link),
.post-content a:not(.wp-block-button__link) {
	text-decoration: underline;
	text-underline-offset: .16em;
	text-decoration-thickness: .06em;
	text-decoration-color: rgba(23, 106, 142, .45);
}

.entry-content a:hover:not(.wp-block-button__link),
.wp-block-post-content a:hover:not(.wp-block-button__link) {
	text-decoration-color: var(--ifish-lake);
}

/* Heading rhythm: clear hierarchy with room to breathe. */
.entry-content h2,
.wp-block-post-content h2 {
	color: var(--ifish-navy);
	font-size: clamp(1.7rem, 2vw + 1rem, 2.35rem);
	line-height: 1.15;
	margin-top: 2.2em;
	margin-bottom: .5em;
}

.entry-content h3,
.wp-block-post-content h3 {
	color: var(--ifish-navy);
	font-size: clamp(1.35rem, 1vw + 1rem, 1.7rem);
	line-height: 1.2;
	margin-top: 1.8em;
	margin-bottom: .45em;
}

/* Lead paragraph for article intros — set it on the first paragraph. */
.ifish-lead {
	font-size: clamp(1.25rem, 0.6vw + 1.1rem, 1.5rem);
	line-height: 1.55;
	color: var(--ifish-navy);
	font-weight: 500;
}

/* In-content images: soft shadow frame and real space around them so text
   never crowds a picture. */
.entry-content .wp-block-image img,
.wp-block-post-content .wp-block-image img {
	border-radius: 6px;
	box-shadow: 0 6px 18px rgba(18, 48, 68, .12);
}

.entry-content .wp-block-image,
.wp-block-post-content .wp-block-image {
	margin-top: 2rem;
	margin-bottom: 2rem;
}

.entry-content figcaption,
.wp-block-post-content figcaption,
.wp-element-caption {
	color: #55707c;
	font-size: .92rem;
	margin-top: .7rem;
	text-align: center;
}

/* Readable tables. */
.entry-content .wp-block-table td,
.entry-content .wp-block-table th,
.wp-block-post-content .wp-block-table td,
.wp-block-post-content .wp-block-table th {
	border-color: var(--ifish-line);
	padding: .7rem .9rem;
}

.entry-content .wp-block-table thead th,
.wp-block-post-content .wp-block-table thead th {
	background: var(--ifish-sand);
	color: var(--ifish-navy);
}

/* ==========================================================================
   HOMEPAGE  —  traveller-first hero and access cards
   ========================================================================== */
.ifish-hero {
	min-height: clamp(440px, 62vw, 680px);
	display: flex;
	align-items: center;
	background-color: var(--ifish-navy);
}

.ifish-hero .wp-block-cover__background {
	background: linear-gradient(90deg, rgba(10, 31, 43, .80) 0%, rgba(10, 31, 43, .54) 58%, rgba(10, 31, 43, .25) 100%) !important;
}

.ifish-hero .wp-block-heading,
.ifish-hero p {
	color: #fff;
	text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}

.ifish-hero .wp-block-heading {
	max-width: 760px;
	font-size: clamp(2.25rem, 5vw, 4.75rem);
	line-height: 1.05;
	letter-spacing: -.025em;
}

.ifish-access-cards {
	gap: 24px;
	margin: 28px auto 64px;
}

.ifish-access-card {
	background: #fff;
	border: 1px solid var(--ifish-line);
	border-radius: var(--ifish-radius);
	box-shadow: var(--ifish-shadow-soft);
	overflow: hidden;
	padding: 0 0 28px;
	transition: transform .2s ease, box-shadow .2s ease;
}

.ifish-access-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--ifish-shadow-lift);
}

.ifish-access-card > *:not(.wp-block-image) {
	margin-left: 26px;
	margin-right: 26px;
}

.ifish-access-card .wp-block-image {
	margin: 0 0 22px;
}

.ifish-access-card .wp-block-image img {
	aspect-ratio: 4 / 3;
	object-fit: cover;
	width: 100%;
	border-radius: 0;
	box-shadow: none;
}

.ifish-access-card h2,
.ifish-access-card h3 {
	color: var(--ifish-navy);
	font-size: 1.55rem;
	margin-top: 0;
}

.ifish-access-card .wp-block-button__link {
	background: var(--ifish-lake);
	border-radius: 4px;
	padding: .7rem 1.1rem;
}

/* ==========================================================================
   EDITORIAL SECTIONS + REUSABLE CONTENT BLOCKS
   ========================================================================== */
.ifish-section {
	background: var(--ifish-sand);
	padding: clamp(40px, 7vw, 88px) 24px;
}

.ifish-eyebrow {
	color: var(--ifish-forest);
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .12em;
	margin-bottom: 12px;
	text-transform: uppercase;
}

/* Callout / "good to know" note box. */
.ifish-callout {
	background: #eef6f9;
	border-left: 5px solid var(--ifish-lake);
	border-radius: 6px;
	padding: 1.2rem 1.4rem;
	margin: 2rem auto;
	max-width: var(--ifish-measure);
	box-shadow: var(--ifish-shadow-soft);
}

.ifish-callout p {
	margin-bottom: 0;
}

.ifish-callout strong {
	color: var(--ifish-navy);
}

/* Question-and-answer block. Clean, human-readable, and easy for machines to
   parse. NOTE: this ships WITHOUT FAQPage JSON-LD on purpose — see README. */
.ifish-faq {
	max-width: var(--ifish-measure);
	margin-inline: auto;
}

.ifish-faq .wp-block-details {
	background: #fff;
	border: 1px solid var(--ifish-line);
	border-radius: 6px;
	box-shadow: var(--ifish-shadow-soft);
	margin-bottom: 14px;
	padding: 0 1.25rem;
}

.ifish-faq .wp-block-details summary {
	color: var(--ifish-navy);
	cursor: pointer;
	font-size: 1.15rem;
	font-weight: 600;
	padding: 1.05rem 0;
	list-style-position: inside;
}

.ifish-faq .wp-block-details[open] summary {
	border-bottom: 1px solid var(--ifish-line);
	margin-bottom: .9rem;
}

.ifish-faq .wp-block-details p {
	margin-bottom: 1rem;
}

/* Two-up feature row (media + text). */
.ifish-feature {
	margin: 2.5rem auto;
	gap: clamp(24px, 4vw, 56px);
}

.ifish-feature .wp-block-media-text__media img {
	border-radius: var(--ifish-radius);
	box-shadow: var(--ifish-shadow-soft);
}

.ifish-feature h2 {
	color: var(--ifish-navy);
	margin-top: 0;
}

/* Full-width call-to-action band. */
.ifish-cta-band {
	background: var(--ifish-navy);
	color: #eaf3f6;
	padding: clamp(44px, 6vw, 80px) 24px;
	text-align: center;
}

.ifish-cta-band h2 {
	color: #fff;
	margin-top: 0;
}

.ifish-cta-band p {
	color: #cfe1e8;
	max-width: 54ch;
	margin-inline: auto;
}

.ifish-cta-band .wp-block-button__link {
	background: var(--ifish-cedar);
	border-radius: 4px;
	color: #fff;
	padding: .85rem 1.6rem;
}

.ifish-cta-band .wp-block-button__link:hover {
	background: #a5691f;
}

/* ==========================================================================
   BLOCK STYLE VARIATIONS  (appear in the block sidebar "Styles" panel)
   ========================================================================== */

/* Image → Framed (soft shadow) */
.wp-block-image.is-style-ifish-framed img {
	border-radius: var(--ifish-radius);
	box-shadow: var(--ifish-shadow-lift);
}

/* Image → Postcard (white border) */
.wp-block-image.is-style-ifish-postcard img {
	background: #fff;
	border-radius: 4px;
	padding: 12px;
	box-shadow: 0 12px 30px rgba(18, 48, 68, .18);
}

/* Group → iFish card */
.wp-block-group.is-style-ifish-card {
	background: #fff;
	border: 1px solid var(--ifish-line);
	border-radius: var(--ifish-radius);
	box-shadow: var(--ifish-shadow-soft);
	padding: clamp(20px, 3vw, 34px);
}

/* Group → Sand panel */
.wp-block-group.is-style-ifish-sand-panel {
	background: var(--ifish-sand);
	border-radius: var(--ifish-radius);
	padding: clamp(24px, 4vw, 44px);
}

/* Separator → Boreal rule (short, centred, cedar dot) */
.wp-block-separator.is-style-ifish-boreal {
	border: none;
	height: auto;
	max-width: 120px;
	opacity: 1;
	text-align: center;
	margin: 3rem auto;
	overflow: visible;
}

.wp-block-separator.is-style-ifish-boreal::before {
	content: "";
	display: block;
	height: 3px;
	background: linear-gradient(90deg, transparent, var(--ifish-lake) 20%, var(--ifish-lake) 80%, transparent);
	border-radius: 3px;
	position: relative;
}

.wp-block-separator.is-style-ifish-boreal::after {
	content: "";
	display: block;
	width: 9px;
	height: 9px;
	background: var(--ifish-cedar);
	border-radius: 50%;
	margin: -6px auto 0;
}

/* Quote / Pullquote → Editorial */
.wp-block-quote.is-style-ifish-editorial,
.wp-block-pullquote.is-style-ifish-editorial {
	border: none;
	border-left: 4px solid var(--ifish-cedar);
	background: var(--ifish-sand);
	border-radius: 0 8px 8px 0;
	padding: 1.4rem 1.6rem;
	margin-inline: auto;
	max-width: var(--ifish-measure);
}

.wp-block-quote.is-style-ifish-editorial p,
.wp-block-pullquote.is-style-ifish-editorial p {
	color: var(--ifish-navy);
	font-size: clamp(1.25rem, 1vw + 1rem, 1.6rem);
	line-height: 1.4;
	font-style: italic;
}

.wp-block-quote.is-style-ifish-editorial cite,
.wp-block-pullquote.is-style-ifish-editorial cite {
	color: var(--ifish-forest);
	font-style: normal;
	font-weight: 600;
}

/* ==========================================================================
   DIRECTORIST — keep cards, filters, and single-listing panels related
   ========================================================================== */
.directorist-listing,
.directorist-card,
.directorist-search-contents,
.directorist-search-form-wrap {
	border-color: var(--ifish-line);
}

.directorist-listing:hover {
	box-shadow: var(--ifish-shadow-soft);
}

.directorist-listing-title a,
.directorist-single-listing-header .directorist-listing-title {
	color: var(--ifish-navy);
}

.directorist-listing-title a:hover {
	color: var(--ifish-lake);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 781px) {
	.ifish-access-cards {
		margin-bottom: 40px;
	}

	.ifish-access-card {
		margin-bottom: 20px;
	}

	.ifish-hero .wp-block-heading {
		font-size: clamp(2.1rem, 10vw, 3.2rem);
	}

	.entry-content > :where(p, ul, ol, h2, h3, h4, blockquote),
	.wp-block-post-content > :where(p, ul, ol, h2, h3, h4, blockquote) {
		margin-inline: 0;
	}
}
