/*
Theme Name: Security System Story (GeneratePress)
Theme URI: https://securitysystemstory.com
Description: GeneratePress child theme with Sahifa demo-inspired magazine homepage.
Author: Security System Story
Template: generatepress
Version: 1.0.0
Text Domain: generatepress-securitysystemstory
*/

/* Child-specific tweaks loaded after sahifa-demo.css */

body.gp-magazine-theme {
	background: #f5f5f5;
}

/* Search and archive listing pages */
.gp-search-wrap,
.gp-archive-wrap {
	margin-top: 20px;
	margin-bottom: 30px;
}

.gp-search-header,
.gp-archive-header {
	background: #fff;
	border: 1px solid #e5e5e5;
	padding: 16px 18px;
	margin-bottom: 16px;
}

.gp-search-title,
.gp-archive-title {
	margin: 0;
	font-size: 22px;
	line-height: 1.35;
	color: #222;
}

.gp-search-title mark {
	background: #fff3a0;
	padding: 0 4px;
}

.gp-search-count {
	margin: 8px 0 0;
	font-size: 13px;
	color: #777;
}

.gp-archive-description {
	margin-top: 8px;
	font-size: 14px;
	line-height: 1.5;
	color: #666;
}

.gp-archive-header .gp-breadcrumbs {
	font-size: 12px;
	color: #888;
	margin-bottom: 14px;
	padding: 8px 0;
	border-bottom: 1px solid #e5e5e5;
}

.gp-archive-header .gp-breadcrumbs a {
	color: #666;
	text-decoration: none;
}

.gp-archive-header .gp-breadcrumbs a:hover {
	color: #f88c00;
}

.gp-archive-header .gp-breadcrumb-current {
	color: #333;
}

.gp-search-empty,
.gp-archive-empty {
	background: #fff;
	border: 1px solid #e5e5e5;
	padding: 18px;
}

.gp-search-result,
.gp-archive-result {
	padding: 16px;
	margin-bottom: 16px;
}

.gp-search-result-inner,
.gp-archive-result-inner {
	display: flex;
	gap: 16px;
	align-items: flex-start;
}

.gp-search-thumb,
.gp-archive-thumb {
	flex: 0 0 180px;
	display: block;
	overflow: hidden;
}

.gp-search-thumb img,
.gp-archive-thumb img {
	display: block;
	width: 100%;
	height: auto;
}

.gp-search-content,
.gp-archive-content {
	flex: 1 1 auto;
	min-width: 0;
}

.gp-search-result .gp-excerpt img,
.gp-archive-result .gp-excerpt img {
	max-width: 180px;
	height: auto;
	float: left;
	margin: 0 16px 12px 0;
}

.gp-search-wrap .navigation.pagination,
.gp-search-wrap .nav-links,
.gp-archive-wrap .navigation.pagination,
.gp-archive-wrap .nav-links {
	padding: 14px 0;
	text-align: center;
}

@media (max-width: 768px) {
	.gp-search-result-inner,
	.gp-archive-result-inner {
		flex-direction: column;
	}

	.gp-search-thumb,
	.gp-archive-thumb {
		flex-basis: auto;
		max-width: 100%;
	}

	.gp-search-result .gp-excerpt img,
	.gp-archive-result .gp-excerpt img {
		float: none;
		max-width: 100%;
		margin: 0 0 12px;
	}
}

@media (min-width: 1025px) {
	body.gp-magazine-theme .gp-magazine-layout {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 300px;
		gap: 24px;
		align-items: start;
	}

	body.gp-magazine-theme .gp-magazine-main {
		flex: none;
		width: auto;
	}

	body.gp-magazine-theme .gp-magazine-sidebar-col {
		width: 300px;
		position: relative;
		z-index: 5;
	}

	body.gp-magazine-theme .gp-magazine-sidebar {
		position: relative;
		width: 100%;
		max-height: none;
		overflow: visible;
	}
}

@media (max-width: 768px) {
	body.gp-magazine-theme .gp-magazine-layout {
		display: flex;
	}

	body.gp-magazine-theme .gp-magazine-sidebar-col {
		width: 100%;
		flex: 1 1 100%;
	}
}

#topcontrol {
	background: #f0ae4e;
	bottom: -100px;
	border-radius: 6px;
	color: #fff;
	cursor: pointer;
	font-size: 22px;
	height: 42px;
	line-height: 42px;
	opacity: 1;
	position: fixed;
	right: 14px;
	text-align: center;
	transition: bottom 0.3s ease;
	width: 42px;
	z-index: 99999;
}

#topcontrol::before {
	border-left: 3px solid #fff;
	border-top: 3px solid #fff;
	content: "";
	display: inline-block;
	height: 10px;
	margin-top: 15px;
	transform: rotate(45deg);
	width: 10px;
}

#topcontrol:hover {
	background: #e9a23e;
}

/* French primary nav: single row only (typography matches English defaults). */
html[lang^="fr"] .gp-main-menu {
	flex-wrap: nowrap;
}

/* Main nav active item: use chevron marker instead of filled background. */
.gp-main-menu > li:not(.gp-nav-home):not(.gp-nav-random):hover > a,
.gp-main-menu > li:not(.gp-nav-home):not(.gp-nav-random):focus-within > a {
	background: var(--gp-nav-bg) !important;
}

.gp-main-menu > li.current-menu-item:not(.gp-nav-home) > a,
.gp-main-menu > li.current-menu-ancestor:not(.gp-nav-home) > a,
.gp-main-menu > li.current-menu-parent:not(.gp-nav-home) > a,
.gp-main-menu > li.current_page_item:not(.gp-nav-home) > a,
.gp-main-menu > li.current_page_parent:not(.gp-nav-home) > a,
.gp-main-menu > li.current-page-ancestor:not(.gp-nav-home) > a,
.gp-main-menu > li.current-menu-item:not(.gp-nav-home):hover > a,
.gp-main-menu > li.current-menu-ancestor:not(.gp-nav-home):hover > a,
.gp-main-menu > li.current-menu-parent:not(.gp-nav-home):hover > a,
.gp-main-menu > li.current_page_item:not(.gp-nav-home):hover > a,
.gp-main-menu > li.current_page_parent:not(.gp-nav-home):hover > a,
.gp-main-menu > li.current-page-ancestor:not(.gp-nav-home):hover > a,
.gp-main-menu > li.current-menu-item:not(.gp-nav-home):focus-within > a,
.gp-main-menu > li.current-menu-ancestor:not(.gp-nav-home):focus-within > a,
.gp-main-menu > li.current-menu-parent:not(.gp-nav-home):focus-within > a,
.gp-main-menu > li.current_page_item:not(.gp-nav-home):focus-within > a,
.gp-main-menu > li.current_page_parent:not(.gp-nav-home):focus-within > a,
.gp-main-menu > li.current-page-ancestor:not(.gp-nav-home):focus-within > a {
	background: var(--gp-nav-bg) !important;
}

.gp-main-menu > li.current-menu-item:not(.gp-nav-home),
.gp-main-menu > li.current-menu-ancestor:not(.gp-nav-home),
.gp-main-menu > li.current-menu-parent:not(.gp-nav-home),
.gp-main-menu > li.current_page_item:not(.gp-nav-home),
.gp-main-menu > li.current_page_parent:not(.gp-nav-home),
.gp-main-menu > li.current-page-ancestor:not(.gp-nav-home) {
	position: relative;
	overflow: visible;
}

.gp-main-menu > li.current-menu-item:not(.gp-nav-home) > a,
.gp-main-menu > li.current-menu-ancestor:not(.gp-nav-home) > a,
.gp-main-menu > li.current-menu-parent:not(.gp-nav-home) > a,
.gp-main-menu > li.current_page_item:not(.gp-nav-home) > a,
.gp-main-menu > li.current_page_parent:not(.gp-nav-home) > a,
.gp-main-menu > li.current-page-ancestor:not(.gp-nav-home) > a,
.gp-main-menu > li:not(.gp-nav-home) > a[aria-current="page"] {
	position: relative;
	overflow: visible;
}

.gp-main-menu > li.current-menu-item:not(.gp-nav-home) > a::after,
.gp-main-menu > li.current-menu-ancestor:not(.gp-nav-home) > a::after,
.gp-main-menu > li.current-menu-parent:not(.gp-nav-home) > a::after,
.gp-main-menu > li.current_page_item:not(.gp-nav-home) > a::after,
.gp-main-menu > li.current_page_parent:not(.gp-nav-home) > a::after,
.gp-main-menu > li.current-page-ancestor:not(.gp-nav-home) > a::after,
.gp-main-menu > li.gp-nav-home.current-menu-item > a::after,
.gp-main-menu > li.gp-nav-home.current-menu-ancestor > a::after,
.gp-main-menu > li.gp-nav-home.current-menu-parent > a::after,
.gp-main-menu > li.gp-nav-home.current_page_item > a::after,
.gp-main-menu > li.gp-nav-home.current_page_parent > a::after,
.gp-main-menu > li.gp-nav-home.current-page-ancestor > a::after,
.gp-main-menu > li:not(.gp-nav-home) > a[aria-current="page"]::after,
.gp-main-menu > li:hover > a::after,
.gp-main-menu > li:focus-within > a::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -1px;
	transform: translateX(-50%);
	width: 0;
	height: 0;
	border-left: 7px solid transparent;
	border-right: 7px solid transparent;
	border-bottom: 7px solid var(--gp-accent);
	pointer-events: none;
	z-index: 300;
}

@media (max-width: 900px) {
	html[lang^="fr"] .gp-main-menu {
		flex-wrap: wrap;
	}
}
