/*
Theme Name: alpk2
Text Domain: alpk2
*/

:root {	
	--site-width: 1386px;
	--border-radius-1: 8px;
}

.light-theme {
	--bg: #f9f9f9; /* SECONDARY BACKGROUND COLOR */
	--bg-2: #ffffff; /* PRIMARY BACKGROUND COLOR */
	--bg-3: #f8f8fc; /* ACCENT BACKGROUND COLOR */
	--bg-4: #ececec; /* TERTIARY BACKGROUND COLOR */
	--text: #0d0d0d; /* PRIMARY TEXT */
	--text-2: #5d5d5d; /* SECONDARY TEXT */
	--text-3: #67696b; /* TERTIARY TEXT */
	--link: #0d6efd;
	--border: rgba(0,0,0,.1);
	--btn-bg: #0d6efd;
	--btn-color: #fff;
}

.dark-theme {
	--bg: #212121; /* SECONDARY BACKGROUND COLOR */
	--bg-2: #171717; /* PRIMARY BACKGROUND COLOR */
	--bg-3: #0d0d0d; /* ACCENT BACKGROUND COLOR */
	--bg-4: #303030; /* TERTIARY BACKGROUND COLOR */
	--text:   #ececec; /* оставить */
	--text-2: #c6c6c6; /* было #b4b4b4 */
	--text-3: #a8a8a8; /* было #9b9b9b */
	--link: #6ea8fe;
	--border: hsla(0, 0%, 100%, .1);
	--btn-bg: #0d6efd;
	--btn-color: #fff;
}

/* *******************************************************************
 *
 *  1. NORMALIZE
 *  
 * *******************************************************************/
*, *::before, *::after {
	box-sizing: border-box;
}
body {
    margin: 0;
	font-family: system-ui, sans-serif;
	font-size: 16px;
	line-height: 1.5;
}
button, input, optgroup, select, textarea {
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}
a {
	color: var(--link);
}
input,button {  /* Отключаем стандартные стили браузеров для кнопок - важно для телефона */
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}
[type="submit"],button {    
	cursor: pointer;
}
textarea,
input[type="text"],
input[type="search"],
input[type="email"] {
    color: var(--text);
}
textarea::placeholder,
input::placeholder {
    color: var(--text-3); /* более приглушённый */
}
button,
textarea,input {
	border-radius: var(--border-radius-1);
}
table {
  caption-side: bottom;
  border-collapse: collapse;
    width: 100%;
    margin-bottom: 2rem;
    vertical-align: top;
    border-color: var(--border);
	font-size:.875rem;
}
th {
  text-align: inherit;
}
table th, table td {
    border-bottom-width: 1px;
	padding: 10px 0;
}
table tr:last-child td {
    border-bottom-width: 0;
}
thead,
tbody,
tfoot,
tr,
td,
th {
  border-color: inherit;
  border-style: solid;
  border-width: 0;
}
h1 {
	font-size: 24px;
}
h2 {
	font-size: 20px;
}
h3 {
	font-size: 18px;
}
h4 {
	font-size: 16px;
}
h6, h5, h4, h3, h2, h1 {
    margin-top: 0;
    margin-bottom: .5rem;
    line-height: 1.2;
	font-weight:500;
}
figcaption {
	color: var(--text-2);
	font-size: 14px;
	padding-top: 0.5rem;
	font-style: italic;
}
figure {
    margin: 0 0 1rem;
}
img {
	height: auto;
	max-width: 100%;
	display: block;
}
hr {
  border: 0;
	border-top: 1px solid var(--border);
}
p {
    margin-top: 0;
    margin-bottom: 1rem;
}
strong {
	font-weight: 600;
}
dl, ol, ul {
    margin-top: 0;
    margin-bottom: 1rem;
}
ol, ul {
    padding-left: 2rem;
}
ol ol,
ul ul,
ol ul,
ul ol {
  margin-bottom: 0;
}
/* 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;
	width: 1px;
	word-wrap: normal;
}


/* *******************************************************************
 *
 *  2. GLOBAL
 *  
 * *******************************************************************/
/* GLOBAL */
.site {	
	display:grid;
	gap:32px;
	max-width: var(--site-width);
	margin:0 auto;
	padding-left: 16px;
	padding-right: 16px;
}
#masthead,
#content,
.side
{
	padding-top:16px;
}
/* HEADER */
#masthead .menu-item > a {
	margin:6px 0;
	display:flex;
	align-items:center;
	gap:12px;
	color:inherit;
	font-size:20px;
	text-decoration:none;
    padding: 12px !important;  
}
/* Основные стили для активного пункта меню */
#masthead .current-menu-item > a {
    font-weight: 500 !important;   
    position: relative;           
    background-color: var(--bg-4);
    border-radius: var(--border-radius-1);
}
/* Яркая вертикальная полоска слева — самый заметный и современный способ выделения */
#masthead .current-menu-item > a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;                  
    height: 100%;                
    background-color: var(--link);
    transition: all 0.3s ease;
}
/* лёгкий hover-эффект для всех пунктов меню */
#masthead .menu-item a:hover {
    background-color: var(--bg-4); 
    border-radius: var(--border-radius-1);
    transition: background-color 0.3s ease;
}
#menu-toggle {
	display:none;
}
/* FOOTER */
#theme-toggler {
	position:absolute;
	bottom:16px
}
.footer-menu a {
	color:var(--text-3);
	text-decoration:none;
}
/* Single Post */
.single-post h1 {
	font-size:3rem;
}
.single-post h2 {
	font-size:2rem;
}
.single-post h3 {
	font-size:1.5rem;
}
/* post content */
.post-content>h2:not(:first-child),
.post-content>.wp-block-group__inner-container>h2:not(:first-child){
    margin-top: 3rem;
}
.post-content>h3,
.post-content>.wp-block-group__inner-container>h3{
    margin-top: 2rem
}
.post-content>ul li,
.post-content>ol li,
.post-content>.wp-block-group__inner-container>ul li,
.post-content>.wp-block-group__inner-container>ol li{
    margin-bottom: .25rem
}
.post-content>ul li>p~ul,
.post-content>ol li>p~ul,
.post-content>.wp-block-group__inner-container>ul li>p~ul,
.post-content>.wp-block-group__inner-container>ol li>p~ul{
    margin-top: -.5rem;
    margin-bottom: 1rem
}
/* features */
#alpaka-scrolltotop {      
	bottom: 8rem; 
	right: 1.5rem; 
    opacity: 0;
    visibility: hidden;
    pointer-events: none;  /* чтобы не ловить клики, когда скрыта */
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
}
#alpaka-scrolltotop.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
#progress-bar {
	height: 4px; 
	top: 0; 
}

/* *******************************************************************
 *
 *  3. Wordpress
 *  
 * *******************************************************************/
.alignright {
	float: right;
	margin-bottom: 2rem;
	margin-left: 2rem;
}
.alignfull {
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	width: auto;
}
/* IS-... */
.is-layout-flex {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}
.is-layout-grid {
	display: grid;
	gap: 1rem;
}
.is-position-sticky {
	position: sticky;
	width:100%;
	top:0;
}
.is-content-justification-center {
	justify-content: center;
}
.is-nowrap {
    flex-wrap: nowrap;
}
/* HAS-... */
.has-text-align-center {
	text-align: center;
}
.has-text-align-left {
	text-align: left;
}
.has-background {
	padding: 1rem;
}
.has-global-padding {
	padding-left: 1rem;
	padding-right: 1rem;
}
/* WP-BLOCK-...*/ 
.wp-block-gallery {
    display: grid; /* Принудительно игнорируем flex */
    gap: 1rem;
}
.wp-block-columns {
	align-items: normal;
}
.wp-block-buttons {
	margin-top:1rem;
}
.wp-block-button__link {
	background-color: var(--btn-bg);
	color: var(--btn-color);
	padding: 8px 16px;
	border-radius:var(--border-radius-1);
	display: block;
	text-decoration: none;
	border:0;
}
.wp-block-button__link.btn-small {
	padding:6px 12px;
}
.wp-block-button.is-style-outline .wp-block-button__link {
	background-color: transparent;
	color: var(--text);
	border: 1px solid var(--border);
}


/* *******************************************************************
 *
 *  4. MY CLASSES
 *  
 * *******************************************************************/
.absolute {
	position: absolute;
}
.relative {
	position: relative;
}
.box-100 {
	width: 100%;
}
.height-100 {
	height: 100%;
}
.fixed {
	position: fixed;
}
.no-decoration {
	text-decoration: none;
}
.list-unstyled {
    padding-left: 0;
    list-style: none;
    margin-bottom: 0;
}
/* TEXT */
.uppercase {
	text-transform: uppercase;
}
.light {
	font-weight: 300;
}
.fw-medium     { 
	font-weight: 500; 
}
.strong {
	font-weight: 600;
}
.stronger {
	font-weight: 800;
}
.smallest {
	font-size: 12.5px;
}
.font-size-14 {
	font-size: 14px;
}
.font-size-16 {
	font-size: 16px;
}
.big {
	font-size: 20px;
}
/* NOWRAP */
.text-nowrap {
    white-space: nowrap;
}
/* FLEX */
.flex {
	display: flex;
}
.flex-wrap {
	flex-wrap: wrap;
}
.justify-center {
    justify-content: center;
}
.justify-between {
	justify-content: space-between;
}
.justify-end {
    justify-content: end;
}
.align-between {
	align-content: space-between;
}
.layout-column {
	flex-direction: column;
	display: flex;
}
.vertical-align-middle {
	vertical-align: middle;
}
.align-center {
	align-items: center;
}
.flex-start {
    align-self: flex-start;
}
.flex-grow {
	flex-grow: 1;
}
.flex-1 {
	flex: 1;
}
.gap-1 {
  gap: 0.25rem;
}
.gap-2 {
  gap: 0.5rem;
}
.gap-3 {
  gap: 1rem;
}
.gap-4 {
  gap: 1.5rem;
}
.gap-5 {
  gap: 3rem;
}
/* HIDDEN */
.hidden {
  display: none;
}
.overflow-hidden {	
	overflow: hidden;
}
.overflow-x-auto {	
	overflow-x:auto;
}
/* BORDERS */
.border {
  border: 1px solid var(--border);
}
.border-top {
  border-top: 1px solid var(--border);
}
.border-bottom {
  border-bottom: 1px solid var(--border);
}
.border-left {
  border-left: 1px solid var(--border);
}
.border-radius-1 {
  border-radius: var(--border-radius-1);
}
.border-radius-50 {
  border-radius: 50%;
}
/* PADDINGS */
.p-0 {
  padding: 0;
}
.p-1 {
  padding: 0.25rem;
}
.p-2 {
  padding: 0.5rem;
}
.p-3 {
  padding: 1rem;
}
.p-4 {
  padding: 1.5rem;
}
.pt-0 {
  padding-top: 0;
}
.pt-2 {
  padding-top: .5rem;
}
.pt-3 {
  padding-top: 1rem;
}
.pt-4 {
  padding-top: 1.5rem;
}
.pt-5 {
  padding-top: 3rem;
}
.pb-0 {
  padding-bottom: 0;
}
.pb-2 {
  padding-bottom: .5rem;
}
.pb-3 {
  padding-bottom: 1rem;
}
.pb-4 {
  padding-bottom: 1.5rem;
}
.pb-5 {
  padding-bottom: 3rem;
}
/* MARGINS */
.mb-0 {
  margin-bottom: 0;
}
.mb-1 {
  margin-bottom: 0.25rem;
}
.mb-2 {
  margin-bottom: 0.5rem;
}
.mb-3 {
  margin-bottom: 1rem;
}
.mb-4 {
  margin-bottom: 1.5rem;
}
.mb-5 {
  margin-bottom: 3rem;
}
.mt-0 {
  margin-top: 0;
}
.mt-1 {
  margin-top: 0.25rem;
}
.mt-2 {
  margin-top: 0.5rem;
}
.mt-3 {
  margin-top: 1rem;
}
.mt-4 {
  margin-top: 1.5rem;
}
.mt-5 {
  margin-top: 3rem;
}
/* BG COLORS */
.bg-color-link {
  background: var(--link);
}
.bg-color-1 {
  background: var(--bg);
}
.bg-color-2 {
  background: var(--bg-2);
}
.bg-color-3 {
  background: var(--bg-3);
}
.bg-color-4 {
  background: var(--bg-4);
}
.bg-transparent {
  background: transparent;
}
/* TEXT COLORS */
.link-color {
  color: var(--link);
}
.text-color {
  color: var(--text);
}
.text-color-2 {
  color: var(--text-2);
}
.text-color-3 {
  color: var(--text-3);
}
.pointer {
	cursor:pointer
}
/* SVG */
.filled {
	fill:var(--text);
}
/* Z-INDEX */
.z-10 {
    z-index: 10;
}
.z-20 {
    z-index: 20;
}
.z-30 {
    z-index: 30;
}
/* OTHER */
.stretched-link::after {
    position: absolute;
	inset: 0;
    z-index: 1;
    content: "";
}


/* *******************************************************************
 *
 *  6. Стили для ПК
 *  
 * *******************************************************************/
@media screen and (min-width: 480px) {
  .columns-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .columns-5 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media screen and (min-width: 719px) {
  .columns-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .columns-3 {
    grid-template-columns: repeat(3, 1fr);
  }	
  .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
    flex-basis: 0;
    flex-grow: 1;
  }
}
@media screen and (min-width: 992px) {
	.columns-4 {
		grid-template-columns: repeat(4, 1fr);
	}
	.columns-5 {
		grid-template-columns: repeat(5, 1fr);
	}
	h1 { 
		font-size: 2rem; 
	}
	h2 { 
		font-size: 1.5rem; 
	}
	h3 { 
		font-size: 1.25rem; 
	}
	h4 { 
		font-size: 1rem; 
	}
	figure.wp-block-table table.has-fixed-layout {
		table-layout: fixed; /* Фиксированная раскладка таблицы */
	}
	.site {	
		grid-template-columns:220px 1fr 350px;
	}
	/* Левое меню + правый сайдбар прилипают */
	#masthead,
	.side {
		position: sticky;
		top: 0;
		height: max-content;
	}
	#masthead {
		min-height: 100vh;
	}
}


 /* *******************************************************************
 *
 *  7. Стили для ПК (устройств, которые поддерживают hover)
 *  
 * *******************************************************************/
@media (hover: hover) and (pointer: fine) {
	a:hover {
		text-decoration: none;
	}
	.hover-underline:hover, .wp-block-button__link:hover {
		text-decoration: underline;		
	}
	#alpaka-scrolltotop:hover {
		opacity: .5;
	}
	#theme-toggler:hover {
		background:var(--bg-2)
	} 
}