@import url(style.css);

*{
    scroll-behavior: smooth;
}

main {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Kartice se raspoređuju u istim kolonama */
    gap: 20px;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    justify-items: center; /* Poravnava kartice u centru */
    align-items: start; /* Poravnava kartice prema vrhu */
}

.card {
    background-color: white;
    display: flex;
    flex-direction: column;
    color: black;
    padding: 0;
    height: fit-content;
    z-index: 1;
    flex-grow: 1;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease-in-out;
    width: 100%; /* Osigurava da kartica zauzima celu širinu raspoloživog prostora */
}

.card:hover {
    transform: translateY(-10px); /* Efekat pri hoveru */
}

.image {
    position: relative;
    width: 100%;
    height: 200px; /* Fiksna visina slike */
    text-align: center;
    overflow: hidden;
}

.image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease-in-out;
}

/* Reduce image opacity on hover */
.image:hover img {
    opacity: 0.3;
}

/* Make the overlay a clickable link */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    text-decoration: none;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    z-index: 2;
}

.overlay a {
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image:hover .overlay {
    opacity: 1;
}

.caption {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.karakteristika {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    padding: 10px 0;
    font-size: 0.85rem;
}

.filter-form {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    gap: 10px;
    flex-wrap: wrap; /* Omogućava da filteri pređu u novi red kada je ekran manji */
}

.filter-box {
    width: 150px;
    height: 50px;
    display: flex;
    flex-direction: column;
}

.filter-form input,
.filter-form select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}

.filter-form button {
    outline: none;
    border: 1px solid #ddd;
    font-family: 'Montserrat';
    height: 40px;
    width: 120px;
    background-color: #007bff;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.filter-form button:hover {
    background-color: #0056b3;
}

.filter-form select,
.filter-form input {
    font-size: 0.9rem;
}

.info{
    font-size: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding-inline: 40px;
}

/* Slideshow container styling */
.slideshow-container {
    max-width: 1000px;
    position: relative;
    margin: auto;
    width: 100%;
    height: 100%;
}

/* Hide the images by default */
.mySlides {
    display: none;
}

/* Next & previous buttons */
.prev,
.next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.5);
    transform: translateY(-50%);
}

.prev {
    left: 0;
    border-radius: 3px 0 0 3px;
}

.next {
    right: 0;
    border-radius: 0 3px 3px 0;
}

.prev:hover,
.next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.numbertext {
    color: #f2f2f2;
    font-size: 12px;
    padding: 8px 12px;
    position: absolute;
    top: 0;
    left: 10px;
    z-index: 10;
}

.dot {
    cursor: pointer;
    height: 15px;
    width: 15px;
    margin: 0 2px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.active,
.dot:hover {
    background-color: #717171;
}

/* Fading animation */
.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from {
        opacity: .4
    }
    to {
        opacity: 1
    }
}
