/*
Theme Name:   Kadence MTSP
Theme URI:    https://mtsp.com.ua
Description:  Kadence child theme for MTC-Poltava. Corporate blue-white style.
Author:       MTC-Poltava
Template:     kadence
Version:      1.0.6
Text Domain:  kadence-mtsp
*/

/* =============================================================
   MTSP — Global Theme Overrides
   Loaded after Kadence parent + all Kadence inline CSS (priority 999),
   so same-specificity rules here win via cascade order.

   HEADER STRUCTURE (as confirmed by live HTML inspection):
     .site-top-header-wrap   — top bar (phone), bg: --global-palette2
     .site-main-header-wrap  — logo (left) + primary nav (right), bg: --global-palette1
     [no .site-bottom-header-wrap — that row is not configured]

   CUSTOMIZER WORK NEEDED for full mockup:
   • White header row + blue nav row as two separate rows:
     Kadence Customizer → Header Builder → add "Bottom" row,
     move nav there, set Main row bg to #fff.
   • Callback button: add "Button" element in the header builder,
     then #main-header .header-button { background:#ff6b35 } below activates.
   • Search bar / lang switcher: add via header builder elements.
   ============================================================= */


/* ---- 1. Page background ----------------------------------- */
/* Kadence outputs: body { background: var(--global-palette8) }
   Our rule wins via load order (child stylesheet after Kadence inline). */
body {
	background-color: #f8f9fa;
}


/* ---- 2. Header callback button: orange -------------------- */
/* No button element exists in the header yet. Once added via
   Kadence header builder, this rule activates automatically.  */
#main-header .header-button {
	background: #ff6b35;
	color: #ffffff;
	border-color: #ff6b35;
}
#main-header .header-button:hover,
#main-header .header-button:focus {
	background: #d94e1f;
	color: #ffffff;
	border-color: #d94e1f;
}


/* ---- 3. Navigation: reinforce white text on blue row ------ */
/* Kadence customizer already sets these; rules here act as a
   safety net so child-theme palette overrides don't break it. */
.main-navigation .primary-menu-container > ul > li.menu-item > a {
	color: rgba(255, 255, 255, 0.90);
}
.main-navigation .primary-menu-container > ul > li.menu-item > a:hover,
.main-navigation .primary-menu-container > ul > li.menu-item > a:focus {
	color: #ffffff;
}
.main-navigation .primary-menu-container > ul > li.menu-item.current-menu-item > a,
.main-navigation .primary-menu-container > ul > li.menu-item.current-menu-ancestor > a {
	color: #ffffff;
}


/* ---- 4 & 5. Custom 4-column dark footer ------------------- */

/* Hide Kadence's own footer builder output — our mtsp-footer replaces it */
#colophon {
	display: none !important;
}

.mtsp-footer {
	background-color: #0a1628;
	color: #c8d0dc;
	font-size: 14px;
	line-height: 1.7;
	margin-top: 0;
	padding: 0;
}

.mtsp-footer__inner {
	display: flex;
	flex-wrap: wrap;
	gap: 40px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 52px 24px 36px;
}

/* Columns */
.mtsp-footer__col {
	flex: 1 1 180px;
	min-width: 0;
}
.mtsp-footer__col--brand {
	flex: 1.5 1 220px;
}

/* Logo */
.mtsp-footer__logo {
	margin-bottom: 16px;
}
.mtsp-footer__logo img {
	max-width: 160px;
	height: auto;
	filter: brightness(0) invert(1);
	opacity: 0.88;
}
.mtsp-footer__site-name {
	display: inline-block;
	color: #ffffff;
	font-size: 18px;
	font-weight: 700;
	text-decoration: none;
}

/* Description / meta rows */
.mtsp-footer__description {
	color: #8fa3bc;
	margin-bottom: 12px;
}
.mtsp-footer__meta {
	color: #c8d0dc;
	margin-bottom: 10px;
}
.mtsp-footer__meta-label {
	display: block;
	color: #6a84a0;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	margin-bottom: 2px;
}

/* Column headings */
.mtsp-footer__col-title {
	color: #ffffff;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.09em;
	margin: 0 0 16px;
	padding-bottom: 10px;
	border-bottom: 1px solid #1b2f4a;
}

/* Nav menus */
.mtsp-footer__menu {
	list-style: none;
	margin: 0;
	padding: 0;
}
.mtsp-footer__menu li {
	margin-bottom: 9px;
}
.mtsp-footer__menu a {
	color: #8fa3bc;
	text-decoration: none;
	transition: color 0.18s;
}
.mtsp-footer__menu a:hover,
.mtsp-footer__menu a:focus {
	color: #ffffff;
}

/* Phones */
.mtsp-footer__phones {
	display: flex;
	flex-direction: column;
	gap: 7px;
	margin-bottom: 16px;
}
.mtsp-footer__phone {
	color: #ffffff;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition: color 0.18s;
}
.mtsp-footer__phone:hover,
.mtsp-footer__phone:focus {
	color: #ff6b35;
}

/* Emails */
.mtsp-footer__emails {
	display: flex;
	flex-direction: column;
	gap: 5px;
}
.mtsp-footer__email {
	color: #8fa3bc;
	text-decoration: none;
	transition: color 0.18s;
}
.mtsp-footer__email:hover,
.mtsp-footer__email:focus {
	color: #ffffff;
}

/* Social icons row */
.mtsp-footer__social {
	display: flex;
	gap: 12px;
	margin-top: 16px;
}
.mtsp-footer__social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.08);
	color: #8fa3bc;
	text-decoration: none;
	transition: background 0.18s, color 0.18s;
}
.mtsp-footer__social-link:hover,
.mtsp-footer__social-link:focus {
	background: #ff6b35;
	color: #ffffff;
}
.mtsp-footer__social-link i {
	width: 18px;
	height: 18px;
}

/* Bottom bar */
.mtsp-footer__bottom {
	border-top: 1px solid #1b2f4a;
	text-align: center;
	padding: 16px 24px;
	color: #3d5570;
	font-size: 13px;
}
.mtsp-footer__bottom p {
	margin: 0;
}

/* Responsive */
@media (max-width: 900px) {
	.mtsp-footer__inner {
		gap: 28px;
	}
	.mtsp-footer__col,
	.mtsp-footer__col--brand {
		flex-basis: calc(50% - 14px);
	}
}
@media (max-width: 560px) {
	.mtsp-footer__inner {
		flex-direction: column;
		padding: 36px 20px 24px;
	}
	.mtsp-footer__col,
	.mtsp-footer__col--brand {
		flex-basis: 100%;
	}
}

/* .mtsp-fp-cta CF7-оверрайди (17 рядків, 6× !important) видалені 2026-07-22 —
 * клас НІДЕ не рендерився: 0 збігів у PHP теми, 0 у живому HTML UA+RU.
 * Розмітка CTA головної вживає `fp-cta` (front-page.php:584), а її стилі живуть
 * у assets/css/front-page.css:458-592 — ті НЕ чіпані. */

@media (max-width: 767px) {
    .site-top-header-wrap {
        display: none !important;
    }
}

/* ── Inline header search ─────────────────────────────────────────
   Styling moved to assets/css/components-header.css (scoped under
   .mtsp-site-header) — Етап 1 крок 2-фікс-2 (2026-06-30). The old global
   rules here targeted the legacy white Kadence header and CONFLICTED with the
   new navy header (leaked width:100% + position:absolute on the button →
   overflow + unreadable text). Removed; the search now lives only inside the
   custom header.php. */
/* Safety net: hide Kadence's search modal if it somehow still renders */
#search-drawer { display: none !important; }

/* ---------------------------------------------------------------
   Language switcher (Polylang, inline with phones in top bar)
--------------------------------------------------------------- */

/* Make the header-html wrapper a flex row so phones + switcher sit side by side */
.site-header-item[data-section="kadence_customizer_header_html"] {
	display: flex;
	align-items: center;
	gap: 12px;
}
.header-html .header-html-inner p {
	margin: 0;
}

.mtsp-lang-switcher {
	display: flex;
	align-items: center;
}
.mtsp-lang-switcher ul {
	display: flex;
	align-items: center;
	gap: 2px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.mtsp-lang-switcher ul li a,
.mtsp-lang-switcher ul li span {
	display: inline-block;
	padding: 1px 7px;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #555;
	text-decoration: none;
	border: 1px solid #ccc;
	border-radius: 3px;
	transition: background 0.15s, color 0.15s;
}
.mtsp-lang-switcher ul li a:hover {
	background: #1565c0;
	color: #fff;
	border-color: #1565c0;
}
.mtsp-lang-switcher ul li.current-lang a {
	background: #1565c0;
	color: #fff;
	border-color: #1565c0;
	pointer-events: none;
}

/* ── Hide CF7 default response output — custom success divs used instead ── */
.wpcf7-response-output {
	display: none !important;
	visibility: hidden !important;
}

/* ── Custom success message div (all forms) ─────────────────────────── */
.mtsp-success-msg {
	margin-top: 12px;
	padding: 12px 16px;
	background: #e8f5e9;
	color: #2e7d32;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 500;
	text-align: center;
}

/* Dark background forms (sidebar) — white text */
.mtsp-sidebar-form .mtsp-success-msg {
	background: rgba(255,255,255,0.15);
	color: #fff;
}

/* ── Global callback popup ───────────────────────────────────────── */
.mtsp-callback-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.55);
	z-index: 9999;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
}
.mtsp-callback-overlay.active { display: flex; }
.mtsp-callback-box {
	background: #fff;
	border-radius: 12px;
	padding: 32px 28px 24px;
	max-width: 420px;
	width: 100%;
	position: relative;
	box-shadow: 0 8px 40px rgba(0,0,0,0.18);
	box-sizing: border-box;
}
.mtsp-callback-close {
	position: absolute;
	top: 12px;
	right: 16px;
	background: none;
	border: none;
	font-size: 20px;
	cursor: pointer;
	color: #666;
	padding: 4px;
	line-height: 1;
	outline: none !important;
	box-shadow: none !important;
	-webkit-tap-highlight-color: transparent;
}
.mtsp-callback-close:hover { color: #1a3a6b; }
.mtsp-callback-heading {
	font-size: 20px;
	font-weight: 700;
	color: #1a3a6b;
	margin: 0 0 20px;
}
.mtsp-callback-box .wpcf7 input[type="text"],
.mtsp-callback-box .wpcf7 input[type="tel"] {
	width: 100%;
	border: 1px solid #dce6f5;
	border-radius: 6px;
	padding: 10px 14px;
	margin-bottom: 10px;
	font-size: 14px;
	box-sizing: border-box;
}
.mtsp-callback-box .wpcf7 input[type="submit"] {
	background: #e8500a;
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 12px 24px;
	width: 100%;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}
.mtsp-callback-box .wpcf7 input[type="submit"]:hover { background: #c94008; }

/* === C2 (2026-04-25): top intro block on category pages === */
.mtsp-cat-intro {
    margin: 1rem 0 2rem;
}
.mtsp-cat-intro__content {
    position: relative;
    max-height: 200px;
    overflow: hidden;
    color: #444;
    font-size: 1rem;
    line-height: 1.6;
}
.mtsp-cat-intro__content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, #fff 80%);
    pointer-events: none;
}
.mtsp-cat-intro__content:not(.is-overflowing)::after {
    display: none;
}
.mtsp-cat-intro__content p {
    margin: 0 0 0.7em;
}
.mtsp-cat-intro__content p:last-child {
    margin-bottom: 0;
}
.mtsp-cat-intro__content ul,
.mtsp-cat-intro__content ol {
    margin: 0 0 0.7em 1.5em;
}
