/*
Theme Name: Webmister
Theme URI: https://webmister.pro/
Description: Hello Elementor Child theme by Webmister
Author: Webmister
Author URI: https://webmister.pro/
Template: hello-elementor
Version: 1.0.2
Text Domain: webmister
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* ---------------------------------------------------------------------------
   Base styles Jupiter used to ship and Hello Elementor deliberately does not.
   Everything here was measured on the live site, not copied from the old
   theme's settings.

   Selectors are kept as bare as the originals on purpose. Raising specificity
   ("safer" .elementor p) makes Elementor's own resets lose — the ones that
   drop the bottom margin on the last paragraph of a widget — and that breaks
   more layouts than it fixes.

   What Site Settings already covers and must NOT be duplicated here:
   body, h1-h6, links, buttons, form fields, images.
   --------------------------------------------------------------------------- */

/* Live site: 16px with a 20px gap. Hello leaves paragraphs at the body size and
   gives them 0.9rem, so every text block ran small and tight.
   The ratio is 1.66 and it is the same everywhere on the live site — as a ratio
   rather than a pixel value, so it survives any font-size a widget sets. */
p {
	font-size: 16px;
	line-height: 1.66;
	margin-bottom: 20px;
}

/* Site Settings styles the fields themselves but has no control for the gap
   between them, and Hello's 1.5 line-height makes them taller than the
   original. Both come from the old theme's base sheet. */
input,
textarea,
select {
	margin-bottom: 4px;
	line-height: normal;
}

/* WPML frames its legacy switcher: a 1px border and padding from its own
   stylesheet, plus a white background and border colour it prints inline from
   the switcher settings. On a dark header that reads as a white rectangle around
   the language links.

   Matching WPML's own class selectors was not enough — the inline block wins on
   order. The wrapper carries an id, so the override goes through that; nothing
   else styles this element, so raising specificity here costs nothing. */
#lang_sel_list,
#lang_sel_list.wpml-ls-statics-shortcode_actions,
.wpml-ls-legacy-list-horizontal,
.wpml-ls-legacy-list-vertical,
.wpml-ls-statics-shortcode_actions,
.wpml-ls {
	border: 0;
	outline: 0;
	padding: 0;
	background: transparent;
}

/* The inline block styles the items too, not just the wrapper — without this the
   box is gone but the language links keep their own light background. */
#lang_sel_list .wpml-ls-item,
#lang_sel_list .wpml-ls-link,
#lang_sel_list a,
.wpml-ls-statics-shortcode_actions .wpml-ls-item,
.wpml-ls-statics-shortcode_actions a {
	background: transparent;
	border: 0;
}

/* Language switcher spacing and current-language colour.
   WPML's own global classes, so this holds wherever the switcher is placed —
   header, footer, off-canvas. Its stylesheet gives the links 5px 10px 6px; the
   horizontal padding is what sets the gap between languages. */
.wpml-ls-link,
.wpml-ls-item a {
	padding-left: 7px;
	padding-right: 7px;
}

/* The switcher widget always paints its links from a per-instance rule built out
   of six classes — clearing the colour in the widget only drops it to Elementor's
   default global, it never stops emitting. Nothing selector-based outweighs that
   from here, so the active language is the one place that takes !important.
   Scoped to that single state; every other language keeps what the widget sets. */
.wpml-ls .wpml-ls-item.wpml-ls-current-language > a,
.wpml-ls .wpml-ls-item.wpml-ls-current-language .wpml-ls-link,
.wpml-elementor-ls .wpml-ls-item.wpml-ls-current-language .wpml-ls-link {
	color: #FFFFFF !important;
}

/* Corner ribbon, printed by inc-stop-war.php. Values are the live site's own —
   the image sits at the same path there, so this survives the move back. */
.stop-war-in-ukraine {
	background-image: url(/img/stop-war-in-ukraine.png);
	background-size: cover;
	position: fixed;
	left: 0;
	top: 0;
	width: 95px;
	height: 98px;
	z-index: 1000000;
}

/* Правила Макса для плиток «виды работ» — восстановлены из бэкапа 14:13
   после того, как я затёр style.css своей копией. */
.wm-type-of-work,
.wm-type-of-work.elementor-widget-call-to-action .elementor-widget-container,
.wm-type-of-work.elementor-widget-call-to-action:not(:has(.elementor-widget-container)),
.wm-type-of-work .elementor-cta,
.wm-type-of-work .elementor-cta .elementor-cta__bg-wrapper {
	overflow: visible;
}

.wm-type-of-work .elementor-cta__content .elementor-cta__title {
	padding-top: 32px;
	margin-bottom: 40px;
}

/* Карточки записей на мобильном: картинка сверху, а не сбоку.
   Брейкпойнт 767px — это mobile в ките Elementor (viewport_md = 768). */
@media (max-width: 767px) {
	.elementor-posts--thumbnail-left .elementor-post,
	.elementor-posts--thumbnail-right .elementor-post {
		flex-direction: column;
	}
	
	.elementor-posts .elementor-post__title {
		padding-top: 15px;
	}
}
