/* ========== Start topics style ==================================================> */

.units-container {
    width: 100%;
    list-style: none;
} 

.units-container ul {
    list-style: none;
    display: -webkit-box;      
    display: -ms-flexbox;      
    display: flex;             
    -webkit-flex-direction: row; 
    flex-direction: row;
    -webkit-flex-wrap: wrap;   
    -ms-flex-wrap: wrap;   
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 10px;
} 

.units-container a {
    text-decoration: none;
} 

.group-line {
    border: 1px solid rgb(177, 177, 177);
    border-radius: 10px;
}

.units-list {
    display: -webkit-box;     
    display: -ms-flexbox;      
    display: flex;             
    -webkit-flex-direction: row;
    flex-direction: row;
    -webkit-flex-wrap: wrap;   
    -ms-flex-wrap: wrap;      
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
    margin: 0;
}

/* -------------------------------- */
.unit-card {
    position: relative; 
    display: -webkit-box;    
    display: -ms-flexbox;   
    display: flex;            
    -webkit-flex-direction: column; 
    -ms-flex-direction: column;    
    flex-direction: column;
    height: 350px;
    width: 300px;
    border: 1px solid lightgray;
    border-radius: 20px;
    border-width: 2px;
    border-style: groove;
    box-shadow: 1px 3px 8px 2px rgba(177, 177, 177, 0.424);
    background-color: aliceblue;
    margin: 15px 10px;
    transition: all 0.25s ease;
    overflow: hidden; 
}

.unit-card:hover {
    box-shadow: 2px 2px 5px 5px rgba(109, 109, 109, 0.424);
	.unit-premium-badge {
		background-color: #ffc64b11;
        opacity: 0.2;
	}
	.unit-free-badge {
		background-color: #9dff3b10;
        opacity: 0.2;
	}
}

/* Anchor tag containing the image */
.unit-card a {
    text-decoration: none;
    height: 100%;
    -webkit-box-flex: 1;       /* OLD - iOS 6-, Safari 3.1-6 */
    -ms-flex: 1;               /* IE 10 */
    flex: 1;
}

/* Image inside the card */
.unit-card a img {
    width: 100%;
    height: auto;
    max-height: 100%; 
    object-fit: cover;
    border-radius: 0 0 18px 18px;
}

/* ------------------------------ */

.unit-card-title {
    padding: 15px 3px 3px 25px;
    font-size: 0.95rem;
    background-color: #505050e5;
    color: #eee;
    border-radius: 20px 20px 0 0;
    min-height: 3.5rem;
    max-height: 35%;

    /* Flexbox properties for centering */
    display: flex;
    justify-content: center;  
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.unitcard-footer{
    font-size: 1rem;
    margin: 0.5rem 0 0 0;
    padding: 2px;
    background-color: #505050e5;
    color: #eee;
    border-radius: 0 0 0 20px;
    text-align: center;
}

.unitcard-footer a{
    text-decoration: none;
    color: #eee;
}

/* Responsive units ------------------- */

/* Small screens, laptops. */
@media (max-width:1024px) {
    
}

/* iPads, Tablets. */
@media (max-width: 768px){
    

}

/* Mobile devices */
@media (max-width: 480px){
	.unit-card{
		min-width: 200px;
		height: 325px;
	}
}

/* <========== units style ================================================== */

.unit-premium-badge,
.unit-free-badge {
    position: absolute;
    top: 0;
    left: 0;
	height: 1.3rem;
    padding: 5px 7px;
    font-size: 0.755rem;
    font-weight: bold;
    min-width: 80px;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    border-radius: 3px;
    z-index: 1;
    text-transform: uppercase;
    -webkit-user-select: none; 
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.unit-premium-badge {
    background-color: #d68100; 
}

.unit-free-badge {
    background-color: #4caf50;
}

.unit-premium-badge:hover,
.unit-free-badge:hover {
    opacity: 0.5;
}
