/*
Theme Name: Hamidreza
Author: Hamidreza Moghaddam
Author URI: https://hamidrezamoghaddam.ir/
Description: Hamidreza is a block theme for stores, businesses, and blogs. It includes the Vazirmatn font, three style variations, section styles, patterns for common layouts, and two complete page layouts. It supports right-to-left languages and is translation-ready.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.0.4
Copyright: 2026 Hamidreza Moghaddam
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hamidreza
Tags: blog, e-commerce, one-column, grid-layout, custom-colors, custom-logo, custom-menu, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, style-variations, threaded-comments, translation-ready, wide-blocks, block-styles
*/

/* Visible keyboard focus for links, buttons and form fields. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
.wp-element-button:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* Smooth color transitions on interactive elements. */
a,
.wp-element-button,
.wp-block-button__link {
	transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
	a,
	.wp-element-button,
	.wp-block-button__link {
		transition: none;
	}
}

/* Readable link underlines. */
a {
	text-underline-offset: 0.2em;
	text-decoration-thickness: 1px;
}

/* Details (FAQ) summary. */
.wp-block-details summary {
	cursor: pointer;
	font-weight: 700;
}

/* Post grid cards: keep featured images tidy. */
.wp-block-post-template.is-layout-grid .wp-block-post-featured-image img {
	transition: transform 0.4s ease;
}

.wp-block-post-template.is-layout-grid .wp-block-post-featured-image {
	overflow: hidden;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.wp-block-post-template.is-layout-grid .wp-block-post-featured-image a:hover img {
		transform: scale(1.04);
	}
}

/* Outline buttons inherit text color. */
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background) {
	background: transparent;
	border: 2px solid currentColor;
	padding-top: calc(0.75rem - 2px);
	padding-bottom: calc(0.75rem - 2px);
}

.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background):hover {
	background: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--contrast);
}

/* Stack full-width sections flush against each other. */
:where(.wp-site-blocks, .wp-block-post-content, main) > .alignfull + .alignfull {
	margin-block-start: 0;
}

/* Compact icon-only search button in the header. */
.wp-block-search__button-only .wp-block-search__button {
	padding: 0.6rem;
	line-height: 1;
}


/* Follow the reading direction of the quote. */
.wp-block-quote {
	border-inline-start: 4px solid var(--wp--preset--color--primary);
	padding-inline-start: var(--wp--preset--spacing--30);
	padding-inline-end: 0;
}

/* The Dusk gradient stays dark in every palette. */
.hamidreza-hero .hamidreza-hero-title,
.hamidreza-hero .is-style-outline > .wp-block-button__link:not(.has-text-color) {
	color: #fff;
}

.hamidreza-hero .hamidreza-hero-eyebrow {
	color: #f7dfa9;
}

.hamidreza-hero .hamidreza-hero-action > .wp-block-button__link:not(.has-background) {
	background: #f7dfa9;
	color: #1c2130;
}

.hamidreza-hero .is-style-outline > .wp-block-button__link:not(.has-background):not(.has-text-color):is(:hover, :focus-visible) {
	background: #f7dfa9;
	border-color: #f7dfa9;
	color: #1c2130;
}

.hamidreza-hero .hamidreza-hero-action > .wp-block-button__link:not(.has-background):is(:hover, :focus-visible) {
	background: #fff;
}
