/*
Theme Name: Swedcom Infraehitus
Theme URI: https://swedcom.ee
Author: Swedcom Baltic OÜ
Description: Swedcom Baltic OÜ koduleht: kaevetööd, infraehitus ja tehnika rent juhiga. Hele taust, mustad tekstikastid, kollased nupud. Kõiki tekste ja pilte saab muuta saidiredaktoris (Välimus → Redaktor).
Version: 1.3.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: swedcom
*/

/* ---------- Üldine ---------- */
:root {
	--sc-yellow: #F2B705;
	--sc-black: #111214;
	--sc-bg: #F5F4F0;
	--sc-white: #FFFFFF;
	--sc-line: #E3E0D8;
	--sc-muted: #5A5850;
	--sc-muted-dark: #C9C6BE;
	--sc-radius: 10px;
}

html { scroll-behavior: smooth; }
body { margin: 0; }
.wp-site-blocks { padding: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }
img { max-width: 100%; height: auto; }

.sc-wrap {
	max-width: 1240px;
	margin-left: auto !important;
	margin-right: auto !important;
	padding-left: 24px;
	padding-right: 24px;
	box-sizing: border-box;
}

/* ---------- Päis ---------- */
.sc-header-part { position: sticky; top: 0; z-index: 50; }
.sc-header {
	background: var(--sc-white);
	border-bottom: 1px solid var(--sc-line);
}
.sc-header-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-top: 14px;
	padding-bottom: 14px;
}
.sc-header-inner > * { margin: 0 !important; }
.sc-logo img { height: 46px; width: auto; display: block; }
.sc-nav { font-size: 15px; font-weight: 500; gap: 26px; }
.sc-nav a { text-decoration: none; color: var(--sc-black); }
.sc-nav a:hover { text-decoration: underline; }
.admin-bar .sc-header-part { top: 32px; }

/* ---------- Nupud ---------- */
.sc-btn-yellow .wp-block-button__link,
.sc-btn-dark .wp-block-button__link {
	font-weight: 700;
	font-size: 16px;
	padding: 15px 26px;
	border-radius: 6px;
	text-decoration: none;
}
.sc-btn-yellow .wp-block-button__link { background: var(--sc-yellow); color: var(--sc-black); }
.sc-btn-dark .wp-block-button__link { background: var(--sc-black); color: var(--sc-white); }
.sc-btn-yellow .wp-block-button__link:hover { filter: brightness(0.95); }
.sc-btn-small .wp-block-button__link { font-size: 15px; padding: 12px 18px; }

/* ---------- Avaplokk ---------- */
.sc-hero { padding-top: 64px; padding-bottom: 72px; gap: 40px !important; }
.sc-kicker {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--sc-muted);
	margin: 0 0 18px;
}
.sc-hero h1 {
	font-size: clamp(40px, 5.4vw, 70px);
	line-height: 1.02;
	letter-spacing: -0.01em;
	margin: 0 0 20px;
}
.sc-lead { font-size: 19px; line-height: 1.55; color: #3E3C36; max-width: 560px; margin: 0 0 24px; }
.sc-hero-img img {
	width: 100%;
	height: 360px;
	object-fit: cover;
	object-position: 50% 60%;
	border-radius: var(--sc-radius);
	display: block;
}
.sc-hero-img { margin: 0 0 14px; }
.sc-stats {
	background: var(--sc-black);
	color: var(--sc-white);
	border-radius: var(--sc-radius);
	padding: 24px 28px;
	gap: 16px !important;
	margin: 0 !important;
}
.sc-stat-num {
	font-family: var(--wp--preset--font-family--archivo);
	font-weight: 800;
	font-size: 28px;
	line-height: 1.15;
	white-space: nowrap;
	margin: 0;
}
.sc-stat-label { font-size: 14px; color: var(--sc-muted-dark); margin: 4px 0 0; }

/* ---------- Sektsioonid ---------- */
.sc-section { padding-top: 80px; padding-bottom: 80px; }
.sc-section-white { background: var(--sc-white); border-top: 1px solid var(--sc-line); border-bottom: 1px solid var(--sc-line); }
.sc-section-head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 24px;
	margin-bottom: 32px;
}
.sc-section-head > * { margin: 0 !important; }
.sc-section-head p { max-width: 520px; font-size: 17px; line-height: 1.55; color: #3E3C36; }
.sc-h2 { font-size: clamp(32px, 3.6vw, 48px); line-height: 1.05; margin: 0; }
.sc-note { font-size: 14px; color: var(--sc-muted); margin-top: 22px; }

/* ---------- Mustad kastid ---------- */
.sc-cards { gap: 16px !important; margin-bottom: 16px !important; }
.sc-card {
	background: var(--sc-black);
	color: var(--sc-white);
	border-radius: var(--sc-radius);
	padding: 30px;
	height: 100%;
	box-sizing: border-box;
}
.sc-card > * { margin-top: 0; }
.sc-card h3 { font-size: 23px; line-height: 1.2; margin: 0 0 12px; color: var(--sc-white); }
.sc-card p { font-size: 15px; line-height: 1.6; color: var(--sc-muted-dark); margin: 0; }
.sc-card a { color: var(--sc-yellow); }
.sc-num {
	font-family: var(--wp--preset--font-family--archivo);
	font-weight: 800;
	font-size: 14px;
	letter-spacing: 0.1em;
	color: var(--sc-yellow) !important;
	margin: 0 0 12px !important;
}
.sc-step-num { font-size: 28px; letter-spacing: 0; }

@media (min-width: 782px) {
	.sc-cards-3 > .wp-block-column { flex: 0 1 calc((100% - 32px) / 3) !important; }
}

/* Rendimasinad */
.sc-machine { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.sc-machine .wp-block-image { margin: 0; }
.sc-machine .wp-block-image img { width: 100%; height: 220px; object-fit: cover; display: block; }
.sc-machine-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.sc-machine-body > * { margin: 0 !important; }
.sc-machine-body h3 { font-size: 20px; margin: 0; }
.sc-machine-body strong { color: var(--sc-white); }
.sc-price {
	margin-top: auto !important;
	padding-top: 14px;
	border-top: 1px solid #34353A;
	font-family: var(--wp--preset--font-family--archivo);
	font-weight: 800;
	font-size: 18px;
	color: var(--sc-white) !important;
}
.sc-price .sc-vat { font-family: var(--wp--preset--font-family--inter); font-weight: 500; font-size: 13px; color: var(--sc-muted-dark); }

/* ---------- Kontakt ---------- */
.sc-contact-white {
	background: var(--sc-white);
	border: 1px solid var(--sc-line);
	border-radius: var(--sc-radius);
	padding: 32px;
	height: 100%;
	box-sizing: border-box;
}
.sc-contact-white > * { margin-top: 0; }
.sc-contact-white h2, .sc-card h2 { font-size: 28px; line-height: 1.1; margin: 0 0 14px; }
.sc-phone-big a {
	font-family: var(--wp--preset--font-family--archivo);
	font-weight: 800;
	font-size: 28px;
	text-decoration: none;
	color: var(--sc-black);
}
.sc-facts { display: grid; grid-template-columns: 140px 1fr; gap: 8px 20px; font-size: 15px; line-height: 1.5; margin: 0; }
.sc-facts dt { color: var(--sc-muted); }
.sc-facts dd { margin: 0; }
.sc-map iframe { width: 100%; height: 280px; border: 0; border-radius: 8px; display: block; }
.sc-breadcrumb { font-size: 14px; color: var(--sc-muted); margin: 0 0 24px; }
.sc-breadcrumb a { color: var(--sc-muted); }
.sc-stack > * + * { margin-top: 16px !important; }

/* ---------- Päringuvorm ---------- */
.sc-form { display: flex; flex-direction: column; gap: 16px; }
.sc-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--sc-muted-dark); }
.sc-form input[type="text"],
.sc-form input[type="tel"],
.sc-form input[type="email"],
.sc-form textarea {
	padding: 13px 14px;
	border-radius: 6px;
	border: 1px solid #3A3B40;
	background: #1E1F22;
	color: var(--sc-white);
	font-size: 16px;
	font-family: inherit;
}
.sc-form fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sc-form legend { font-size: 14px; color: var(--sc-muted-dark); padding: 0; margin-bottom: 10px; }
.sc-form .sc-radio {
	flex-direction: row;
	align-items: center;
	gap: 10px;
	font-size: 15px;
	color: var(--sc-white);
	padding: 12px 14px;
	border: 1px solid #3A3B40;
	border-radius: 6px;
	cursor: pointer;
}
.sc-form .sc-radio input { accent-color: var(--sc-yellow); width: 18px; height: 18px; margin: 0; }
.sc-form button {
	background: var(--sc-yellow);
	color: var(--sc-black);
	font-weight: 700;
	padding: 16px;
	border-radius: 6px;
	border: 0;
	font-size: 16px;
	cursor: pointer;
	font-family: inherit;
}
.sc-form .sc-consent { margin: 0; font-size: 13px; line-height: 1.5; color: #9C998F; }
.sc-form .sc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sc-form-msg { padding: 14px 16px; border-radius: 6px; font-size: 15px; margin-bottom: 8px; }
.sc-form-msg.ok { background: #1F3A24; color: #CFF5D6; }
.sc-form-msg.err { background: #3E1F1F; color: #F8D2D2; }

/* ---------- Jalus ---------- */
.sc-footer { background: var(--sc-white); border-top: 1px solid var(--sc-line); color: var(--sc-muted); font-size: 13px; }
.sc-footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; padding-bottom: 24px; }
.sc-footer-inner > * { margin: 0 !important; }

/* ---------- Mobiil ---------- */
@media (max-width: 781px) {
	.sc-hero { padding-top: 36px; padding-bottom: 48px; }
	.sc-hero-img img { height: 240px; }
	.sc-section { padding-top: 56px; padding-bottom: 56px; }
	.sc-stats { flex-wrap: wrap !important; }
	.sc-facts { grid-template-columns: 1fr; }
	.admin-bar .sc-header-part { top: 46px; }
}

/* Kontuurnupp tumedas kastis */
.sc-card .is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--sc-white);
	border: 1px solid #4A4B50;
	padding: 11px 18px;
	font-size: 15px;
	font-weight: 600;
	border-radius: 6px;
}
.sc-card h2, .sc-card h3 { color: var(--sc-white); }
.sc-card .wp-block-buttons { margin: 18px 0; }

/* Parandused */
[id] { scroll-margin-top: 100px; }
.sc-stack .sc-card, .sc-stack .sc-contact-white { height: auto; }

/* Meie kliendid */
.sc-clients { padding-top: 0; padding-bottom: 48px; }
.sc-clients .sc-h2 { margin-bottom: 16px; font-size: 22px; }
.sc-logos { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 620px; }
.sc-logos > * { margin: 0 !important; }
.sc-logo-box { background: #FFFFFF; border: 1px solid var(--sc-line); border-radius: var(--sc-radius); height: 60px; display: flex !important; align-items: center; justify-content: center; padding: 10px 14px; box-sizing: border-box; }
.sc-logo-box img { max-height: 35px; width: auto !important; max-width: 100%; object-fit: contain; }
@media (max-width: 781px) { .sc-logos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Kompaktne päringuvorm */
.sc-form { gap: 14px; }
.sc-form fieldset { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.sc-form legend { width: 100%; margin-bottom: 8px; }
.sc-form .sc-radio { padding: 9px 12px; font-size: 14px; flex: 0 0 auto; }
.sc-form-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sc-form input[type="text"], .sc-form input[type="tel"], .sc-form input[type="email"], .sc-form textarea { padding: 11px 12px; }
.sc-form button { padding: 14px; }
@media (max-width: 600px) { .sc-form-row { grid-template-columns: 1fr; } }

/* Objekti rida tehtud töödel */
.sc-card p.sc-objekt { font-size: 13px; line-height: 1.4; color: var(--sc-muted-dark); margin: 0; }

/* Pildi suurendus (mustade servadega fotod) */
.sc-machine .sc-zoom { overflow: hidden; }
.sc-machine .sc-zoom img { transform: scale(1.18); }

/* Mobiil: päis ei võta ekraani kinni */
@media (max-width: 781px) {
	.sc-header-part { position: static; }
	.sc-logo img { height: 36px; }
	.sc-header-inner { padding-top: 10px; padding-bottom: 10px; gap: 10px; }
}

/* Keelevalik */
.sc-lang { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; margin: 0 !important; color: var(--sc-muted); }
.sc-lang a { text-decoration: none; color: var(--sc-muted); padding: 4px 2px; }
.sc-lang a:hover { color: var(--sc-black); }
.sc-lang a.is-current { color: var(--sc-black); border-bottom: 2px solid var(--sc-yellow); }

/* Pikemad tekstid inglise ja vene keeles */
html[lang^="ru"] .sc-hero h1 { font-size: clamp(32px, 4vw, 54px); hyphens: auto; -webkit-hyphens: auto; }
html[lang^="en"] .sc-stat-num, html[lang^="ru"] .sc-stat-num { white-space: normal; font-size: 22px; }
html[lang^="ru"] .sc-h2 { hyphens: auto; -webkit-hyphens: auto; }

/* SEO tekstiplokk */
.sc-seo { padding-top: 40px; padding-bottom: 56px; border-top: 1px solid var(--sc-line); }
.sc-seo .sc-h2 { font-size: clamp(26px, 2.6vw, 34px); margin-bottom: 18px; }
.sc-seo p { max-width: 860px; font-size: 16px; line-height: 1.7; color: #3E3C36; margin: 0 0 14px; }

/* Mobiil: numbrikast (15+ / 100+ / Üle Eesti) */
@media (max-width: 600px) {
	.sc-stats { padding: 18px 16px; gap: 10px !important; }
	.sc-stat-num, html[lang^="en"] .sc-stat-num, html[lang^="ru"] .sc-stat-num { font-size: 20px; white-space: normal; line-height: 1.1; }
	.sc-stat-label { font-size: 12px; }
}
