/*!
Theme Name: masters
Theme URI: http://underscores.me/
Author: Underscores.me
Author URI: http://underscores.me/
Description: Description
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: masters
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.

masters 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/
*/

/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
# Generic
	- Normalize
	- Box sizing
# Base
	- Typography
	- Elements
	- Links
	- Forms
## Layouts
# Components
	- Navigation
	- Posts and pages
	- Comments
	- Widgets
	- Media
	- Captions
	- Galleries
# plugins
	- Jetpack infinite scroll
# Utilities
	- Accessibility
	- Alignments

--------------------------------------------------------------*/

/*--------------------------------------------------------------
# Generic
--------------------------------------------------------------*/

/* Normalize
--------------------------------------------- */

/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */

/**
 * Correct the padding in Firefox.
 */
fieldset {
	padding: 0.35em 0.75em 0.625em;
}

/**
 * 1. Correct the text wrapping in Edge and IE.
 * 2. Correct the color inheritance from `fieldset` elements in IE.
 * 3. Remove the padding so developers are not caught out when they zero out
 *		`fieldset` elements in all browsers.
 */
legend {
	box-sizing: border-box;
	color: inherit;
	display: table;
	max-width: 100%;
	padding: 0;
	white-space: normal;
}

/**
 * Add the correct vertical alignment in Chrome, Firefox, and Opera.
 */
progress {
	vertical-align: baseline;
}

[hidden] {
	display: none;
}

/* Box sizing
--------------------------------------------- */
/*--------------------------------------------------------------
# Base
--------------------------------------------------------------*/


/*--------------------------------------------------------------
# Layouts
--------------------------------------------------------------*/

/*--------------------------------------------------------------
# Components
--------------------------------------------------------------*/

/* Navigation
--------------------------------------------- */
.main-navigation {
	display: block;
	width: 100%;
}

.main-navigation ul {
	display: none;
	list-style: none;
	margin: 0;
	padding-left: 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;
}

.main-navigation a {
	display: block;
	text-decoration: none;
}

/* Small menu. */
.menu-toggle,
.main-navigation.toggled ul {
	display: block;
}

@media screen and (min-width: 37.5em) {

	.menu-toggle {
		display: none;
	}

	.main-navigation ul {
		display: flex;
	}
}

.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;
}


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


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

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

.bypostauthor {
	display: block;
}



.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;
}

/* 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;
}

/*--------------------------------------------------------------
# Plugins
--------------------------------------------------------------*/

/* Jetpack infinite scroll
--------------------------------------------- */

/* Hide the Posts Navigation and the Footer when Infinite Scroll is in use. */
.infinite-scroll .posts-navigation,
.infinite-scroll.neverending .site-footer {
	display: none;
}

/* Re-display the Theme Footer when Infinite Scroll has reached its end. */
.infinity-end.neverending .site-footer {
	display: block;
}

/*--------------------------------------------------------------
# Utilities
--------------------------------------------------------------*/

/* Accessibility
--------------------------------------------- */

/* Text meant only for screen readers. */
.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 !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;
	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;
}

/* 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;
}

/* Основной элемент списка */
#headerNavList li {
  position: relative;
  display: inline-block;
  margin-right: 30px; /* промежуток между пунктами меню */
}

/* Появление при наведении */
#headerNavList li:hover > ul {
  display: block;
	opacity: 1;
  transform: translateY(0);
  pointer-events: auto;

}

/* Стили для пунктов подменю */
#headerNavList li ul li {
  padding: 12px 20px;
}

#headerNavList li ul li:last-child {
  border-bottom: none;
}

#headerNavList li ul li a {
  position: relative;
  display: block;
  padding: 12px 24px;
  color: #fefefe;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  overflow: hidden;
  transition: color 0.3s ease;
  z-index: 1;

}
#headerNavList li ul li a::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 180%;
  height: 220%;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
  transform: translate(-50%, -50%);
  filter: blur(14px);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}
#headerNavList li ul li a:hover::before {
  opacity: 1;
}
#headerNavList li ul li a:hover {
  color: #21b8a3; /* мягкое золото при наведении */
  z-index: 2;
}

/* === Третий уровень меню: каскад справа === */
#headerNavList li ul li {
  position: relative;
}

#headerNavList li ul li ul {
  position: absolute;
  top: 0;
  left: 100%;
  background: linear-gradient(to bottom right, #101010, #1c1c1c);
  border-radius: 8px;
  min-width: 180px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  display: none;
  padding: 10px 0;
  z-index: 1001;
}

#headerNavList li ul li:hover > ul,
#headerNavList li ul li ul:hover {
  display: block;
}

/* Стиль ссылок в 3 уровне */
#headerNavList li ul li ul li a {
  color: #eee;
  padding: 12px 24px;
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  transition: background-color 0.3s ease;
}

#headerNavList li ul li ul li a:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Контейнер меню */
#headerNavList {
  position: relative;
  z-index: 999;
}

/* Пункт меню верхнего уровня */
#headerNavList>li {
  position: relative;
  display: inline-block;
}

/* Подменю */
#headerNavList li ul {
  position: absolute;
  top: 100%;
  left: 0;
  display: none;
  background: linear-gradient(to bottom right, #0f0f0f, #1a1a1a);
  border-radius: 8px;
  padding: 10px 0;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 1000;


}
/* ===== Уровень 3 ===== */
#headerNavList li ul li {
  position: relative;
}

#headerNavList li ul li ul {
	display: none;
  position: absolute;
  top: 0;
  left: 100%;
  display: none;
  min-width: 180px;
  background-color: rgba(0, 0, 0, .6);
  box-shadow: 0 8px 16px rgba(0,0,0,0.12);
  z-index: 1001;
  padding: 8px 0;
  border-radius: 6px;
	flex-direction: column;
}
#headerNavList li ul li ul li {
  display: block;
  padding: 10px 20px;
  white-space: nowrap;
}
/* Показываем третий уровень по hover */
#headerNavList li ul li:hover > ul,
#headerNavList li ul li ul:hover {
  display: block;
}


.main-menu li ul li:hover > ul {
  display: block;
}

/* Показываем подменю при наведении НА родителя ИЛИ на само подменю */
#headerNavList li:hover > ul,
.#headerNavList li ul:hover {
  display: block;
}
/* Показываем третий уровень, когда курсор над родительским пунктом ИЛИ над самим подменю */
#headerNavList li ul li:hover > ul,
#headerNavList li ul li ul:hover {
  display: block;
}


/* Стилизация пунктов подменю */
#headerNavList li ul li {
  padding: 10px 20px;
  white-space: nowrap;
	border-radius: 23px;
}
@media screen and (max-width: 768px) {
	#headerNavList>li {
  max-width: 100%;
}
  #headerNavList li ul,
  #headerNavList li ul li ul {
    position: static;
    display: none;
    background-color: #1a1a1a;
    box-shadow: none;
    padding-left: 20px;
  }
	#headerNavList li ul li ul li {
  white-space: normal;
}
	#headerNavList li ul li {
  max-width: 100%;
		margin: 0;
        padding: 0;
}
#headerNavList li ul li ul {
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    box-sizing: border-box;
	
  }

  /* Раскрытие второго уровня */
  #headerNavList li.active > ul {
    display: block;
	  margin-left: 0;
    padding-left: 20px; /* аккуратное смещение */
    max-width: 100%;
  }

  /* Раскрытие третьего уровня */
  #headerNavList li ul li.active > ul {
    display: block;
  }

  #headerNavList li ul li a,
  #headerNavList li ul li ul li a {
    padding: 12px 20px;
    font-size: 15px;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
}

@media screen and (min-width: 769px) {
  .mobile-toggle-arrow {
    display: none;
  }
}


@media screen and (max-width: 768px) {
  .th-header-navigation li.menu-item-has-children > ul {
    display: none; /* скрыто по умолчанию */
  }

  .th-header-navigation li.menu-item-has-children.active > ul {
    display: block; /* видно, если есть класс active */
  }
}
@media screen and (max-width: 768px) {
  .th-header-navigation {
    width: 100%;
    max-width: 380px; /* или 100% при необходимости */
    margin: 0 auto;
    box-sizing: border-box;
    padding: 0 20px;
    background: #0f0f0f; /* дымчатый фон, если хочешь */
  }

  .th-header-navigation li a {
    display: flex;
    justify-content: space-around;
    align-items: center;
  }
	.th-header-navigation-wrap {
		padding: 0!important;
	}
}
@media screen and (max-width: 768px) {
  .th-header-navigation li a {
    display: flex;
    justify-content: space-between; /* текст слева, стрелка справа */
    align-items: center;
    padding: 14px 20px;
    font-size: 16px;
    color: #eee;
    text-decoration: none;
  }


  /* Скрытие/отображение подменю */
  .menu-item-has-children > ul {
    display: none;
    padding-left: 0;
    margin: 0;
  }

  .menu-item-has-children.active > ul {
    display: block;
  }

  /* Вложенные пункты — отступ для визуального уровня */
  .menu-item-has-children ul li a {
    padding-left: 30px;
  }
}
@media screen and (max-width: 768px) {
  .th-header-navigation li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    position: relative;

  }

  .th-header-navigation li .mobile-toggle-arrow {
    position: absolute;
        right: -20px;
        top: 50%;
        font-size: 16px;
        color: #21B8A3;
        cursor: pointer;
        transition: transform 0.3s ease;
        z-index: 10000;
        background: transparent;
        border: 0;
  }


  .th-header-navigation li a {
    flex-grow: 1;
    text-decoration: none;
    font-size: 16px;
    color: #eee;
    display: block;
    padding: 14px 20px;
  }


@media screen and (max-width: 768px) {
  .link-arrow-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    width: 100%;
    box-sizing: border-box;

  }
	#headerNavList li {
		margin-right: 0;
	}
  .link-text-wrapper {
    flex-grow: 1;
  }

  .link-text-wrapper a {
    display: block;
    font-size: 16px;
    color: #eee;
    text-decoration: none;
  }


}
@media screen and (max-width: 768px) {
  .th-header-navigation li {
    position: relative;
  }

  .th-header-navigation li a {
    display: block;
    padding: 14px 20px;
    font-size: 16px;
    color: #eee;
  }

  .mobile-toggle-arrow {
    font-size: 16px;
    color: #21B8A3;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    z-index: 2;

  }

  .menu-item-has-children.active .mobile-toggle-arrow {
    transform: rotate(180deg);
  }

  .menu-item-has-children > ul {
    display: none;
  }

  .menu-item-has-children.active > ul {
    display: block;
  }
}



