/* Атрибут hidden должен работать и при стилях для .header-social-link. */
.site-header > .teatr-menu-toggle[hidden] {
	display: none !important;
}

@media (max-width: 767px) {
	.site-header {
		display: grid;
		grid-template-columns: minmax(4.25rem, 1fr) minmax(0, auto) minmax(4.25rem, 1fr);
		align-items: center;
		column-gap: 0.5rem;
		row-gap: 0.5rem;
		padding-block: 4px;
	}

	.site-header > .teatr-menu-toggle {
		grid-column: 1;
		grid-row: 1;
		justify-self: start;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		gap: 5px;
		width: 44px;
		height: 44px;
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 0;
		background: transparent;
		cursor: pointer;
	}

	.teatr-menu-toggle span {
		display: block;
		width: 24px;
		height: 2px;
		border-radius: 2px;
		background: currentColor;
		transition: transform 0.2s ease, opacity 0.2s ease;
	}

	.teatr-menu-toggle[aria-expanded="true"] span:first-child {
		transform: translateY(7px) rotate(45deg);
	}

	.teatr-menu-toggle[aria-expanded="true"] span:nth-child(2) {
		opacity: 0;
	}

	.teatr-menu-toggle[aria-expanded="true"] span:last-child {
		transform: translateY(-7px) rotate(-45deg);
	}

	.teatr-menu-toggle:focus-visible {
		outline: 2px solid currentColor;
		outline-offset: 2px;
	}

	.site-header > .site-branding {
		grid-column: 2;
		grid-row: 1;
		justify-self: center;
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 0.25rem;
		min-width: 0;
		max-width: 100%;
		text-align: center;
	}

	.site-header > .site-branding .site-title,
	.site-header > .site-branding .site-description {
		font-size: 1.2rem;
		line-height: 1.2;		
		overflow-wrap: anywhere;
	}
	
	.site-branding .site-title a {
		color: #ffffff;
	}	

	.site-header > .header-button-container {
		grid-column: 3;
		grid-row: 1;
		justify-self: end;
		min-height: 44px;
	}

	.site-header > .primary-navigation {
		grid-column: 1 / -1;
		grid-row: 2;
		min-width: 0;
	}

	.site-header > .primary-navigation[hidden] {
		display: none !important;
	}

	.site-header > .primary-navigation ul {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		margin: 0;
	}

	.site-header > .primary-navigation ul ul {
		margin-left: 1rem;
	}

	.site-header > .primary-navigation a {
		display: block;
		padding: 0.4rem 0;
		overflow-wrap: anywhere;
	}
	
	.home .teatr-header {
	background-color: var(--color-black);
	position: relative;
	}
	
	.site-branding picture {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.teatr-menu-toggle span {
		transition: none;
	}
}
