/* Building Page Styles */
.building-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.building-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #f8faff 0%, #e3f0ff 100%);
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,123,255,0.12);
    border: 1px solid #e3eafc;
    transition: all 0.3s ease;
}

.building-header:hover {
    box-shadow: 0 12px 36px rgba(0,123,255,0.18);
    transform: translateY(-2px);
}

.building-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0,123,255,0.15);
}

.building-icon svg {
    width: 48px;
    height: 48px;
    transition: transform 0.3s ease;
}

.building-icon:hover svg {
    transform: scale(1.1);
}

.building-header h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin: 0;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.filter-section {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    border: 1px solid #eaeaea;
    transition: all 0.3s ease;
}

.filter-section:hover {
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.filter-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--text-color);
    font-size: 1.4rem;
    font-weight: 600;
    position: relative;
    padding-left: 16px;
}

.filter-section h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 3px;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-end;
}

.form-group {
    flex: 1;
    min-width: 170px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #dfe7f6;
    border-radius: 10px;
    font-size: 16px;
    background-color: #f9fbff;
    transition: all 0.3s ease;
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(0,123,255,0.15);
    background-color: #fff;
}

.form-control:hover {
    border-color: #b8c8e0;
}

.filter-button {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    font-size: 1rem;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 12px rgba(0,123,255,0.2);
    text-transform: uppercase;
    font-size: 0.9rem;
}

.filter-button:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,123,255,0.25);
}

.filter-button:active {
    transform: translateY(-1px);
}

.status-legend {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    justify-content: center;
    background: white;
    padding: 16px 24px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid #eaeaea;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.legend-color {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.legend-item:hover .legend-color {
    transform: scale(1.1);
}

.legend-color.vacant {
    background-color: var(--success);
    border: 2px solid rgba(255,255,255,0.6);
}

.legend-color.occupied {
    background-color: var(--danger);
    border: 2px solid rgba(255,255,255,0.6);
}

.floors-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-bottom: 40px;
}

.floor-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    border: 1px solid #eaeaea;
    transition: all 0.3s ease;
}

.floor-section:hover {
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.floor-title {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--text-color);
    font-size: 1.3rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 14px;
    border-bottom: 2px solid #eaeaea;
}

.floor-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--primary-color);
}

.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.room-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px 12px;
    border-radius: 12px;
    color: white;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.room-card::before {
    content: '';
    position: absolute;
    top: -10px;
    right: -10px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    z-index: 0;
}

.room-card::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: -15px;
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    z-index: 0;
}

.room-card:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.room-card.vacant {
    background: linear-gradient(135deg, var(--success) 0%, #28a745 100%);
}

.room-card.occupied {
    background: linear-gradient(135deg, var(--danger) 0%, #dc3545 100%);
}

.room-number {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.room-status {
    font-size: 0.9rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.navigation-buttons {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 6px 16px rgba(0,123,255,0.2);
    position: relative;
    overflow: hidden;
}

.back-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: all 0.6s ease;
}

.back-button:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,123,255,0.25);
}

.back-button:hover::before {
    left: 100%;
}

.no-rooms {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 16px;
    color: var(--text-light);
    font-style: italic;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.05);
    border: 1px dashed #ddd;
}

/* Responsive Adjustments */
@media (max-width: 1100px) {
    .building-page {
        padding: 20px 16px;
    }
}

@media (max-width: 900px) {
    .building-header {
        padding: 20px;
    }
    
    .building-icon svg {
        width: 40px;
        height: 40px;
    }
    
    .building-header h2 {
        font-size: 1.6rem;
    }
    
    .filter-form {
        gap: 16px;
    }
    
    .rooms-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .room-card {
        padding: 14px 10px;
    }
    
    .filter-section h3 {
        font-size: 1.3rem;
    }
    
    .status-legend {
        padding: 12px 20px;
    }
}

@media (max-width: 768px) {
    .building-header {
        flex-direction: column;
        text-align: center;
        padding: 16px;
        gap: 12px;
    }
    
    .filter-section {
        padding: 20px;
    }
    
    .filter-section h3 {
        text-align: center;
        padding-left: 0;
    }
    
    .filter-section h3::before {
        display: none;
    }
    
    .filter-form {
        flex-direction: column;
        gap: 16px;
    }
    
    .form-group {
        width: 100%;
    }
    
    .form-control {
        padding: 10px 14px;
    }
    
    .filter-button {
        width: 100%;
    }
    
    .floor-section {
        padding: 20px;
    }
    
    .floor-title {
        text-align: center;
        font-size: 1.2rem;
    }
    
    .floor-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .back-button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .building-header {
        padding: 14px;
    }
    
    .building-icon svg {
        width: 36px;
        height: 36px;
    }
    
    .building-header h2 {
        font-size: 1.4rem;
    }
    
    .rooms-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 12px;
    }
    
    .room-card {
        padding: 12px 8px;
    }
    
    .room-number {
        font-size: 1.1rem;
    }
    
    .status-legend {
        flex-direction: column;
        gap: 12px;
        align-items: center;
        padding: 14px;
        border-radius: 16px;
    }
}

@media (max-width: 480px) {
    .rooms-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .room-card {
        padding: 10px 6px;
    }
    
    .room-number {
        font-size: 1rem;
        margin-bottom: 4px;
    }
    
    .room-status {
        font-size: 0.75rem;
    }
}

@media (max-width: 350px) {
    .rooms-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
