/*!
Theme Name: myflat
Theme URI: http://underscores.me/
Author: hammercode
Author URI: https://hammercode.eu/
Description: MyFlat Mein Theme
Version: 1.0.0
Tested up to: 5.4
Requires PHP: 5.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: myflat
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned.

myflat is based on Underscores https://underscores.me/, (C) 2012-2020 Automattic, Inc.
Underscores is distributed under the terms of the GNU GPL v2 or later.

Normalizing styles have been helped along thanks to the fine work of
Nicolas Gallagher and Jonathan Neal https://necolas.github.io/normalize.css/
*/
/* @import "css/main.css"; */
*,
*::after,
*::before {
  box-sizing: border-box;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul {
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 0;
}

body {
  min-height: 100vh;
}

button {
  border: none;
  outline: none;
}

input,
button,
textarea,
select {
  font: inherit;
}

html,
body {
  scroll-behavior: smooth;
}

button, a {
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
  -webkit-tap-highlight-color: transparent;
}

button {
  outline: none;
  border: none;
  cursor: pointer;
}

figure {
  margin: 0;
  padding: 0;
  display: block;
}

/* Normalize for Wordpress*/
::-webkit-file-upload-button {
  -webkit-appearance: button;
  font: inherit;
}

[type=search]::-webkit-search-decoration {
  -webkit-appearance: none;
}

main {
  display: block;
}

b,
strong {
  font-weight: bolder;
}

img {
  border-style: none;
}

button,
[type=button],
[type=reset],
[type=submit] {
  -webkit-appearance: button;
}

button::-moz-focus-inner,
[type=button]::-moz-focus-inner,
[type=reset]::-moz-focus-inner,
[type=submit]::-moz-focus-inner {
  border-style: none;
  padding: 0;
}

button:-moz-focusring,
[type=button]:-moz-focusring,
[type=reset]:-moz-focusring,
[type=submit]:-moz-focusring {
  outline: 1px dotted;
}

fieldset {
  padding: 0.35em 0.75em 0.625em;
}

textarea {
  overflow: auto;
}

[type=checkbox],
[type=radio] {
  box-sizing: border-box;
  padding: 0;
}

[type=number]::-webkit-inner-spin-button,
[type=number]::-webkit-outer-spin-button {
  height: auto;
}

[type=search] {
  -webkit-appearance: textfield;
  outline-offset: -2px;
}

/* Accessibility
--------------------------------------------- */
/* Text meant only for screen readers. */
.skip-link {
    position: absolute;
    top: -40px; /* Убираем ссылку за пределы экрана */
    left: 0;
    background-color: #000;
    color: #fff;
    padding: 8px 16px;
    z-index: 100; /* Убедитесь, что она находится поверх всего */
    text-decoration: none;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0; /* Возвращаем ссылку на экран при фокусе */
}



/* .screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  -webkit-clip-path: inset(50%);
          clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: #f1f1f1;
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  -webkit-clip-path: none;
          clip-path: none;
  color: #21759b;
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
} */

/* Do not show the outline on the skip link target. */
#primary[tabindex="-1"]:focus {
  outline: 0;
}

input[type=search] {
  padding: 3px 5px;
  border: 1px solid #000;
  outline: none;
  font-size: 16px;
  line-height: 1;
  width: 100%;
}


/* div#wpadminbar {
	display: none !important;
} */


/* Navigation
--------------------------------------------- */
.main-navigation {
	display: block;
	padding-bottom: 5px;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding-left: 0;
    gap: 10px 0;
}

.main-navigation ul ul {
	box-shadow: 0 3px 3px rgba(0, 0, 0, 0.2);
	float: left;
	position: absolute;
	top: 100%;
	left: -999em;
	z-index: 99999;
}

.main-navigation ul ul ul {
	left: -999em;
	top: 0;
}

.main-navigation ul ul li:hover > ul,
.main-navigation ul ul li.focus > ul {
	display: block;
	left: auto;
}

.main-navigation ul ul a {
	width: 200px;
}

.main-navigation ul li:hover > ul,
.main-navigation ul li.focus > ul {
	left: auto;
}

.main-navigation li {
    position: relative;
    line-height: normal;
    font-size: 18px;
    color: #493517;
    padding: 8px 16px;
    border-radius: 4px;
}

.main-navigation li a {
	display: block;
	text-decoration: none;
	font-size: 18px;
	color: #493517;
	text-decoration: underline 1px transparent;
	text-underline-offset: 2px;
	transition: all 0.3s ease;
}

.main-navigation li:hover > a,
.main-navigation li.focus > a {
	text-decoration-color: #493517;
	transition: all 0.3s ease;
}

.main-navigation li.current-menu-item {
    background-color: rgb(232 214 187 / 50%);
    font-weight: 500;
    margin: 0 16px;
}


.main-navigation li.current-menu-item:hover > a,
.main-navigation li.current-menu-item.focus > a {
	text-decoration: none;
}

/* Small menu. */

.menu-toggle {
	display: none;
}

@media screen and (max-width: 1080px) {
	.menu-toggle, .main-navigation.toggled ul {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

	.main-navigation ul {
		display: none;
	}

	.main-navigation li:last-child {
		padding-bottom: 0;
	}

	.main-navigation li:last-child::after {
		display: none;
	}
	
	.main-navigation li a {
		color: #FFFDF9;
	}
	
	.main-navigation li {
		position: relative;
		padding-bottom: 16px;
	}
	
	.main-navigation li::after {
		position: absolute;
		content: '';
		left: 50%;
		bottom: 0;
		transform: translate(-50%, 0px);
		background: #E8D6BB;
		width: 48px;
		height: 1px;
	}

	.menu.nav-menu {
        position: fixed;
        background-color: #392912;
        width: 100%;
        left: 0;
        top: 66px;
        padding: 32px 16px;
        display: flex;
        justify-content: center;
        text-align: center;
        transform: scaleY(0);
        transform-origin: 0 0;
		transition: transform 0.3s ease;
    }
    
    .main-navigation {
        padding-bottom: 0;
    }

	.main-navigation.toggled .menu.nav-menu {
		transform: scaleY(1);
		transition: transform 0.3s ease;
	}

}

@media screen and (max-width: 820px) {
	.menu.nav-menu {
        top: 48px;
    }
}


.site-main .comment-navigation,
.site-main
.posts-navigation,
.site-main
.post-navigation {
	margin: 0 0 1.5em;
}

.comment-navigation .nav-links,
.posts-navigation .nav-links,
.post-navigation .nav-links {
	display: flex;
}

.comment-navigation .nav-previous,
.posts-navigation .nav-previous,
.post-navigation .nav-previous {
	flex: 1 0 50%;
}

.comment-navigation .nav-next,
.posts-navigation .nav-next,
.post-navigation .nav-next {
	text-align: end;
	flex: 1 0 50%;
}

/* Posts and pages
--------------------------------------------- */
.sticky {
	display: block;
}

/* .post,
.page {
	margin: 0 0 1.5em;
} */

.updated:not(.published) {
	display: none;
}

.page-content,
.entry-content,
.entry-summary {
	margin: 1.5em 0 0;
}

.page-links {
	clear: both;
	margin: 0 0 1.5em;
}

/* Comments
--------------------------------------------- */
.comment-content a {
	word-wrap: break-word;
}

.bypostauthor {
	display: block;
}

/* Widgets
--------------------------------------------- */
/* .widget {
	margin: 0 0 1.5em;
}

.widget select {
	max-width: 100%;
} */

/* Media
--------------------------------------------- */
.page-content .wp-smiley,
.entry-content .wp-smiley,
.comment-content .wp-smiley {
	border: none;
	margin-bottom: 0;
	margin-top: 0;
	padding: 0;
}

/* Make sure logo link wraps around logo image. */
.custom-logo-link {
    display: inline-block;
    flex-shrink: 0;
}

/* Captions
--------------------------------------------- */
.wp-caption {
	margin-bottom: 1.5em;
	max-width: 100%;
}

.wp-caption img[class*="wp-image-"] {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.wp-caption .wp-caption-text {
	margin: 0.8075em 0;
}

.wp-caption-text {
	text-align: center;
}

/* Galleries
--------------------------------------------- */
.gallery {
	margin-bottom: 1.5em;
	display: grid;
	grid-gap: 1.5em;
}

.gallery-item {
	display: inline-block;
	text-align: center;
	width: 100%;
}

.gallery-columns-2 {
	grid-template-columns: repeat(2, 1fr);
}

.gallery-columns-3 {
	grid-template-columns: repeat(3, 1fr);
}

.gallery-columns-4 {
	grid-template-columns: repeat(4, 1fr);
}

.gallery-columns-5 {
	grid-template-columns: repeat(5, 1fr);
}

.gallery-columns-6 {
	grid-template-columns: repeat(6, 1fr);
}

.gallery-columns-7 {
	grid-template-columns: repeat(7, 1fr);
}

.gallery-columns-8 {
	grid-template-columns: repeat(8, 1fr);
}

.gallery-columns-9 {
	grid-template-columns: repeat(9, 1fr);
}

.gallery-caption {
	display: block;
}


/* Alignments
--------------------------------------------- */
.alignleft {

	/*rtl:ignore*/
	float: left;

	/*rtl:ignore*/
	margin-right: 1.5em;
	margin-bottom: 1.5em;
}

.alignright {

	/*rtl:ignore*/
	float: right;

	/*rtl:ignore*/
	margin-left: 1.5em;
	margin-bottom: 1.5em;
}

.aligncenter {
	clear: both;
	display: block;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 1.5em;
}


@media screen and (max-width: 1480px) {
	.main-navigation {
		padding-bottom: 10px;
	}
}

@media screen and (max-width: 1080px) {
	    
    a.custom-logo-link {
        max-width: 34px;
    }

	.main-navigation li a {
        font-size: 16px;
    }
    
    .main-navigation ul {
        gap: 10px 28px;
    }
    
    .main-navigation {
        padding-bottom: 2px;
    }

    .main-navigation li.current_page_item {
        background-color: transparent;
        font-weight: 400;
        margin: 0;
    }
    
}