/* Auranmaa Makers -lohkojen jaetut tyylit (Iltapaja-design).
   Designtokenit tulevat inline-tyyleinä render.php:stä; tässä hover-tilat,
   responsiivisuus ja asiat joita ei voi tehdä inlinenä. */

/* Napit */
.am-btn { transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.am-btn--primary:hover,
.am-btn--primary:focus-visible { background: #F6B95F !important; color: #1A1C1F !important; }
.am-btn--secondary:hover,
.am-btn--secondary:focus-visible { border-color: #8B939C !important; color: #F4EFE6 !important; }

/* Nuolilinkit ja tekstilinkit */
.am-arrow { transition: color .15s ease; }
.am-arrow:hover, .am-arrow:focus-visible { color: #F6B95F !important; }
.am-block a { text-decoration: none; }

/* Kortit joissa hover-reunaviiva (esim. Muut uutiset) */
.am-card-hover { transition: border-color .15s ease; }
.am-card-hover:hover, .am-card-hover:focus-visible { border-color: #F2A33C !important; }

/* Uutisrivit (etusivun listaus): otsikko aksentille hoverissa */
.am-newsrow span { transition: color .15s ease; }
.am-newsrow:hover span:nth-child(2),
.am-newsrow:focus-visible span:nth-child(2) { color: #F2A33C !important; }

/* Hero: kuvan häivytys vasemmalle työpöydällä, ylös mobiilissa */
@media (max-width: 640px) {
	.am-hero-fade { background: linear-gradient(180deg, #1A1C1F 0%, rgba(26,28,31,0) 30%) !important; }
	.am-hero-img { min-height: 280px !important; }
	.am-hero-text { padding-top: 40px !important; padding-bottom: 40px !important; }
	.am-hero-h1 { font-size: 34px !important; }
	.am-newsrow { grid-template-columns: 78px 1fr !important; row-gap: 2px !important; }
	.am-newsrow .am-newsrow-tag { grid-column: 2; }
	.am-newscard { grid-template-columns: 1fr !important; }
	.am-newscard img, .am-newscard > div[aria-hidden] { height: 190px !important; min-height: 0 !important; }
	.am-btn { flex: 1 1 100%; text-align: center; }
	.am-btnrow { width: 100%; }
	.am-page-h1 { font-size: 34px !important; }
}

/* Tietokorttien tekstin sisäiset linkit (esim. Facebook-linkki leipätekstissä) */
.am-block--info-cards p a { color: #F2A33C; transition: color .15s ease; }
.am-block--info-cards p a:hover,
.am-block--info-cards p a:focus-visible { color: #F6B95F; }

/* Editorin esikatselu: tumma pohja ettei valkoinen kanvas vilku */
.am-ed-preview { background: #1A1C1F; }
.am-ed-preview > div { min-height: 40px; }

/* Editorin kuvakenttä */
.am-ed-image img { border: 1px solid #ddd; }

/* --------------------------------------------------------------
   AM: Yhteydenottolomake (am/form)
   -------------------------------------------------------------- */
.am-block--form .am-form { color: #F4EFE6; }

.am-form .am-input {
	width: 100%;
	box-sizing: border-box;
	background: #1A1C1F;
	color: #F4EFE6;
	border: 1px solid #3A3E44;
	border-radius: 8px;
	padding: 11px 13px;
	font: inherit;
	font-size: 15px;
	line-height: 1.4;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.am-form textarea.am-input { resize: vertical; min-height: 120px; }
.am-form select.am-input { appearance: none; -webkit-appearance: none; cursor: pointer; }

.am-form .am-input::placeholder { color: #8B939C; }

.am-form .am-input:focus {
	outline: none;
	border-color: #F2A33C;
	box-shadow: 0 0 0 3px rgba(242, 163, 60, .18);
}

.am-form .am-input:user-invalid {
	border-color: #C6553C;
}

/* Honeypot: piiloon näkyvistä ja ruudunlukijoilta, mutta lomakkeessa mukana */
.am-form .am-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* GDPR-suostumus */
.am-form .am-consent {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-size: 14px;
	line-height: 1.5;
	color: #A9B0B8;
	margin-top: 4px;
}
.am-form .am-consent input[type="checkbox"] {
	margin-top: 3px;
	width: 17px;
	height: 17px;
	accent-color: #F2A33C;
	flex: none;
}
.am-form .am-consent a { color: #F2A33C; }
.am-form .am-consent a:hover { color: #F6B95F; }

/* Lähetä-nappi: hieman leveämpi kosketusalue */
.am-form .am-form-submit {
	cursor: pointer;
	border: none;
	font: inherit;
	padding: 14px 30px;
}

/* Ilmoitusbannerit */
.am-form .am-form-note {
	border-radius: 8px;
	padding: 14px 16px;
	margin: 0 0 20px;
	font-size: 15px;
	line-height: 1.5;
	border: 1px solid;
}
.am-form .am-form-note--ok {
	background: rgba(242, 163, 60, .10);
	border-color: #F2A33C;
	color: #F4EFE6;
}
.am-form .am-form-note--err {
	background: rgba(198, 85, 60, .12);
	border-color: #C6553C;
	color: #F4EFE6;
}
.am-form .am-form-note a { color: #F2A33C; }

/* --------------------------------------------------------------
   AM: Viikon rytmi (am/week-rhythm)
   -------------------------------------------------------------- */
.am-wr-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
	gap: 14px;
}

.am-wr-card {
	background: #24272B;
	border: 1px solid #2C2F34;
	border-top: 3px solid #F2A33C;
	border-radius: 10px;
	padding: 20px 22px 22px;
}

.am-wr-top {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin-bottom: 10px;
}

.am-wr-day {
	font-family: 'Archivo', sans-serif;
	font-weight: 900;
	font-stretch: 118%;
	font-size: 26px;
	line-height: 1;
}

.am-wr-time {
	font-family: ui-monospace, Menlo, Consolas, monospace;
	font-size: 13px;
	color: #D5D9DE;
}

.am-wr-name {
	font-family: 'Archivo', sans-serif;
	font-weight: 700;
	font-stretch: 112%;
	font-size: 18px;
	color: #F4EFE6;
	margin-bottom: 4px;
}

.am-wr-audience {
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 8px;
}

.am-wr-text {
	font-size: 14px;
	line-height: 1.55;
	color: #A9B0B8;
	margin: 0;
}

/* --------------------------------------------------------------
   AM: Seuraavat vuorot (am/calendar)
   -------------------------------------------------------------- */
.am-cal-box {
	background: #24272B;
	border: 1px solid #2C2F34;
	border-radius: 10px;
	padding: 26px 28px;
}

.am-cal-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px 18px;
	margin-bottom: 4px;
}

.am-cal-range {
	font-family: ui-monospace, Menlo, Consolas, monospace;
	font-size: 12px;
	letter-spacing: .1em;
	color: #8B939C;
}

.am-cal-intro {
	font-size: 14px;
	color: #A9B0B8;
	margin: 0 0 14px;
}

.am-cal-rows {
	display: flex;
	flex-direction: column;
}

.am-cal-row {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 11px 4px;
	border-top: 1px solid #2C2F34;
}

.am-cal-daybox {
	width: 64px;
	flex: none;
	text-align: center;
	line-height: 1.1;
}

.am-cal-wd {
	font-family: ui-monospace, Menlo, Consolas, monospace;
	font-size: 11px;
	letter-spacing: .12em;
	color: #8B939C;
	text-transform: uppercase;
}

.am-cal-dnum {
	font-family: 'Archivo', sans-serif;
	font-weight: 800;
	font-stretch: 112%;
	font-size: 19px;
	color: #F4EFE6;
}

.am-cal-bar {
	width: 4px;
	height: 34px;
	flex: none;
	border-radius: 2px;
}

.am-cal-main {
	flex: 1;
	min-width: 140px;
}

.am-cal-name {
	font-weight: 600;
	font-size: 15px;
	color: #F4EFE6;
}

.am-cal-aud {
	font-size: 13px;
	color: #8B939C;
}

.am-cal-time {
	font-family: ui-monospace, Menlo, Consolas, monospace;
	font-size: 13px;
	color: #D5D9DE;
	flex: none;
}

/* Pillerit */
.am-cal-pill {
	display: inline-block;
	font-family: ui-monospace, Menlo, Consolas, monospace;
	font-size: 10.5px;
	letter-spacing: .1em;
	border-radius: 999px;
	padding: 3px 9px;
	margin-left: 8px;
	vertical-align: 2px;
	color: #1A1C1F;
	white-space: nowrap;
}

.am-cal-pill--next { background: #F2A33C; }
.am-cal-pill--event { background: #8FAEDC; }
.am-cal-pill--moved {
	background: transparent;
	color: #F2A33C;
	border: 1px solid #F2A33C;
}

.am-cal-footer {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 22px;
	align-items: center;
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px solid #2C2F34;
}

.am-cal-note {
	font-size: 13.5px;
	color: #8B939C;
}

.am-cal-empty {
	background: #1A1C1F;
	border: 1px solid #2C2F34;
	border-radius: 8px;
	padding: 16px 18px;
	font-size: 14.5px;
	line-height: 1.6;
	color: #A9B0B8;
}

/* Mobiili: kellonaika omalle riville otsikon alle, alarivi pinoutuu */
@media (max-width: 640px) {
	.am-cal-box { padding: 20px 18px; }
	.am-cal-row {
		flex-wrap: wrap;
		gap: 6px 12px;
	}
	.am-cal-main { min-width: 160px; }
	.am-cal-time {
		flex-basis: 100%;
		margin-left: 92px;
	}
	.am-cal-footer {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* --------------------------------------------------------------
   AM: Osallistujalista (am/participants)
   -------------------------------------------------------------- */
.am-parts-wrap {
	overflow-x: auto;
	background: #24272B;
	border: 1px solid #2C2F34;
	border-radius: 10px;
}

table.am-parts {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

table.am-parts th {
	text-align: left;
	font-family: ui-monospace, Menlo, Consolas, monospace;
	font-size: 11.5px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #8B939C;
	font-weight: 600;
	padding: 14px 18px;
	border-bottom: 1px solid #2C2F34;
	white-space: nowrap;
}

table.am-parts td {
	padding: 13px 18px;
	color: #D5D9DE;
	border-bottom: 1px solid #2C2F34;
	vertical-align: top;
}

table.am-parts tbody tr:last-child td {
	border-bottom: none;
}

table.am-parts tbody tr:hover td {
	background: rgba(242, 163, 60, .05);
}

table.am-parts .am-parts-num {
	width: 52px;
	font-family: ui-monospace, Menlo, Consolas, monospace;
	color: #F2A33C;
	text-align: center;
}

table.am-parts .am-parts-name {
	color: #F4EFE6;
	font-weight: 600;
}

@media (max-width: 640px) {
	table.am-parts th,
	table.am-parts td { padding: 11px 12px; }
	table.am-parts { font-size: 14px; }
}

/* ------------------------------------------------------------------
   King of Epoxy: sarjasivu ja osakilpailusivu (handoff 4)
   ------------------------------------------------------------------ */

/* Jaettu hero */
.am-shero-kuva img { border-radius: 0; }

/* Osakilpailurivit ja linkkikortit: sama hover kuin designissa */
a.am-round:hover,
a.am-linkcard:hover { border-color: #F2A33C !important; }

/* Lomakkeen kaksipalstainen kenttäruudukko */
.am-form-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.am-form--cols .am-consent { margin-top: 16px; }

/* Artikkelin sivupalsta (1fr + 340px) — pysyy kahdessa palstassa 641 px asti */
@media (min-width: 641px) {
	.wp-block-columns.am-art-cols { flex-wrap: nowrap !important; gap: 28px; align-items: flex-start; }
	.wp-block-columns.am-art-cols > .wp-block-column { flex-basis: 0; flex-grow: 1; min-width: 0; }
	.wp-block-columns.am-art-cols > .wp-block-column.am-art-side { flex-basis: 340px !important; flex-grow: 0; flex-shrink: 0; }
}

/* Koko leveyden kortti-parit (sarjasivu) */
.wp-block-columns.am-cols {
	padding-left: clamp(20px, 5vw, 72px);
	padding-right: clamp(20px, 5vw, 72px);
	box-sizing: border-box;
	gap: 14px;
	margin-top: 0;
	margin-bottom: 0;
}

@media (min-width: 641px) {
	.wp-block-columns.am-cols { flex-wrap: nowrap !important; }
	.wp-block-columns.am-cols > .wp-block-column { flex-basis: 0; flex-grow: 1; min-width: 0; }
}

@media (max-width: 640px) {
	.am-shero { grid-template-columns: 1fr !important; }
	.am-shero-h1 { font-size: 38px !important; }
	.am-shero-text { padding-top: 40px !important; padding-bottom: 40px !important; }
	.am-shero-kuva { min-height: 200px !important; }

	.am-round { grid-template-columns: 56px 1fr !important; }
	.am-round-meta { grid-column: 2; }

	.am-tilanne-rivi { grid-template-columns: 32px 1fr 64px !important; gap: 8px !important; }
	.am-r-col { display: none; }

	.am-dcard-rows { grid-template-columns: 1fr !important; }
	.am-linkcards { grid-template-columns: 1fr !important; }
	.am-form-fields { grid-template-columns: 1fr; }

	.am-osall-rivi { grid-template-columns: 28px 1fr !important; }
	.am-osall-kalusto { grid-column: 2; }

	.wp-block-columns.am-art-cols > .wp-block-column,
	.wp-block-columns.am-cols > .wp-block-column { flex-basis: 100% !important; }
}

/* Artikkelikuva korttityylillä (am-photo) */
.wp-block-image.am-photo { margin-top: 0; }
.wp-block-image.am-photo img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 10px;
	border: 1px solid #2C2F34;
}

/* ------------------------------------------------------------------
   Vapaamuotoinen tekstilohko (am_rich): esim. Heron esittelyteksti.
   Typografia periytyy kääreestä, jotta lohkon oma koko/väri säilyy.
   ------------------------------------------------------------------ */

.am-rich > :first-child { margin-top: 0; }
.am-rich > :last-child { margin-bottom: 0; }

.am-rich p {
	font-size: inherit;
	line-height: inherit;
	color: inherit;
	margin: 0 0 14px;
}

.am-rich h2,
.am-rich h3,
.am-rich h4 {
	font-family: 'Archivo', sans-serif;
	font-weight: 800;
	font-stretch: 115%;
	color: #F4EFE6;
	line-height: 1.2;
	margin: 20px 0 8px;
}

.am-rich h2 { font-size: 1.4em; }
.am-rich h3 { font-size: 1.18em; }
.am-rich h4 { font-size: 1em; letter-spacing: .02em; }

.am-rich ul,
.am-rich ol {
	margin: 0 0 14px;
	padding-left: 20px;
}

.am-rich li { margin-bottom: 5px; }
.am-rich li::marker { color: #F2A33C; }

.am-rich a { color: #F2A33C; }
.am-rich a:hover { color: #F6B95F; }

.am-rich small { font-size: .85em; color: #8B939C; }
