/**
 * CorporateBlocks — Front-end Styles
 *
 * Supplements theme.json design tokens with custom block styles,
 * transitions, and responsive refinements.
 *
 * @package CorporateBlocks
 * @since   1.0.0
 */

/* -------------------------------------------------------
   1. Global & Base
   ------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

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

/* -------------------------------------------------------
   2. Links & Buttons — Transitions
   ------------------------------------------------------- */
a {
	transition: color 0.2s ease;
}

.wp-element-button,
.wp-block-button__link {
	transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.wp-element-button:hover,
.wp-block-button__link:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Outline button style */
.is-style-outline .wp-block-button__link {
	border-style: solid;
}

/* Corporate outline block style */
.is-style-outline-corporate .wp-block-button__link {
	background-color: transparent;
	border: 2px solid var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--secondary);
}

.is-style-outline-corporate .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--primary);
}

/* -------------------------------------------------------
   3. Custom Block Styles
   ------------------------------------------------------- */

/* Elevated card */
.is-style-card-elevated {
	background: var(--wp--preset--color--background);
	border-radius: 8px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.is-style-card-elevated:hover {
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

/* Bordered card */
.is-style-card-bordered {
	background: var(--wp--preset--color--background);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	transition: border-color 0.2s ease;
}

.is-style-card-bordered:hover {
	border-color: var(--wp--preset--color--secondary);
}

/* -------------------------------------------------------
   4. Navigation Refinements
   ------------------------------------------------------- */
.wp-block-navigation .wp-block-navigation-item a {
	position: relative;
	padding-bottom: 4px;
}

.wp-block-navigation .wp-block-navigation-item a::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0;
	height: 2px;
	background-color: var(--wp--preset--color--secondary);
	transition: width 0.25s ease;
}

.wp-block-navigation .wp-block-navigation-item a:hover::after,
.wp-block-navigation .wp-block-navigation-item.current-menu-item a::after {
	width: 100%;
}

/* Mobile overlay navigation */
.wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--50);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a {
	font-size: 1.125rem;
	padding: var(--wp--preset--spacing--20) 0;
}

/* -------------------------------------------------------
   5. Post Cards — Archive Grid
   ------------------------------------------------------- */
.wp-block-post-template .wp-block-group {
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.wp-block-post-template .wp-block-group:hover {
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

.wp-block-post-featured-image img {
	object-fit: cover;
	width: 100%;
}

/* -------------------------------------------------------
   6. Separator Enhancements
   ------------------------------------------------------- */
.wp-block-separator.is-style-wide {
	border-bottom-width: 1px;
}

/* -------------------------------------------------------
   7. Cover Block — Hero Polish
   ------------------------------------------------------- */
.wp-block-cover {
	overflow: hidden;
}

.wp-block-cover::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse at 30% 50%, rgba(44, 66, 112, 0.3) 0%, transparent 70%);
	pointer-events: none;
	z-index: 1;
}

.wp-block-cover__inner-container {
	position: relative;
	z-index: 2;
}

/* -------------------------------------------------------
   8. Accessibility
   ------------------------------------------------------- */
:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	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(--wp--preset--color--surface);
	clip: auto !important;
	clip-path: none;
	color: var(--wp--preset--color--primary);
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}

/* -------------------------------------------------------
   9. Responsive Adjustments
   ------------------------------------------------------- */
@media (max-width: 781px) {
	.wp-block-columns {
		gap: var(--wp--preset--spacing--30) !important;
	}

	/* Stack columns on mobile */
	.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
		flex-basis: 100% !important;
	}
}

@media (max-width: 600px) {
	.wp-block-buttons {
		flex-direction: column;
		align-items: stretch;
	}

	.wp-block-button {
		width: 100%;
	}

	.wp-block-button__link {
		width: 100%;
		text-align: center;
	}
}

/* -------------------------------------------------------
   10. Print Styles
   ------------------------------------------------------- */
@media print {
	.wp-block-navigation,
	.wp-block-cover__background,
	.wp-block-buttons {
		display: none !important;
	}

	body {
		color: #000;
		background: #fff;
	}
}
