/*
Theme Name: Itfirm Child
Theme URI: http://demo.casethemes.net/itfirm/
Author: Case-Themes
Author URI: https://themeforest.net/user/case-themes/portfolio/
Description: Child theme — Theme Options colors forced site-wide from first paint.
Version: 1.5.0
License: ThemeForest
License URI: https://themeforest.net/licenses
Template: itfirm
Text Domain: itfirm-child
*/

/*
 * JEDNO ŹRÓDŁO KOLORÓW
 * --------------------
 * WP Admin → Theme Options (Itfirm) → Colors
 *
 *  - Primary / Secondary / Third
 *  - Link Colors
 *  - Gradient Color (From / To)  ← buttony, ikony, text-gradient, podkreślenie menu
 *
 * Child wymusza te wartości (CSS variables) na froncie od razu i nadpisuje
 * demo-hexy z theme.css oraz stare kolory zapisane w widgetach Elementora
 * (menu underline, Case Button gradient, itp.).
 *
 * Po zmianie w panelu: Save + wyczyść cache.
 */

/* Optional custom CSS below. */

/* ---- Large screens: scale whole layout (Elementor + slider use px sizes, 1140px container) ---- */
/* ponytail: root zoom + fix-ups for JS that measures window.innerWidth (unscaled by zoom):
   Elementor stretched sections and Slider Revolution full-width. Switch to rem/clamp() if this bites. */
@media (min-width: 2200px) { :root { --va-zoom: 1.25; } }
@media (min-width: 3200px) { :root { --va-zoom: 1.6; } }
@media (min-width: 2200px) {
	html { zoom: var(--va-zoom); }
	.elementor-section-stretched {
		width: calc(100vw / var(--va-zoom)) !important;
		left: 0 !important;
		margin-left: calc(50% - 50vw / var(--va-zoom)) !important;
	}
	sr7-module sr7-content {
		width: calc(100vw / var(--va-zoom)) !important;
		left: calc(50% - 50vw / var(--va-zoom)) !important;
		overflow: hidden !important;
	}
	sr7-module sr7-content > sr7-slide {
		width: 100vw !important;
		margin-left: calc(-50vw * (1 - 1 / var(--va-zoom))) !important;
	}
}

/* ---- A11y: visible keyboard focus (theme sets outline:none) ---- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
	outline: 2px solid var(--primary-color, #5ee04a) !important;
	outline-offset: 2px;
}

/* ---- 4K zoom: custom cursor is positioned by JS with real screen px (translate) — un-zoom it ---- */
@media (min-width: 2200px) {
	.ct-cursor { zoom: calc(1 / var(--va-zoom)); }
	.ct-cursor .ct-cursor--follower { width: calc(1.5rem * var(--va-zoom)); height: calc(1.5rem * var(--va-zoom)); }
}

/* ---- 4K zoom: sticky header. Its stretched section sits in a 1200px .container > .row > col chain the
   main header lacks, so the generic 50%-50vw offset shifted it left and clipped the logo. Let the whole
   chain span the fixed wrapper (= viewport) and drop the offset; result matches the main header 1:1. ---- */
@media (min-width: 2200px) {
	#ct-header-elementor .ct-header-elementor-sticky > .container {
		max-width: none !important;
		width: 100% !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
	}
	#ct-header-elementor .ct-header-elementor-sticky > .container > .row {
		margin-left: 0 !important;
		margin-right: 0 !important;
	}
	#ct-header-elementor .ct-header-elementor-sticky > .container > .row > * {
		flex: 0 0 100% !important;
		width: 100% !important;
		max-width: 100% !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
	}
	#ct-header-elementor .ct-header-elementor-sticky .elementor-section-stretched {
		width: 100% !important;
		left: 0 !important;
		margin-left: 0 !important;
	}
}

/* ---- Ultrawide (> 3840px): stop growing. Layout stays exactly as on a 4K screen (zoom 1.6 → 2400 CSS px)
   and is centered; gutters take the secondary colour. Stretched sections, the slider and the fixed
   header bars are re-anchored to the capped body instead of the viewport. ---- */
@media (min-width: 3841px) {
	html { background: #041122; } /* = header/nav navy, hides the seam */
	body { max-width: 2400px; margin: 0 auto !important; position: relative; }
	.elementor-section-stretched {
		width: 2400px !important;
		left: 50% !important;
		margin-left: -1200px !important;
	}
	/* Slider Revolution (fullwidth) positions layers from window width, so the hero stays full-bleed
	   here on purpose (rules from the >=2200px block apply); everything else is capped. */
	#ct-header-elementor .ct-header-elementor-sticky,
	#ct-header-elementor .ct-header-fixed-transparent-wrap {
		left: calc(50% - 1200px) !important;
		right: auto !important;
		width: 2400px !important;
	}
}
