/*
Theme Name: DAGIT Slavonski Brod
Description: Tema za stranicu Društva arhitektonskih i građevinskih inženjera i tehničara Slavonski Brod. Na računalu izgleda isto kao dosadašnja stranica, a na mobitelu i tabletu se prilagođava zaslonu.
Version: 1.1.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: dagit
License: GNU General Public License v2 or later
*/

/* ==========================================================================
   Izgled preuzet 1:1 s dosadašnje stranice (screen.css + Drupal system.css)
   ========================================================================== */

* {
	margin: 0;
	padding: 0;
}

header, footer, article, nav, main {
	display: block;
}

html {
	background: white;
	font-size: small;
}

body {
	width: 940px;
	margin: 0 auto;
	background: url(images/faux.gif) repeat-y;
	border: #CCC 1px solid;
	border-top: 0;
	padding-top: 150px;
	line-height: 1.4em;
	font-family: 'Open Sans', Tahoma, "Trebuchet MS", Arial, sans-serif;
	font-size: 102%;
}

.clearfix::after {
	content: "";
	display: table;
	clear: both;
}

.element-invisible,
.screen-reader-text {
	position: absolute !important;
	clip: rect(1px, 1px, 1px, 1px);
	overflow: hidden;
	height: 1px;
	width: 1px;
}

.skip-link:focus {
	clip: auto;
	height: auto;
	width: auto;
	z-index: 1000;
	top: 5px;
	left: 5px;
	background: #fff;
	padding: 0.5em 1em;
	border: 1px solid #FFB611;
}

#site-header {
	background: #FFB611 url(images/nav.gif) repeat-y;
}

nav#main_menu {
	float: left;
	width: 336px;
	background: url(images/nav2.gif) no-repeat;
}

nav#main_menu ul {
	background: url(images/faux.gif) repeat-y;
	background-position: -52px top;
	margin: 0 26px 0 52px;
	padding: 10px 15px 0 15px;
	font-size: small;
	border: none;
	list-style: none;
	text-align: left;
}

nav#main_menu li {
	list-style: none;
	font-size: 1.1em;
	line-height: 1.8em;
	text-align: right;
	padding: 0.2em 0.5em 0 0;
	margin: 0 0 0 0.5em;
}

nav#main_menu a {
	color: black;
}

nav#main_menu a:hover,
nav#main_menu a:focus {
	font-weight: bold;
	text-decoration: none;
}

nav#main_menu li ul {
	display: none;
}

#title {
	float: left;
	height: 87px;
	width: 600px;
	padding: 8em 0 0;
	background: url(images/header.gif) no-repeat;
	background-position: right center;
	line-height: 0;
	font-weight: bold;
	color: #231F20;
	margin: 0;
	font-size: 1em;
}

#title a {
	display: block;
	height: 100%;
	margin-top: -8em;
	padding-top: 8em;
	color: transparent;
	font-size: 0;
}

div#main {
	padding-bottom: 3em;
}

div#left {
	float: left;
	width: 336px;
	padding: 2em 0 0;
	background: url(images/nav2.gif) no-repeat;
	background-position: -336px top;
}

#center {
	float: right;
	width: 544px;
	padding: 3em 30px 2em;
	background: url(images/logo.gif) repeat-x;
	background-position: left -113px;
}

footer#site-footer {
	text-align: right;
	font-family: Verdana, sans-serif;
	font-size: x-small;
	color: #999;
}

footer#site-footer p {
	margin: 0 20px 0 360px;
	padding: 0.7em 10px 0.5em;
	line-height: 1.5em;
	border-top: 1px dashed #DDD;
}

footer#site-footer a {
	color: #CCC;
}

footer#site-footer a:hover {
	text-decoration: none;
	color: #888;
}

/* Elementi */

a {
	text-decoration: none;
	color: #072a6f;
}

a:hover {
	text-decoration: underline;
}

p {
	margin: 1em 0;
}

h1, h2, h3, h4, h5, h6 {
	margin: 2.5em 0 1em;
}

h1 {
	font-size: 1.3em;
	text-transform: uppercase;
}

h2 {
	font-size: 1.2em;
}

h3, h4, h5, h6 {
	font-size: 1em;
}

div#main ul {
	margin: 1em 0 1em 2em;
}

ol {
	margin: 1em 0 1em 3em;
}

img {
	border: 0;
}

table {
	border-collapse: collapse;
}

th {
	border-bottom: 3px solid #ccc;
	padding-right: 1em;
	text-align: left;
}

hr {
	border: 1px solid gray;
	height: 1px;
}

/* Lijevi stupac: preuzimanja */

div#preuzimanja {
	padding: 20px 55px 0 80px;
}

div#main div#preuzimanja ul {
	list-style: none;
	margin: 1em 0 1em 2em;
}

div#preuzimanja li {
	list-style: none;
	line-height: 1.1em;
}

div#preuzimanja a {
	color: #777;
	line-height: 1.1em;
	font-size: 0.9em;
	text-align: right;
	padding-right: 55px;
	display: block;
	background: url(images/pdf.gif) no-repeat;
	background-position: right center;
}

div#preuzimanja a:hover {
	font-weight: bold;
	text-decoration: none;
}

/* Novosti */

.datum {
	float: right;
	font-size: 85%;
	display: block;
}

.intro {
	padding-bottom: 10px;
	margin-bottom: 10px;
	background: url(images/intro.png) no-repeat;
	background-position: bottom left;
}

#center img {
	background: #FFF;
	margin: 0 5px 0.2em;
	padding: 2px;
	border: 1px solid #FFB611;
}

.content img {
	width: 100%;
}

/* Kontakt: karta */

iframe.gmap {
	border: 2px solid #888;
	margin-bottom: 2em;
}

/* Straničenje (kao Drupal pager) */

.item-list .pager {
	clear: both;
	text-align: center;
}

div#main .item-list ul.pager {
	margin: 0 0 0.75em 0;
	padding: 0;
}

.item-list .pager li {
	background-image: none;
	display: inline;
	list-style-type: none;
	padding: 0.5em;
	margin: 0 0 0.25em 1.5em;
}

.pager-current {
	font-weight: bold;
}

/* Obrasci */

.form-item,
.form-actions {
	margin-top: 1em;
	margin-bottom: 1em;
}

label {
	display: block;
	font-weight: bold;
}

label.option {
	display: inline;
	font-weight: normal;
}

.form-radios .form-item {
	margin-top: 0.4em;
	margin-bottom: 0.4em;
}

input.form-radio {
	vertical-align: middle;
}

.form-required {
	color: #f00;
}

.form-item input.error,
.form-item select.error {
	border: 2px solid red;
}

input.form-text {
	border: 1px solid #FFB611;
	border-radius: 3px;
	padding: 0.3em 5px;
	max-width: 100%;
}

input.form-submit {
	background: #EEE;
	padding: 0.3em 10px;
	border-radius: 3px;
	border: 0px;
	font-weight: bold;
	cursor: pointer;
	margin-right: 10px;
}

input.form-submit:hover {
	background: #DDD;
}

textarea {
	border: 1px solid #FFB611;
	border-radius: 3px;
	padding: 0.3em 5px;
}

.webform-container-inline div,
.webform-container-inline div.form-item {
	display: inline;
	margin: 0;
}

.dagit-hp {
	position: absolute !important;
	left: -9999px;
}

.messages {
	margin: 1em 0;
	padding: 10px 10px 10px 15px;
	border: 1px solid;
}

.messages.status {
	background: #f8fff0;
	border-color: #be7;
	color: #234600;
}

.messages.error {
	background: #fef5f1;
	border-color: #ed541d;
	color: #8c2e0b;
}

.messages ul {
	margin: 0.5em 0 0 1.5em !important;
}

/* Fotogalerije koje WordPress dodaje u nove objave */

#center .gallery img,
#center .wp-block-gallery img {
	width: 100%;
	height: auto;
	margin: 0;
	box-sizing: border-box;
}

.gallery {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	margin: 1em 0;
}

.gallery-item {
	margin: 0;
}

.wp-caption,
figure {
	max-width: 100%;
}

.wp-caption-text,
figcaption {
	font-size: 85%;
	color: #777;
	text-align: center;
}

.alignleft {
	float: left;
	margin-right: 1em;
}

.alignright {
	float: right;
	margin-left: 1em;
}

.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.nema-galerije {
	padding: 1em;
	background: #f6f6f6;
	border: 1px dashed #ccc;
	color: #777;
}

/* ==========================================================================
   Prilagodba za tablet i mobitel (ispod 960 px)
   Na računalu se ništa od ovoga ne primjenjuje.
   ========================================================================== */

/* --- Zajedničko za tablet i mobitel --- */
@media (max-width: 959px) {
	body {
		width: auto;
		border: 0;
	}

	#site-header {
		display: flex;
	}

	nav#main_menu,
	#title,
	div#left,
	#center {
		float: none;
	}

	div#main {
		display: flex;
	}

	#center {
		width: auto;
		min-width: 0;
		overflow-wrap: anywhere;
	}

	#center img {
		box-sizing: border-box;
		max-width: 100%;
		height: auto;
	}

	.content img {
		width: 100%;
	}

	iframe,
	embed,
	video {
		max-width: 100%;
	}

	iframe.gmap {
		width: 100%;
		box-sizing: border-box;
	}

	#center table {
		display: block;
		overflow-x: auto;
	}

	input.form-text,
	select.form-select {
		box-sizing: border-box;
		max-width: 100%;
	}
}

/* --- Tablet (600-959 px): izbornik lijevo, kao na računalu --- */
@media (min-width: 600px) and (max-width: 959px) {
	body {
		padding-top: 40px;
		background: linear-gradient(to right, #ECECEC 0, #ECECEC 205px, #C9C9C9 240px, #fff 240px) repeat-y;
	}

	#site-header {
		background: linear-gradient(to right, #FFB611 0, #FFB611 215px, #D79A10 240px, #FFB611 240px);
		align-items: stretch;
	}

	nav#main_menu {
		flex: 0 0 240px;
		width: 240px;
		background: none;
	}

	nav#main_menu ul {
		background: #ECECEC;
		margin: 0 15px 0 25px;
		padding: 10px 10px 8px;
	}

	#title {
		flex: 1 1 auto;
		width: auto;
		height: auto;
		min-height: 87px;
		margin: 0 20px;
		padding: 0;
		background: url(images/header.gif) no-repeat right center;
		background-size: contain;
	}

	#title a {
		height: 100%;
		margin: 0;
		padding: 0;
	}

	div#left {
		flex: 0 0 240px;
		width: 240px;
		background: none;
	}

	div#preuzimanja {
		padding: 20px 15px 0 30px;
	}

	#center {
		flex: 1 1 auto;
		padding: 3em 25px 2em;
	}

	#center img {
		margin: 0 0 0.2em;
	}

	footer#site-footer p {
		margin: 0 20px 0 260px;
	}
}

/* --- Mobitel (ispod 600 px): izbornik uvijek otvoren iznad teksta --- */
@media (max-width: 599px) {
	html {
		font-size: 15px;
	}

	body {
		padding-top: 0;
		background: #fff;
		font-size: 100%;
		line-height: 1.5;
	}

	#site-header {
		flex-direction: column;
		background: #FFB611;
	}

	#title {
		order: 1;
		width: auto;
		height: auto;
		padding: 0;
		background: none;
		line-height: 1;
	}

	#title a {
		display: block;
		height: 0;
		padding: 0 0 14.7%;
		margin: 12px 15px;
		background: url(images/header.gif) no-repeat left center;
		background-size: contain;
	}

	nav#main_menu {
		order: 2;
		width: 100%;
		background: #ECECEC;
	}

	nav#main_menu ul {
		display: grid;
		grid-template-columns: 1fr 1fr;
		background: none;
		margin: 0;
		padding: 0.3em 0;
		font-size: 0.95rem;
	}

	nav#main_menu li {
		text-align: left;
		padding: 0;
		margin: 0;
		font-size: 1em;
		line-height: 1.3;
	}

	nav#main_menu a {
		display: block;
		padding: 0.5em 15px;
		border-bottom: 1px solid #ddd;
	}

	div#main {
		flex-direction: column;
		padding-bottom: 1em;
	}

	#center {
		order: 1;
		padding: 1.5em 15px 1em;
		background-position: left -113px;
	}

	div#left {
		order: 2;
		width: auto;
		padding: 0 15px;
		background: none;
	}

	div#preuzimanja {
		padding: 0;
	}

	div#main div#preuzimanja ul {
		margin: 0;
	}

	div#preuzimanja a {
		text-align: left;
		padding: 0.5em 0 0.5em 60px;
		background-position: left center;
		font-size: 1em;
	}

	div#preuzimanja a br {
		display: none;
	}

	footer#site-footer p {
		margin: 0 15px;
		padding: 0.7em 0;
	}

	h1, h2, h3, h4, h5, h6 {
		margin: 1.5em 0 0.8em;
	}

	#center h1:first-child,
	#center .intro:first-child h1 {
		margin-top: 0.5em;
	}

	#center img {
		margin: 0 0 0.2em;
	}

	input.form-text,
	select.form-select {
		width: 100%;
		font-size: 1rem;
	}

	.webform-container-inline select.form-select {
		width: auto;
	}

	.item-list .pager li {
		margin: 0;
		padding: 0.4em;
		display: inline-block;
	}

	.gallery {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media print {
	body {
		width: auto;
		border: 0;
		padding: 0;
		background: none;
	}

	nav#main_menu,
	div#left,
	.pager {
		display: none;
	}

	#center {
		float: none;
		width: auto;
		background: none;
	}
}