/*
Theme Name: Rota Kurumsal
Theme URI: https://example.com/rota-kurumsal
Author: WP Denizi
Author URI: https://example.com
Description: Block-based (FSE) corporate WordPress theme for agencies, consultancies, small businesses, law and health practices. Ready patterns for services, projects, process, FAQ and quote calls; four style variations; locally hosted fonts.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
Version: 0.7.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rota-kurumsal
Update URI: https://www.wpdenizi.com/rota-kurumsal
Domain Path: /languages
Tags: portfolio, blog, full-site-editing, block-patterns, block-styles, style-variations, wide-blocks, editor-style, custom-colors, custom-menu, featured-images, translation-ready, accessibility-ready, one-column
*/

/*
 * Styles live in theme.json. This file only holds the few rules
 * theme.json cannot express.
 */

.wp-site-blocks > * + * {
	margin-block-start: 0;
}

:where(.wp-site-blocks) :focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

.skip-link.screen-reader-text:focus {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	z-index: 100000;
}

/* Card: is-style-rota-card block style (functions.php) */
.is-style-rota-card {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--lg);
	box-shadow: var(--wp--preset--shadow--card);
}

/* Secondary button: is-style-outline */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	border: 1px solid var(--wp--preset--color--line-strong);
	color: var(--wp--preset--color--contrast);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	border-color: var(--wp--preset--color--contrast);
}

/* Accent button: for the single main call on a page */
.wp-block-button.is-style-rota-accent > .wp-block-button__link {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--on-accent);
}

/* Badge: is-style-rota-badge (paragraph) */
.is-style-rota-badge {
	display: inline-block;
	padding: 0.25rem 0.625rem;
	border-radius: var(--wp--custom--radius--sm);
	background: var(--wp--preset--color--primary-soft);
	color: var(--wp--preset--color--primary);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

/* Icon box */
.rota-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--primary-soft);
	color: var(--wp--preset--color--primary);
}
.rota-icon svg {
	width: 24px;
	height: 24px;
}

/* Aligned numbers */
.rota-numeric {
	font-variant-numeric: tabular-nums;
}

/* FAQ summary row */
.wp-block-details summary {
	cursor: pointer;
	font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

.rota-plain-list {
	list-style: none;
}

/* Plain link lists (footer services): no underline until hover. */
.rota-plain-list a {
	text-decoration: none;
}

.rota-plain-list a:hover,
.rota-plain-list a:focus-visible {
	text-decoration: underline;
}

/* Breathing room above headings inside page and post content. */
.wp-block-post-content > :is(h2, h3):not(:first-child) {
	margin-block-start: var(--wp--preset--spacing--60);
}

/* Client logos: calm grey until hover. */
.rota-client-logo img {
	filter: grayscale(1);
	opacity: 0.75;
	transition: opacity 0.2s, filter 0.2s;
}

.rota-client-logo img:hover {
	filter: none;
	opacity: 1;
}

/* WooCommerce product grid on the home page. */
.rota-products.woocommerce {
	max-width: var(--wp--style--global--wide-size);
	margin-inline: auto !important;
}

.rota-products ul.products {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
	margin: 0;
	padding: 0;
}

.rota-products ul.products::before,
.rota-products ul.products::after {
	display: none;
}

@media (max-width: 900px) {
	.rota-products ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	.rota-products ul.products {
		grid-template-columns: minmax(0, 1fr);
	}
}

.rota-products ul.products li.product {
	width: auto !important;
	float: none !important;
	margin: 0 !important;
	display: flex;
	flex-direction: column;
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 16px;
	padding: 0 0 20px;
	overflow: hidden;
	text-align: left;
}

.rota-products ul.products li.product a img {
	margin: 0 0 16px;
	border-radius: 0;
}

.rota-products ul.products li.product .woocommerce-loop-product__title,
.rota-products ul.products li.product .price,
.rota-products ul.products li.product .button {
	margin-inline: 20px;
}

.rota-products ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--large);
}

.rota-products ul.products li.product .button {
	margin-top: auto;
	align-self: flex-start;
}

.rota-products ul.products li.product .price {
	color: var(--wp--preset--color--primary);
	font-weight: 700;
}

/* WooCommerce buttons outside blocks (My account, notices). */
.woocommerce a.button,
.woocommerce button.button {
	display: inline-block;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	border: 0;
	border-radius: 8px;
	padding: 10px 18px;
	font-weight: 600;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.4;
	text-decoration: none;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

.woocommerce a.button.alt {
	background: var(--wp--preset--color--accent, #d7262f);
}

/*
 * Header (0.7.1): logo, menu and button stay on one row. Tablets and
 * crowded headers (long company name, many menu items) use the menu button;
 * on phones the header button moves into the menu.
 */
@media (min-width: 600px) {
	header .wp-block-group:has(> .wp-block-navigation) {
		flex-wrap: nowrap;
	}

	header .wp-block-group:has(> .wp-block-navigation) > .wp-block-navigation .wp-block-navigation__container {
		flex-wrap: nowrap;
	}

	header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation-item__content {
		white-space: nowrap;
	}
}

header .wp-block-group:has(> .wp-block-navigation) > :not(.wp-block-navigation) {
	flex-shrink: 0;
}

header .wp-block-site-title {
	line-height: 1.2;
}

@media (max-width: 1023px) {
	header .wp-block-group:has(> .wp-block-navigation) > .wp-block-navigation {
		margin-left: auto;
	}

	header .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}
}

header.rota-nav-collapsed .wp-block-group:has(> .wp-block-navigation) > .wp-block-navigation {
	margin-left: auto;
}

header.rota-nav-collapsed .wp-block-navigation__responsive-container-open:not(.always-shown) {
	display: flex;
}

header.rota-nav-collapsed .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
	display: none;
}

/* Header button inside the menu: shown only in the open menu. */
.rota-nav-cta-item {
	display: none;
	list-style: none;
}

.wp-block-navigation__responsive-container.is-menu-open .rota-nav-cta-item {
	display: block;
	width: 100%;
	margin-top: var(--wp--preset--spacing--40, 1.5rem);
	border: 0 !important;
}

.wp-block-navigation__responsive-container.is-menu-open .rota-nav-cta-item .wp-block-button__link {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 14px 20px;
	text-align: center;
	background: var(--wp--preset--color--accent, var(--wp--preset--color--primary));
	color: var(--wp--preset--color--on-accent, #fff) !important;
	border-radius: var(--wp--custom--radius--button, 999px);
	font-weight: 600;
	text-decoration: none;
}

@media (max-width: 599px) {
	header .wp-block-group:has(> .wp-block-navigation) {
		flex-wrap: nowrap;
	}

	header .wp-block-group:has(> .wp-block-navigation) > .wp-block-navigation {
		margin-left: auto;
	}

	header .rota-header-cta,
	header .wp-block-group:has(> .wp-block-navigation) > .wp-block-buttons {
		display: none;
	}

	header .wp-block-group:has(> .wp-block-navigation) > :first-child {
		flex-shrink: 1;
		min-width: 0;
	}
}

/* The information bar wraps on narrow tablets; the same details are in the menu card there. */
@media (max-width: 781px) {
	body:has(.rota-nav-card) .rota-topbar {
		display: none !important;
	}
}

header.rota-nav-tight .wp-block-group:has(> .wp-block-navigation) {
	column-gap: var(--wp--preset--spacing--30, 1rem);
}

header.rota-nav-tight .wp-block-navigation__container {
	column-gap: 1.1rem !important;
}
