/*
Theme Name: Arhiva Knjiznica VT
Version: 1.0
*/

:root {
	--bg: #f6f8fb;
	--muted: #7a8593;
	--accent: #0f7cff;
	--accent-dark: #0a62cc;
	--card: #ffffff;
	--radius: 12px;
	--max-width: 1200px;
}

* {
	box-sizing: border-box
}

html,
body {
	height: 100%
}
a {
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}
button:hover {
    background: #0029ff !important
}

body {
	margin: 0;
	font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
	background: var(--bg);
	color: #0b1a2b;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	line-height: 1.45;
}

/* page container */
.site {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 28px;
}

/* header */
header.site-header {
	gap: 20px;
	padding: 12px 20px;
    border-bottom: 1px solid rgba(11, 26, 43, 0.04);
    background-color: #fff;
    box-shadow: 0 6px 18px rgba(15, 124, 255, 0.12);
}
.navbar-nav {
    margin-left: calc(50% - 300px);
}
.navbar-nav li {
    padding: 10px;
}
.navbar-nav li a {
    color: #000;
    font-weight: 500;
}

.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: inherit;
}

.brand .logo {
	width: 250px;
    padding: 10px;
	height: auto;
	box-shadow: 0 6px 18px rgba(15, 124, 255, 0.12);
    border-radius: 10px;
}

.brand .title {
	font-weight: 700;
	font-size: 18px;
	letter-spacing: 0.2px;
}

nav.primary {
	display: flex;
	gap: 16px;
	align-items: center;
}

nav.primary a {
	color: #000;
	text-decoration: none;
	font-weight: 600;
	font-size: 16px;
}

.header-actions {
	display: flex;
	gap: 12px;
	align-items: center;
}

.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	border-radius: 10px;
	text-decoration: none;
	font-weight: 600;
	cursor: pointer;
}

.btn--primary {
	background: linear-gradient(180deg, var(--accent), var(--accent-dark));
	color: #fff;
	border: 0;
}

.btn--ghost {
	background: transparent;
	color: var(--muted);
	border: 1px solid rgba(11, 26, 43, 0.06);
}

/* hero */
.hero {
	margin: 0 0 36px;
	background-image: url('assets/images/footer-background.webp');
    background-position: center;
	padding: 100px 36px;
	gap: 28px;
	align-items: center;
    text-align: center;
    color: #fff;
    position: relative;
}

.hero .left {
	flex: 1 1 560px;
}

.hero h1 {
	margin: 0 0 8px;
	font-size: 34px;
	line-height: 1.05;
}

.hero p.lead {
	margin: 0 0 18px;
	color: var(--muted);
	font-size: 16px;
}
.hero a {
    color: #fff;
    margin-top: 10px;
    display: block;
}
#hero-heading {
    margin-bottom: 20px;
}
.hero-intro {
    position: absolute;
    top: 30px;
    font-size: 3rem;
    font-weight: 700;
}

/* search */
.search {
	display: flex;
	gap: 8px;
    max-width: 600px;
    margin: 0 auto;
}

.search input[type="search"] {
	flex: 1;
	padding: 14px 16px;
	border-radius: 12px;
	border: 1px solid rgba(11, 26, 43, 0.08);
	font-size: 16px;
	outline: none;
}

.search button, .single-grade .df-popup-button {
	padding: 12px 18px;
	border-radius: 12px;
	border: 0;
	background: var(--accent);
	color: #fff;
	font-weight: 700;
	cursor: pointer;
}

.hero .meta {
	margin-top: 12px;
	color: var(--muted);
	font-size: 13px;
}

.hero .right {
	width: 420px;
	min-width: 240px;
}

.hero-card {
	background: var(--card);
	border-radius: 12px;
	padding: 16px;
	box-shadow: 0 6px 30px rgba(11, 26, 43, 0.04);
}

.hero-card img {
	width: 100%;
	border-radius: 8px;
	display: block;
	margin-bottom: 12px;
}

.hero-card h4 {
	margin: 0 0 6px;
	font-size: 16px
}

.hero-card p {
	margin: 0;
	color: var(--muted);
	font-size: 14px
}

/* collections grid */
.collections {
	margin-bottom: 32px;
}

.section-title {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 14px;
}

.section-title h2 {
	margin: 0;
	font-size: 26px
}

.collections-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 18px;
}

.card {
	background: var(--card);
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform .18s ease, box-shadow .18s ease;
	box-shadow: 0 6px 18px rgba(11, 26, 43, 0.04);
    transition: all 0.5s;
}

.books-slider .card:hover {
	transform: scale(0.98);
	box-shadow: 0 14px 30px rgba(11, 26, 43, 0.08);
    background-color: var(--accent-dark);
    color: #fff;
}
.books-slider .card:hover .kicker {
    color: #fff;
}

.card img {
	width: 100%;
	height: 180px;
	object-fit: cover;
	display: block
}

.card .card-body {
	padding: 14px
}

.card .kicker {
	font-size: 12px;
	color: var(--muted);
	margin-bottom: 6px
}

.card h3 {
	margin: 0 0 10px;
	font-size: 16px
}

.card p {
	margin: 0;
	color: var(--muted);
	font-size: 14px
}

.card .card-footer {
	margin-top: auto;
	padding: 12px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-top: 1px solid rgba(11, 26, 43, 0.04)
}

/* featured items */
.featured {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
	margin-bottom: 36px;
}

.item {
	background: var(--card);
	border-radius: 10px;
	padding: 12px;
	display: flex;
	gap: 12px;
	align-items: center;
	box-shadow: 0 6px 14px rgba(11, 26, 43, 0.03);
}

.item img {
	width: 76px;
	height: 76px;
	object-fit: cover;
	border-radius: 6px
}

.item h4 {
	margin: 0 0 6px;
	font-size: 14px
}

.item p {
	margin: 0;
	color: var(--muted);
	font-size: 13px
}
.page-template-tpl-grade .card {
    padding: 20px;
}
.page-template-tpl-grade .card img {
    border-radius: 10px;
}
.page-template-tpl-grade .facetwp-facet {
    margin-bottom: 20px;
}
.page-template-tpl-grade .book-desc {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5; /* number of lines to show */
    line-clamp: 5; 
    -webkit-box-orient: vertical;
}
.facetwp-type-number_range input {
    width: calc(40% - 10px);
    margin-right: 5px;
}
.facetwp-type-number_range input.facetwp-submit {
    width: 20%;
    background: #000;
    color: #fff;
    border: 2px solid #000;
}
input.facetwp-search, .facetwp-input-wrap {
    width: 100%;
}
input.facetwp-search, .facetwp-type-number_range input {
    height: 40px;
    border-radius: 10px;
    border: 1px solid #d2d2d2;
    padding: 0 10px;
}

.single-grade .item {
    border-bottom: 1px solid #efefef;
    box-shadow: none;
}
.single-grade .item h3 {
    margin-bottom: 0;
    width: 20%;
}
.single-grade .item p {
    font-size: 16px;
    width: 80%;
}
.single-grade .wp-post-image {
    border-radius: 10px;
}
.single-grade .df-popup-thumb {
    width: 200px;
}
.single-grade .df-popup-button {
    width: 70%;
}
.owl-prev, .owl-next {
    position: absolute;
    top: calc(50% - 20px);
    left: -40px;
}
.owl-next {
    right: -40px;
    left: auto;
}
.owl-prev i, .owl-next i {
    font-size: 52px;
    -webkit-text-stroke: 8px #f6f8fb;
    color: #939599;
}

.page-template-tpl-novine .wp-block-table td {
    border: none;
}
.page-template-tpl-novine .wp-block-table tr {
    border-bottom: 1px solid #efefef;
}
.page-template-tpl-novine .wp-post-image {
    border-radius: 10px;
    width: 100%;
}
.page-template-tpl-novine .btn {
    border: 1px solid #666;
}
.page-template-tpl-novine .btn.active {
    background-color: #0f7cff;
    border: 1px solid #0f7cff;
    color: #fff;
}
.white-block {
    background-color: #fff;
    padding: 20px;
    margin-top: 25px;
    border-radius: 20px;
    box-shadow: 0 6px 18px rgba(11, 26, 43, 0.04);
}
.page-template-tpl-novine .wp-block-table {
    padding: 10px;
}
.page-template-tpl-novine .searchwp-form .swp-input--search {
    height: 45px;
    border: 1px solid #d6d6d7;
    border-radius: 10px;
}
.page-template-tpl-novine .searchwp-form .search-submit {
    background-color: #0f7cff;
    border: 1px solid #0f7cff;
    color: #fff;
    font-weight: bold;
    border-radius: 10px;
    padding: 0 20px;
}
.books-slider .card .img-box {
    height: 300px;
    background-size: cover;
    width: auto;
}
.page-template-tpl-home .site {
    padding-top: 0;
}

.novine-online-arhiva .card {
    display: grid;
    margin-bottom: 15px;
    padding: 10px;
}
.novine-online-arhiva .card img {
    height: auto;
    max-height: 200px;
    width: auto;
    max-width: 100%;
}

/* footer */
footer.site-footer {
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid rgba(11, 26, 43, 0.04);
	display: flex;
	justify-content: space-between;
	gap: 20px;
	align-items: flex-start;
	flex-wrap: wrap;
}

footer .small {
	color: var(--muted);
	font-size: 13px
}
footer a {
    border-right: 1px solid #ddd;
    padding: 0 10px;
}
footer a:first-child {
    padding-left: 0;
}
footer a:last-child {
    border-right: 0;
}
footer .footer-menu {
    margin-top: 15px;
}

/* responsiveness */
@media (max-width:1000px) {
	.collections-grid {
		grid-template-columns: repeat(2, 1fr)
	}

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

	.hero {
		flex-direction: column
	}

	.hero .right {
		width: 100%
	}
}

@media (max-width:992px) {
    .navbar-nav {
        margin-left: 0;
    }
    .brand .logo {
        width: 200px;
    }
}

@media (max-width:640px) {
	.collections-grid {
		grid-template-columns: 1fr
	}

	.featured {
		grid-template-columns: 1fr
	}

	header.site-header {
		flex-direction: column;
		align-items: flex-start
	}
    .hero-intro {
        position: relative;
        top: -30px;
        font-size: 2rem;
    }

	.site {
		padding: 16px
	}

	.hero h1 {
		font-size: 24px
	}
    .owl-prev {
        left: -15px;
    }
    .owl-next {
        right: -15px;
    }
}

/* small accessibility focus */
a:focus,
button:focus,
input:focus {
	outline: 3px solid rgba(15, 124, 255, 0.14);
	outline-offset: 3px
}