/* Phones and small tablets. The theme is a fixed 990px grid plus 20px of padding (960.css); from 1010px up this file does nothing.
   The menu's drop-down needs a mouse, so here "Ejes de Trabajo" just opens its own page, which lists them all. */
@media (max-width: 1009px) {
	body { min-width: 0; }
	.container_12 { width: auto; padding-left: 0; }
	.container_12 [class*="grid_"] {
		display: block;
		float: none;
		width: auto;
		margin-left: 16px;
		margin-right: 16px;
	}

	#languages_menu_container { height: auto; padding: 3px 0; }
	#languages_menu { display: none; }
	#mail_link_menu { text-align: right; }

	#header_container {
		height: auto;
		padding: 12px 0;
		overflow: hidden;
		background-image: none;
	}
	.container_12 #logo {
		float: left;
		width: 72px;
		margin: 0 12px 0 16px;
	}
	/* aspect-ratio keeps the space while images load (they have no size in the HTML), so the page doesn't jump */
	#logo img { display: block; width: 100%; height: auto; aspect-ratio: 146 / 140; }
	.container_12 #logo_text { margin-left: 100px; margin-right: 48px; }
	#title { margin-top: 0; }
	#title p { font-size: 32px; line-height: 1.1; margin: 0; }
	#subtitle { margin-top: 2px; }
	#subtitle p { font-size: 13px; line-height: 1.3; margin: 0; }
	#header_container a#fb_page { top: 12px; right: 12px; bottom: auto; }

	#menu_container { height: auto; }
	.container_12 #menu { margin: 0; }
	ul.topnav {
		float: none;
		width: auto;
		height: auto;
		padding: 4px 8px;
		overflow: hidden;
	}
	ul.topnav li { padding: 0; }
	ul.topnav li a { padding: 12px 8px; font-size: 13px; }
	ul.topnav li span { display: none; }
	ul.topnav li ul.sub-menu { display: none !important; }

	#axis_container {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		height: auto;
		padding-bottom: 12px;
		background: #174a96 linear-gradient(#3b7fd0, #0e3a80);
	}
	#axis_container .grid_2 {
		box-sizing: border-box;
		width: 50%;
		margin: 0;
		padding: 0 8px;
	}
	.axis_img { text-align: center; }
	.axis_img img { width: 100%; max-width: 140px; height: auto; aspect-ratio: 140 / 153; }
	.axis_description { margin-top: 6px; }
	.axis_description p { font-size: 13px; line-height: 1.3; }

	#content_container { min-height: 0; overflow: hidden; }
	#content { margin-top: 20px; }
	#content p { font-size: 16px; line-height: 1.5; }
	#content img { max-width: 100%; height: auto; }
	.side_image { float: none; margin: 0 0 16px; }
	.news_title, .news_content { padding-left: 0; }
	#content .news .news_title h1 { font-size: 20px; }

	#mini_boxes { overflow: hidden; }
	#mini { min-height: 0; margin-bottom: 24px; }

	ul.gallery_thumbs li { margin: 0 8px 8px 0; }
	ul.gallery_thumbs li img { display: block; }

	.wpcf7-form input[type="text"],
	.wpcf7-form input[type="email"],
	.wpcf7-form textarea {
		box-sizing: border-box;
		width: 100%;
		padding: 8px;
		font-size: 16px;
	}
	.wpcf7-form input[type="submit"] { padding: 10px 24px; font-size: 16px; }

	#footer { padding: 16px 16px; }
}

/* Three eje images per row once there's room */
@media (min-width: 600px) and (max-width: 1009px) {
	#axis_container .grid_2 { width: 33.33%; }
}
