@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

.nav ul li a{
    text-decoration: none;
}

footer{
    bottom: -100;
}

.Services{
    margin-top: 10em;
}

.SearchBarContainer {
    position: absolute;
    top: 24%; /* Adjust this to position it correctly under the title */
    left: 49%;
    transform: translateX(-50%);
    width: 300px; /* Adjust width as needed */
}

.searchBar {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 2px solid #ccc;
    text-align: center;
    font-family: 'Roboto', sans-serif;
    box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.1); /* Optional: adds slight inner shadow */
}

.searchBar::placeholder {
    color: rgba(0, 0, 0, 0.3); /* Optional: placeholder text color */
    font-style: italic; /* Optional: placeholder text style */
}

.searchBar:focus {
    border-color: red; /* Change border color on focus */
    outline: none; /* Remove default outline */
}

.grid-container {
    display: grid;
    margin-top: 20em;
    margin-left: 6.5em;
    grid-template-columns: repeat(4, 1fr); /* Change to 3 columns per row */
    gap: 10px;
    row-gap: 23em;
    position: relative;
}

.grid-item {
    position: relative;
    width: 20em; /* Adjust to take appropriate width */
    height: 4em;
    padding: 10px 20px;
    font-size: 16px;
    font-family: Roboto;    
    cursor: pointer;
    z-index: 1;
    display: flex;
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    background-color: #f0f0f0; /* Moved from ::after to here */
    border: 2px solid;
    border-color: #ffffff;
    transition: 0.3s;
    text-transform: uppercase;
}

.grid-item:hover{
    background-color: rgb(204, 23, 23);
    color: white;
    transition: 0.3s;
}

.grid-item:before {
    content: '';
    position: absolute;
    top: 100%; /* Place it right below the button */
    left: 50%;
    transform: translateX(-50%);
    width: 100%; /* Adjust width as needed */
    height: 300px; /* Adjust height as needed */
    background-position: center;
    background-repeat: no-repeat;
    background-size: auto 100%;
}

.highlight {
    background-color: yellow; /* You can choose any color you prefer */
    transition: background-color 0.5s ease; /* Smooth transition for the highlight */
}

#i1:before {
    background-image: url('../images/PRODUKTI/pechatna\ reklama.jpg'); /* Replace with actual image path */
}

#i2:before {
    background-image: url('../images/PRODUKTI/pokani.jpg'); /* Replace with actual image path */
}

#i3:before {
    background-image: url('../images/PRODUKTI/rolbanner.jpg'); /* Replace with actual image path */
}

#i4:before {
    background-image: url('../images/PRODUKTI/hotel.jpg'); /* Replace with actual image path */
}

#i5:before {
    background-image: url('../images/PRODUKTI/menu.jpg'); /* Replace with actual image path */
}

#i6:before {
    background-image: url('../images/PRODUKTI/plaketi.jpg'); /* Replace with actual image path */
}

#i7:before{
    background-image: url('../images/PRODUKTI/kalendari.jpg'); /* Replace with actual image path */
}
#i8:before{
    background-image: url('../images/PRODUKTI/vn\ reklama.jpg'); /* Replace with actual image path */
}
#i9:before{
    background-image: url('../images/PRODUKTI/suvenir.jpg'); /* Replace with actual image path */
}
#i10:before{
    background-image: url('../images/PRODUKTI/tekstil.jpg'); /* Replace with actual image path */
}
#i11:before{
    background-image: url('../images/PRODUKTI/svatbeni\ artikuli.jpg'); /* Replace with actual image path */
}
#i12:before{
    background-image: url('../images/PRODUKTI/stoperi.jpg'); /* Replace with actual image path */
}
#i13:before{
    background-image: url('../images/PRODUKTI/pleksiglas.jpg'); /* Replace with actual image path */
}
#i14:before{
    background-image: url('../images/PRODUKTI/pvc\ karti.jpg'); /* Replace with actual image path */
}
#i15:before{
    background-image: url('../images/PRODUKTI/opakovki.jpg'); /* Replace with actual image path */
}
#i16:before{
    background-image: url('../images/PRODUKTI/tabeli\ za\ baseini.jpg'); /* Replace with actual image path */
}
#i17:before{
    background-image: url('../images/PRODUKTI/tapeti.jpg'); /* Replace with actual image path */
}
#i18:before{
    background-image: url('../images/PRODUKTI/znamena.jpg'); /* Replace with actual image path */
}
#i19:before{
    background-image: url('../images/PRODUKTI/pana.jpg'); /* Replace with actual image path */
}

#i1:before,
#i2:before,
#i3:before,
#i4:before,
#i5:before,
#i6:before,
#i7:before,
#i8:before,
#i9:before,
#i10:before,
#i11:before,
#i12:before,
#i13:before,
#i14:before,
#i15:before,
#i16:before,
#i17:before,
#i18:before,
#i19:before {
    transition: 0.3s;
}

#i1:hover:before,
#i2:hover:before,
#i3:hover:before,
#i4:hover:before,
#i5:hover:before,
#i6:hover:before,
#i7:hover:before,
#i8:hover:before,
#i9:hover:before,
#i10:hover:before,
#i11:hover:before,
#i12:hover:before,
#i13:hover:before,
#i14:hover:before,
#i15:hover:before,
#i16:hover:before,
#i17:hover:before,
#i18:hover:before,
#i19:hover:before {
    opacity: 0.7;
    background-size: auto 107%;
    transition: 0.3s;
}

/* For screens smaller than or equal to 1280px */
/* @media (max-width: 1280px) {
    .grid-container {
        margin: 2em auto;
        grid-template-columns: repeat(3, 1fr); 3 columns per row 
        row-gap: 18em;
    }
    .grid-item {
        font-size: 14px;
        width: 80%;
        padding: 10px 10px;
    }
    .grid-item:before {
        top: 100%;
        left: 50%;
        width: 100%;
        height: 280px;
        transform: translateX(-50%);
    }
} */
@media (max-width: 1280px) {
    .grid-container{
        margin-left: 3.2em;
        row-gap: 18em;
    }
    .grid-item{
        font-size: 14px;
        width: 80%;
        padding: 10 10;
    }
    .grid-item:before {
        top: 100%; /* Place it right below the button */
        left: 50%;
        width: 100%; /* Adjust width as needed */
        height: 280px; /* Adjust height as needed */
    }
    .SearchBarContainer{
        top: 38%;
    }
}
/* For screens smaller than or equal to 1100px */
@media (max-width: 1100px) {
    .grid-container {
        margin: 20em auto;
        grid-template-columns: repeat(2, 1fr); /* 2 columns per row */
        row-gap: 18em;
        padding-left: 10em;
    }
    .grid-item {
        font-size: 12px;
        width: 57%;
    }
    .grid-item:before {
        height: 260px;
    }
}

/* For screens smaller than or equal to 768px */
@media (max-width: 768px) {
    .grid-container {
        margin: 20em auto;
        grid-template-columns: 1fr; /* 1 column per row */
        row-gap: 18em;
    }
    .grid-item {
        font-size: 12px;
        width: 80%;
    }
    .grid-item:before {
        height: 240px;
    }
}

/* For screens smaller than or equal to 640px */
@media (max-width: 640px) {
    .grid-container {
        margin: 18em auto;
        grid-template-columns: 1fr; /* 1 column per row */
        row-gap: 15em;
    }
    .grid-item {
        font-size: 12px;
        width: 80%;
    }
    .grid-item:before {
        height: 220px;
    }
}

/* For screens smaller than or equal to 430px */
@media (max-width: 430px) {
    .grid-container {
        top:5em;
        right: 14%;
        grid-template-columns: 1fr; /* 1 column per row */
        row-gap: 16em;
    }
    .grid-item {
        font-size: 10px;
        width: 100%;
    }
    .grid-item:before {
        height: 200px;
    }
}
