.labs-page {
    padding: 60px 0;
}

.labs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* CARD */
.lab-card {
    background: #fff;
    border: 1px solid #e3e3e3;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.lab-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(127, 36, 30, 0.03), transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

.lab-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(127, 36, 30, 0.15);
    border-color: #d7a84e;
    z-index: 50;
    overflow: visible;
}

.lab-card:hover::before {
    left: 100%;
}

/* BANNER */
.lab-banner {
    height: 180px;
    overflow: hidden;
    position: relative;
    background: #f5f5f5;
}

.lab-banner img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    margin: auto;
}

.lab-card:hover .lab-banner img {
    transform: scale(1.1);
}

.lab-card:hover .lab-banner-fallback {
    transform: scale(1.05);
}

/* Gradient fallback */
.lab-banner-fallback {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;

    background: linear-gradient(135deg,
            #7f241e 0%,
            #a63a2e 60%,
            #d7a84e 120%);

    color: #fff;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* subtle overlay element */
.lab-banner-fallback::after {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    top: -30px;
    right: -30px;
}

/* BODY */
.lab-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
}

/* TITLE */
.lab-title {
    font-size: 18px;
    font-weight: 500;
    color: #7f241e;
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.lab-card:hover .lab-title {
    color: #a63a2e;
}

.lab-title span {
    font-size: 14px;
    color: #666;
}

/* Research Scholars Count */
.lab-scholars {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #555;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-left: 3px solid #d7a84e;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.lab-card:hover .lab-scholars {
    background: #fff9f0;
    border-left-color: #7f241e;
    transform: translateX(5px);
}

.lab-scholars svg {
    color: #7f241e;
    flex-shrink: 0;
}

.lab-scholars strong {
    color: #7f241e;
    font-size: 16px;
    font-weight: 600;
}

/* ROOM NUMBER */
.lab-room {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #fff9f0 0%, #ffffff 100%);
    border-left: 3px solid #7f241e;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.lab-card:hover .lab-room {
    background: linear-gradient(135deg, #fff3e0 0%, #fff9f0 100%);
    border-left-color: #d7a84e;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(127, 36, 30, 0.1);
}

.lab-room svg {
    color: #7f241e;
    flex-shrink: 0;
}

.lab-room span {
    font-weight: 500;
    color: #7f241e;
}

/* RESEARCH TAGS */
.lab-tags {
    margin-bottom: 12px;
}

.lab-tags span {
    display: inline-block;
    font-size: 12px;
    padding: 5px 14px;
    margin: 2px 4px 2px 0;
    border: 1px solid #d7a84e;
    color: #7f241e;
    background: #fff;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.lab-card:hover .lab-tags span {
    background: #fff9f0;
    border-color: #a63a2e;
    transform: translateY(-2px);
}

.lab-tags span:nth-child(1) {
    transition-delay: 0.05s;
}

.lab-tags span:nth-child(2) {
    transition-delay: 0.1s;
}

.lab-tags span:nth-child(3) {
    transition-delay: 0.15s;
}

/* PI */
.lab-pi {
    font-size: 15px;
    color: #444;
    margin-bottom: 15px;
}

.lab-pi strong {
    color: #7f241e;
    font-size: 16px;
}

/* LAB URL */
.lab-url {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e3e3e3;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.lab-url::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(215, 168, 78, 0.1), transparent);
    transition: left 0.5s ease;
}

.lab-card:hover .lab-url {
    background: linear-gradient(135deg, #fff9f0 0%, #fff 100%);
    border-color: #d7a84e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(127, 36, 30, 0.1);
}

.lab-card:hover .lab-url::before {
    left: 100%;
}

.lab-url svg {
    color: #7f241e;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.lab-card:hover .lab-url svg {
    transform: rotate(15deg) scale(1.1);
}

.lab-url a {
    color: #7f241e;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    word-break: break-all;
    line-height: 1.4;
}

.lab-url a:hover {
    color: #d7a84e;
    text-decoration: underline;
}