/* =========================================================
   mobiel.css - Swift Cross
   Aanvulling op style.css voor tablet en telefoon.
   Wordt NA style.css geladen; boven 906px verandert er niets.
   ========================================================= */

/* ---------- Tablet (796 - 906px): menu nog links, poster 600px ---------- */
@media screen and (max-width: 906px) {
	/* De posteronderdelen staan absoluut gepositioneerd, waardoor #poster
	   zelf geen hoogte had en de sponsors er (met margin-left:650px)
	   naast moesten staan - dat past hier niet meer. Nu komen de
	   sponsors onder de poster. */
	div#poster {
		height: 690px;
	}
	.sponsor_begin {
		width: auto;
		max-width: 600px;
		margin-left: 0;
		margin-top: 15px;
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		align-items: center;
		gap: 10px 25px;
	}
	.sponsor_begin img {
		width: 120px;
		margin-bottom: 0;
	}
}

/* ---------- Telefoon (t/m 795px) ---------- */
@media screen and (max-width: 795px) {

	img { max-width: 100%; height: auto; }

	/* Menuknop: wit zodat hij zichtbaar is op de donkere kopbalk */
	#menu_button {
		color: #FFF;
		text-shadow: 1px 1px 4px #000;
		padding: 0 5px;
	}

	/* Menu: verborgen (style.css), zichtbaar na tik op de menuknop */
	nav.open {
		display: block;
		width: auto;
		margin: 10px 5px 15px 5px;
	}
	div.menu {
		width: auto;
	}
	div.menu h2 {
		width: auto;
	}
	div.menu ul li a {
		padding: 10px 8px;          /* groter raakvlak voor de vinger */
		font-size: 1.1em;
	}
	div.menu ul li a:hover {
		transform: none;            /* geen vergroot effect op touchscreens */
	}

	/* Beginpagina: onderdelen onder elkaar in plaats van over elkaar */
	div#poster {
		height: auto;
		position: static;
	}
	div#kopDiv,
	img#fotoImg,
	div#informatieDiv {
		position: static;
		top: auto;
		height: auto;
	}
	div#kopDiv {
		padding: 10px 0;
	}
	div#kopDiv h2 {
		margin-top: 0;
	}
	img#fotoImg {
		display: block;
	}
	div#informatieDiv {
		line-height: 1.4 !important;   /* overschrijft de inline stijl uit begin.php */
		background-color: #EEE;
		padding: 8px 5px;
		font-size: 0.75em;
	}
	div#informatieDiv p {
		margin: 6px 0;
	}
	.sponsor_begin {
		max-width: none;
		margin-top: 20px;
		gap: 10px 15px;
	}
	.sponsor_begin img {
		width: 100px;
	}

	/* Tabellen: volle breedte, tekst mag afbreken */
	table.uitslag,
	table.uitslag.deelnemer,
	table.infoTabel,
	table.prijsTabel {
		width: 100%;
	}
	table.infoTabel th,
	table.prijsTabel th {
		width: auto !important;     /* vaste kolombreedtes uit style.css loslaten */
	}
	/* Uitslagen/deelnemers: vaste verhouding, zodat alle tabellen gelijk lopen */
	table.uitslag th:nth-child(1) { width: 9%; }
	table.uitslag th:nth-child(2) { width: 30%; }
	table.uitslag th:nth-child(3) { width: 10%; }
	table.uitslag th:nth-child(4) { width: 38%; }
	table.uitslag th:nth-child(5) { width: 13%; }
	table.uitslag th { overflow-wrap: anywhere; }
	table.uitslag.deelnemer th:nth-child(1) { width: 11%; }
	table.uitslag.deelnemer th:nth-child(2) { width: 38%; }
	table.uitslag.deelnemer th:nth-child(3) { width: 12%; }
	table.uitslag.deelnemer th:nth-child(4) { width: 39%; }
	table.uitslag td,
	table.infoTabel td,
	table.prijsTabel td {
		padding-right: 4px;
		vertical-align: top;
	}
	table.infoTabel,
	table.prijsTabel {
		font-size: 0.85em;
	}
	table.infoTabel th[style] {
		width: auto !important;     /* overschrijft style="width:200px/500px" */
	}
}

/* ---------- Programma (telefoon) ---------- */
@media screen and (max-width: 795px) {
	/* Tijdschema en prijsuitreikingen (tabellen zonder klasse op de programmapagina) */
	#content > table:not([class]) {
		font-size: 0.9em;
		border-collapse: collapse;
	}
	#content > table:not([class]) td {
		vertical-align: top;
		padding: 2px 6px 2px 0;
	}
	#content > table:not([class]) td p {
		margin: 0;
	}
	/* tijd, afstand en aantal rondes niet afbreken */
	#content > table:not([class]) td:first-child,
	#content > table:not([class]) tr > td:nth-last-child(2):not(:first-child),
	#content > table:not([class]) tr > td:last-child:not(:first-child) {
		white-space: nowrap;
	}
	#content > table:not([class]) tr > td:last-child:not(:first-child) {
		padding-right: 0;
	}

	/* Parcourskaartjes: twee naast elkaar */
	#content figure {
		display: inline-block;
		width: 48%;
		vertical-align: top;
		margin: 0 1% 12px 0;
	}
	#content figure img.klein {
		width: 100%;
	}
	#content figure br {
		display: none;
	}
	/* Vergroot kaartje: altijd vanaf de linkerrand van het scherm.
	   Zonder 'left' bleef het op de plek van het kleine kaartje staan
	   en viel het deels buiten beeld. */
	#content figure img.groot {
		left: 0;
		top: 0;
		width: 100%;
		max-width: 100%;
		margin: 0;
	}
	figcaption {
		font-size: 0.85em;
	}
}

/* ---------- Informatiepagina (telefoon) ---------- */
@media screen and (max-width: 795px) {
	div.informatie h3 {
		margin-top: 14px;
	}
	table.infoTabel th,
	table.prijsTabel th {
		line-height: 1.3;
		padding: 3px;
		vertical-align: top;         /* kopteksten bovenaan uitlijnen */
	}

	/* Tabel "Categorieën" (4 kolommen): kleiner lettertype; past hij
	   bij grote tekstinstelling nog niet, dan kun je zijwaarts vegen */
	div.informatie > table.infoTabel:first-of-type {
		font-size: 0.8em;
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	/* Tabel "Categorie Indeling": eerste kolom op één regel,
	   de tweede kolom krijgt de rest van de breedte */
	div.informatie > table.infoTabel:nth-of-type(2) th:first-child,
	div.informatie > table.infoTabel:nth-of-type(2) td:first-child {
		white-space: nowrap;
		width: 1% !important;
		padding-right: 12px;
	}
	table.infoTabel td,
	table.prijsTabel td {
		padding: 3px 6px 3px 3px;
		vertical-align: top;
	}
	table.infoTabel tbody tr:nth-child(even),
	table.prijsTabel tbody tr:nth-child(even) {
		background-color: #F0F0F5;   /* zebrastrepen voor leesbaarheid */
	}
}

/* ---------- Kleine telefoon (t/m 570px) ---------- */
@media screen and (max-width: 570px) {

	/* Contactformulier: label boven het invoerveld */
	#contact label {
		float: none;
		width: auto;
		text-align: left;
		margin: 0 0 0 10px;
		line-height: 1.6em;
	}
	#contact .regel {
		line-height: normal;
	}
	#formulier input[type="email"],
	#formulier input[type="text"],
	#formulier select,
	#formulier textarea {
		font-size: 16px;            /* voorkomt automatisch inzoomen op iPhone */
		box-sizing: border-box;
		width: calc(100% - 20px);
		max-width: none;
		margin-left: 10px;
		margin-right: 10px;
	}
	#formulier input[type="submit"] {
		width: calc(100% - 20px);
		margin-left: 10px;
	}

	/* Contactgegevens onderaan de informatiepagina */
	div.informatie div[style*="margin-left"] {
		margin-left: 10px !important;
	}
}

/* ---------- Zeer smalle telefoon (t/m 450px) ---------- */
@media screen and (max-width: 450px) {
	/* style.css zet de uitslagen hier op 0.63em; dat is te klein om te lezen */
	table.uitslag {
		font-size: 0.75em;
	}
}
