/*!
Theme Name: bebestschool.kz
Theme URI: https://bebestschool.kz
Author: Dmitry Dev
Author URI: https://portfolio-v2-five-xi.vercel.app/
Description: WordPress theme for BeBest School (bebestschool.kz): custom Gutenberg blocks on ACF, page templates, popups and Contact Form 7 forms.
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: bebestschool-kz
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready

This theme, like WordPress, is licensed under the GPL.

Developed by Dmitry Dev, https://portfolio-v2-five-xi.vercel.app/.
Started from a GPL starter theme (C) 2012-2020 Automattic, Inc., GPL v2 or later.

The reset below is modern-normalize v3 https://github.com/sindresorhus/modern-normalize
(C) Sindre Sorhus, MIT License.
*/

/*
 * The site's own look lives with each part: every block in its folder under
 * inc/blocks/, the header in site-header/, the footer in site-footer/, forms
 * in inc/cf7.css. This file is only what they all stand on — a reset, the
 * page's base type and colours, and WordPress's own utility classes.
 *
 * TABLE OF CONTENTS
 * 1. Reset (modern-normalize)
 * 2. Base
 * 3. Accessibility
 * 4. WordPress: alignments, captions, galleries
 * 5. Block pages
 */

/*--------------------------------------------------------------
# 1. Reset — modern-normalize v3
--------------------------------------------------------------*/

*,
::before,
::after {
	box-sizing: border-box;
}

html {
	font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
	line-height: 1.15;
	-webkit-text-size-adjust: 100%;
	tab-size: 4;
}

body {
	margin: 0;
}

b,
strong {
	font-weight: bolder;
}

code,
kbd,
samp,
pre {
	font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
	font-size: 1em;
}

small {
	font-size: 80%;
}

sub,
sup {
	position: relative;
	font-size: 75%;
	line-height: 0;
	vertical-align: baseline;
}

sub {
	bottom: -0.25em;
}

sup {
	top: -0.5em;
}

table {
	border-color: currentcolor;
}

button,
input,
optgroup,
select,
textarea {
	margin: 0;
	font-family: inherit;
	font-size: 100%;
	line-height: 1.15;
}

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

legend {
	padding: 0;
}

progress {
	vertical-align: baseline;
}

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
	height: auto;
}

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

::-webkit-search-decoration {
	-webkit-appearance: none;
}

::-webkit-file-upload-button {
	-webkit-appearance: button;
	font: inherit;
}

summary {
	display: list-item;
}

/*--------------------------------------------------------------
# 2. Base
--------------------------------------------------------------*/

:root {
	--bbs-font: 'ApercuPro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
	--bbs-ink: #000000;
	--bbs-green: #1cb65a;
	--bbs-coral: #f66746;
	--bbs-yellow: #ffd72e;
}

/*
 * Type is drawn the way Tilda draws it, with greyscale antialiasing: on macOS
 * that keeps light text on the coloured bands (the footer, the green
 * sections) as fine as on the original, where subpixel rendering thickens it.
 */
body {
	background: #ffffff;
	color: var(--bbs-ink);
	font-family: var(--bbs-font);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

img,
svg,
video,
canvas,
iframe {
	max-width: 100%;
}

img,
video {
	height: auto;
}

img {
	vertical-align: middle;
	border-style: none;
}

/* Links in running text. The blocks, the header and the footer colour their own. */
a {
	color: var(--bbs-green);
}

a:hover {
	color: #169c4c;
}

button,
[role='button'],
summary,
label[for] {
	cursor: pointer;
}

:focus-visible {
	outline: 2px solid var(--bbs-green);
	outline-offset: 2px;
}

::selection {
	background: var(--bbs-yellow);
	color: #000000;
}

hr {
	height: 0;
	margin: 2em 0;
	border: 0;
	border-top: 1px solid #e5e5e5;
}

/*--------------------------------------------------------------
# 3. Accessibility
--------------------------------------------------------------*/

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

/* The "Skip to content" link, when it gets keyboard focus. */
.screen-reader-text:focus {
	top: 5px;
	left: 5px;
	z-index: 100000;
	display: block;
	width: auto;
	height: auto;
	padding: 15px 23px 14px;
	clip: auto !important;
	clip-path: none;
	border-radius: 3px;
	background: #ffffff;
	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
	color: #000000;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: normal;
	text-decoration: none;
}

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

/*--------------------------------------------------------------
# 4. WordPress: alignments, captions, galleries
--------------------------------------------------------------*/

.alignleft {
	float: left;
	margin: 0 1.5em 1.5em 0;
}

.alignright {
	float: right;
	margin: 0 0 1.5em 1.5em;
}

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

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

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

.wp-caption-text,
.wp-element-caption {
	margin: 0.6em 0 0;
	color: #666666;
	font-size: 14px;
	text-align: center;
}

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

.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-caption {
	display: block;
}

/*--------------------------------------------------------------
# 5. Block pages
--------------------------------------------------------------*/

/* A page is its blocks, one under another, with nothing between them. */
.site-main,
.entry-content {
	margin: 0;
}

/*
 * Every custom block on this site manages its own 1200px container itself, on
 * purpose — their background runs full width and only their content is boxed.
 * A plain core block (Heading, Paragraph, List...) dropped straight into a
 * page has no such container, so it would run edge to edge. This gives it the
 * same 1200px + 20px gutter, unless an editor deliberately picks Wide or Full
 * width — those stay untouched, same as a custom block's own full-bleed
 * background.
 */
.entry-content > :where(:not(.alignwide):not(.alignfull)) {
	max-width: 1240px;
	margin-right: auto;
	margin-left: auto;
	padding-right: 20px;
	padding-left: 20px;
}

/* Some air around plain text blocks, which have no spacing of their own. */
.entry-content > :where(p, h1, h2, h3, h4, h5, h6, ul, ol, blockquote, figure, table, .wp-block-image, .wp-block-buttons) {
	margin-top: 1em;
	margin-bottom: 1em;
}

.entry-content > .alignwide {
	max-width: 1240px;
	margin-right: auto;
	margin-left: auto;
}

@media (max-width: 639px) {
	.entry-content > :where(:not(.alignwide):not(.alignfull)) {
		padding-right: 16px;
		padding-left: 16px;
	}
}

/*
 * Section backgrounds a block can be switched to (the "Background" select,
 * inc/blocks.php): the site's yellow, green, white and light grey. The doubled class
 * outranks the block's own background, whatever order the stylesheets load in.
 */
.bbs-bg.bbs-bg--white {
	background: #ffffff;
}

.bbs-bg.bbs-bg--yellow {
	background: #ffd62c;
}

.bbs-bg.bbs-bg--green {
	background: #1cb65a;
}

.bbs-bg.bbs-bg--grey {
	background: #f0f0f0;
}
