/*
Theme Name: KotoisaArki
Template: hello-biz
Author: Kotoisa Arki Oy
Description: Lapsiteemainen, lämmin ja selkeä child-teema Hello Biz -teemalle.
Version: 1.0.0
Text Domain: kotoisaarki
*/

/* =========================================================
   KotoisaArki – YHTEINEN UI
   (typografia + kortit + etusivun lohkot + napit + Gutenberg leveys)
   ========================================================= */

/* =========================================================
   TYPOGRAFIA – Otsikot (HTML + Elementor)
   Viimeiset sovitut koot:
   Desktop: 52 / 40 / 32 / 28 / 26 / 24
   Mobile : 32 / 24 / 20 / 17 / 16 / 14
   ========================================================= */

/* Estä Elementorin oma font-size (Kit/Global Styles) */
.elementor-heading-title{
	font-size: inherit;
	line-height: inherit;
}

/* Yhteinen otsikkoperus */
h1, h2, h3, h4, h5, h6,
.elementor-widget-heading h1,
.elementor-widget-heading h2,
.elementor-widget-heading h3,
.elementor-widget-heading h4,
.elementor-widget-heading h5,
.elementor-widget-heading h6{
	font-family: "Poppins", sans-serif;
	font-weight: 600;
	line-height: 1.25;
	margin-top: 0;
}

/* DESKTOP */
h1, .elementor-widget-heading h1{ font-size: 52px; margin-bottom: 16px; }
h2, .elementor-widget-heading h2{ font-size: 40px; margin-bottom: 14px; }
h3, .elementor-widget-heading h3{ font-size: 32px; margin-bottom: 10px; }
h4, .elementor-widget-heading h4{ font-size: 28px; margin-bottom: 8px; }
h5, .elementor-widget-heading h5{ font-size: 26px; }
h6, .elementor-widget-heading h6{ font-size: 24px; letter-spacing: .02em; }

/* MOBIILI */
@media (max-width: 768px){
	h1, .elementor-widget-heading h1{ font-size: 32px; }
	h2, .elementor-widget-heading h2{ font-size: 24px; }
	h3, .elementor-widget-heading h3{ font-size: 20px; }
	h4, .elementor-widget-heading h4{ font-size: 17px; }
	h5, .elementor-widget-heading h5{ font-size: 16px; }
	h6, .elementor-widget-heading h6{ font-size: 14px; }
}

/* =========================================================
   GUTENBERG – estä “kapea tekstipalsta” sivuilla / lohkoissa
   ========================================================= */
.ka-page-content{ max-width: none !important; }
.ka-page-content .is-layout-constrained{ max-width: none !important; }
.ka-page-content .is-layout-constrained > :not(.alignfull):not(.alignwide){
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/* =========================================================
   KA – Korttipohjat (yksi totuus)
   ========================================================= */
.ka-card{
	background: #fff;
	border: 1px solid rgba(0,0,0,0.06);
	border-radius: 22px;
	box-shadow: 0 10px 30px rgba(0,0,0,0.08);
	padding: 26px;
	overflow: hidden;
}
.ka-card--flat{ box-shadow: 0 6px 18px rgba(0,0,0,0.06); }
.ka-card--post{ padding: 18px 18px 20px; }
.ka-sidebar-card{ padding: 20px; }
.ka-muted{ color: rgba(0,0,0,0.62); }

/* Gutenberg group -varmistus */
.entry-content .wp-block-group.ka-card{
	background: #fff;
	border: 1px solid rgba(0,0,0,0.06);
	border-radius: 22px;
	box-shadow: 0 10px 30px rgba(0,0,0,0.08);
	padding: 26px;
}

/* Mobiili kortit */
@media (max-width: 520px){
	.ka-card{ border-radius: 18px; padding: 18px; }
	.ka-sidebar-card{ padding: 18px; }
}

/* =========================================================
   ETUSIVU – tee Elementskit-korteista saman tyyliset
   ========================================================= */

/* Palvelut-kortit */
.home .elementskit-info-image-box.simple-card{
	background: #fff;
	border: 1px solid rgba(0,0,0,0.06);
	border-radius: 22px;
	box-shadow: 0 10px 30px rgba(0,0,0,0.08);
	padding: 26px;
	overflow: hidden;
}
.home .elementskit-info-image-box.simple-card .elementskit-box-style-content{
	color: rgba(0,0,0,0.75);
	line-height: 1.65;
}

/* Ajankohtaista-kortit */
.home .elementskit-post-image-card{
	background: #fff;
	border: 1px solid rgba(0,0,0,0.06);
	border-radius: 22px;
	box-shadow: 0 10px 30px rgba(0,0,0,0.08);
	overflow: hidden;
}
.home .elementskit-post-image-card .elementskit-post-body{
	padding: 18px 18px 20px;
}
.home .elementskit-post-image-card img{
	width: 100%;
	height: auto;
	display: block;
}

/* =========================================================
   Gutenberg – Taulukot
   ========================================================= */
.wp-block-table table{
	width: 100%;
	border-collapse: collapse;
	border: 1px solid #000;
	border-radius: 0 !important;
	background: #fff;
}
.wp-block-table th,
.wp-block-table td{
	border: 1px solid #000;
	padding: 10px 12px;
	vertical-align: top;
	text-align: left;
}
.wp-block-table tr:first-child td{
	background: #f5f5f5;
}

/* =========================================================
   Ajankohtaista – Layout & listat
   ========================================================= */
.ka-layout{
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 22px;
	align-items: start;
}
.ka-posts{
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--ka-gap, 18px);
}
.ka-thumb{
	width: 100%;
	height: auto;
	display: block;
	margin-bottom: 14px;
	border-radius: 12px;
}
.ka-older-list{
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 12px;
}
.ka-older-list li{
	padding-bottom: 12px;
	border-bottom: 1px solid rgba(0,0,0,0.10);
}
.ka-older-list li:last-child{
	border-bottom: 0;
	padding-bottom: 0;
}
.ka-older-list a{ text-decoration: none; }
.ka-older-list a:hover{ text-decoration: underline; }

@media (max-width: 1024px){
	.ka-layout{ grid-template-columns: 1fr; }
	.ka-sidebar{ order: 2; }
}

/* =========================================================
   Mobiili – sivuttaissuunnan esto
   ========================================================= */
@media (max-width: 768px){
	html, body{ overflow-x: hidden; }
}

/* =========================================================
   POISTA Elementskit Image Box -otsikon sininen hover
   ========================================================= */
.home .elementskit-info-image-box.simple-card:hover .elementskit-info-box-title{
	color: inherit !important;
}
.home .elementskit-info-image-box.simple-card .elementskit-info-box-title a,
.home .elementskit-info-image-box.simple-card .elementskit-info-box-title a:hover{
	color: inherit !important;
	text-decoration: none !important;
}
.home .elementskit-info-box-title{ color: #1f1f1f; }

/* =========================================================
   NAPIT – YHTENÄISTÄ KAIKKI (EI HEADER)
   Tavoite: kaikki sivuston napit näyttävät samalta kuin .elementskit-btn
   HUOM: Headerin nappeihin EI kosketa.
   ========================================================= */

/* Rajaa header / navigaatio pois */
:root{
	--ka-btn-bg: #DDC5B9;
	--ka-btn-bg-hover: #cbb1a3;
	--ka-btn-text: #2b2b2b;
	--ka-btn-text-hover: #fff;
	--ka-btn-radius: 14px;
	--ka-btn-pad-y: 12px;
	--ka-btn-pad-x: 22px;
	--ka-btn-border: #DDC5B9;
	--ka-btn-border-hover: #cbb1a3;
}

/* Kaikki "napit" sisällössä (ei headerissa) */
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
button,
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
input[type="submit"],
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
input[type="button"],
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
.wp-block-button__link,
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
.elementor-button,
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
.elementskit-btn,
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
.ka-btn{
	font-family: "Poppins", sans-serif !important;
	font-weight: 600 !important;
	border-radius: var(--ka-btn-radius) !important;
	padding: var(--ka-btn-pad-y) var(--ka-btn-pad-x) !important;
	text-decoration: none !important;
	transition: all 0.25s ease !important;
	box-shadow: none !important;
}

/* Täytetyt napit (Gutenberg + Elementor + Elementskit) */
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
.wp-block-button__link:not(.is-style-outline),
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
.elementor-button:not(.elementor-button-outline),
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
.elementskit-btn,
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
.ka-btn--primary{
	background-color: var(--ka-btn-bg) !important;
	color: var(--ka-btn-text) !important;
	border: 1px solid var(--ka-btn-border) !important;
}

/* Hover: teksti valkoiseksi */
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
.wp-block-button__link:not(.is-style-outline):hover,
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
.elementor-button:not(.elementor-button-outline):hover,
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
.elementskit-btn:hover,
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
.ka-btn--primary:hover{
	background-color: var(--ka-btn-bg-hover) !important;
	border-color: var(--ka-btn-border-hover) !important;
	color: var(--ka-btn-text-hover) !important;
}

/* Varmista myös ikonit/SVG:t valkoiseksi hoverissa */
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
.elementskit-btn:hover svg,
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
.elementskit-btn:hover svg path{
	fill: var(--ka-btn-text-hover) !important;
}

/* Outline-tyyliset (jos käytössä) */
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
.wp-block-button__link.is-style-outline,
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
.elementor-button.elementor-button-outline,
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
.ka-btn--secondary{
	background: transparent !important;
	color: var(--ka-btn-text) !important;
	border: 1px solid rgba(0,0,0,0.25) !important;
}
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
.wp-block-button__link.is-style-outline:hover,
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
.elementor-button.elementor-button-outline:hover,
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
.ka-btn--secondary:hover{
	background-color: rgba(221,197,185,0.25) !important;
	border-color: var(--ka-btn-border) !important;
	color: var(--ka-btn-text-hover) !important;
}

/* Pienempi nappi korteissa */
.ka-card .wp-block-button__link,
.ka-card .elementor-button,
.ka-card .elementskit-btn{
	padding: 10px 18px !important;
	font-size: 15px !important;
}

/* Focus: poista sininen reunus, käytä teeman sävyä */
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
button:focus,
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
button:focus-visible,
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
.wp-block-button__link:focus,
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
.wp-block-button__link:focus-visible,
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
.elementor-button:focus,
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
.elementor-button:focus-visible,
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
.elementskit-btn:focus,
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
.elementskit-btn:focus-visible{
	outline: 3px solid rgba(221,197,185,0.6) !important;
	outline-offset: 2px !important;
	box-shadow: none !important;
}

/* =========================================================
   Gutenberg File -lohkon "Lataa" -nappi yhtenäiseksi (EI headeriin)
   ========================================================= */
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
.wp-block-file__button{
	font-family: "Poppins", sans-serif !important;
	font-weight: 600 !important;
	border-radius: var(--ka-btn-radius) !important;
	padding: var(--ka-btn-pad-y) var(--ka-btn-pad-x) !important;
	text-decoration: none !important;
	transition: all 0.25s ease !important;
	box-shadow: none !important;

	background-color: var(--ka-btn-bg) !important;
	color: var(--ka-btn-text) !important;
	border: 1px solid var(--ka-btn-border) !important;
}

/* Hover */
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
.wp-block-file__button:hover{
	background-color: var(--ka-btn-bg-hover) !important;
	border-color: var(--ka-btn-border-hover) !important;
	color: var(--ka-btn-text-hover) !important;
}

/* Focus (poista sininen, käytä teeman sävyä) */
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
.wp-block-file__button:focus,
body:not(.elementor-editor-active) :not(.ekit-template-content-header):not(header):not(.site-header)
.wp-block-file__button:focus-visible{
	outline: 3px solid rgba(221,197,185,0.6) !important;
	outline-offset: 2px !important;
	box-shadow: none !important;
}
/* =========================================================
   YHTENÄISTÄ ka-btn--secondary Elementskit-napin kanssa
   ========================================================= */

body:not(.elementor-editor-active)
:not(.ekit-template-content-header):not(header):not(.site-header)
.ka-btn--secondary{
	background-color: var(--ka-btn-bg) !important;
	color: var(--ka-btn-text) !important;
	border: 1px solid var(--ka-btn-border) !important;
	border-radius: var(--ka-btn-radius) !important;
	padding: var(--ka-btn-pad-y) var(--ka-btn-pad-x) !important;
	box-shadow: none !important;
}

/* Hover: sama kuin muissa napeissa */
body:not(.elementor-editor-active)
:not(.ekit-template-content-header):not(header):not(.site-header)
.ka-btn--secondary:hover{
	background-color: var(--ka-btn-bg-hover) !important;
	border-color: var(--ka-btn-border-hover) !important;
	color: var(--ka-btn-text-hover) !important;
}

/* =========================================================
   END
   ========================================================= */