/* Studios Grid Layout - Simple Float-based Grid */

/* Reset and base styles */
.studios-grid {
    list-style: none;
    margin: 0 -15px;
    padding: 0;
}

.studios-grid::after {
    content: "";
    display: table;
    clear: both;
}

/* Card base styles */
.studio-card {
    float: left;
    padding: 0 15px;
    margin-bottom: 30px;
    box-sizing: border-box;
    min-height: 400px;
}

.studio-card a {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Responsive grid */
@media (min-width: 1200px) {
    .studio-card {
        width: 33.333%;
    }

    /* Clear every 3rd item to prevent float issues */
    .studio-card:nth-child(3n+1) {
        clear: left;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .studio-card {
        width: 50%;
    }

    /* Clear every 2nd item */
    .studio-card:nth-child(2n+1) {
        clear: left;
    }
}

@media (max-width: 767px) {
    .studio-card {
        width: 100%;
    }
}

/* Image container */
.studio-card__image {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    background: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
}

.studio-card__image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Content area */
.studio-card__content {
    padding-top: 10px;
    height: 90px;
    overflow: hidden;
}

.studio-card__title {
    font-size: 18px;
    font-weight: bold;
    color: #111;
    margin: 0 0 8px 0;
    line-height: 1.3;
    height: 24px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.studio-card__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    height: 20px;
}

.studio-card__rating {
    display: inline-block;
    padding: 0 5px;
    height: 20px;
    line-height: 20px;
    border-radius: 2px;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

/* Rating colors based on score */
.studio-card__rating--5 {
    background: #28a745; /* Green - Excellent */
}

.studio-card__rating--4 {
    background: #a7d600; /* Light green - Very good */
}

.studio-card__rating--3 {
    background: #ffc107; /* Yellow - Good */
}

.studio-card__rating--2 {
    background: #fd7e14; /* Orange - Fair */
}

.studio-card__rating--1 {
    background: #dc3545; /* Red - Poor */
}

.studio-card__rating--0 {
    background: #6c757d; /* Gray - No rating */
}

.studio-card__price {
    font-size: 14px;
    color: #666;
}

.studio-card__address {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    height: 38px;
    overflow: hidden;
}

.studio-card__address address {
    margin: 0;
    font-style: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
