@media screen and (min-width:481px) and (max-width:768px) { /*tablet*/
    .polje-firme {
        grid-area: main;
        display: grid;
        grid-auto-flow: dense;
        justify-items: center; 
        align-items: center;
        grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
        grid-auto-rows: 19vw;
        grid-auto-columns: 19vw;
        padding: 10px 2px 10px 2px;
        gap: 5px;
    }
    
    .firma {
        display: block;
        width: 100%;
        height: 100%;
        inset-inline: 0px;
        margin: 0px;
        padding: 0px;
        position: relative;
        align-items: center;
        border-radius: 1px;
        outline-offset: 0px;
        opacity: 90%;
        /* aspect-ratio: 1 / 1; */
    }
    
    .vel2 {
        grid-column-end: span 2;
        height: 100%;
    }
    .vel3 {
        grid-row-end: span 2;
        height: 100%;
    }
    .vel4 {
        grid-row-end: span 2;
        grid-column-end: span 2;
        height: 100%;
    }
    
    .promo-raspored:nth-child(2){
        grid-row-end: span 2;
        height: 100%;
        aspect-ratio: unset;
    }
    
    .promo-raspored:nth-child(12){
        grid-row-end: span 2;
        grid-column-end: span 2;
        height: 100%;
    }
    
    .promo-raspored:nth-child(17){
        grid-column-end: span 2;
        height: 100%;
        aspect-ratio: unset;
    }
    
    .firma:hover {
        box-shadow: -5px -2px 8px 0px rgba(0, 0, 0, 0.5),
                    0px -7px 8px 0px rgba(0, 0, 0, 0.5),
                    5px -2px 8px 0px rgba(0, 0, 0, 0.5);
        background-color: white;
        transform: scale(1.04);
        transition: transform 0.3s ease,
                    outline .3s ease;
        z-index: 3;
        outline: 3px solid white;
        outline-offset: 0px;
        opacity: 100%;
    }
    
    .firma img {
        width: 100%;
        height: 100%;
    }
    
    .info-box-dugme {
        position: absolute;
        display: block;
        width: 28px;
        height: 28px;
        bottom: 0px;
        text-align: center;
        right: 0px;
        padding-top: 4px;
        padding-bottom: 0px;
        padding-left: 3px;
    }
    .info-box-dugme span {
        font-family: 'Times New Roman', Times, serif;
        font-style: italic;
        font-size: small;
        font-weight: 900;
        border: 0.5px solid silver;
        padding: 0px 5px;
        border-radius: 20px;
        background-color: rgb(240, 240, 240);
        color: rgb(90, 90, 90);
        cursor: pointer;
    } 
    
    .info-box {
        visibility: hidden;
        position: absolute;
        display: block;
        margin:0px;
        width: calc(100% + 5px);
        height: 0px;
        transition-property: height;
        transition-duration: 700ms;
        background-color: white;
        padding-left: 5px;
        padding-right: 5px;
        box-shadow: -5px 2px 8px 0px rgba(0, 0, 0, 0.5),
                    0px 7px 8px 0px rgba(0, 0, 0, 0.5),
                    5px 2px 8px 0px rgba(0, 0, 0, 0.5);
        top: 100%;
        left: -2.5px;
        z-index: 4;
        border-radius: 0px 0px 3px 3px;
        overflow: hidden;
    }
    .prikazi-info-box {
        visibility: visible;
        height: 160px;
    }
    .naziv-firme {
        font-weight: bold;
        font-size: 16px;
        margin-bottom: 10px;
    }
    .adresa {
        font-weight: normal;
        font-size: 14px;
    }
    .telefon_k {
        font-weight: bold;
        font-size: 16px;
        margin-top: 10px;
    }
    .kontakt-opcije {
        display: inline-block;
        list-style: none;
        position: absolute;
        bottom: 0px;
        right: 0px;
        margin: 0px;
        margin-left: 1px;
        padding: 2px;
        cursor: pointer;
        width: 98%;
    }
    .kontakt-opcije a {
        color: inherit;
    }
    .k-o-maska{
        position: absolute;
        bottom: 0px;
        right: 0px;
        display: block;
        width: 80px;
        height: 32px;
        background-image: linear-gradient(to right, #ff7b00,orangered,green,lightskyblue,darkblue,darkred, purple);
        text-align: center;
        color: black;
        font-size: 26px;
        border-radius: 5px;
        border: 2px solid black;
    }
    .kontakt-opcije:hover .k-o-maska {
        width: 0px;
        display: none;
    }
    .kontakt-opcije li {
        color: transparent;
        padding: 0px;
        margin: 0px;
        float: right;
        width: 3px;
        text-align: center;
        background-color: #cacaca;
        transition-property: all;
        transition-duration: .8s;
        font-size: 22px;
    }
    .kontakt-opcije:hover li {
        width: 33%;
        height: 30px;
        color: white;
    }
    }
    
    @media screen and (min-width:769px){ /*računar*/
    .polje-firme {
        grid-area: main;
        display: grid;
        grid-auto-flow: dense;
        justify-items: center; 
        align-items: center;
        grid-template-columns:repeat(5, 173px);
        grid-auto-rows:173px;
        grid-auto-columns: 173px;
        padding: 2px 5px 20px 0px;
        gap: 5px;	
    }
    .firma {
        display: block;
        width: 100%;
        height: 100%;
        inset-inline: 0px;
        margin: 0px;
        padding: 0px;
        position: relative;
        align-items: center;
        border-radius: 1px;
        outline-offset: 0px;
        opacity: 90%;
    }
    .vel2 {
        grid-column-end: span 2;
        height: 100%;
    }
    .vel3 {
        grid-row-end: span 2;
        height: 100%;
    }
    .vel4 {
        grid-row-end: span 2;
        grid-column-end: span 2;
        height: 100%;
    }
    .promo-raspored:nth-child(2) { /*2x vertikalno*/
        grid-row-end: span 2;
        height: 100%;
    }
    
    .promo-raspored:nth-child(17){ /*2x horizontalno*/
        grid-column-end: span 2;
        height: 100%;
    }
    
    .promo-raspored:nth-child(12) { /*veličina 2x2*/
        grid-row-end: span 2;
        grid-column-end: span 2;
        height: 100%;
    }
    
    .firma:hover {
        box-shadow: -5px -2px 8px 0px rgba(0, 0, 0, 0.5),
                        0px -7px 8px 0px rgba(0, 0, 0, 0.5),
                        5px -2px 8px 0px rgba(0, 0, 0, 0.5);
        background-color: white;
        transform: scale(1.1);
        transition: all 0.3s ease;
        z-index: 3;
        outline: 3px solid white;
        outline-offset: 0px;
        opacity: 100%;
    }
    
    .firma img {
        width: 100%;
        height: 100%;
    }
    
    .info-box-dugme {
        position: absolute;
        display: block;
        width: 26px;
        height: 26px;
        bottom: 0px;
        text-align: center;
        right: 0px;
        padding-top: 2px;
        padding-bottom: 0px;
        padding-left: 3px;
    }
    .info-box-dugme span {
        font-family: 'Times New Roman', Times, serif;
        font-style: italic;
        font-size: small;
        font-weight: 900;
        border: 0.5px solid silver;
        padding: 0px 5px;
        border-radius: 20px;
        background-color: rgb(240, 240, 240);
        color: rgb(90, 90, 90);
        cursor: pointer;
    } 
    
    .info-box {
        visibility: hidden;
        position: absolute;
        display: block;
        margin:0px;
        width: calc(100% + 5.5px);
        height: 0px;
        transition-property: height;
        transition-duration: 1s;
        background-color: white;
        padding-left: 2px;
        padding-right: 2px;
        box-shadow: -5px 2px 8px 0px rgba(0, 0, 0, 0.5),
                        0px 7px 8px 0px rgba(0, 0, 0, 0.5),
                        5px 2px 8px 0px rgba(0, 0, 0, 0.5);
        top: 100%;
        left: -3px;
        z-index: 4;
        border-radius: 0px 0px 1px 1px;
        overflow: hidden;
    }
    
    .prikazi-info-box {
        visibility: visible;
        height: 160px;
    }
    
    .naziv-firme {
        font-weight: bold;
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .adresa {
        font-weight: normal;
        font-size: 14px;
    }
    
    .telefon_k {
        font-weight: bold;
        font-size: 16px;
        margin-top: 10px;
    }
    
    .kontakt-opcije {
        display: inline-block;
        list-style: none;
        position: absolute;
        bottom: 1px;
        right: 1px;
        margin: 0px;
        padding: 1px;
        cursor: pointer;
    }
    .kontakt-opcije a {
        color: inherit;
    }
    .k-o-maska {
        position: absolute;
        bottom: 1px;
        right: 1px;
        display: block;
        width: 80px;
        height: 30px;
        background-color: #ff7b0000;
    }
    .k-o-maska i {
        display: none;
    }
    .kontakt-opcije:hover .k-o-maska {
        display: none;
    }
    .kontakt-opcije li {
        display: block;
        color: transparent;
        padding: 3px;
        margin: 0px;
        float: left;
        width: 8px;
        text-align: center;
        background-color: #cacaca;
        transition-property: width;
        transition-duration: 1s;
    }
    .kontakt-opcije:hover li {
        width: 34px;
        color: white;
    }
    }