/*
Theme Name: Powell
Theme URI: 
Author: Stellaractive
Author URI: 
Description: Simple block theme for testing
Requires at least: 6.6
Tested up to: 6.6
Requires PHP: 5.7
Version: 1.2.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: powell
Tags: 
*/

/* Global Styles */
:root :where(.is-layout-constrained) > *,
:root :where(.is-layout-flow) > * {
    margin-block-start: 0;
}

:root :where(.wp-site-blocks) > :first-child {
	padding: 0 !important;
}

.wp-block-post-content a {
	transition: all 0.3s ease-in-out;
}

.wp-block-group.is-layout-flex {
    padding: 20px;
}

.wp-block-list li {
	margin-bottom: 10px;
}

body.no-scroll {
    overflow: hidden;
    height: 100vh;
    touch-action: none;
}

/* Utils */
body:not(.block-editor-iframe__body):not(.editor-styles-wrapper):not(.wp-admin) .hide {
    display: none !important;
}

@media (min-width: 1001px) {
	.left-padding-desktop {
		padding-left: 20%;
	}
}

/* Custom block Visibility Settings */
	@media (max-width: 781px) {
		body:not(.block-editor-iframe__body):not(.editor-styles-wrapper):not(.wp-admin) .hide-on-mobile {
			display: none !important;
		}
	}
	@media (min-width: 782px) and (max-width: 1079px) {
		body:not(.block-editor-iframe__body):not(.editor-styles-wrapper):not(.wp-admin) .hide-on-tablet {
			display: none !important;
		}
	}
	@media (min-width: 1080px) {
		body:not(.block-editor-iframe__body):not(.editor-styles-wrapper):not(.wp-admin) .hide-on-desktop {
			display: none !important;
		}
	}

/* Buttons */
.wp-block-button__link,
.gform_button {
	transition: all 0.3s ease-in-out;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: white;
}

.mobile-header {
	/* Mobile nav hidden by default, JS toggles active class */
    display: none;
	position: absolute;
	top: 80px;
    left: 0;
    right: 0;
    z-index: 1000;
	overflow-y: auto; /* Vertical scroll */
    max-height: calc(100vh - 80px);
    -webkit-overflow-scrolling: touch; /* Smooth scrolling for iOS */
}

.mobile-header nav {
	width: 100%;
	/* Reset automatic gaps in nav */
	gap: 0;
}
.mobile-nav {
	gap: 0;
}

/* Mobile Menu */
@media (max-width: 860px) {
	.header-row {
		height: 80px;
	}
	.desktop-main-nav {
		display: none !important;
	}
	.header-nav-group {
		display: flex;
		width: 100%;
	}
	.topbar-nav li:first-of-type {
		display: none;
	}

	/* Mobile Menu toggle */
	#mobile-menu-toggle {
		width: 48px;
		height: 48px;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		background: none;
		border: none;
		cursor: pointer;
		padding: 10px;
		position: relative;
	}

	#mobile-menu-toggle span {
		width: 100%;
		height: 4px;
		background: var(--wp--preset--color--black);
		transition: transform 0.3s, opacity 0.3s;
	}

	/* When menu is open, create an "X" effect */
	#mobile-menu-toggle.open span:nth-child(1) {
		transform: translateY(12px) rotate(45deg);
	}
	#mobile-menu-toggle.open span:nth-child(2) {
		display: none;
	}
	#mobile-menu-toggle.open span:nth-child(3) {
		transform: translateY(-12px) rotate(-45deg);
	}
	#mobile-menu-toggle.open span:nth-child(4) {
		display: none;
	}

	.mobile-nav .wp-block-buttons {
		margin: 20px 30px;
	}
	.mobile-nav ul, 
	.mobile-nav li {
		width: 100%;
	}
	.mobile-nav button,
	.mobile-nav a {
		padding: 10px 30px !important;
	}
	.mobile-nav li.current-menu-item {
		color: var(--wp--preset--color--black);
		background-color: var(--wp--preset--color--white);
	}
	.mobile-header.active {
		display: block;
	}
	header .header-btn-container {
		display: none;
	}
	.wp-block-site-logo a img {
		max-width: 150px;
	}
	.wp-block-navigation__responsive-container-content ul {
		line-height: 0.2 !important;
	}
	.footer-info a {
		text-decoration: none;
	}

	/* Mobile submenu dropdowns */
	.wp-block-navigation-submenu__toggle {
		width: 100%;
	}
	.wp-block-navigation__submenu-icon {
		position: absolute;
    	right: 20px;
	}
	.mobile-header .wp-block-navigation-submenu {
		flex-wrap: wrap;
	}
	.mobile-header .wp-block-navigation-submenu.open {
		color: var(--wp--preset--color--black);
		background-color: var(--wp--preset--color--white);
	}
	.mobile-header .wp-block-navigation-submenu.open .wp-block-navigation__submenu-icon {
		top: 18px;
    	right: 20px;
	}
	.wp-block-navigation .has-child .wp-block-navigation__submenu-container {
		position: relative;
		width: 100% !important;
		font-weight: 300;
    	padding-left: 15px;
		border: none;
	}
	.wp-block-navigation .has-child .wp-block-navigation__submenu-container [aria-expanded="true"] {
		color: #000;
	}
	.mobile-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
		padding: 5px 30px !important;
		font-weight: 300;
	}
	.mobile-header .wp-block-navigation__submenu-container .wp-block-navigation-item:last-of-type .wp-block-navigation-item__content {
		padding-bottom: 10px !important;
	}
}

/* Desktop Menu */
@media (min-width: 861px) {
	#mobile-menu-toggle {
		display: none;
	}
	.wp-block-navigation__submenu-container li:first-of-type {
        margin-top: 20px;
    }
	.wp-block-navigation__submenu-container li:last-of-type {
        padding-bottom: 10px;
    }
}

/* Social Icons */
.wp-block-social-link {
	border-radius: 0;
	transition: 0.3s all ease-in-out;
}

/* Gravity Forms */
#gform_fields_1 {
    row-gap: 20px !important;
}

.gform-body input, 
.gform-body textarea,
.gform-body select {
	border: none;
}

.gform-body textarea {
	font-family: inherit;
}

/* Scroll to top */
.scroll-to-top {
	position: fixed;
	width: 50px;
	height: 50px;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	transition: all 0.3s ease;
	box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.scroll-to-top:hover {
	transform: translateY(-5px);
}
.scroll-to-top svg {
	width: 24px;
	height: 24px;
}

/* Sitewide Notice */
.stellar-sitewide-notice {
	position: fixed;
	left: 0;
	right: 0;
	padding: 15px 20px;
	z-index: 999;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 5px rgba(0,0,0,0.1);
	font-size: 16px;
	line-height: 1.5;
}
.stellar-notice-top {
	top: 0;
}
.stellar-notice-bottom {
	bottom: 0;
}
.stellar-notice-content {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	max-width: 1200px;
	width: 100%;
	flex-wrap: wrap;
}
.stellar-notice-message p {
	margin: 0;
	padding-bottom: 0;
	color: inherit;
}
.stellar-notice-message a {
	color: inherit;
	text-decoration: underline;
}
.stellar-notice-button {
	display: inline-block;
	padding: 8px 20px;
	text-decoration: none;
	border-radius: 4px;
	font-weight: bold;
	transition: opacity 0.3s ease;
	white-space: nowrap;
}
.stellar-notice-button:hover {
	opacity: 0.9;
}
.stellar-notice-close {
	position: absolute;
	right: 20px;
	top: 50%;
	transform: translateY(-50%);
	background: transparent;
	border: none;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0.7;
	transition: opacity 0.3s ease;
}
.stellar-notice-close:hover {
	opacity: 1;
}
/* Mobile responsive */
@media (max-width: 768px) {
	.stellar-sitewide-notice {
		padding: 12px 15px;
		font-size: 14px;
	}
	.stellar-notice-content {
		gap: 15px;
	}
	.stellar-notice-button {
		padding: 6px 15px;
		font-size: 14px;
	}
	.stellar-notice-close {
		right: 10px;
	}
}

/* Footer */
.copyright a:hover {
	color: var(--wp--preset--color--primary);
}
@media (max-width: 780px) {
	footer p {
		text-align: center !important;
	}
	footer .is-content-justification-right,
	footer .is-content-justification-left {
		justify-content: center;
	}
}
